summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJosh Blum2013-05-27 20:13:34 -0700
committerJosh Blum2013-05-27 20:13:34 -0700
commitc0aaedb595a4e04726c27c54560fd40394d0bac8 (patch)
treef7f7343f2220b1a04d87008a46b7c097fcd53d8e /include
parent22d99448cb680652c02464e2aa8b0c043c6ee72b (diff)
downloadsandhi-c0aaedb595a4e04726c27c54560fd40394d0bac8.tar.gz
sandhi-c0aaedb595a4e04726c27c54560fd40394d0bac8.tar.bz2
sandhi-c0aaedb595a4e04726c27c54560fd40394d0bac8.zip
gras: simplify registration object passing
Diffstat (limited to 'include')
-rw-r--r--include/gras/block.hpp4
-rw-r--r--include/gras/detail/block.hpp12
2 files changed, 6 insertions, 10 deletions
diff --git a/include/gras/block.hpp b/include/gras/block.hpp
index 85a6ecc..aab0a81 100644
--- a/include/gras/block.hpp
+++ b/include/gras/block.hpp
@@ -535,8 +535,8 @@ struct GRAS_API Block : Element
* private implementation guts for overloads and template support
******************************************************************/
virtual PMCC _handle_prop_access(const std::string &, const PMCC &, const bool);
- void _register_getter(const std::string &, PMCC);
- void _register_setter(const std::string &, PMCC);
+ void _register_getter(const std::string &, void *);
+ void _register_setter(const std::string &, void *);
virtual void _set_property(const std::string &, const PMCC &);
virtual PMCC _get_property(const std::string &);
};
diff --git a/include/gras/detail/block.hpp b/include/gras/detail/block.hpp
index 630117d..ac9a669 100644
--- a/include/gras/detail/block.hpp
+++ b/include/gras/detail/block.hpp
@@ -14,8 +14,6 @@ struct GRAS_API PropertyRegistry
virtual PMCC get(void) = 0;
};
-typedef boost::shared_ptr<PropertyRegistry> PropertyRegistrySptr;
-
template <typename ClassType, typename ValueType>
class PropertyRegistryImpl : public PropertyRegistry
{
@@ -58,9 +56,8 @@ inline void Block::register_getter(
)
{
ClassType *obj = dynamic_cast<ClassType *>(this);
- PropertyRegistrySptr pr;
- pr.reset(new PropertyRegistryImpl<ClassType, ValueType>(obj, get, NULL));
- this->_register_getter(key, PMC_M(pr));
+ void *pr = new PropertyRegistryImpl<ClassType, ValueType>(obj, get, NULL);
+ this->_register_getter(key, pr);
}
template <typename ClassType, typename ValueType>
@@ -70,9 +67,8 @@ inline void Block::register_setter(
)
{
ClassType *obj = dynamic_cast<ClassType *>(this);
- PropertyRegistrySptr pr;
- pr.reset(new PropertyRegistryImpl<ClassType, ValueType>(obj, NULL, set));
- this->_register_setter(key, PMC_M(pr));
+ void *pr = new PropertyRegistryImpl<ClassType, ValueType>(obj, NULL, set);
+ this->_register_setter(key, pr);
}
template <typename ValueType>