Mirror reflection library 0.5.13
|
Implementation of reflected object tagging. More...
#include <mirror/mirror_fwd.hpp>
#include <mirror/auxiliary/named.hpp>
#include <mirror/meta_prog/is_a.hpp>
Go to the source code of this file.
Classes | |
class | mirror::tag< Selector > |
Template for creating tag types which can be used for object tagging. More... | |
struct | mirror::tags< MetaObject > |
Meta-function returning the tags of a meta-object. More... | |
Namespaces | |
namespace | mirror |
All Mirror's types, classes, functions, etc. are defined in this namespace. | |
Defines | |
#define | MIRROR_REG_OBJECT_TAG(TAG) |
This macro registers a new tag for tagging reflected objects. | |
#define | MIRROR_OBJECT_TAG(TAG) |
Expands into an instantiation of the tag template for the TAG. | |
#define | MIRROR_TAG_TYPE(TYPE, TAGS) |
Assigns the list of TAGS to the TYPE. |
Implementation of reflected object tagging.
Copyright 2008-2010 Matus Chochlik. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#define MIRROR_OBJECT_TAG | ( | TAG | ) |
Expands into an instantiation of the tag template for the TAG.
This macro expands into an instantiation of the tag template class for the TAG previously registered with the MIRROR_REG_OBJECT_TAG
macro.
#define MIRROR_REG_OBJECT_TAG | ( | TAG | ) |
This macro registers a new tag for tagging reflected objects.
Once registered tags can be used to tag the objects reflected by Mirror. For example one can assign a single_instance tag to a class or a unique tag to a class member variable, etc.
#define MIRROR_TAG_TYPE | ( | TYPE, | |
TAGS | |||
) |
namespace tagsel { \ template <> \ struct type_tags< TYPE > \ { \ typedef mirror::mp::range< \ MIRROR_PP_EXPAND_ARGS TAGS \ > type; \ }; \ }
Assigns the list of TAGS to the TYPE.
This macro assigns the comma separated list of TAGS (enclosed in parentheses) to the type specified by the TYPE argument.
All the tags must be registered with the MIRROR_REG_OBJECT_TAG
macro before they can be used.