Mirror reflection library 0.5.13
Defines

Mirror - Registering macros

Defines

#define MIRROR_REG_BEGIN
 Macro which begins the registering with Mirror.
#define MIRROR_REG_END
 Macro which ends the registering with Mirror.
#define MIRROR_REG_GLOBAL_SCOPE_CLASS_BEGIN(ELABORATED_TYPE, CLASS)
 Begins the registering of an elaborate type from the global scope.
#define MIRROR_REG_CLASS_BEGIN(ELABORATED_TYPE, NAMESPACE, CLASS)
 Macro that begins the registering of an elaborate type.
#define MIRROR_REG_NESTED_CLASS_BEGIN(ELABORATED_TYPE, PARENT_CLASS, CLASS)
 Macro that begins the registering of an elaborate type nested in a class.
#define MIRROR_REG_CLASS_END
 Macro that ends the registering of an elaborate type.
#define MIRROR_REG_TYPE_ALIAS(TYPENAME, ALIAS)
 Macro that creates an alias for a type.
#define MIRROR_REG_BASE_CLASSES_BEGIN
 Macro that begins the registering of the base classes of a class.
#define MIRROR_REG_BASE_CLASSES_END
 Macro that ends the registering of the base classes of a class.
#define MIRROR_REG_BASE_CLASS(INHERITANCE_TYPE, ACCESS_TYPE, BASE_CLASS)
 Macro that registers one base class inheritance.
#define MIRROR_REG_CLASS_MEM_VARS_BEGIN
 Macro that begins the registering of the class' member variables.
#define MIRROR_REG_CLASS_MEM_VARS_END
 Macro that ends the registering of the class' member variables.
#define MIRROR_REG_CLASS_MEM_VAR_GET_SET(ACCESS_TYPE, STORAGE_CLASS, TYPE, NAME, GET_EXPRESSION, SET_EXPRESSION)
 Macro for registering a single class member variable.
#define MIRROR_REG_CLASS_MEM_VAR(ACCESS_TYPE, STORAGE_CLASS, TYPE, NAME)
 Macro for registering a single class member variable.
#define MIRROR_REG_CONSTRUCTORS_BEGIN
 Macro that begins the registering of the class' constructors.
#define MIRROR_REG_CONSTRUCTORS_END
 Macro that ends the registering of the class' constructors.
#define MIRROR_REG_DEFAULT_CONSTRUCTOR(ACCESS_TYPE)
 Macro that registers the class' default constructor.
#define MIRROR_REG_COPY_CONSTRUCTOR(ACCESS_TYPE)
 Macro that registers the class' copy constructor.
#define MIRROR_REG_INITLIST_CONSTRUCTOR(ACCESS_TYPE, ELEMENT_TYPE, NAME)
 Macro that registers the class' initializer_list constructor.
#define MIRROR_REG_STRUCT_INITIALIZER()
 Macro that registers the POD class' initializer as constructor.
#define MIRROR_REG_CONSTRUCTOR_BEGIN(ACCESS_TYPE, ID)
 Macro that ends the registering of a single class' constructor.
#define MIRROR_REG_CONSTRUCTOR_END(ID)
 Macro that ends the registering of a single class' constructor.
#define MIRROR_REG_MEM_FUNCTION_PARAM(TYPE, NAME)
#define MIRROR_REG_CONSTRUCTOR_PARAM(TYPE, NAME)
 Macro that registers a single parameter of a constructor.
#define MIRROR_REG_MEM_FUNCTIONS_BEGIN
 Macro that begins the registering of the class' member functions.
#define MIRROR_REG_MEM_FUNCTIONS_END
 Macro that ends the registering of the class' member functions.
#define MIRROR_REG_MEM_OVLD_FUNC_BEGIN(NAME)
 Macro that starts the registering of a (overloaded) member function.
#define MIRROR_REG_MEM_OVLD_FUNC_END(NAME)
 Macro that ends the registering of a (overloaded) member function.
#define MIRROR_REG_MEM_FUNCTION_BEGIN(ACCESS_TYPE, LINKAGE_TYPE, RESULT_TYPE, NAME, ID)
 Macro that ends the registering of a single class' member function.
#define MIRROR_REG_MEM_FUNCTION_END(ID, CONST)
 Macro that ends the registering of a single class' member function.
#define MIRROR_REG_CLASS_CONVERSIONS(TYPELIST)
 Macro for the registering of types the class is convertible to.
#define MIRROR_FRIENDLY_CLASS(CLASS)
 Grants access to private members of a class to Mirror.
#define MIRROR_REG_GLOBAL_SCOPE_ENUM_BEGIN(ENUM)
 Macro which begins the registering of a global scope enum.
#define MIRROR_REG_ENUM_BEGIN(NAMESPACE, ENUM)
 Macro which begins the registering of an enum nested in a namespace.
#define MIRROR_REG_NESTED_ENUM_BEGIN(PARENT_CLASS, ENUM)
 Macro which begins the registering of an enum nested in a class.
#define MIRROR_REG_ENUM_END
 Macro which ends the registering on an enumeration.
#define MIRROR_REG_ENUM_VALUE(ENUM_VALUE)
 Macro which registers an enum value.
#define MIRROR_REG_GLOBAL_SCOPE_OVLD_FUNC_END(NAME)
 Ends the registering of a set of overloaded functions from the global scope.
#define MIRROR_REG_GLOBAL_SCOPE_OVLD_FUNC_BEGIN(NAME)
 Registers a set of overloaded functions from the global scope with Mirror.
#define MIRROR_REG_FREE_OVLD_FUNC_END(NAMESPACE, NAME)
 Ends the registering of a set of nested overloaded functions.
#define MIRROR_REG_FREE_FUNCTION_BEGIN(LINKAGE, RESULT_TYPE, ID)
 Starts the definition of one of function overloads.
#define MIRROR_REG_FREE_FUNCTION_END(ID)
 Ends the definition of one of function overloads.
