Bayeux  3.4.1
Core Foundation library for SuperNEMO
Classes | Namespaces | Macros | Functions
reflection_export.h File Reference
#include <boost/mpl/bool.hpp>
#include <boost/serialization/singleton.hpp>

Go to the source code of this file.

Classes

struct  datatools::detail::reflection::guid_initializer< T >
 Struct used internally by the reflection mechanism. More...
 
struct  datatools::detail::reflection::init_guid< T >
 
struct  datatools::detail::reflection::guid_defined< T >
 Struct used internally by the reflection mechanism. More...
 

Namespaces

 datatools
 The Bayeux/datatools library top-level namespace.
 
 datatools::detail
 Nested namespace of the Bayeux/datatools module library (detail)
 
 datatools::detail::reflection
 Nested private namespace of the Bayeux/datatools module library (reflection)
 

Macros

#define DR_CLASS_EXPORT_IMPLEMENT(T)
 Define registration of a class T with reflection support. More...
 
#define DR_CLASS_EXPORT_KEY(T, K)
 Define class identifier K for the registration of a class T with reflection support. More...
 
#define DR_CLASS_EXPORT(T, K)
 Implement the code for reflection support of class T with identifier K. More...
 
#define DR_TYPE_EXPORT(T, K)   DR_CLASS_EXPORT (T, K) \
 

Functions

template<class T >
const char * datatools::detail::reflection::guid ()
 

Macro Definition Documentation

◆ DR_CLASS_EXPORT

#define DR_CLASS_EXPORT (   T,
 
)
Value:
DR_CLASS_EXPORT_IMPLEMENT (T) \
#define DR_CLASS_EXPORT_KEY(T, K)
Define class identifier K for the registration of a class T with reflection support.
Definition: reflection_export.h:107

Implement the code for reflection support of class T with identifier K.

This macro must be invoked outside of any namespace scope.

Example:

DR_CLASS_EXPORT(foo::bar, "foo::bar"");

◆ DR_CLASS_EXPORT_IMPLEMENT

#define DR_CLASS_EXPORT_IMPLEMENT (   T)
Value:
namespace datatools { \
namespace detail { \
namespace reflection { \
template<> \
struct init_guid< T > { \
static guid_initializer< T > const & g; \
}; \
guid_initializer< T > const & init_guid< T >::g = \
::boost::serialization::singleton< guid_initializer< T > > \
::get_mutable_instance().export_guid(); \
}}} \
The Bayeux/datatools library top-level namespace.
Definition: algo.h:13

Define registration of a class T with reflection support.

This macro must be invoked outside of any namespace scope.

Example:

namespace foo {
class bar {
...
};
}

◆ DR_CLASS_EXPORT_KEY

#define DR_CLASS_EXPORT_KEY (   T,
 
)
Value:
namespace datatools { \
namespace detail { \
namespace reflection { \
template<> \
struct guid_defined< T > : boost::mpl::true_ {}; \
template<> \
inline const char * guid< T >(){ \
return K; \
} \
}}} \
The Bayeux/datatools library top-level namespace.
Definition: algo.h:13

Define class identifier K for the registration of a class T with reflection support.

This macro must be invoked outside of any namespace scope.

Example:

DR_CLASS_EXPORT_KEY(foo::bar, "foo::bar"");

◆ DR_TYPE_EXPORT

#define DR_TYPE_EXPORT (   T,
 
)    DR_CLASS_EXPORT (T, K) \
See also
DR_CLASS_EXPORT