Mirror reflection library 0.5.13
Classes | Namespaces | Defines

mirror/object_tagging.hpp File Reference

Implementation of reflected object tagging. More...

#include <mirror/mirror_fwd.hpp>
#include <mirror/auxiliary/named.hpp>
#include <mirror/meta_prog/is_a.hpp>
Include dependency graph for object_tagging.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.

Detailed Description

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 Documentation

#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.

See also:
MIRROR_REG_OBJECT_TAG
MIRROR_TAG_TYPE
Examples:
mirror/example/meta_prog_06.cpp.
#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.

See also:
MIRROR_OBJECT_TAG
#define MIRROR_TAG_TYPE (   TYPE,
  TAGS 
)
Value:
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.

See also:
MIRROR_REG_OBJECT_TAG
MIRROR_OBJECT_TAG

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.