#define MIRROR_REG_NAMESPACE_BEGIN
 This macro begins the registering of namespace(s) with Mirror.
#define MIRROR_REG_NAMESPACE(NAMESPACE_NAME)
 This macro registers a namespace with Mirror.
#define MIRROR_REG_NAMESPACE_END
 This macro ends the registering of namespace(s) with Mirror.
#define MIRROR_INIT_NAMESPACE_MEMBER_LIST(FULL_NAMESPACE_NAME)
 Macro which initializes the namespace's member list.
#define MIRROR_REG_STD_CONTAINER_TEMPLATE_BEGIN(TEMPLATE_PARAMS, NAMESPACE, CLASS, PARAM_LIST, ELEMENT)
 This macro begins the registering of a standard container template.
#define MIRROR_REG_STD_CONTAINER_END
 Ends the registering of a standard container.
#define MIRROR_REG_STD_FWD_CONTAINER_TRAVERSALS
 Registers the traversals of a standard forward container.
#define MIRROR_REG_STD_REV_CONTAINER_TRAVERSALS
 Registers the traversals of a standard reversible container.
#define MIRROR_REG_STD_CONTAINER_OP(KIND, NAME)
 Registers a container operation (inserter, eraser, locator)
#define MIRROR_REG_GLOBAL_SCOPE_TYPE(NAME)
 This macro registers a type defined in the global scope with Mirror.
#define MIRROR_REG_TYPE(NAMESPACE, NAME)
 This macro registers a type nested in a named namespace with Mirror.
#define MIRROR_REG_GLOBAL_SCOPE_CLASS_TEMPLATE(ELABORATED_TYPE, NAME)
 This macro registers a class template defined in the global scope.
#define MIRROR_REG_GLOBAL_SCOPE_TYPE_TEMPLATE(NAME)
 This macro registers a type template defined in the global scope.
#define MIRROR_REG_CLASS_TEMPLATE(ELABORATED_TYPE, NAMESPACE, NAME)
 This macro registers a template class nested in a named namespace with Mirror.
#define MIRROR_REG_TYPE_TEMPLATE(NAMESPACE, NAME)
 This macro registers a template type nested in a named namespace with Mirror.
#define MIRROR_REG_CLASS_TEMPLATE_BEGIN(TEMPLATE_PARAMS, ELABORATED_TYPE, NAMESPACE, CLASS, PARAM_LIST)
 This macro begins the registering of a class template with Mirror.
#define MIRROR_REG_GLOBAL_SCOPE_TYPEDEF(TYPEDEF)
 This macro registers a typedef from the global scope with Mirror.
#define MIRROR_REG_TYPEDEF(NAMESPACE, TYPEDEF)
 This macro registers a typedef nested in a named namespace with Mirror.
#define MIRROR_REG_GLOBAL_SCOPE_VARIABLE(STORAGE_CLASS, VARIABLE)
 This macro registers a variable from the global scope with Mirror.
#define MIRROR_REG_FREE_VARIABLE(STORAGE_CLASS, NAMESPACE, VARIABLE)
 This macro registers a variable from the a namespace with Mirror.
#define MIRROR_QREG_GLOBAL_SCOPE_VARIABLES(VARIABLES)
 Macro for quick registering of global scope enumerations.
#define MIRROR_QREG_FREE_VARIABLES(NAMESPACE, VARIABLES)
 Macro for quick registering of enumerations.
#define MIRROR_QREG_GLOBAL_SCOPE_POD_CLASS(ELABORATED_TYPE, CLASS, MEMBERS)
 Macro for quick registering of POD classes defined at the global scope.
#define MIRROR_QREG_POD_CLASS(ELABORATED_TYPE, NAMESPACE, CLASS, MEMBERS)
 Macro for quick registering of POD class without base classes, etc.
#define MIRROR_QREG_NESTED_POD_CLASS(ELABORATED_TYPE, PARENT_CLASS, CLASS, MEMBERS)
 Macro for quick registering of POD classes nested in other classes.

Detailed Description

Constructs like namespaces, types, typedefs, classes, class member variables, base classes, etc. need to be registered before they can be reflected or otherwise used. To simplify the registration process and to make it more convenient, the Mirror library provides several preprocessor macros described in greater detail in the references pages accessible through the links provided below.

More on registering can be found in the Registering with Mirror section.


Define Documentation

#define MIRROR_FRIENDLY_CLASS (   CLASS)

Grants access to private members of a class to Mirror.

This macro is used to grant access to private and protected members of the class CLASS to Mirror's meta-objects. It should be used inside of class declaration and basically translates into one or several 'friend' declarations.

This macro is necessary if you want to reflect non-public member variables of a class directly i.e. without using public getter / setter member functions.

See also:
MIRROR_REG_CLASS_MEM_VARS_BEGIN
MIRROR_REG_CLASS_MEM_VARS_END
MIRROR_REG_CLASS_MEM_VAR_GET_SET
MIRROR_REG_CLASS_MEM_VAR
Examples:
mirror/example/various_03.cpp.
#define MIRROR_INIT_NAMESPACE_MEMBER_LIST (   FULL_NAMESPACE_NAME)

Macro which initializes the namespace's member list.

This macro initializes the compile-time list of the members of the FULL_NAMESPACE_NAME namespace. This macro must be used between the MIRROR_REG_BEGIN and the MIRROR_REG_END macros. after registering the namespace, i.e. after the MIRROR_REG_NAMESPACE_END macro.

See also:
MIRROR_REG_NAMESPACE_BEGIN
MIRROR_REG_NAMESPACE
MIRROR_REG_NAMESPACE_END
#define MIRROR_QREG_FREE_VARIABLES (   NAMESPACE,
  VARIABLES 
)

Macro for quick registering of enumerations.

