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,
 ) 

Value:

\
    static stlsoft_ns_qual(ss_ptrdiff_t) STLSOFT_METHOD_PROPERTY_OFFSET_NAME(C, P)()    \
    {                                                                                   \
        return STLSOFT_RAW_OFFSETOF(C, P);                                              \
    }
Parameters:
C The containing class type
P The property name

#define STLSOFT_METHOD_PROPERTY_GET ( V,
R,
C,
GM,
 ) 

Value:

\
    STLSOFT_METHOD_PROPERTY_DEFINE_OFFSET(C, P)             \
                                                            \
    stlsoft_ns_qual(method_property_get)<   V               \
                                        ,   R               \
                                        ,   C               \
                                        ,   &C::STLSOFT_METHOD_PROPERTY_OFFSET_NAME(C, P)    \
                                        ,   &C::GM          \
                                        >           P
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,
 ) 

Value:

\
    STLSOFT_METHOD_PROPERTY_DEFINE_OFFSET(C, P)             \
    STLSOFT_METHOD_PROPERTY_GET_EXTERNAL_PROP(R, C, GM, P)
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,
 ) 

Value:

\
    STLSOFT_METHOD_PROPERTY_DEFINE_OFFSET(C, P)                     \
                                                                    \
    stlsoft_ns_qual(method_property_getset)<    V                   \
                                            ,   RG                  \
                                            ,   RS                  \
                                            ,   C                   \
                                            ,   &C::STLSOFT_METHOD_PROPERTY_OFFSET_NAME(C, P)    \
                                            ,   &C::GM              \
                                            ,   &C::SM              \
                                            >       P
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,
 ) 

Value:

\
    STLSOFT_METHOD_PROPERTY_DEFINE_OFFSET(C, P)                         \
    STLSOFT_METHOD_PROPERTY_GETSET_EXTERNAL_PROP(RG, RS, C, GM, SM, P)
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,
 ) 

Value:

\
    STLSOFT_METHOD_PROPERTY_DEFINE_OFFSET(C, P)             \
                                                            \
    stlsoft_ns_qual(method_property_set)<   V               \
                                        ,   R               \
                                        ,   C               \
                                        ,   &C::STLSOFT_METHOD_PROPERTY_OFFSET_NAME(C, P)    \
                                        ,   &C::SM          \
                                        >           P
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,
 ) 

Value:

\
    STLSOFT_METHOD_PROPERTY_DEFINE_OFFSET(C, P)             \
    STLSOFT_METHOD_PROPERTY_SET_EXTERNAL_PROP(R, C, SM, P)
Parameters:
R The value reference type
C The containing class type
SM The property set accessor method
P The property name
TODO: EXAMPLE HERE


Generated on Thu Jun 10 08:58:18 2010 for STLSoft by  doxygen 1.5.6