summaryrefslogtreecommitdiff
path: root/lib/block_props.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/block_props.cpp')
-rw-r--r--lib/block_props.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/block_props.cpp b/lib/block_props.cpp
index ae687be..fc4c755 100644
--- a/lib/block_props.cpp
+++ b/lib/block_props.cpp
@@ -5,6 +5,9 @@
using namespace gras;
+FunctionRegistry::FunctionRegistry(void){}
+FunctionRegistry::~FunctionRegistry(void){}
+
PropertyRegistry::PropertyRegistry(void){}
PropertyRegistry::~PropertyRegistry(void){}
@@ -113,3 +116,15 @@ PMCC Block::_get_property(const std::string &key)
{
return prop_access_dispatcher((*this)->block_actor, key, PMCC(), false);
}
+
+
+void Block::_register_function(const std::string &key, void *fr)
+{
+ (*this)->block_data->function_registry[key].reset(reinterpret_cast<FunctionRegistry *>(fr));
+}
+
+PMCC Block::_handle_function_access(const std::string &key, const std::vector<PMCC> &args)
+{
+ //TODO this is testing -- needs to call actor instead
+ return (*this)->block_data->function_registry[key]->call(args);
+}