diff --git a/src/dynamic_graph/__init__.py b/src/dynamic_graph/__init__.py index c84a5442e1d1ca782b1017ef211d6217df07aca0..b573be8806c101abeb9c32bfb39dc1aa96c6b9e3 100644 --- a/src/dynamic_graph/__init__.py +++ b/src/dynamic_graph/__init__.py @@ -13,7 +13,6 @@ from wrap import * sys.setdlopenflags(flags) import entity, signal_base -import re def plug (signalOut, signalIn) : """ diff --git a/src/entity-py.cc b/src/entity-py.cc index 0744a3ec37fc373f2cab20cd076048f07e0757fd..332fa4d7f93b0dd2304047b82662fb8fd3848f22 100644 --- a/src/entity-py.cc +++ b/src/entity-py.cc @@ -52,7 +52,8 @@ namespace dynamicgraph { Entity* obj = NULL; /* Try to find if the corresponding object already exists. */ - if( dynamicgraph::g_pool.existEntity( instanceName,obj ) ) + if( dynamicgraph::PoolStorage::getInstance()->existEntity(instanceName, + obj)) { if( obj->getClassName()!=className ) { std::string msg ("Found an object named " @@ -68,8 +69,8 @@ namespace dynamicgraph { else /* If not, create a new object. */ { try { - obj = dynamicgraph::g_factory.newEntity(std::string(className), - std::string(instanceName)); + obj = dynamicgraph::FactoryStorage::getInstance()->newEntity + (std::string(className), std::string(instanceName)); } catch (std::exception& exc) { PyErr_SetString(dgpyError, exc.what()); return NULL; diff --git a/src/factory-py.cc b/src/factory-py.cc index a821440335f065724010a03a56d587bacf081d20..65b8463e21291cde428f77e1d96b70687d452ccf 100644 --- a/src/factory-py.cc +++ b/src/factory-py.cc @@ -34,7 +34,7 @@ namespace dynamicgraph { return NULL; std::vector <std::string> classNames; - dynamicgraph::g_factory.listEntities(classNames); + dynamicgraph::FactoryStorage::getInstance()->listEntities(classNames); unsigned int classNumber = classNames.size(); // Build a tuple object PyObject* classTuple = PyTuple_New(classNumber);