Parameters:
NAMESPACEthe full namespace name where the variables are defined.
VARIABLESa sequence of variable names enclosed in parenthesises for example (x)(y)(z)
See also:
MIRROR_QREG_GLOBAL_SCOPE_VARIABLES
Examples:
mirror/example/meta_prog_11.cpp.
#define MIRROR_QREG_GLOBAL_SCOPE_POD_CLASS (   ELABORATED_TYPE,
  CLASS,
  MEMBERS 
)

Macro for quick registering of POD classes defined at the global scope.

Parameters:
ELABORATED_TYPEthe type of the class this parameter can have the following values (class, struct, union, enum and _ for default (class))
CLASSthe base class name.
MEMBERSa sequence of member variable names enclosed in parenthesises for example (x)(y)(z)
See also:
MIRROR_QREG_POD_CLASS
MIRROR_REG_GLOBAL_SCOPE_CLASS_BEGIN
MIRROR_REG_CLASS_END
#define MIRROR_QREG_GLOBAL_SCOPE_VARIABLES (   VARIABLES)

Macro for quick registering of global scope enumerations.

Parameters:
VARIABLESa sequence of variable names enclosed in parenthesises for example (x)(y)(z)
See also:
MIRROR_QREG_FREE_VARIABLES
Examples:
mirror/example/meta_prog_11.cpp.
#define MIRROR_QREG_NESTED_POD_CLASS (   ELABORATED_TYPE,
  PARENT_CLASS,
  CLASS,
  MEMBERS 
)

Macro for quick registering of POD classes nested in other classes.

Parameters:
ELABORATED_TYPEthe type of the class this parameter can have the following values (class, struct, union, enum and _ for default (class))
PARENT_CLASSthe full class name inside of which the registerd class is nested.
CLASSthe base class name.
MEMBERSa sequence of member variable names enclosed in parenthesises for example (x)(y)(z)
See also:
MIRROR_QREG_POD_CLASS
MIRROR_REG_NESTED_CLASS_BEGIN
MIRROR_REG_CLASS_END
#define MIRROR_QREG_POD_CLASS (   ELABORATED_TYPE,
  NAMESPACE,
  CLASS,
  MEMBERS 
)

Macro for quick registering of POD class without base classes, etc.

Parameters:
ELABORATED_TYPEthe type of the class this parameter can have the following values (class, struct, union, enum and _ for default (class))
NAMESPACEthe full namespace name inside of which the class is nested.
CLASSthe base class name.
MEMBERSa sequence of member variable names enclosed in parenthesises for example (x)(y)(z)
See also:
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_CLASS_END
MIRROR_REG_BASE_CLASS
Examples:
mirror/example/factories/grades.cpp, mirror/example/stream_03.cpp, and mirror/example/stream_04.cpp.
#define MIRROR_REG_BASE_CLASS (   INHERITANCE_TYPE,
  ACCESS_TYPE,
  BASE_CLASS 
)

Macro that registers one base class inheritance.

This macro must be used between the MIRROR_REG_BASE_CLASSES_BEGIN and the MIRROR_REG_BASE_CLASSES_END macros and must be comma separated from the other invocations of this macro between the MIRROR_REG_BASE_CLASSES_BEGIN and MIRROR_REG_BASE_CLASSES_END macros.

Parameters:
INHERITANCE_TYPEthe inheritance type specifier. This argument must have one of these values (virtual, non_virtual or _ for default (non-virtual)).
ACCESS_TYPEthe member access type specifier. This argument must have one of these values (private, protected, public or _ for default (public for struct(s) and private for class(es))).
BASE_CLASSthe full base class type name.
See also:
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_CLASS_END
MIRROR_REG_BASE_CLASSES_BEGIN
MIRROR_REG_BASE_CLASSES_END
Examples:
mirror/example/various_03.cpp.
#define MIRROR_REG_BASE_CLASSES_BEGIN

Macro that begins the registering of the base classes of a class.

This macro must be used between the MIRROR_REG_CLASS_BEGIN and the MIRROR_REG_CLASS_END macros.

See also:
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_CLASS_END
MIRROR_REG_BASE_CLASS
Examples:
mirror/example/various_03.cpp.
#define MIRROR_REG_BASE_CLASSES_END

Macro that ends the registering of the base classes of a class.

This macro must be used between the MIRROR_REG_CLASS_BEGIN and the MIRROR_REG_CLASS_END macros and after the MIRROR_REG_BASE_CLASSES_BEGIN macro.

See also:
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_CLASS_END
MIRROR_REG_BASE_CLASS
Examples:
mirror/example/various_03.cpp.
MIRROR_REG_BEGIN
#define MIRROR_REG_CLASS_BEGIN (   ELABORATED_TYPE,
  NAMESPACE,
  CLASS 
)

Macro that begins the registering of an elaborate type.

Parameters:
ELABORATED_TYPEthe type of the class this parameter can have the following values (class, struct, union, enum and _ for default (class))
NAMESPACEthe full namespace name inside of which the class is nested.
CLASSthe base class name.
See also:
MIRROR_REG_CLASS_END
MIRROR_REG_BASE_CLASS
Examples:
mirror/example/typedefd_members.cpp, and mirror/example/various_03.cpp.
#define MIRROR_REG_CLASS_CONVERSIONS (   TYPELIST)

Macro for the registering of types the class is convertible to.

This macro allows to register the other types that the currently registered class is convertible into, i.e. has the apropriate conversion operators.

This macro must be used between the MIRROR_REG_CLASS_BEGIN and the MIRROR_REG_CLASS_END macros.

Parameters:
TYPELISTthe comma separated list of fully qualified types enclosed in parentheses.
  MIRROR_REG_CLASS_BEGIN(class, myproject, X)
    MIRROR_REG_CLASS_CONVERSIONS((::myproject::Y, ::myproject::Z))
  MIRROR_REG_CLASS_END
See also:
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_CLASS_END
#define MIRROR_REG_CLASS_END

Macro that ends the registering of an elaborate type.

See also:
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_BASE_CLASS
Examples:
mirror/example/typedefd_members.cpp, and mirror/example/various_03.cpp.
#define MIRROR_REG_CLASS_MEM_VAR (   ACCESS_TYPE,
  STORAGE_CLASS,
  TYPE,
  NAME 
)

Macro for registering a single class member variable.

This registering macro registers a single member variable of a class, in case the member variable is a regular non-const and publically accessible member variable or its parent class definition contains the MIRROR_FRIENDLY_CLASS macro.

This macro must be used between the MIRROR_REG_CLASS_MEM_VARS_BEGIN and the MIRROR_REG_CLASS_MEM_VARS_END macros.

Parameters:
ACCESS_TYPEthe access type specifier (private|protected|publici|_) In case the special '_' specifier is used, then the access type is either determined from the elaborated type specifier of the parent class or from the explicitly specified access of a previous member (if any).
STORAGE_CLASSthe storage class specifier for the member variable (static|mutable|auto|...|_) if the special '_' specifier is used,then auto is assumed.
TYPEthe type of the member variable. If the special '_' specifier is used, then the type if automatically detected, if it is possible.
NAMEthe name (i.e. identifier not a string) of the member variable.
See also:
MIRROR_REG_CLASS_MEM_VARS_BEGIN
MIRROR_REG_CLASS_MEM_VARS_END
MIRROR_REG_CLASS_MEM_VAR_GET_SET
MIRROR_FRIENDLY_CLASS
Examples:
mirror/example/typedefd_members.cpp, and mirror/example/various_03.cpp.
#define MIRROR_REG_CLASS_MEM_VAR_GET_SET (   ACCESS_TYPE,
  STORAGE_CLASS,
  TYPE,
  NAME,
  GET_EXPRESSION,
  SET_EXPRESSION 
)

Macro for registering a single class member variable.

This registering macro registers a single member variable of a class and allows to specify custom expressions for getting and setting the value of the member variable in case it is necessary. This macro must be used between the MIRROR_REG_CLASS_MEM_VARS_BEGIN and the MIRROR_REG_CLASS_MEM_VARS_END macros. In case the member variable is a regular non-const and publically accessible member variable, the MIRROR_REG_CLASS_MEM_VAR macro can be used.

Parameters:
ACCESS_TYPEthe access type specifier (private|protected|publici|_) In case the special '_' specifier is used, then the access type is either determined from the elaborated type specifier of the parent class or from the explicitly specified access of a previous member (if any).
STORAGE_CLASSthe storage class specifier for the member variable (static|mutable|auto|...|_) if the special '_' specifier is used,then auto is assumed.
TYPEthe type of the member variable. If the special '_' specifier is used, then the type if automatically detected, if it is possible.
NAMEthe name (i.e. identifier not a string) of the member variable.
GET_EXPRESSIONthe expression which returns the value of the member variable from a const reference to an instance of the parent class of the member var. The reference to the parent class instance can be accessed by the pre-defined _ variable.
SET_EXPRESSIONthe expression which sets the value of the member variable to a reference to an instance of the parent class of the member variable. The reference to the parent class instance can be accessed by the pre-defined _ variable, the value to be set is stored in a variable having the same name as the registered member variable prefixed with a single underscore.
See also:
MIRROR_REG_CLASS_MEM_VARS_BEGIN
MIRROR_REG_CLASS_MEM_VARS_END
MIRROR_REG_CLASS_MEM_VAR
MIRROR_FRIENDLY_CLASS
#define MIRROR_REG_CLASS_MEM_VARS_BEGIN

Macro that begins the registering of the class' member variables.

This macro must be used between the MIRROR_REG_CLASS_BEGIN and the MIRROR_REG_CLASS_END macros.

See also:
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_CLASS_END
MIRROR_REG_CLASS_ATTR_END
MIRROR_REG_CLASS_ATTR
Examples:
mirror/example/typedefd_members.cpp, and mirror/example/various_03.cpp.
#define MIRROR_REG_CLASS_MEM_VARS_END

Macro that ends the registering of the class' member variables.

This macro must be used between the MIRROR_REG_CLASS_BEGIN and the MIRROR_REG_CLASS_END macros.

See also:
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_CLASS_END
MIRROR_REG_CLASS_MEM_VARS_BEGIN
MIRROR_REG_CLASS_MEM_VAR
Examples:
mirror/example/typedefd_members.cpp, and mirror/example/various_03.cpp.
#define MIRROR_REG_CLASS_TEMPLATE (   ELABORATED_TYPE,
  NAMESPACE,
  NAME 
)

This macro registers a template class nested in a named namespace with Mirror.

Parameters:
ELABORATED_TYPEthe elaborated type specifier (class | struct )
NAMESPACEthe full namespace name NOT containing the leading double colon
NAMEthe base template type name
See also:
MIRROR_REG_GLOBAL_SCOPE_TYPE_TEMPLATE
MIRROR_REG_GLOBAL_SCOPE_CLASS_TEMPLATE
MIRRORED_TEMPLATE
#define MIRROR_REG_CLASS_TEMPLATE_BEGIN (   TEMPLATE_PARAMS,
  ELABORATED_TYPE,
  NAMESPACE,
  CLASS,
  PARAM_LIST 
)

This macro begins the registering of a class template with Mirror.

This macro is similar to the MIRROR_REG_CLASS_BEGIN except that it registers a class template instead of a regular class. The registering is ended with the MIRROR_REG_CLASS_END macro.

Parameters:
TEMPLATE_PARAMSthe list of template parameters enclosed in parentheses. For example (typename A, typename B, typename C)
ELABORATED_TYPEthe type of the class this parameter can have the following values (class, struct, union, enum and _ for default (class))
NAMESPACEthe full namespace name inside of which the class is nested.
CLASSthe base class name.
PARAM_LISTthe list of template parameter names enclosed in parentheses. For example (A, B, C).
See also:
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_CLASS_END
MIRROR_REG_TYPE_TEMPLATE
MIRROR_REG_CLASS_TEMPLATE
MIRROR_REG_GLOBAL_SCOPE_TYPE_TEMPLATE
MIRROR_REG_GLOBAL_SCOPE_CLASS_TEMPLATE
MIRRORED_TEMPLATE
#define MIRROR_REG_CONSTRUCTOR_BEGIN (   ACCESS_TYPE,
  ID 
)

