UHD  003.000.c6c4b01e0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes
wax Namespace Reference

Classes

class  obj
 

Detailed Description

WAX - it's a metaphor!

The WAX framework allows an object to have generic/anyobj properties. These properties can be addressed through generic/anyobj identifiers.

The WAX object itself is an anytype container much like boost::any. To retrieve the value of the appropriate type, use my_obj.as<type>().

Proprties may be referenced though the [] overloaded operator. The [] operator returns a special proxy that allows for assigment. Also, the [] operators may be chained as in the folowing examples: my_obj[prop1][prop2][prop3] = value; value = my_obj[prop1][prop2][prop3].as<type>();

Property nesting occurs when a WAX object gets another object's link. This special link is obtained through a call to my_obj.get_link().

Note: Do not put a class derived from wax::obj into an stl container. MSVC will compile the code, but the binaries will crash at runtime. Rather, use pointers or smart pointers to instances of the derived class.