25 #include "YProperty.h"
26 #include "YUIException.h"
35 case YUnknownPropertyType:
return "<Unknown>";
36 case YOtherProperty:
return "<Other>";
37 case YStringProperty:
return "String";
38 case YBoolProperty:
return "Bool";
39 case YIntegerProperty:
return "Integer";
45 return "<Undefined property type>";
72 if ( !
contains( propertyName, type ) )
83 for ( YPropertySet::const_iterator it = _properties.begin();
84 it != _properties.end();
87 if ( it->name() == propertyName )
98 for ( YPropertySet::const_iterator it = _properties.begin();
99 it != _properties.end();
102 if ( it->name() == propertyName )
104 if ( it->isReadOnly() )
107 if ( it->type() == type ||
108 it->type() == YOtherProperty )
122 _properties.push_back( prop );
138 YPropertySet::const_iterator
141 return _properties.begin();
144 YPropertySet::const_iterator
147 return _properties.end();
Exception class for attempt to set a read-only property.
void check(const std::string &propertyName) const
Check if a property 'propertyName' exists in this property set.
~YPropertyValue()
Destructor.
void add(const YProperty &prop)
Add a property to this property set.
A set of properties to check names and types against.
const_iterator propertiesBegin() const
Returns an iterator that points to the first property in this set.
bool contains(const std::string &propertyName) const
Check if a property 'propertyName' exists in this property set.
Exception class for "unknown property name": The application tried to set (or query) a property that ...
YPropertySet()
Constructor.
Class for widget properties.
const_iterator propertiesEnd() const
Returns an iterator that points after the last property in this set.
Exception class for "property type mismatch": The application tried to set a property with a wrong ty...
std::string typeAsStr() const
Returns the type of this property as string.