Macro that ends the registering of a single class' constructor.

This macro must be used between the MIRROR_REG_CONSTRUCTORS_BEGIN and the MIRROR_REG_CONSTRUCTORS_END macros.

Parameters:
ACCESS_TYPEthe access type specifier (private|protected|public|_) In case the special '_' specifier is used, then the access type is determined from the elaborated type specifier of the parent class
IDa unique identifier of the constructor within the class. Same rules as for C++ identifiers apply except it is possible for the identifier to start with a digit. i.e. 1 is a valid constructor identifier.
See also:
MIRROR_REG_CONSTRUCTOR_END
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_CLASS_END
MIRROR_REG_CONSTRUCTORS_BEGIN
MIRROR_REG_CONSTRUCTORS_END
MIRROR_REG_STRUCT_INITIALIZER
MIRROR_REG_DEFAULT_CONSTRUCTOR
MIRROR_REG_COPY_CONSTRUCTOR
MIRROR_REG_INITLIST_CONSTRUCTOR
#define MIRROR_REG_CONSTRUCTOR_END (   ID)

Macro that ends the registering of a single class' constructor.

This macro must be used between the MIRROR_REG_CONSTRUCTORS_BEGIN and the MIRROR_REG_CONSTRUCTORS_END macros.

Parameters:
IDa unique identifier of the constructor within the class. Same rules as for C++ identifiers apply except it is possible for the identifier to start with a digit. i.e. 1 is a valid constructor identifier.
See also:
MIRROR_REG_CONSTRUCTOR_BEGIN
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_CLASS_END
MIRROR_REG_CONSTRUCTORS_BEGIN
MIRROR_REG_CONSTRUCTORS_END
#define MIRROR_REG_CONSTRUCTOR_PARAM (   TYPE,
  NAME 
)

Macro that registers a single parameter of a constructor.

This macro must be used between the MIRROR_REG_CONSTRUCTOR_BEGIN and the MIRROR_REG_CONSTRUCTOR_END macros. The parameters must be registered in the same order as they appear in the constructor.

Parameters:
TYPEthe type of the parameter. If the class that this constructor belongs to has a member variable with the same name as NAME you can use the special value '_'. If _ is used then the type of this constructor parameter is deduced from the type of the member variable NAME.
NAMEthe name of the parameter (an identifier not a string).
See also:
MIRROR_REG_CONSTRUCTOR_BEGIN
MIRROR_REG_CONSTRUCTOR_END
MIRROR_REG_CONSTRUCTORS_BEGIN
MIRROR_REG_CONSTRUCTORS_END
#define MIRROR_REG_CONSTRUCTORS_BEGIN

Macro that begins the registering of the class' constructors.

This macro must be used between the MIRROR_REG_CLASS_BEGIN and the MIRROR_REG_CLASS_END macros.

See also:
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_CLASS_END
MIRROR_REG_CONSTRUCTORS_END
MIRROR_REG_STRUCT_INITIALIZER
MIRROR_REG_DEFAULT_CONSTRUCTOR
MIRROR_REG_COPY_CONSTRUCTOR
MIRROR_REG_INITLIST_CONSTRUCTOR
#define MIRROR_REG_CONSTRUCTORS_END

Macro that ends the registering of the class' constructors.

This macro must be used between the MIRROR_REG_CLASS_BEGIN and the MIRROR_REG_CLASS_END macros.

See also:
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_CLASS_END
MIRROR_REG_CONSTRUCTORS_BEGIN
MIRROR_REG_STRUCT_INITIALIZER
MIRROR_REG_DEFAULT_CONSTRUCTOR
MIRROR_REG_COPY_CONSTRUCTOR
MIRROR_REG_INITLIST_CONSTRUCTOR
#define MIRROR_REG_COPY_CONSTRUCTOR (   ACCESS_TYPE)

Macro that registers the class' copy constructor.

This macro must be used between the MIRROR_REG_CONSTRUCTORS_BEGIN and the MIRROR_REG_CONSTRUCTORS_END macros.

Parameters:
ACCESS_TYPEthe access type specifier (private|protected|publici|_) In case the special '_' specifier is used, then the access type is determined from the elaborated type specifier of the parent class
See also:
MIRROR_REG_CONSTRUCTORS_BEGIN
MIRROR_REG_CONSTRUCTORS_END
MIRROR_REG_DEFAULT_CONSTRUCTOR
MIRROR_REG_STRUCT_INITIALIZER
MIRROR_REG_INITLIST_CONSTRUCTOR
#define MIRROR_REG_DEFAULT_CONSTRUCTOR (   ACCESS_TYPE)

Macro that registers the class' default constructor.

This macro must be used between the MIRROR_REG_CONSTRUCTORS_BEGIN and the MIRROR_REG_CONSTRUCTORS_END macros.

Parameters:
ACCESS_TYPEthe access type specifier (private|protected|publici|_) In case the special '_' specifier is used, then the access type is determined from the elaborated type specifier of the parent class
See also:
MIRROR_REG_CONSTRUCTORS_BEGIN
MIRROR_REG_CONSTRUCTORS_END
MIRROR_REG_COPY_CONSTRUCTOR
MIRROR_REG_STRUCT_INITIALIZER
MIRROR_REG_INITLIST_CONSTRUCTOR
#define MIRROR_REG_END
#define MIRROR_REG_ENUM_BEGIN (   NAMESPACE,
  ENUM 
)

Macro which begins the registering of an enum nested in a namespace.

