Properties #
Properties are what this library is all about. There are a number of property types available to ensure maximum flexiblity.
To use properties, the client class needs to inherit from properties
provided by this library:
class shape :
tct::cppproperties::properties
{
MAKE_PROPERTY(x, int);
MAKE_PROPERTY(y, int);
}
Note that a property type needs to be registered before it can be used. See types for more information.
The following types of properties are available:
- Raw properties: This is the most common form of a property. Use this if you want to use a regular member variable as a property.
- Nested properties: Allows to created nested property structures when inheriting from a base class also defining properties.
- Linked properties: Linked properties are used when public or protected member variables of a base class should become properties.
- Linked property functions: Allows to use private members variables of a base class as properties.