#include <Runtime.hxx>
Public Member Functions | |
virtual void | init () |
virtual void | fini () |
virtual Catalog * | loadCatalog (const std::string &sourceKind, const std::string &path) |
Load a catalog of calculation to use as factory. More... | |
virtual InlineFuncNode * | createFuncNode (const std::string &kind, const std::string &name) |
virtual InlineNode * | createScriptNode (const std::string &kind, const std::string &name) |
virtual ServiceNode * | createRefNode (const std::string &kind, const std::string &name) |
virtual ServiceNode * | createCompoNode (const std::string &kind, const std::string &name) |
virtual ServiceInlineNode * | createSInlineNode (const std::string &kind, const std::string &name) |
virtual DataNode * | createInDataNode (const std::string &kind, const std::string &name) |
virtual DataNode * | createOutDataNode (const std::string &kind, const std::string &name) |
virtual ComponentInstance * | createComponentInstance (const std::string &name, const std::string &kind="") |
virtual Container * | createContainer (const std::string &kind="") |
virtual Proc * | createProc (const std::string &name) |
virtual Bloc * | createBloc (const std::string &name) |
virtual WhileLoop * | createWhileLoop (const std::string &name) |
virtual ForLoop * | createForLoop (const std::string &name) |
virtual ForEachLoop * | createForEachLoop (const std::string &name, TypeCode *type) |
virtual OptimizerLoop * | createOptimizerLoop (const std::string &name, const std::string &algLib, const std::string &factoryName, bool algInitOnFile, const std::string &kind="", Proc *procForTypes=NULL) |
virtual Switch * | createSwitch (const std::string &name) |
virtual TypeCode * | createInterfaceTc (const std::string &id, const std::string &name, std::list< TypeCodeObjref * > ltc) |
virtual TypeCode * | createSequenceTc (const std::string &id, const std::string &name, TypeCode *content) |
virtual TypeCodeStruct * | createStructTc (const std::string &id, const std::string &name) |
virtual InputPort * | createInputPort (const std::string &name, const std::string &impl, Node *node, TypeCode *type)=0 |
virtual OutputPort * | createOutputPort (const std::string &name, const std::string &impl, Node *node, TypeCode *type)=0 |
virtual InputDataStreamPort * | createInputDataStreamPort (const std::string &name, Node *node, TypeCode *type) |
virtual OutputDataStreamPort * | createOutputDataStreamPort (const std::string &name, Node *node, TypeCode *type) |
virtual InputPort * | adapt (InputPort *source, const std::string &impl, TypeCode *type, bool init=false)=0 throw (ConversionException) |
virtual InputPort * | adapt (InPropertyPort *source, const std::string &impl, TypeCode *type, bool init=false)=0 throw (ConversionException) |
virtual void * | convertNeutral (TypeCode *type, Any *data) |
Convert a YACS::ENGINE::Any object to an external object with type type. More... | |
virtual std::string | convertNeutralAsString (TypeCode *type, Any *data) |
Convert a YACS::ENGINE::Any object to a string to be used in GUI for example. More... | |
virtual void | removeRuntime () |
virtual | ~Runtime () |
virtual void | setCatalogLoaderFactory (const std::string &name, CatalogLoader *factory) |
Add a catalog loader factory to the map _catalogLoaderFactoryMap under the name name. More... | |
Catalog * | getBuiltinCatalog () |
Get the catalog of base nodes (elementary and composed) More... | |
virtual void | addCatalog (Catalog *catalog) |
Add a catalog of types and nodes to the runtime. More... | |
virtual TypeCode * | getTypeCode (const std::string &name) |
Get a typecode by its name from runtime catalogs. More... | |
Public Attributes | |
std::map< std::string, CatalogLoader * > | _catalogLoaderFactoryMap |
Static Public Attributes | |
static const char | RUNTIME_ENGINE_INTERACTION_IMPL_NAME [] ="Neutral" |
static YACS::ENGINE::TypeCode * | _tc_double = 0 |
static YACS::ENGINE::TypeCode * | _tc_int = 0 |
static YACS::ENGINE::TypeCode * | _tc_bool = 0 |
static YACS::ENGINE::TypeCode * | _tc_string = 0 |
static YACS::ENGINE::TypeCode * | _tc_file = 0 |
static YACS::ENGINE::TypeCode * | _tc_stringpair = 0 |
static YACS::ENGINE::TypeCode * | _tc_propvec = 0 |
Protected Member Functions | |
Runtime () | |
Protected Attributes | |
std::set< std::string > | _setOfImplementation |
Catalog * | _builtinCatalog |
std::vector< Catalog * > | _catalogs |
Static Protected Attributes | |
static Runtime * | _singleton = 0 |
Friends | |
Runtime * | getRuntime () throw (Exception) |
Definition at line 67 of file Runtime.hxx.
|
virtual |
Definition at line 143 of file Runtime.cxx.
References _singleton, _tc_bool, _tc_double, _tc_file, _tc_int, _tc_string, YACS::ENGINE::RefCounter::_totalCnt, DEBTRACE, and YACS::ENGINE::RefCounter::decrRef().
|
protected |
Definition at line 68 of file Runtime.cxx.
References YACS::ENGINE::Executor::_maxThreads, _tc_bool, _tc_double, _tc_file, _tc_int, _tc_propvec, _tc_string, _tc_stringpair, YACS::ENGINE::Executor::_threadStackSize, YACS::ENGINE::TypeCodeStruct::addMember(), YACS::ENGINE::Bool, DEBTRACE, YACS::ENGINE::Double, YACS::ENGINE::RefCounter::incrRef(), YACS::ENGINE::Int, YACS::ENGINE::String, and YACS::traceLevel.
|
pure virtual |
|
pure virtual |
Implemented in YACS::ENGINE::RuntimeSALOME.
|
virtual |
Add a catalog of types and nodes to the runtime.
These catalogs are searched when calling getTypeCode method
Definition at line 318 of file Runtime.cxx.
References YACS::ENGINE::RefCounter::incrRef().
Referenced by YACS::HMI::GenericGui::GenericGui(), and main().
Convert a YACS::ENGINE::Any object to an external object with type type.
This method is used to convert Neutral objects to script languages. For example Python language. The runtime has one external script language. The object is returned as a void * because engine knows nothing about external script language.
type,: | the type of the converted object if the conversion is possible |
data,: | the object to convert |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 350 of file Runtime.cxx.
Convert a YACS::ENGINE::Any object to a string to be used in GUI for example.
engine package does not provide a conversion to string. It has to be implemented in the runtime package.
type,: | the type of the object to convert |
data,: | the object to convert |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 364 of file Runtime.cxx.
Referenced by YACS::ENGINE::AnyOutputPort::getAsString(), and YACS::ENGINE::AnyInputPort::getAsString().
|
virtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 231 of file Runtime.cxx.
Referenced by YACS::bloctypeParser< T >::name().
|
virtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 215 of file Runtime.cxx.
Referenced by YACS::ENGINE::Proc::createComponentInstance(), YACS::inlinetypeParser< T >::function(), and YACS::ENGINE::ServiceNode::setRef().
|
virtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 205 of file Runtime.cxx.
Referenced by YACS::servicetypeParser< T >::component(), YACS::servicetypeParser< T >::componentinstance(), and YACS::ENGINE::SessionCataLoader::importComponent().
|
virtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 221 of file Runtime.cxx.
Referenced by YACS::ENGINE::CppComponent::CppComponent(), and YACS::ENGINE::CppComponent::load().
|
virtual |
Definition at line 251 of file Runtime.cxx.
References YACS::ENGINE::DynParaLoop::edGetNbOfBranchesPort(), YACS::ENGINE::InputPort::edInit(), and PMMLBasicsTestLauncher::ret.
Referenced by YACS::foreachlooptypeParser< T >::postAttr().
|
virtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 246 of file Runtime.cxx.
Referenced by YACS::forlooptypeParser< T >::name().
|
virtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 190 of file Runtime.cxx.
Referenced by YACS::remotetypeParser< T >::function(), YACS::inlinetypeParser< T >::function(), and YACS::servertypeParser< T >::loadcontainer().
|
virtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 180 of file Runtime.cxx.
Referenced by YACS::presettypeParser< T >::create().
|
virtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 264 of file Runtime.cxx.
Referenced by YACS::ENGINE::ElementaryNode::createInputDataStreamPort().
|
pure virtual |
Implemented in YACS::ENGINE::RuntimeSALOME.
Referenced by YACS::ENGINE::ElementaryNode::createInputPort().
|
virtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 162 of file Runtime.cxx.
References YACS::ENGINE::TypeCode::interfaceTc().
Referenced by YACS::ENGINE::SessionCataLoader::loadTypes().
|
virtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 258 of file Runtime.cxx.
Referenced by YACS::optimizerlooptypeParser< T >::postAttr().
|
virtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 185 of file Runtime.cxx.
Referenced by YACS::outnodetypeParser< T >::create().
|
virtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 269 of file Runtime.cxx.
Referenced by YACS::ENGINE::ElementaryNode::createOutputDataStreamPort().
|
pure virtual |
Implemented in YACS::ENGINE::RuntimeSALOME.
Referenced by YACS::ENGINE::ElementaryNode::createOutputPort().
|
virtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 226 of file Runtime.cxx.
Referenced by YACS::proctypeParser< T >::pre().
|
virtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 200 of file Runtime.cxx.
Referenced by YACS::servicetypeParser< T >::ref().
|
virtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 195 of file Runtime.cxx.
Referenced by YACS::remotetypeParser< T >::script(), and YACS::inlinetypeParser< T >::script().
|
virtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 168 of file Runtime.cxx.
References YACS::ENGINE::TypeCode::sequenceTc().
Referenced by YACS::ENGINE::SessionCataLoader::loadTypes().
|
virtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 210 of file Runtime.cxx.
Referenced by YACS::inlinetypeParser< T >::function().
|
virtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 175 of file Runtime.cxx.
References YACS::ENGINE::TypeCode::structTc().
Referenced by YACS::ENGINE::SessionCataLoader::loadTypes().
|
virtual |
Definition at line 236 of file Runtime.cxx.
Referenced by YACS::switchtypeParser::name().
|
virtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 241 of file Runtime.cxx.
Referenced by YACS::whilelooptypeParser< T >::name().
|
inlinevirtual |
Reimplemented in YACS::ENGINE::RuntimeSALOME.
Definition at line 72 of file Runtime.hxx.
Referenced by main().
Catalog * Runtime::getBuiltinCatalog | ( | ) |
Get the catalog of base nodes (elementary and composed)
Definition at line 309 of file Runtime.cxx.
Referenced by YACS::HMI::GuiEditor::CreateForEachLoop(), YACS::HMI::GuiEditor::CreateNode(), YACS::HMI::GenericGui::GenericGui(), YACS::HMI::GuiContext::GuiContext(), YACS::HMI::SubjectProc::loadTypes(), and YACS::HMI::CommandPutInComposedNode::localExecute().
|
virtual |
Get a typecode by its name from runtime catalogs.
Definition at line 328 of file Runtime.cxx.
Referenced by YACS::objtypeParser::base(), YACS::seqtypeParser::content(), YACS::ENGINE::Proc::getTypeCode(), YACS::inlinetypeParser< T >::inport(), YACS::servertypeParser< T >::instream(), YACS::servicetypeParser< T >::instream(), YACS::structtypeParser::member(), YACS::inlinetypeParser< T >::outport(), YACS::servertypeParser< T >::outstream(), YACS::servicetypeParser< T >::outstream(), YACS::outnodetypeParser< T >::parameter(), YACS::presettypeParser< T >::parameter(), and YACS::foreachlooptypeParser< T >::postAttr().
|
inlinevirtual |
Definition at line 71 of file Runtime.hxx.
|
virtual |
Load a catalog of calculation to use as factory.
sourceKind,: | the kind of catalog source. It depends on runtime. It could be a file, a server, a directory |
path,: | the path to the catalog. |
Definition at line 280 of file Runtime.cxx.
References YACS::ENGINE::CatalogLoader::load().
Referenced by YACS::HMI::CatalogWidget::addCatalogFromFile(), YACS::HMI::GenericGui::GenericGui(), and main().
|
virtual |
Definition at line 138 of file Runtime.cxx.
|
virtual |
Add a catalog loader factory to the map _catalogLoaderFactoryMap under the name name.
name,: | name under which the factory is registered |
factory,: | the factory |
Definition at line 300 of file Runtime.cxx.
Referenced by YACS::YACSLoader::registerProcCataLoader().
|
protected |
Definition at line 151 of file Runtime.hxx.
std::map<std::string,CatalogLoader*> YACS::ENGINE::Runtime::_catalogLoaderFactoryMap |
Definition at line 142 of file Runtime.hxx.
|
protected |
Definition at line 152 of file Runtime.hxx.
|
protected |
Definition at line 150 of file Runtime.hxx.
|
staticprotected |
Definition at line 148 of file Runtime.hxx.
Referenced by YACS::ENGINE::getRuntime(), YACS::ENGINE::RuntimeSALOME::getSingleton(), and ~Runtime().
|
static |
Definition at line 136 of file Runtime.hxx.
Referenced by YACS::ENGINE::AtomAny::AtomAny(), YACS::ENGINE::Proc::createType(), YACS::ENGINE::AtomAny::getBoolValue(), YACS::ENGINE::ComposedAny::getBoolValue(), YACS::ENGINE::SessionCataLoader::loadTypes(), YACS::ENGINE::AtomAny::operator==(), YACS::ENGINE::Proc::Proc(), YACS::ENGINE::AtomAny::putMyReprAtPlace(), YACS::ENGINE::AtomAny::putReprAtPlace(), Runtime(), and ~Runtime().
|
static |
Definition at line 134 of file Runtime.hxx.
Referenced by YACS::ENGINE::AtomAny::AtomAny(), YACS::ENGINE::Proc::createType(), YACS::ENGINE::AtomAny::getDoubleValue(), YACS::ENGINE::ComposedAny::getDoubleValue(), YACS::ENGINE::SessionCataLoader::loadTypes(), YACS::ENGINE::AtomAny::operator==(), YACS::ENGINE::Proc::Proc(), YACS::ENGINE::AtomAny::putMyReprAtPlace(), YACS::ENGINE::AtomAny::putReprAtPlace(), Runtime(), and ~Runtime().
|
static |
Definition at line 138 of file Runtime.hxx.
Referenced by YACS::ENGINE::SalomeNode::execute(), YACS::ENGINE::Proc::Proc(), Runtime(), and ~Runtime().
|
static |
Definition at line 135 of file Runtime.hxx.
Referenced by YACS::ENGINE::AtomAny::AtomAny(), YACS::ENGINE::Proc::createType(), YACS::ENGINE::AtomAny::getIntValue(), YACS::ENGINE::ComposedAny::getIntValue(), YACS::ENGINE::SessionCataLoader::loadTypes(), YACS::ENGINE::AtomAny::operator==(), YACS::ENGINE::Proc::Proc(), YACS::ENGINE::AtomAny::putMyReprAtPlace(), YACS::ENGINE::AtomAny::putReprAtPlace(), Runtime(), and ~Runtime().
|
static |
Definition at line 140 of file Runtime.hxx.
Referenced by YACS::ENGINE::Node::Node(), and Runtime().
|
static |
Definition at line 137 of file Runtime.hxx.
Referenced by YACS::ENGINE::AtomAny::AtomAny(), YACS::ENGINE::Proc::createType(), YACS::ENGINE::AtomAny::getStringValue(), YACS::ENGINE::ComposedAny::getStringValue(), YACS::ENGINE::OptimizerAlgBase::getTCForAlgoInit(), YACS::ENGINE::OptimizerAlgBase::getTCForAlgoResult(), YACS::ENGINE::SessionCataLoader::loadTypes(), YACS::ENGINE::SequenceAny::New(), YACS::ENGINE::AtomAny::operator==(), YACS::ENGINE::Proc::Proc(), YACS::ENGINE::AtomAny::putMyReprAtPlace(), YACS::ENGINE::AtomAny::putReprAtPlace(), Runtime(), and ~Runtime().
|
static |
Definition at line 139 of file Runtime.hxx.
Referenced by Runtime().
|
static |
Definition at line 133 of file Runtime.hxx.
Referenced by YACS::ENGINE::InputPort::edInit(), and YACS::ENGINE::DynParaLoop::putValueOnBranch().