Public Member Functions

objtree::property_t Struct Reference
[Object Tree API]

abstraction of a general property of an object More...

#include <objtree.h>

List of all members.

Public Member Functions

 property_t (const char *in_value)
 property_t (void) throw ()
void clear (void) throw ()
void setFieldValue (const char *field, const char *value)
const char * getFieldValue (const char *field) const throw ()
const char * getOptionalFieldValue (const char *field, const char *default_value) const throw ()
void setValue (const char *value) throw ()
const char * getValue (void) const throw ()
void dump (const char *title) const throw ()

Detailed Description

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.


Constructor & Destructor Documentation

objtree::property_t::property_t ( const char *  in_value  )  [inline]

Definition at line 88 of file objtree.h.


The documentation for this struct was generated from the following files: