|
Bytemaster's Boost Libraries
|
Defines types and macros used to provide reflection. More...
#include <boost/static_assert.hpp>#include <boost/preprocessor/seq/for_each_i.hpp>#include <boost/preprocessor/seq/seq.hpp>#include <boost/preprocessor/stringize.hpp>#include <boost/preprocessor/tuple/elem.hpp>#include <boost/preprocessor/facilities/empty.hpp>#include <boost/type_traits/remove_const.hpp>#include <boost/type_traits/remove_reference.hpp>#include <boost/type_traits/remove_pointer.hpp>#include <string>#include <typeinfo>#include <vector>#include <list>#include <set>#include <map>#include <stdint.h>#include <boost/fusion/container/vector.hpp>#include <boost/reflect/void.hpp>#include <boost/reflect/vtable.hpp>#include <boost/reflect/typeinfo.hpp>Go to the source code of this file.
Classes | |
| struct | boost::reflect::reflector< T > |
| defines visit functions for T Unless this is specialized, visit() will not be defined for T. More... | |
Namespaces | |
| namespace | boost |
Defines | |
| #define | BOOST_REFLECT_VISIT_BASE(r, visitor, base) boost::reflect::reflector<base>::visit( visitor ); |
| #define | BOOST_REFLECT_VISIT_MEMBER(r, visitor, elem) visitor.template operator()<BOOST_TYPEOF(type::elem),type,&type::elem>( BOOST_PP_STRINGIZE(elem) ); |
| #define | BOOST_REFLECT_IMPL(TYPE, INHERITS, MEMBERS) |
| #define | BOOST_REFLECT_DERIVED(TYPE, INHERITS, MEMBERS) |
| Specializes boost::reflect::reflector for TYPE where type inherits other reflected classes. | |
| #define | BOOST_REFLECT(TYPE, MEMBERS) BOOST_REFLECT_DERIVED( TYPE, BOOST_PP_SEQ_NIL, MEMBERS ) |
| Specializes boost::reflect::reflector for TYPE. | |
Defines types and macros used to provide reflection.
This class defines the macros and types used to implement an REFLECT interface.
| #define BOOST_REFLECT | ( | TYPE, | |
| MEMBERS | |||
| ) | BOOST_REFLECT_DERIVED( TYPE, BOOST_PP_SEQ_NIL, MEMBERS ) |
Specializes boost::reflect::reflector for TYPE.
| MEMBERS | - a sequence of member names. (field1)(field2)(field3) |
| #define BOOST_REFLECT_DERIVED | ( | TYPE, | |
| INHERITS, | |||
| MEMBERS | |||
| ) |
BOOST_REFLECT_TYPEINFO(TYPE) \ namespace boost { namespace reflect { \ template<> struct reflector<TYPE> {\ typedef TYPE type; \ typedef boost::true_type is_defined; \ BOOST_REFLECT_IMPL( TYPE, INHERITS, MEMBERS ) \ }; } }
Specializes boost::reflect::reflector for TYPE where type inherits other reflected classes.
| INHERITS | - a sequence of base class names (basea)(baseb)(basec) |
| MEMBERS | - a sequence of member names. (field1)(field2)(field3) |
| #define BOOST_REFLECT_IMPL | ( | TYPE, | |
| INHERITS, | |||
| MEMBERS | |||
| ) |
template<typename Visitor>\ static inline void visit( const Visitor& v ) { \ BOOST_PP_SEQ_FOR_EACH( BOOST_REFLECT_VISIT_BASE, v, INHERITS ) \ BOOST_PP_SEQ_FOR_EACH( BOOST_REFLECT_VISIT_MEMBER, v, MEMBERS ) \ }