aboutsummaryrefslogtreecommitdiff
path: root/src/confpair.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-11-21 05:17:23 +0000
committerMike Buland <eichlan@xagasoft.com>2006-11-21 05:17:23 +0000
commit737b1aee54da9ff45a4fb6eb7e636eff9019128e (patch)
tree927462af3c8301f1ccac44ed7a5ee8c52dc77b29 /src/confpair.h
parent76e04d54d648395ea5e9884882350f3e1a39a086 (diff)
downloadlibbu++-737b1aee54da9ff45a4fb6eb7e636eff9019128e.tar.gz
libbu++-737b1aee54da9ff45a4fb6eb7e636eff9019128e.tar.bz2
libbu++-737b1aee54da9ff45a4fb6eb7e636eff9019128e.tar.xz
libbu++-737b1aee54da9ff45a4fb6eb7e636eff9019128e.zip
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.
Diffstat (limited to '')
-rw-r--r--src/confpair.h35
1 files changed, 35 insertions, 0 deletions
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 @@
1#ifndef CONF_PAIR_H
2#define CONF_PAIR_H
3
4#include <stdint.h>
5#include <string>
6/**
7 *
8 */
9template<class T>
10class ConfPair
11{
12public:
13 ConfPair( const std::string &sName ) :
14 sName( sName )
15 { }
16
17 virtual ~ConfPair()
18 { }
19
20 T &value()
21 {
22 return tValue;
23 }
24
25 const std::string &name()
26 {
27 return sName;
28 }
29
30private:
31 std::string sName;
32 T tValue;
33};
34
35#endif