35 YUnknownPropertyType = 0,
45 typedef long long YInteger;
67 std::string
name()
const {
return _name; }
72 YPropertyType
type()
const {
return _type; }
112 _type( YStringProperty ), _stringVal( str ) {}
118 _type( YStringProperty ), _stringVal( str ) {}
124 _type( YBoolProperty ), _boolVal( b ) {}
130 _type( YIntegerProperty ), _integerVal( num ) {}
136 _type( YIntegerProperty ), _integerVal( num ) {}
145 _type( YUnknownPropertyType ) {}
169 YPropertyType
type()
const {
return _type; }
181 bool boolVal()
const {
return _boolVal; }
182 YInteger integerVal()
const {
return _integerVal; }
188 std::string _stringVal;
190 YInteger _integerVal;
211 void check(
const std::string & propertyName )
const;
222 void check(
const std::string & propertyName, YPropertyType type )
const;
237 bool contains(
const std::string & propertyName )
const throw();
252 bool contains(
const std::string & propertyName, YPropertyType type )
const;
263 bool isEmpty()
const {
return _properties.empty(); }
268 int size()
const {
return (
int) _properties.size(); }
283 typedef std::vector<YProperty>::const_iterator const_iterator;
303 std::vector<YProperty> _properties;
307 #endif // YProperty_h YProperty(const std::string &name, YPropertyType type, bool isReadOnly=false)
Definition: YProperty.h:58
bool isEmpty() const
Definition: YProperty.h:263
YPropertyValue()
Definition: YProperty.h:144
YPropertyValue(int num)
Definition: YProperty.h:135
Definition: YProperty.h:104
const_iterator propertiesEnd() const
Definition: YProperty.cc:171
~YPropertyValue()
Definition: YProperty.cc:50
bool contains(const std::string &propertyName) const
void add(const YProperty &prop)
Definition: YProperty.cc:146
YPropertyType type() const
Definition: YProperty.h:72
Definition: YProperty.h:197
bool operator!=(const YPropertyValue &other) const
Definition: YProperty.cc:76
bool operator==(const YPropertyValue &other) const
Definition: YProperty.cc:54
std::string typeAsStr() const
Definition: YProperty.h:82
int size() const
Definition: YProperty.h:268
std::string name() const
Definition: YProperty.h:67
const_iterator propertiesBegin() const
Definition: YProperty.cc:165
YPropertyValue(const char *str)
Definition: YProperty.h:117
std::string stringVal() const
Definition: YProperty.h:180
YPropertySet()
Definition: YProperty.cc:81
void check(const YProperty &prop) const
Definition: YProperty.h:227
Definition: YProperty.h:51
bool isReadOnly() const
Definition: YProperty.h:77
std::string typeAsStr() const
Definition: YProperty.h:174
bool contains(const YProperty &prop) const
Definition: YProperty.h:257
YPropertyValue(YInteger num)
Definition: YProperty.h:129
YPropertyValue(bool b)
Definition: YProperty.h:123
void check(const std::string &propertyName) const
YPropertyType type() const
Definition: YProperty.h:169
YPropertyValue(const std::string &str)
Definition: YProperty.h:111