blob: 0ad540c8358da2a1b2c7de7a46a7b196c4268cf2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include "document_cache.h"
#include <stdexcept>
namespace InputXSLT {
DomDocumentCache::DomDocumentCache():
write_mutex_(),
cache_() { }
xalan::XalanDocument* DomDocumentCache::create(xercesc::DOMDocument* document) {
std::lock_guard<std::mutex> guard(this->write_mutex_);
this->cache_.emplace(new item(document));
return this->cache_.top()->getXalanDocument();
}
}
|