summaryrefslogtreecommitdiff
path: root/project2/variables-modconfig.cpp
blob: 88fddd4f906670a7da1474a71d5b1d343a7a4cbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "variables.h"
#include "xmlObjectLoader.h"
#include "xmlStorage.h"
#include "appEngine.h"

/// Variable implementation to access platform configuration values
class VariableConfig : public VariableImplDyn {
	public:
		VariableConfig(const xmlpp::Element * e) :
			VariableImplDyn(e),
			name(e->get_attribute_value("name"))
		{
		}
		VariableType value() const
		{
			return ApplicationEngine::getCurrent()->getCurrentConfig()->getValue(name);
		}
	private:
		const Glib::ustring name;
};
DECLARE_COMPONENT_LOADER("config", VariableConfig, VariableLoader);