libyui
|
#include <YProperty.h>
Public Member Functions | |
YPropertyValue (const string &str) | |
YPropertyValue (const char *str) | |
YPropertyValue (bool b) | |
YPropertyValue (YInteger num) | |
YPropertyValue (int num) | |
YPropertyValue (YPropertyType type) | |
YPropertyValue () | |
~YPropertyValue () | |
YPropertyType | type () const |
string | typeAsStr () const |
string | stringVal () const |
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.
YPropertyValue::YPropertyValue | ( | const string & | str | ) | [inline] |
Constructor for string properties.
YPropertyValue::YPropertyValue | ( | const char * | str | ) | [inline] |
Constructor for const char * (string) properties.
YPropertyValue::YPropertyValue | ( | bool | b | ) | [inline, explicit] |
Constructor for bool properties.
YPropertyValue::YPropertyValue | ( | YInteger | num | ) | [inline, explicit] |
Constructor for numerical (YCP integer) properties.
YPropertyValue::YPropertyValue | ( | int | num | ) | [inline, explicit] |
Constructor for numerical (YCP integer) properties.
YPropertyValue::YPropertyValue | ( | ) | [inline] |
Default constructor
YPropertyValue::~YPropertyValue | ( | ) |
Destructor.
string YPropertyValue::stringVal | ( | ) | const [inline] |
Methods to get the value of this property. Check with type() which one to use.
YPropertyType YPropertyValue::type | ( | ) | const [inline] |
Returns the type of this property value. Use this to determine which xyVal() method to use.
string YPropertyValue::typeAsStr | ( | ) | const [inline] |
Returns the type of this property value as string.