00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 INLINE ConfigVariableBase::
00023 ConfigVariableBase(const string &name,
00024 ConfigVariableBase::ValueType value_type) :
00025 _core(ConfigVariableManager::get_global_ptr()->make_variable(name))
00026 {
00027 if (value_type != VT_undefined) {
00028 _core->set_value_type(value_type);
00029 }
00030 }
00031
00032
00033
00034
00035
00036
00037 INLINE ConfigVariableBase::
00038 ~ConfigVariableBase() {
00039 }
00040
00041
00042
00043
00044
00045
00046 INLINE const string &ConfigVariableBase::
00047 get_name() const {
00048 nassertr(_core != (ConfigVariableCore *)NULL, *new string());
00049 return _core->get_name();
00050 }
00051
00052
00053
00054
00055
00056
00057
00058
00059 INLINE ConfigVariableBase::ValueType ConfigVariableBase::
00060 get_value_type() const {
00061 nassertr(_core != (ConfigVariableCore *)NULL, VT_undefined);
00062 return _core->get_value_type();
00063 }
00064
00065
00066
00067
00068
00069
00070
00071 INLINE const string &ConfigVariableBase::
00072 get_description() const {
00073 nassertr(_core != (ConfigVariableCore *)NULL, *new string());
00074 return _core->get_description();
00075 }
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086 INLINE int ConfigVariableBase::
00087 get_flags() const {
00088 nassertr(_core != (ConfigVariableCore *)NULL, 0);
00089 return _core->get_flags();
00090 }
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106 INLINE bool ConfigVariableBase::
00107 is_closed() const {
00108 nassertr(_core != (ConfigVariableCore *)NULL, false);
00109 return _core->is_closed();
00110 }
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127 INLINE int ConfigVariableBase::
00128 get_trust_level() const {
00129 nassertr(_core != (ConfigVariableCore *)NULL, 0);
00130 return _core->get_trust_level();
00131 }
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142 INLINE bool ConfigVariableBase::
00143 is_dynamic() const {
00144 nassertr(_core != (ConfigVariableCore *)NULL, false);
00145 return _core->is_dynamic();
00146 }
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158 INLINE bool ConfigVariableBase::
00159 clear_local_value() {
00160 nassertr(_core != (ConfigVariableCore *)NULL, false);
00161 return _core->clear_local_value();
00162 }
00163
00164
00165
00166
00167
00168
00169
00170
00171 INLINE bool ConfigVariableBase::
00172 has_local_value() const {
00173 nassertr(_core != (ConfigVariableCore *)NULL, false);
00174 return _core->has_local_value();
00175 }
00176
00177
00178
00179
00180
00181
00182
00183
00184 INLINE bool ConfigVariableBase::
00185 has_value() const {
00186 nassertr(_core != (ConfigVariableCore *)NULL, false);
00187 return _core->has_value();
00188 }
00189
00190
00191
00192
00193
00194
00195 INLINE void ConfigVariableBase::
00196 output(ostream &out) const {
00197 nassertv(_core != (ConfigVariableCore *)NULL);
00198 _core->output(out);
00199 }
00200
00201
00202
00203
00204
00205
00206 INLINE void ConfigVariableBase::
00207 write(ostream &out) const {
00208 nassertv(_core != (ConfigVariableCore *)NULL);
00209 _core->write(out);
00210 }
00211
00212 INLINE ostream &
00213 operator << (ostream &out, const ConfigVariableBase &variable) {
00214 variable.output(out);
00215 return out;
00216 }