Parameters:
NAMESPACEfull namespace name inside of which the enum is defined
ENUMname of the enumeration type
See also:
MIRROR_REG_GLOBAL_SCOPE_ENUM_BEGIN
MIRROR_REG_ENUM_END
#define MIRROR_REG_ENUM_END

Macro which ends the registering on an enumeration.

See also:
MIRROR_REG_GLOBAL_SCOPE_ENUM_BEGIN
MIRROR_REG_ENUM_BEGIN
#define MIRROR_REG_ENUM_VALUE (   ENUM_VALUE)

Macro which registers an enum value.

See also:
MIRROR_REG_ENUM_BEGIN
MIRROR_REG_ENUM_END
#define MIRROR_REG_FREE_FUNCTION_BEGIN (   LINKAGE,
  RESULT_TYPE,
  ID 
)

Starts the definition of one of function overloads.

Parameters:
LINKAGEthe linkage of the function
RESULT_TYPEthe result type of the function
IDa unique id of the overload
See also:
MIRROR_REG_GLOBAL_SCOPE_OVLD_FUNC_BEGIN
MIRROR_REG_FREE_OVLD_FUNC_BEGIN
MIRROR_REG_FREE_FUNCTION_END
#define MIRROR_REG_FREE_FUNCTION_END (   ID)

Ends the definition of one of function overloads.

Parameters:
IDa unique id of the overload
See also:
MIRROR_REG_GLOBAL_SCOPE_OVLD_FUNC_BEGIN
MIRROR_REG_FREE_OVLD_FUNC_BEGIN
MIRROR_REG_FREE_FUNCTION_BEGIN
#define MIRROR_REG_FREE_OVLD_FUNC_END (   NAMESPACE,
  NAME 
)

Ends the registering of a set of nested overloaded functions.

Parameters:
NAMESPACEfull name of the namespace where the functions are defined
NAMEthe name of the overloaded function
See also:
MIRROR_REG_FREE_OVLD_FUNC_BEGIN
#define MIRROR_REG_FREE_VARIABLE (   STORAGE_CLASS,
  NAMESPACE,
  VARIABLE 
)

This macro registers a variable from the a namespace with Mirror.

Parameters:
STORAGE_CLASSthe storage class of the variable. _ is the default.
NAMESPACEfull name of the namespace where the variable is defined
VARIABLEthe variable name
See also:
MIRROR_REG_FREE_VARIABLE
#define MIRROR_REG_GLOBAL_SCOPE_CLASS_BEGIN (   ELABORATED_TYPE,
  CLASS 
)

Begins the registering of an elaborate type from the global scope.

Parameters:
ELABORATED_TYPEthe type of the class this parameter can have the following values (class, struct, union, enum and _ for default (class))
CLASSthe base class name.
See also:
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_CLASS_END
MIRROR_REG_BASE_CLASS
#define MIRROR_REG_GLOBAL_SCOPE_CLASS_TEMPLATE (   ELABORATED_TYPE,
  NAME 
)

This macro registers a class template defined in the global scope.

Parameters:
NAMEthe base type name
See also:
MIRROR_REG_TYPE_TEMPLATE
MIRROR_REG_CLASS_TEMPLATE
MIRRORED_TEMPLATE
#define MIRROR_REG_GLOBAL_SCOPE_ENUM_BEGIN (   ENUM)

Macro which begins the registering of a global scope enum.

Parameters:
ENUMname of the enumeration type
See also:
MIRROR_REG_ENUM_BEGIN
MIRROR_REG_ENUM_END
#define MIRROR_REG_GLOBAL_SCOPE_OVLD_FUNC_BEGIN (   NAME)

Registers a set of overloaded functions from the global scope with Mirror.

Parameters:
NAMEthe name of the overloaded functions
See also:
MIRROR_REG_GLOBAL_SCOPE_OVLD_FUNC_END
#define MIRROR_REG_GLOBAL_SCOPE_OVLD_FUNC_END (   NAME)

Ends the registering of a set of overloaded functions from the global scope.

Parameters:
NAMEthe name of the overloaded function
See also:
MIRROR_REG_GLOBAL_SCOPE_OVLD_FUNC_BEGIN
#define MIRROR_REG_GLOBAL_SCOPE_TYPE (   NAME)

This macro registers a type defined in the global scope with Mirror.

Parameters:
NAMEthe base type name
See also:
MIRROR_REG_TYPE
MIRRORED_TYPE
mirror::reflected
#define MIRROR_REG_GLOBAL_SCOPE_TYPE_TEMPLATE (   NAME)

This macro registers a type template defined in the global scope.

Parameters:
NAMEthe base type name
See also:
MIRROR_REG_TYPE_TEMPLATE
MIRROR_REG_CLASS_TEMPLATE
MIRRORED_TEMPLATE
#define MIRROR_REG_GLOBAL_SCOPE_TYPEDEF (   TYPEDEF)

This macro registers a typedef from the global scope with Mirror.

Parameters:
TYPEDEFthe typefined type name
See also:
MIRROR_REG_TYPEDEF
MIRRORED_TYPEDEF
#define MIRROR_REG_GLOBAL_SCOPE_VARIABLE (   STORAGE_CLASS,
  VARIABLE 
)

This macro registers a variable from the global scope with Mirror.

Parameters:
STORAGE_CLASSthe storage class of the variable. _ is the default.
VARIABLEthe variable name
See also:
MIRROR_REG_FREE_VARIABLE
#define MIRROR_REG_INITLIST_CONSTRUCTOR (   ACCESS_TYPE,
  ELEMENT_TYPE,
  NAME 
)

Macro that registers the class' initializer_list constructor.

This macro must be used between the MIRROR_REG_CONSTRUCTORS_BEGIN and the MIRROR_REG_CONSTRUCTORS_END macros.

