libyui
3.0.10
|
#include <YProperty.h>
Public Types | |
typedef std::vector< YProperty > ::const_iterator | const_iterator |
Public Member Functions | |
YPropertySet () | |
void | check (const std::string &propertyName) const |
void | check (const std::string &propertyName, YPropertyType type) const |
void | check (const YProperty &prop) const |
bool | contains (const std::string &propertyName) const throw () |
bool | contains (const std::string &propertyName, YPropertyType type) const |
bool | contains (const YProperty &prop) const |
bool | isEmpty () const |
int | size () const |
void | add (const YProperty &prop) |
void | add (const YPropertySet &otherSet) |
const_iterator | propertiesBegin () const |
const_iterator | propertiesEnd () const |
A set of properties to check names and types against.
Definition at line 184 of file YProperty.h.
YPropertySet::YPropertySet | ( | ) |
Constructor.
Definition at line 55 of file YProperty.cc.
void YPropertySet::add | ( | const YProperty & | prop | ) |
Add a property to this property set.
Definition at line 120 of file YProperty.cc.
void YPropertySet::add | ( | const YPropertySet & | otherSet | ) |
Adds all properties of another property set.
If that other set contains duplicates (properties that are already in this set), those others will never be found with lookup().
Definition at line 127 of file YProperty.cc.
void YPropertySet::check | ( | const std::string & | propertyName | ) | const |
Check if a property 'propertyName' exists in this property set. Throw a YUIUnknownPropertyException if it does not exist. Use YPropertySet::contains() for a check that simply returns 'false' if it does not exist.
Definition at line 62 of file YProperty.cc.
void YPropertySet::check | ( | const std::string & | propertyName, |
YPropertyType | type | ||
) | const |
Check if a property 'propertyName' exists in this property set. Throw a YUIUnknownPropertyException if it does not exist.
If there is a property with that name, check also the expected type against 'type'. If the types don't match, throw a YUIPropertyTypeMismatchException. If the property is read-only, throw a YUISetReadOnlyPropertyException.
Definition at line 70 of file YProperty.cc.
|
inline |
Same as above, overloaded for convenience.
Definition at line 214 of file YProperty.h.
bool YPropertySet::contains | ( | const std::string & | propertyName | ) | const |
throw | ( | ||||
) |
Check if a property 'propertyName' exists in this property set. Returns 'true' if it exists, 'false' if not.
Use YPropertySet::check() for a check that throws exceptions if there is no such property.
Definition at line 81 of file YProperty.cc.
bool YPropertySet::contains | ( | const std::string & | propertyName, |
YPropertyType | type | ||
) | const |
Check if a property 'propertyName' exists in this property set. Returns 'true' if it exists, 'false' if not.
If there is a property with that name, check also the expected type against 'type'. If the types don't match, throw a YUIPropertyTypeMismatchException.
If the property is read-only, throw a YUISetReadOnlyPropertyException.
Use YPropertySet::check() for a check that throws exceptions if there is no such property.
Definition at line 96 of file YProperty.cc.
|
inline |
Same as above, overloaded for convenience.
Definition at line 244 of file YProperty.h.
|
inline |
Returns 'true' if this property set does not contain anything.
Definition at line 250 of file YProperty.h.
YPropertySet::const_iterator YPropertySet::propertiesBegin | ( | ) | const |
Returns an iterator that points to the first property in this set.
Definition at line 139 of file YProperty.cc.
YPropertySet::const_iterator YPropertySet::propertiesEnd | ( | ) | const |
Returns an iterator that points after the last property in this set.
Definition at line 145 of file YProperty.cc.
|
inline |
Returns the number of properties in this set.
Definition at line 255 of file YProperty.h.