20 #ifndef GENERIC_PROPERTY_DEF_HH
21 #define GENERIC_PROPERTY_DEF_HH
31 WARN_DEPRECATED(
"GetGenericStringProperty is deprecated. Use GetStringProp");
32 return c.GetStringProp(k, v);
38 WARN_DEPRECATED(
"GetGenericStringProperty is deprecated. Use GetStringProp");
39 return c.GetStringProp(k);
45 WARN_DEPRECATED(
"SetGenericStringProperty is deprecated. Use SetStringProp");
46 return c.SetStringProp(k, v);
53 return c.GetIntProp(k, v);
60 return c.GetIntProp(k);
67 return c.SetIntProp(k, v);
73 WARN_DEPRECATED(
"GetGenericBoolProperty is deprecated. Use GetBoolProp");
74 return c.GetBoolProp(k, v);
80 WARN_DEPRECATED(
"GetGenericBoolProperty is deprecated. Use GetBoolProp");
81 return c.GetBoolProp(k);
87 WARN_DEPRECATED(
"SetGenericBoolProperty is deprecated. Use SetBoolProp");
88 return c.SetBoolProp(k, v);
94 WARN_DEPRECATED(
"GetGenericFloatProperty is deprecated. Use GetFloatProp");
95 return c.GetFloatProp(k, v);
101 WARN_DEPRECATED(
"GetGenericFloatProperty is deprecated. Use GetFloatProp");
102 return c.GetFloatProp(k);
105 template <
typename C>
108 WARN_DEPRECATED(
"SetGenericFloatProperty is deprecated. Use SetFloatProp");
109 return c.SetFloatProp(k, v);
112 template <
typename C>
115 WARN_DEPRECATED(
"ClearGenericProperties is deprecated. Use ClearProps");
119 template <
typename C>
126 template <
typename C>
129 WARN_DEPRECATED(
"GetGenericPropertyStringRepresentation is deprecated. Use GetPropAsString");
130 return c.GetPropAsString(k);
133 template <
typename C,
typename O>
136 bool (C::*get_bool1)(
const String&, bool)
const=&C::GetBoolProp;
137 bool (C::*get_bool2)(
const String&)
const=&C::GetBoolProp;
139 int (C::*get_int1)(
const String&, int)
const=&C::GetIntProp;
140 int (C::*get_int2)(
const String&)
const=&C::GetIntProp;
142 Real (C::*get_float1)(
const String&,
Real)
const=&C::GetFloatProp;
143 Real (C::*get_float2)(
const String&)
const=&C::GetFloatProp;
148 String (C::*get_str2)(
const String&)
const=&C::GetStringProp;
150 .def(
"HasProp", &C::HasProp)
151 .def(
"GetPropAsString",
153 .def(
"GetBoolProp", get_bool1)
154 .def(
"GetBoolProp", get_bool2)
155 .def(
"GetFloatProp", get_float1)
156 .def(
"GetFloatProp", get_float2)
157 .def(
"GetVec3Prop", get_vec3)
158 .def(
"GetIntProp", get_int1)
159 .def(
"GetIntProp", get_int2)
160 .def(
"GetStringProp", get_str1)
161 .def(
"GetStringProp", get_str2)
162 .def(
"GetPropList",&C::GetPropList)
163 .def(
"GetGenericBoolProperty", &depr_get_bool_a<C>)
164 .def(
"GetGenericBoolProperty", &depr_get_bool_b<C>)
165 .def(
"GetGenericFloatProperty", &depr_get_float_a<C>)
166 .def(
"GetGenericFloatProperty", &depr_get_float_b<C>)
167 .def(
"GetGenericIntProperty", &depr_get_int_a<C>)
168 .def(
"GetGenericIntProperty", &depr_get_int_b<C>)
169 .def(
"GetGenericStringProperty", &depr_get_string_a<C>)
170 .def(
"GetGenericStringProperty", &depr_get_string_b<C>)
171 .def(
"HasGenericProperty", &depr_has_prop<C>)
172 .def(
"GetGenericPropertyStringRepresentation", &depr_prop_as_string<C>)
176 template <
typename C,
typename O>
179 const_generic_prop_def<C, O>(bp_class);
181 .def(
"SetBoolProp",&C::SetBoolProp)
182 .def(
"ClearProps", &C::ClearProps)
183 .def(
"GetPropAsString", &C::GetPropAsString)
184 .def(
"SetFloatProp", &C::SetFloatProp)
185 .def(
"SetVec3Prop", &C::SetVec3Prop)
186 .def(
"SetIntProp", &C::SetIntProp)
187 .def(
"SetStringProp", &C::SetStringProp)
188 .def(
"GetPropList",&C::GetPropList)
189 .def(
"ClearGenericProperties", &depr_clear_props<C>)
190 .def(
"SetGenericIntProperty", &depr_set_int<C>)
191 .def(
"SetGenericFloatProperty", &depr_set_float<C>)
192 .def(
"SetGenericBoolProperty", &depr_set_bool<C>)
193 .def(
"SetGenericStringProperty", &depr_set_string<C>)
194 .def(
"RemoveProp", &C::RemoveProp)
Three dimensional vector class, using Real precision.
void depr_set_string(C &c, const String &k, const String &v)
Real depr_get_float_a(C &c, const String &k, const float &v)
String depr_get_string_a(C &c, const String &k, const String &v)
bool depr_get_bool_b(C &c, const String &k)
void generic_prop_def(O &bp_class)
bool depr_get_bool_a(C &c, const String &k, const bool &v)
int depr_get_int_a(C &c, const String &k, const int &v)
void depr_set_bool(C &c, const String &k, const bool &v)
String depr_prop_as_string(C &c, const String &k)
void depr_set_int(C &c, const String &k, const int &v)
void depr_clear_props(C &c)
Real depr_get_float_b(C &c, const String &k)
bool depr_has_prop(C &c, const String &k)
String depr_get_string_b(C &c, const String &k)
void const_generic_prop_def(O &bp_class)
void depr_set_float(C &c, const String &k, const Real &v)
int depr_get_int_b(C &c, const String &k)
#define WARN_DEPRECATED(m)