Mirror reflection library 0.5.13
Defines

Mirror - Quick-registering macros

Defines

#define MIRROR_QREG_GLOBAL_SCOPE_NAMESPACE(NAMESPACE)
 Macro for quick registering of a single namespace under the global scope.
#define MIRROR_QREG_NESTED_NAMESPACE(PARENT_NAMESPACE, NESTED_NAMESPACE)
 Macro for quick registering of a namespace nested in top-level namespace.
#define MIRROR_QREG_NESTED_NESTED_NAMESPACE(GRANDPARENT_NAMESPACE, PARENT_NAMESPACE, NESTED_NAMESPACE)
 Macro for quick registering of a namespace nested in a nested namespace.
#define MIRROR_QREG_GLOBAL_SCOPE_ENUM(ENUM, VALUES)
 Macro for quick registering of global scope enumerations.
#define MIRROR_QREG_ENUM(NAMESPACE, ENUM, VALUES)
 Macro for quick registering of enumerations.
#define MIRROR_QREG_NESTED_ENUM(PARENT_CLASS, ENUM, VALUES)
 Macro for quick registering of enumerations nested in a class.

Detailed Description

Even if flexible, the regular registering macros can be little cumbersome for some registering tasks. For example the registering of a POD class involves specifying all member variables and the default, copy and structure initializer constructors, each by a separate macro invocation. The quick registering macros simplify the registering of some special constructs like POD classes, enums, etc. at the cost of a dependency on an external library (Boost.Preprocessor).

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


Define Documentation

#define MIRROR_QREG_ENUM (   NAMESPACE,
  ENUM,
  VALUES 
)

Macro for quick registering of enumerations.

Parameters:
NAMESPACEthe full namespace name inside of which the enum is nested.
ENUMthe base enum name.
VALUESa sequence of enumeration value names enclosed in parenthesises for example (x)(y)(z)
See also:
MIRROR_REG_ENUM_BEGIN
MIRROR_REG_ENUM_END
Examples:
mirror/example/stream_03.cpp, and mirror/example/stream_04.cpp.
#define MIRROR_QREG_GLOBAL_SCOPE_ENUM (   ENUM,
  VALUES 
)

Macro for quick registering of global scope enumerations.

Parameters:
ENUMthe base enum name.
VALUESa sequence of enumeration value names enclosed in parenthesises for example (x)(y)(z)
See also:
MIRROR_QREG_ENUM
MIRROR_REG_GLOBAL_SCOPE_ENUM_BEGIN
MIRROR_REG_ENUM_END
#define MIRROR_QREG_GLOBAL_SCOPE_NAMESPACE (   NAMESPACE)

Macro for quick registering of a single namespace under the global scope.

This macro can be used for registering of a single namespace defined directly in the global scope i.e. not a nested namespace. This macro takes care of registering the namespace and initializing the member type list.

Parameters:
NAMESPACEthe name of the namespace to be registered
See also:
MIRROR_REG_NAMESPACE_BEGIN
MIRROR_REG_NAMESPACE
MIRROR_REG_NAMESPACE_END
MIRROR_INIT_NAMESPACE_MEMBER_LIST
MIRROR_QREG_NESTED_NAMESPACE
Examples:
mirror/example/factories/grades.cpp, mirror/example/hello_world.cpp, mirror/example/meta_prog_11.cpp, mirror/example/stream_03.cpp, mirror/example/stream_04.cpp, mirror/example/typedefd_members.cpp, mirror/example/typenames_03.cpp, and mirror/example/various_03.cpp.
#define MIRROR_QREG_NESTED_ENUM (   PARENT_CLASS,
  ENUM,
  VALUES 
)

Macro for quick registering of enumerations nested in a class.

Parameters:
PARENT_CLASSthe full class name inside of which the enum is nested.
ENUMthe base enum name.
VALUESa sequence of member variable names enclosed in parenthesises for example (x)(y)(z)
See also:
MIRROR_REG_NESTED_ENUM_BEGIN
MIRROR_REG_ENUM_END
Examples:
mirror/example/factories/grades.cpp.
#define MIRROR_QREG_NESTED_NAMESPACE (   PARENT_NAMESPACE,
  NESTED_NAMESPACE 
)

Macro for quick registering of a namespace nested in top-level namespace.

This macro can be used for registering of a single namespace defined in another namespace nested directly in the global scope. This macro takes care of registering the namespace and initializing the member type list. The enclosing parent namespace must be registered before the nested namespace is registered.

Parameters:
PARENT_NAMESPACEthe name of the parent namespace
NESTED_NAMESPACEthe name of the nested namespace to be registered
See also:
MIRROR_REG_NAMESPACE_BEGIN
MIRROR_REG_NAMESPACE
MIRROR_REG_NAMESPACE_END
MIRROR_INIT_NAMESPACE_MEMBER_LIST
MIRROR_QREG_GLOBAL_SCOPE_NAMESPACE
Examples:
mirror/example/typenames_03.cpp, and mirror/example/various_03.cpp.
#define MIRROR_QREG_NESTED_NESTED_NAMESPACE (   GRANDPARENT_NAMESPACE,
  PARENT_NAMESPACE,
  NESTED_NAMESPACE 
)

Macro for quick registering of a namespace nested in a nested namespace.

This macro can be used for registering of a single namespace defined in another namespace nested in namespace under the global scope. This macro takes care of registering the namespace and initializing the member type list. The enclosing parent namespace must be registered before the nested namespace is registered.

Parameters:
GRANDPARENT_NAMESPACEthe name of the top-level namespace
PARENT_NAMESPACEthe name of the parent namespace
NESTED_NAMESPACEthe name of the nested namespace to be registered
See also:
MIRROR_REG_NAMESPACE_BEGIN
MIRROR_REG_NAMESPACE
MIRROR_REG_NAMESPACE_END
MIRROR_INIT_NAMESPACE_MEMBER_LIST
MIRROR_QREG_GLOBAL_SCOPE_NAMESPACE
MIRROR_QREG_NESTED_NAMESPACE
Examples:
mirror/example/typenames_03.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.