blob: d5897ad0bb9eab3cb795df093b7d92af2e692ee2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#include "presenterCache.h"
#include <boost/foreach.hpp>
PresenterCache::PresenterCache(ScriptNodePtr s) :
SourceObject(s),
IHaveParameters(s),
encoding(s->value("encoding", "utf-8").as<std::string>())
{
}
void
PresenterCache::applyKeys(const boost::function2<void, const std::string &, const VariableType &> & f) const
{
BOOST_FOREACH(const IHaveParameters::Parameters::value_type & p, allParameters()) {
f(p.first, p.second);
}
}
void
PresenterCache::flushCache()
{
}
class WriteToCache : public TransformImpl<WritableContent, PresenterCache> {
public:
void transform(const WritableContent * wc, PresenterCache * pc) const {
wc->writeTo(pc->writeCache(wc->getContentType(), pc->encoding), pc->encoding);
}
};
DECLARE_TRANSFORM(WriteToCache);
|