summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJosh Blum2013-07-07 12:21:36 -0700
committerJosh Blum2013-07-07 12:21:36 -0700
commitcfd9e8146f7589f3f04fea979c741267b0454546 (patch)
treedb46f578e2ff93b104ed9270623926732ee5eb83 /include
parentc6373f53f4690d667e553ed7258e13c3b45aa323 (diff)
downloadsandhi-cfd9e8146f7589f3f04fea979c741267b0454546.tar.gz
sandhi-cfd9e8146f7589f3f04fea979c741267b0454546.tar.bz2
sandhi-cfd9e8146f7589f3f04fea979c741267b0454546.zip
gras: python hooks for factory
Diffstat (limited to 'include')
-rw-r--r--include/gras/detail/factory.hpp8
-rw-r--r--include/gras/factory.hpp10
2 files changed, 9 insertions, 9 deletions
diff --git a/include/gras/detail/factory.hpp b/include/gras/detail/factory.hpp
index 0487e76..632e09d 100644
--- a/include/gras/detail/factory.hpp
+++ b/include/gras/detail/factory.hpp
@@ -116,7 +116,7 @@ inline
Element *Factory::make(const std::string &name)
{
PMCList args(0);
- return Factory::_make(name, PMC_M(args));
+ return Factory::_handle_make(name, PMC_M(args));
}
template <typename Arg0>
@@ -124,7 +124,7 @@ Element *Factory::make(const std::string &name, const Arg0 &a0)
{
PMCList args(1);
args[0] = PMC_M(a0);
- return Factory::_make(name, PMC_M(args));
+ return Factory::_handle_make(name, PMC_M(args));
}
template <typename Arg0, typename Arg1>
@@ -133,7 +133,7 @@ Element *Factory::make(const std::string &name, const Arg0 &a0, const Arg1 &a1)
PMCList args(2);
args[0] = PMC_M(a0);
args[1] = PMC_M(a1);
- return Factory::_make(name, PMC_M(args));
+ return Factory::_handle_make(name, PMC_M(args));
}
template <typename Arg0, typename Arg1, typename Arg2>
@@ -143,7 +143,7 @@ Element *Factory::make(const std::string &name, const Arg0 &a0, const Arg1 &a1,
args[0] = PMC_M(a0);
args[1] = PMC_M(a1);
args[2] = PMC_M(a2);
- return Factory::_make(name, PMC_M(args));
+ return Factory::_handle_make(name, PMC_M(args));
}
}
diff --git a/include/gras/factory.hpp b/include/gras/factory.hpp
index 926025e..13d1c2b 100644
--- a/include/gras/factory.hpp
+++ b/include/gras/factory.hpp
@@ -39,10 +39,8 @@ namespace gras
* Example call into the factory:
* gras::Element *my_block = gras::Factory::make("make_my_block", arg0, arg1);
*/
-class GRAS_API Factory : Callable
+struct GRAS_API Factory
{
-public:
-
/*******************************************************************
* Register API - don't look here, template magic, not helpful
******************************************************************/
@@ -73,9 +71,11 @@ public:
template <typename Arg0, typename Arg1, typename Arg2>
static Element *make(const std::string &name, const Arg0 &a0, const Arg1 &a1, const Arg2 &a2);
-private:
+ /*******************************************************************
+ * Private registration hooks
+ ******************************************************************/
static void _register_make(const std::string &, void *);
- static Element *_make(const std::string &, const PMCC &);
+ static Element *_handle_make(const std::string &, const PMCC &);
};
}