summaryrefslogtreecommitdiff
path: root/project2/common/presenterCache.cpp
blob: 6ca366117a62a02bb2dc77f44d4796c0acc56658 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#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::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);