summaryrefslogtreecommitdiff
path: root/python/gras
diff options
context:
space:
mode:
Diffstat (limited to 'python/gras')
-rw-r--r--python/gras/GRAS_Factory.i12
-rw-r--r--python/gras/__init__.py2
2 files changed, 7 insertions, 7 deletions
diff --git a/python/gras/GRAS_Factory.i b/python/gras/GRAS_Factory.i
index eca9d2e..2740b39 100644
--- a/python/gras/GRAS_Factory.i
+++ b/python/gras/GRAS_Factory.i
@@ -9,7 +9,7 @@
namespace gras
{
- %ignore Factory::register_make;
+ %ignore Factory::register_factory;
%ignore Factory::make;
}
@@ -31,17 +31,17 @@ namespace gras
#TODO we need to register this into the real factory
_py_factory = dict()
-def register_make(name, fcn):
+def register_factory(path, fcn):
#TODO we need to register this into the real factory
- _py_factory[name] = fcn
+ _py_factory[path] = fcn
-def make(name, *args, **kwargs):
+def make(path, *args, **kwargs):
#first try the local to python py factory #TODO real factory
- if name in _py_factory: return _py_factory[name](*args, **kwargs)
+ if path in _py_factory: return _py_factory[path](*args, **kwargs)
from PMC import PMC_M
pmcargs = PMC_M(list(args))
- return Factory._handle_make(name, pmcargs)
+ return Factory._handle_make(path, pmcargs)
%}
diff --git a/python/gras/__init__.py b/python/gras/__init__.py
index da3567f..884182c 100644
--- a/python/gras/__init__.py
+++ b/python/gras/__init__.py
@@ -10,7 +10,7 @@ from GRAS_SBuffer import SBufferConfig, SBuffer
from GRAS_Tags import Tag, StreamTag, PacketMsg
from GRAS_TimeTag import TimeTag
from GRAS_Element import Element
-from GRAS_Factory import make, register_make
+from GRAS_Factory import make, register_factory
import GRAS_Block
import GRAS_HierBlock
import GRAS_TopBlock