Parameters:
ACCESS_TYPEthe access type specifier (private|protected|publici|_) In case the special '_' specifier is used, then the access type is determined from the elaborated type specifier of the parent class
ELEMENT_TYPEthe type of the elements in the initializer list
NAMEthe name of the initializer-list parameter
See also:
MIRROR_REG_CONSTRUCTORS_BEGIN
MIRROR_REG_CONSTRUCTORS_END
MIRROR_REG_DEFAULT_CONSTRUCTOR
MIRROR_REG_STRUCT_INITIALIZER
MIRROR_REG_COPY_CONSTRUCTOR
#define MIRROR_REG_MEM_FUNCTION_BEGIN (   ACCESS_TYPE,
  LINKAGE_TYPE,
  RESULT_TYPE,
  NAME,
  ID 
)

Macro that ends the registering of a single class' member function.

This macro must be used between the MIRROR_REG_MEM_FUNCTIONS_BEGIN and the MIRROR_REG_MEM_FUNCTIONS_END macros.

Parameters:
ACCESS_TYPEthe access type specifier (private|protected|public|_) In case the special '_' specifier is used, then the access type is determined from the elaborated type specifier of the parent class
LINKAGE_TYPEthe linkage type or storage class specifier for the member function (static|_).
RESULT_TYPEthe type of the result of the member function.
NAMEthe name of the member function.
IDa unique identifier of the member function within the overloads with the same name. Same rules as for C++ identifiers apply except it is possible for the identifier to start with a digit. i.e. 1 is a valid member function identifier.
See also:
MIRROR_REG_MEM_FUNCTION_END
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_CLASS_END
MIRROR_REG_MEM_FUNCTIONS_BEGIN
MIRROR_REG_MEM_FUNCTIONS_END
#define MIRROR_REG_MEM_FUNCTION_END (   ID,
  CONST 
)

Macro that ends the registering of a single class' member function.

This macro must be used between the MIRROR_REG_MEM_FUNCTIONS_BEGIN and the MIRROR_REG_MEM_FUNCTIONS_END macros.

Parameters:
NAMEthe name of the parameter (an identifier not a string).
IDa unique identifier of the member function within the overloads with the same name. Same rules as for C++ identifiers apply except it is possible for the identifier to start with a digit. i.e. 1 is a valid member function identifier.
CONSTthe constness specifier. Can be either non_const or _ for non-const member functions or const for const member functions.
See also:
MIRROR_REG_MEM_FUNCTION_BEGIN
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_CLASS_END
MIRROR_REG_MEM_FUNCTIONS_BEGIN
MIRROR_REG_MEM_FUNCTIONS_END
#define MIRROR_REG_MEM_FUNCTION_PARAM (   TYPE,
  NAME 
)

Macro that ends the registering of a single class' constructor Macro that registers a single parameter of a member function This macro must be used between the MIRROR_REG_MEM_FUNCTION_BEGIN and the MIRROR_REG_MEM_FUNCTION_END macros. The parameters must be registered in the same order as they appear in the function.

Parameters:
TYPEthe type of the parameter. If the class that this member function belongs to has a member variable with the same name as NAME you can use the special value '_'. If _ is used then the type of this function parameter is deduced from the type of the member variable NAME.
NAMEthe name of the parameter (an identifier not a string).
See also:
MIRROR_REG_MEM_FUNCTION_BEGIN
MIRROR_REG_MEM_FUNCTION_END
MIRROR_REG_MEM_FUNCTIONS_BEGIN
MIRROR_REG_MEM_FUNCTIONS_END
#define MIRROR_REG_MEM_FUNCTIONS_BEGIN

Macro that begins the registering of the class' member functions.

This macro must be used between the MIRROR_REG_CLASS_BEGIN and the MIRROR_REG_CLASS_END macros.

See also:
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_CLASS_END
MIRROR_REG_MEM_FUNCTIONS_END
#define MIRROR_REG_MEM_FUNCTIONS_END

Macro that ends the registering of the class' member functions.

This macro must be used between the MIRROR_REG_CLASS_BEGIN and the MIRROR_REG_CLASS_END macros.

See also:
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_CLASS_END
MIRROR_REG_MEM_FUNCTIONS_BEGIN
#define MIRROR_REG_MEM_OVLD_FUNC_BEGIN (   NAME)

Macro that starts the registering of a (overloaded) member function.

This macro must be used between the MIRROR_REG_MEM_FUNCTIONS_BEGIN and the MIRROR_REG_MEM_FUNCTIONS_END macros. This macro only registers the things common to all functions with the same name. The individual overloads are registered by the MIRROR_REG_MEM_FUNCTION_BEGIN and MIRROR_REG_MEM_FUNCTION_END macros.

See also:
MIRROR_REG_MEM_FUNCTIONS_BEGIN
MIRROR_REG_MEM_FUNCTIONS_END
MIRROR_REG_MEM_OVLD_FUNC_END
#define MIRROR_REG_MEM_OVLD_FUNC_END (   NAME)

Macro that ends the registering of a (overloaded) member function.

This macro must be used between the MIRROR_REG_MEM_FUNCTIONS_BEGIN and the MIRROR_REG_MEM_FUNCTIONS_END macros. This macro only registers the things common to all functions with the same name. The individual overloads are registered by the MIRROR_REG_MEM_FUNCTION_BEGIN and MIRROR_REG_MEM_FUNCTION_END macros.

See also:
MIRROR_REG_MEM_FUNCTIONS_BEGIN
MIRROR_REG_MEM_FUNCTIONS_END
MIRROR_REG_MEM_OVLD_FUNC_BEGIN
#define MIRROR_REG_NAMESPACE (   NAMESPACE_NAME)

This macro registers a namespace with Mirror.

See also:
MIRROR_REG_NAMESPACE_BEGIN
MIRROR_REG_NAMESPACE_END
MIRRORED_NAMESPACE
#define MIRROR_REG_NAMESPACE_BEGIN

This macro begins the registering of namespace(s) with Mirror.

See also:
MIRROR_REG_NAMESPACE_END
MIRROR_REG_NAMESPACE
#define MIRROR_REG_NAMESPACE_END

