summaryrefslogtreecommitdiff
path: root/icetray/unittests/testOptions.cpp
blob: b47e8a47b017fd60d4cc1f92e440e17e778e9741 (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 "testOptions.h"

TestOptions::TestOptions() :
	IceTray::Options("Test options"),
	testInt(0)
{
}

ICETRAY_OPTIONS(TestOptions,
		("testInt", boost::program_options::value(&testInt), "testInt")
		("testString", boost::program_options::value(&testString)->default_value("some string"), "testString")
		("vec", boost::program_options::value(&testVec), "vector")
);

class TestOptionsInline : public IceTray::Options {
	public:
		TestOptionsInline() :
			IceTray::Options("Test options inline"),
			testInt(0)
		{
		}

		ICETRAY_OPTIONS_INLINE(
				("testIntInline", boost::program_options::value(&testInt), "testInt")
		);

		int testInt;
};
FACTORY(TestOptionsInline, IceTray::OptionsFactory);