summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJosh Blum2013-06-01 16:43:10 -0400
committerJosh Blum2013-06-01 16:43:10 -0400
commitf1b9b9a44b9f50d6cca8234998d7e0adf64e46af (patch)
tree5f7faed39ad80c0febf26716b874787af294e087 /include
parent41c180eece1af536874c8591539aeb0a23f6e134 (diff)
downloadsandhi-f1b9b9a44b9f50d6cca8234998d7e0adf64e46af.tar.gz
sandhi-f1b9b9a44b9f50d6cca8234998d7e0adf64e46af.tar.bz2
sandhi-f1b9b9a44b9f50d6cca8234998d7e0adf64e46af.zip
props: added query functionality to enumerate properties
Diffstat (limited to 'include')
-rw-r--r--include/gras/detail/block.hpp8
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);