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 ) {}
156 YPropertyType
type()
const {
return _type; }
168 bool boolVal()
const {
return _boolVal; }
169 YInteger integerVal()
const {
return _integerVal; }
175 std::string _stringVal;
177 YInteger _integerVal;
198 void check(
const std::string & propertyName )
const;
209 void check(
const std::string & propertyName, YPropertyType type )
const;
224 bool contains(
const std::string & propertyName )
const throw();
239 bool contains(
const std::string & propertyName, YPropertyType type )
const;
250 bool isEmpty()
const {
return _properties.empty(); }
255 int size()
const {
return (
int) _properties.size(); }
270 typedef std::vector<YProperty>::const_iterator const_iterator;
290 std::vector<YProperty> _properties;
294 #endif // YProperty_h
YProperty(const std::string &name, YPropertyType type, bool isReadOnly=false)
std::string typeAsStr() const
YPropertyType type() const
void check(const std::string &propertyName) const
void add(const YProperty &prop)
const_iterator propertiesBegin() const
std::string stringVal() const
bool contains(const YProperty &prop) const
YPropertyValue(const char *str)
bool contains(const std::string &propertyName) const
const_iterator propertiesEnd() const
YPropertyValue(YInteger num)
YPropertyType type() const
void check(const YProperty &prop) const
std::string typeAsStr() const
YPropertyValue(const std::string &str)