00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef SYMBOLENT_H
00020 #define SYMBOLENT_H
00021
00022 #include <dtoolbase.h>
00023
00024 #include "config_setup.h"
00025 #include "pvector.h"
00026
00027 namespace Config {
00028
00029 class EXPCL_DTOOLCONFIG SymbolEnt {
00030 public:
00031 enum SymbolEntSrc { ConfigFile, Environment, CommandEnv, Commandline,
00032 Other, Invalid };
00033 private:
00034 ConfigString _src;
00035 ConfigString _val;
00036 bool _state;
00037 enum SymbolEntSrc _srctok;
00038 public:
00039 SymbolEnt() : _srctok(Invalid) {}
00040 SymbolEnt(enum SymbolEntSrc tok, const ConfigString& val,
00041 const ConfigString& src = "", bool state = false)
00042 : _src(src), _val(val), _state(state), _srctok(tok) {}
00043 SymbolEnt(const SymbolEnt& c) : _src(c._src), _val(c._val),
00044 _state(c._state), _srctok(c._srctok) {}
00045 INLINE SymbolEnt& operator=(const SymbolEnt&);
00046
00047
00048
00049 INLINE bool operator == (const SymbolEnt &other) const;
00050 INLINE bool operator != (const SymbolEnt &other) const;
00051 INLINE bool operator < (const SymbolEnt &other) const;
00052
00053 INLINE ConfigString Src(void) const;
00054 INLINE ConfigString Val(void) const;
00055 INLINE SymbolEntSrc SrcTok(void) const;
00056 INLINE bool State(void) const;
00057 };
00058
00059 }
00060
00061 #define EXPCL EXPCL_DTOOLCONFIG
00062 #define EXPTP EXPTP_DTOOLCONFIG
00063 #define TYPE Config::SymbolEnt
00064 #define NAME vector_SymbolEnt
00065 #include "vector_src.h"
00066
00067 namespace Config {
00068
00069 typedef ::vector_SymbolEnt vector_SymbolEnt;
00070
00071 #include "symbolEnt.I"
00072
00073 }
00074
00075
00076
00077 #ifdef __GNUC__
00078 #pragma interface
00079 #endif
00080
00081 #endif