diff options
Diffstat (limited to '')
-rw-r--r-- | src/confpair.h | 35 |
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 | */ | ||
9 | template<class T> | ||
10 | class ConfPair | ||
11 | { | ||
12 | public: | ||
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 | |||
30 | private: | ||
31 | std::string sName; | ||
32 | T tValue; | ||
33 | }; | ||
34 | |||
35 | #endif | ||