libyui
3.4.2
|
Transport class for the value of simple properties. More...
#include <YProperty.h>
Public Member Functions | |
YPropertyValue (const std::string &str) | |
Constructor for string properties. | |
YPropertyValue (const char *str) | |
Constructor for const char * (string) properties. | |
YPropertyValue (bool b) | |
Constructor for bool properties. | |
YPropertyValue (YInteger num) | |
Constructor for numerical (YCP integer) properties. | |
YPropertyValue (int num) | |
Constructor for numerical (YCP integer) properties. | |
YPropertyValue (YPropertyType type) | |
YPropertyValue () | |
Default constructor. | |
~YPropertyValue () | |
Destructor. | |
bool | operator== (const YPropertyValue &other) const |
Equality operator, can compare with another YPropertyValue. More... | |
bool | operator!= (const YPropertyValue &other) const |
Inequality operator. More... | |
YPropertyType | type () const |
Returns the type of this property value. More... | |
std::string | typeAsStr () const |
Returns the type of this property value as string. | |
std::string | stringVal () const |
Methods to get the value of this property. More... | |
bool | boolVal () const |
YInteger | integerVal () const |
Transport class for the value of simple properties.
More complex properties (lists of items, tree descriptions, ...) have to be handled specifically someplace else, but most properties are of simple types and can be treated in similar ways.
Definition at line 104 of file YProperty.h.
bool YPropertyValue::operator!= | ( | const YPropertyValue & | other | ) | const |
Inequality operator.
YUIException | for incompatible property types |
Definition at line 75 of file YProperty.cc.
bool YPropertyValue::operator== | ( | const YPropertyValue & | other | ) | const |
Equality operator, can compare with another YPropertyValue.
YUIException | for incompatible property types |
Definition at line 53 of file YProperty.cc.
|
inline |
Methods to get the value of this property.
Check with type() which one to use.
Definition at line 180 of file YProperty.h.
|
inline |
Returns the type of this property value.
Use this to determine which xyVal() method to use.
Definition at line 169 of file YProperty.h.