abstraction of a general property of an object More...
#include <objtree.h>
Public Member Functions | |
property_t (IN const char *in_value) | |
property_t (void) throw () | |
void | clear (void) throw () |
void | setFieldValue (IN const char *field, IN const char *value) |
const char * | getFieldValue (IN const char *field) const throw () |
const char * | getOptionalFieldValue (IN const char *field, IN const char *default_value) const throw () |
void | setValue (IN const char *value) throw () |
const char * | getValue (void) const throw () |
void | dump (IN const char *title) const throw () |
abstraction of a general property of an object
This attempts to capture the metadata around a property. For instance, the user may have selected a rectangle, and they want the properties of the rectangle. A single property of the rectangle (for instance the line color) will be generally represented by this. The "value" of the property is the line color (red, black, whatever). But there could be other metadata fields such as the property type (it is a color, not a weight or length etc.). It could have units (lengths could be measured in meters or miles, etc.). And so on.
There are multiple possible metadata fields (up to the client), such as the type (string? float? int? color?), units (centimeters? miles? liters?) etc.
There is one "special" property, the value. All property_t objects are required to have a value entry, albeit empty. All other fields may not exist (and getFieldValue() can return null for those). But clients can rely on getValue() returning non-null at least.
Definition at line 86 of file objtree.h.
objtree::property_t::property_t | ( | IN const char * | in_value | ) | [inline] |