Properties Library
[Libraries]
Detailed Description
Created: 10th June 2006 Updated: 13th March 2007.
This library defines file template components for the definition of efficient C++ classes exhibiting properties.
C++ properties, like those in other languages (such as C#, D), have the syntactic appearance of fields (member variables) but define precise read and/or write access, and may in fact invoke methods on the callee, rather than manipulating member variables. For example, consider the following class that defines a read-only field property Name and a read-write method property
The components provided by the Properties library include:
|
Classes |
class | field_property_get |
| Class template used to define a read-only internal field property. More...
|
class | field_property_set |
| Class template used to define a write-only internal field property. More...
|
class | field_property_get_external |
| Class template that defines a read-only external property. More...
|
class | field_property_set_external |
| Class template that defines a write-only external property. More...
|
struct | member_get_pointer |
| Provides static storage and access to a get member function of a given type. More...
|
struct | member_set_pointer |
| Provides static storage and access to a set member function of a given type. More...
|
class | method_property_get |
| This class provides method-based read-only property access. More...
|
class | method_property_set |
| This class provides method-based write-only property access. More...
|
class | method_property_getset |
| This class provides method-based read/write property access. More...
|
class | method_property_get_external |
| This class provides indirect method-based read-only property access. More...
|
class | method_property_set_external |
| This class provides indirect method-based write-only property access. More...
|
class | method_property_getset_external |
| This class provides indirect method-based read/write property access. More...
|
class | static_method_property_get |
| Implements static read-only Method Property. More...
|
class | static_method_property_set |
| Implements static write-only Method Property. More...
|
class | static_method_property_getset |
| Implements static read-write Method Property. More...
|
class | static_method_property_get_external |
| Implements External static read-only Method Property. More...
|
class | static_method_property_getset_external |
| Implements External static read-write Method Property. More...
|
Defines |
#define | STLSOFT_METHOD_PROPERTY_DEFINE_OFFSET(C, P) |
#define | STLSOFT_METHOD_PROPERTY_GET(V, R, C, GM, P) |
#define | STLSOFT_METHOD_PROPERTY_SET(V, R, C, SM, P) |
#define | STLSOFT_METHOD_PROPERTY_GETSET(V, RG, RS, C, GM, SM, P) |
#define | STLSOFT_METHOD_PROPERTY_GET_EXTERNAL(R, C, GM, P) |
#define | STLSOFT_METHOD_PROPERTY_SET_EXTERNAL(R, C, SM, P) |
#define | STLSOFT_METHOD_PROPERTY_GETSET_EXTERNAL(RG, RS, C, GM, SM, P) |
Define Documentation
#define STLSOFT_METHOD_PROPERTY_DEFINE_OFFSET |
( |
C, |
|
|
P |
|
) |
|
Value:
- Parameters:
-
| C | The containing class type |
| P | The property name |
#define STLSOFT_METHOD_PROPERTY_GET |
( |
V, |
|
|
R, |
|
|
C, |
|
|
GM, |
|
|
P |
|
) |
|
Value:
- Parameters:
-
| V | The value type |
| R | The value reference type |
| C | The containing class type |
| GM | The property get accessor method |
| P | The property name |
TODO: EXAMPLE HERE
#define STLSOFT_METHOD_PROPERTY_GET_EXTERNAL |
( |
R, |
|
|
C, |
|
|
GM, |
|
|
P |
|
) |
|
Value:
- Parameters:
-
| R | The value reference type |
| C | The containing class type |
| GM | The property get accessor method |
| P | The property name |
TODO: EXAMPLE HERE
#define STLSOFT_METHOD_PROPERTY_GETSET |
( |
V, |
|
|
RG, |
|
|
RS, |
|
|
C, |
|
|
GM, |
|
|
SM, |
|
|
P |
|
) |
|
Value:
- Parameters:
-
| V | The value type |
| RG | The get reference type |
| RS | The set reference type |
| C | The containing class type |
| GM | The property get accessor method |
| SM | The property set accessor method |
| P | The property name |
TODO: EXAMPLE HERE
#define STLSOFT_METHOD_PROPERTY_GETSET_EXTERNAL |
( |
RG, |
|
|
RS, |
|
|
C, |
|
|
GM, |
|
|
SM, |
|
|
P |
|
) |
|
Value:
- Parameters:
-
| RG | The get reference type |
| RS | The set reference type |
| C | The containing class type |
| GM | The property get accessor method |
| SM | The property set accessor method |
| P | The property name |
TODO: EXAMPLE HERE
- Examples:
-
by_library/properties/properties/properties.cpp.
#define STLSOFT_METHOD_PROPERTY_SET |
( |
V, |
|
|
R, |
|
|
C, |
|
|
SM, |
|
|
P |
|
) |
|
Value:
- Parameters:
-
| V | The value type |
| R | The value reference type |
| C | The containing class type |
| SM | The property set accessor method |
| P | The property name |
TODO: EXAMPLE HERE
#define STLSOFT_METHOD_PROPERTY_SET_EXTERNAL |
( |
R, |
|
|
C, |
|
|
SM, |
|
|
P |
|
) |
|
Value:
- Parameters:
-
| R | The value reference type |
| C | The containing class type |
| SM | The property set accessor method |
| P | The property name |
TODO: EXAMPLE HERE