diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2014-12-21 15:28:30 +0100 |
---|---|---|
committer | Andreas Stöckel <andreas@somweyr.de> | 2014-12-21 15:28:30 +0100 |
commit | da3b35e77c1e22b46264df4c1b2a48f867d1e15e (patch) | |
tree | d483940d49f2d5ba7fac86187174cc7d70714f9d /src/core/common/Rtti.hpp | |
parent | 54d66cfa220128ae6c7cd05aa5db3354e459105b (diff) |
changed RttiTypes from class to namespace
Diffstat (limited to 'src/core/common/Rtti.hpp')
-rw-r--r-- | src/core/common/Rtti.hpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/core/common/Rtti.hpp b/src/core/common/Rtti.hpp index b91bd35..b46a8fa 100644 --- a/src/core/common/Rtti.hpp +++ b/src/core/common/Rtti.hpp @@ -49,11 +49,13 @@ * \code{.hpp} * // Only needed if the type needs to be accessed * // from other compilation units! - * extern const Rtti<MyType> MyType_Rtti; + * namespace RttiTypes { + * extern const Rtti<MyType> MyType; + * } * \endcode * In the source file: * \code{.cpp} - * const Rtti<MyType> MyType_Rtti{"MyType", {&MyOtherType_Rtti}, [...]}; + * const Rtti<MyType> RttiTypes::MyType{"MyType", {&RttiTypes::MyOtherType}, [...]}; * \endcode * * @author Andreas Stöckel (astoecke@techfak.uni-bielefeld.de) @@ -215,37 +217,37 @@ inline const RttiBase &typeOf(const T &obj) * constants are used to e.g. define the type of function arguments while * allowing for both primitive variant types and more complex variant types. */ -struct RttiTypes { +namespace RttiTypes { /** * Type of no particular color. */ - static const RttiBase None; + extern const RttiBase None; /** * Constant representing a variant int type. */ - static const RttiBase Int; + extern const RttiBase Int; /** * Constant representing a variant double type. */ - static const RttiBase Double; + extern const RttiBase Double; /** * Constant representing a variant string type. */ - static const RttiBase String; + extern const RttiBase String; /** * Constant representing a variant array type. */ - static const RttiBase Array; + extern const RttiBase Array; /** * Constant representing a variant map type. */ - static const RttiBase Map; -}; + extern const RttiBase Map; +} } |