summaryrefslogtreecommitdiff
path: root/project2/ut/testOptionsSource.cpp
blob: 59dc8822968b163f454aa1168a21df61cddd65af (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 "testOptionsSource.h"

const Glib::ustring testPlatform;

TestOptionsSource::TestOptionsSource(const Opts & o) :
	opts(o)
{
}

void
TestOptionsSource::loadInto(const ConfigConsumer & consume, const Options::CurrentPlatform & platform) const
{
	BOOST_FOREACH(const auto & opt, opts) {
		consume(opt.first, testPlatform, opt.second, platform);
	}
}

bool
TestOptionsSource::needReload() const
{
	return true;
}

void
TestOptionsSource::LoadTestOptions(const Opts & o)
{
	OptionsSource::loadSource(boost::bind<const Glib::ustring &>([]{ return testPlatform; }),
			OptionsSourcePtr(new TestOptionsSource(o)));	
}