5 using namespace YACS::ENGINE;
9 Runtime* Runtime::_singleton = 0;
11 void Runtime::setRuntime() // singleton creation (not thread safe!)
13 if (! Runtime::_singleton) Runtime::_singleton = new Runtime();
16 // singleton creation must be done before by a derived class
18 Runtime* YACS::ENGINE::getRuntime() throw(Exception)
20 if ( ! Runtime::_singleton )
21 throw Exception("Runtime is not yet initialized");
22 return Runtime::_singleton;
25 ElementaryNode* Runtime::createNode(string implementation,
26 string name) throw(Exception)
28 return new TestElemNode(name);
31 InputPort* Runtime::createInputPort(const string& name,
36 return new InputPort(name, node, type);
39 OutputPort* Runtime::createOutputPort(const string& name,
44 return new OutputPort(name, node, type);
47 InputPort* Runtime::adapt(const string& imp_source,
49 const string& impl,TypeCode * type)
50 throw (ConversionException)