This macro ends the registering of namespace(s) with Mirror.

See also:
MIRROR_REG_NAMESPACE_BEGIN
MIRROR_REG_NAMESPACE
MIRROR_INIT_NAMESPACE_MEMBER_LIST
#define MIRROR_REG_NESTED_CLASS_BEGIN (   ELABORATED_TYPE,
  PARENT_CLASS,
  CLASS 
)

Macro that begins the registering of an elaborate type nested in a class.

Parameters:
ELABORATED_TYPEthe type of the class this parameter can have the following values (class, struct, union, enum and _ for default (class))
PARENT_CLASSthe full class name inside of which the class is nested.
CLASSthe base class name.
See also:
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_CLASS_END
MIRROR_REG_BASE_CLASS
#define MIRROR_REG_NESTED_ENUM_BEGIN (   PARENT_CLASS,
  ENUM 
)

Macro which begins the registering of an enum nested in a class.

Parameters:
PARENT_CLASSfull class name inside of which the enum is defined
ENUMname of the enumeration type
See also:
MIRROR_REG_GLOBAL_SCOPE_ENUM_BEGIN
MIRROR_REG_ENUM_BEGIN
MIRROR_REG_ENUM_END
#define MIRROR_REG_STD_CONTAINER_END

Ends the registering of a standard container.

See also:
MIRROR_REG_STD_CONTAINER_TEMPLATE_BEGIN
#define MIRROR_REG_STD_CONTAINER_OP (   KIND,
  NAME 
)

Registers a container operation (inserter, eraser, locator)

See also:
MIRROR_REG_STD_CONTAINER_TEMPLATE_BEGIN
MIRROR_REG_STD_CONTAINER_END
#define MIRROR_REG_STD_CONTAINER_TEMPLATE_BEGIN (   TEMPLATE_PARAMS,
  NAMESPACE,
  CLASS,
  PARAM_LIST,
  ELEMENT 
)

This macro begins the registering of a standard container template.

Parameters:
TEMPLATE_PARAMSthe list of template parameters enclosed in parentheses. For example (typename A, typename B, typename C)
NAMESPACEthe namespace where the container is defined
CONTAINERthe base container class name.
PARAM_LISTthe list of template parameter names enclosed in parentheses. For example (A, B, C).
ELEMENTthe element type
See also:
MIRROR_REG_STD_CONTAINER_END
#define MIRROR_REG_STD_FWD_CONTAINER_TRAVERSALS

Registers the traversals of a standard forward container.

See also:
MIRROR_REG_STD_CONTAINER_TEMPLATE_BEGIN
MIRROR_REG_STD_CONTAINER_END
MIRROR_REG_STD_REV_CONTAINER_TRAVERSALS
#define MIRROR_REG_STD_REV_CONTAINER_TRAVERSALS

Registers the traversals of a standard reversible container.

See also:
MIRROR_REG_STD_CONTAINER_TEMPLATE_BEGIN
MIRROR_REG_STD_CONTAINER_END
MIRROR_REG_STD_FWD_CONTAINER_TRAVERSALS
#define MIRROR_REG_STRUCT_INITIALIZER ( )

Macro that registers the POD class' initializer as constructor.

This macro must be used between the MIRROR_REG_CONSTRUCTORS_BEGIN and the MIRROR_REG_CONSTRUCTORS_END macros.

See also:
MIRROR_REG_CONSTRUCTORS_BEGIN
MIRROR_REG_CONSTRUCTORS_END
MIRROR_REG_DEFAULT_CONSTRUCTOR
MIRROR_REG_COPY_CONSTRUCTOR
MIRROR_REG_INITLIST_CONSTRUCTOR
#define MIRROR_REG_TYPE (   NAMESPACE,
  NAME 
)

This macro registers a type nested in a named namespace with Mirror.

Parameters:
NAMESPACEthe full namespace name NOT containing the leading double colon
NAMEthe base type name
See also:
MIRROR_REG_GLOBAL_SCOPE_TYPE
MIRRORED_TYPE
mirror::reflected
Examples:
mirror/example/hello_world.cpp, and mirror/example/typenames_03.cpp.
#define MIRROR_REG_TYPE_ALIAS (   TYPENAME,
  ALIAS 
)

Macro that creates an alias for a type.

This macro can be used to create an alias for a type inside of the class registering expression, basically to do a typedef.

Doing this is necessary with templated types whose name contains a comma. TODO

See also:
MIRROR_REG_CLASS_BEGIN
MIRROR_REG_CLASS_END
#define MIRROR_REG_TYPE_TEMPLATE (   NAMESPACE,
  NAME 
)

This macro registers a template type nested in a named namespace with Mirror.

Parameters:
NAMESPACEthe full namespace name NOT containing the leading double colon
NAMEthe base template type name
See also:
MIRROR_REG_GLOBAL_SCOPE_TYPE_TEMPLATE
MIRROR_REG_GLOBAL_SCOPE_CLASS_TEMPLATE
MIRRORED_TEMPLATE
#define MIRROR_REG_TYPEDEF (   NAMESPACE,
  TYPEDEF 
)

This macro registers a typedef nested in a named namespace with Mirror.

Parameters:
NAMESPACEthe full namespace name NOT containing the leading double colon
TYPEDEFthe base type name
See also:
MIRROR_REG_GLOBAL_SCOPE_TYPEDEF
MIRRORED_TYPEDEF
Examples:
mirror/example/typedefd_members.cpp.

Copyright © 2006-2011 Matus Chochlik, University of Zilina, Zilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Fri Dec 16 2011 by Doxygen (version 1.7.3).
Important note: Although the 'boostified' version of Mirror uses the Boost C++ libraries Coding Guidelines and is implemented inside of the boost namespace, it IS NOT an officially reviewed and accepted Boost library. Mirror is being developed with the intention to be submitted for review for inclusion to the Boost C++ libraries.