diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/gras/detail/block.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/gras/detail/block.hpp b/include/gras/detail/block.hpp index ac9a669..d975b0f 100644 --- a/include/gras/detail/block.hpp +++ b/include/gras/detail/block.hpp @@ -3,6 +3,8 @@ #ifndef INCLUDED_GRAS_DETAIL_BLOCK_HPP #define INCLUDED_GRAS_DETAIL_BLOCK_HPP +#include <typeinfo> + namespace gras { @@ -12,6 +14,7 @@ struct GRAS_API PropertyRegistry virtual ~PropertyRegistry(void); virtual void set(const PMCC &) = 0; virtual PMCC get(void) = 0; + virtual const std::type_info &type(void) const = 0; }; template <typename ClassType, typename ValueType> @@ -39,6 +42,11 @@ public: return PMC_M((_my_class->*_getter)()); } + const std::type_info &type(void) const + { + return typeid(ValueType); + } + private: ClassType *_my_class; ValueType(ClassType::*_getter)(void); |