summaryrefslogtreecommitdiff
path: root/project2/common/presenterCache.cpp
blob: b1b2c947af26c91e2d9142c3c08ec841b6258411 (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
#include "presenterCache.h"
#include <factory.impl.h>

PresenterCache::PresenterCache(ScriptNodePtr s) :
	SourceObject(s),
	IHaveParameters(s),
	encoding(s->value("encoding", "utf-8", NULL).as<std::string>())
{
}

void
PresenterCache::flushCache()
{
}

INSTANTIATEFACTORY(PresenterCache, std::shared_ptr<const ScriptNode>);

class WriteToCache : public TransformImpl<WritableContent, PresenterCache> {
	public:
		void transform(const WritableContent * wc, PresenterCache * pc, ExecContext * ec) const {
			wc->writeTo(pc->writeCache(wc->getContentType(ec), pc->encoding, ec), pc->encoding, ec);
		}
};
DECLARE_TRANSFORM(WriteToCache);