00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef CONFIGVARIABLE_H
00016 #define CONFIGVARIABLE_H
00017
00018 #include "dtoolbase.h"
00019 #include "configVariableBase.h"
00020 #include "numeric_types.h"
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 class EXPCL_DTOOLCONFIG ConfigVariable : public ConfigVariableBase {
00036 protected:
00037 INLINE ConfigVariable(const string &name, ValueType type);
00038 INLINE ConfigVariable(const string &name, ValueType type,
00039 const string &description, int flags);
00040
00041 PUBLISHED:
00042 INLINE ConfigVariable(const string &name);
00043 INLINE ~ConfigVariable();
00044
00045 INLINE const ConfigDeclaration *get_default_value() const;
00046
00047 INLINE const string &get_string_value() const;
00048 INLINE void set_string_value(const string &value);
00049 INLINE void clear_value();
00050
00051 INLINE int get_num_words() const;
00052
00053 INLINE bool has_string_word(int n) const;
00054 INLINE bool has_bool_word(int n) const;
00055 INLINE bool has_int_word(int n) const;
00056 INLINE bool has_int64_word(int n) const;
00057 INLINE bool has_double_word(int n) const;
00058
00059 INLINE string get_string_word(int n) const;
00060 INLINE bool get_bool_word(int n) const;
00061 INLINE int get_int_word(int n) const;
00062 INLINE PN_int64 get_int64_word(int n) const;
00063 INLINE double get_double_word(int n) const;
00064
00065 INLINE void set_string_word(int n, const string &value);
00066 INLINE void set_bool_word(int n, bool value);
00067 INLINE void set_int_word(int n, int value);
00068 INLINE void set_int64_word(int n, PN_int64 value);
00069 INLINE void set_double_word(int n, double value);
00070
00071 protected:
00072 INLINE bool is_constructed() const;
00073 void report_unconstructed() const;
00074 };
00075
00076 #include "configVariable.I"
00077
00078 #endif