From 737b1aee54da9ff45a4fb6eb7e636eff9019128e Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 21 Nov 2006 05:17:23 +0000 Subject: Adding a new config-system that should be easy to make derive from xml. Or just used in general. The base unit, the confpair is a template, so if things go right, you should be able to use this to store any kind of config data in a nice and easily accessable way. --- src/confpair.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/confpair.h (limited to 'src/confpair.h') diff --git a/src/confpair.h b/src/confpair.h new file mode 100644 index 0000000..5be33c8 --- /dev/null +++ b/src/confpair.h @@ -0,0 +1,35 @@ +#ifndef CONF_PAIR_H +#define CONF_PAIR_H + +#include +#include +/** + * + */ +template +class ConfPair +{ +public: + ConfPair( const std::string &sName ) : + sName( sName ) + { } + + virtual ~ConfPair() + { } + + T &value() + { + return tValue; + } + + const std::string &name() + { + return sName; + } + +private: + std::string sName; + T tValue; +}; + +#endif -- cgit v1.2.3