From f1b9b9a44b9f50d6cca8234998d7e0adf64e46af Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 1 Jun 2013 16:43:10 -0400 Subject: props: added query functionality to enumerate properties --- include/gras/detail/block.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/gras/detail') 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 + 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 @@ -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); -- cgit