//----------------------------------------------------------------------
// Function : implementation type
-// Purpose : define if a component is implemented in C++ or Python
+// Purpose : return the implementation type : C++ (dyn lib), Python (module) or executable
//----------------------------------------------------------------------
-CORBA::Boolean SALOME_ModuleCatalog_AcomponentImpl::implementation_type()
+SALOME_ModuleCatalog::ImplType SALOME_ModuleCatalog_AcomponentImpl::implementation_type()
{
return _Component.implementationType ;
}
+//----------------------------------------------------------------------
+// Function : implementation name
+// Purpose : return the implementation name to exec if the default one is not convenient
+//----------------------------------------------------------------------
+char* SALOME_ModuleCatalog_AcomponentImpl::implementation_name()
+{
+ return _Component.implname ;
+}
+
//----------------------------------------------------------------------
// Function : component_type
// Purpose : define the type of the component
test_component_multistudy = "component-multistudy";
test_component_icon = "component-icone" ;
test_component_impltype = "component-impltype";
+ test_component_implname = "component-implname";
test_component_version = "component-version";
test_component_comment = "component-comment";
// Tag test_component_impltype
if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_impltype) )
- _aModule.implementationType = atoi(aContent.c_str());
+ _aModule.implementationType = aContent;
+
+ // Tag test_component_implname
+ if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_implname) )
+ _aModule.implementationName = aContent;
// Tag test_component_icon
if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_icon) )
ComponentTypeConvert[OTHER]
= SALOME_ModuleCatalog::OTHER;
- // Conversion rules for datastream parameters type and dependency
- DataStreamTypeConvert["UNKNOWN"]
- = SALOME_ModuleCatalog::DATASTREAM_UNKNOWN;
- DataStreamTypeConvert["INTEGER"]
- = SALOME_ModuleCatalog::DATASTREAM_INTEGER;
- DataStreamTypeConvert["FLOAT"]
- = SALOME_ModuleCatalog::DATASTREAM_FLOAT;
- DataStreamTypeConvert["DOUBLE"]
- = SALOME_ModuleCatalog::DATASTREAM_DOUBLE;
- DataStreamTypeConvert["STRING"]
- = SALOME_ModuleCatalog::DATASTREAM_STRING;
- DataStreamTypeConvert["BOOLEAN"]
- = SALOME_ModuleCatalog::DATASTREAM_BOOLEAN;
-
+ // Conversion rules for datastream parameters dependency
DataStreamDepConvert["UNDEFINED"]
= SALOME_ModuleCatalog::DATASTREAM_UNDEFINED;
DataStreamDepConvert["T"]
C_corba.multistudy = C_parser.multistudy;
C_corba.icon = CORBA::string_dup(C_parser.icon.c_str());
C_corba.type = ComponentTypeConvert[C_parser.type];
- C_corba.implementationType = C_parser.implementationType;
+ if(C_parser.implementationType == "EXE")
+ C_corba.implementationType=SALOME_ModuleCatalog::EXE;
+ else if(C_parser.implementationType == "PY")
+ C_corba.implementationType=SALOME_ModuleCatalog::PY;
+ else
+ C_corba.implementationType=SALOME_ModuleCatalog::SO;
+ C_corba.implname = CORBA::string_dup(C_parser.implementationName.c_str());
unsigned int _length = C_parser.interfaces.size();
C_corba.interfaces.length(_length);
(SALOME_ModuleCatalog::ServicesDataStreamParameter & P_corba,
const ParserDataStreamParameter & P_parser)
{
- std::map < std::string,
- SALOME_ModuleCatalog::DataStreamType >::const_iterator it_type;
-
std::map < std::string,
SALOME_ModuleCatalog::DataStreamDependency >::const_iterator it_dep;
// duplicate parameter name
P_corba.Parametername = CORBA::string_dup(P_parser.name.c_str());
- // doesn't work ???
- // it_type = DataStreamTypeConvert.find(P_parser.type);
- // P_corba.Parametertype
- // = (it_type == DataStreamTypeConvert.end())
- // ? it_type->second : SALOME_ModuleCatalog::DATASTREAM_UNKNOWN;
-
- if(MYDEBUG) SCRUTE(P_parser.type);
- P_corba.Parametertype = SALOME_ModuleCatalog::DATASTREAM_UNKNOWN;
- for (it_type = DataStreamTypeConvert.begin();
- it_type != DataStreamTypeConvert.end();
- it_type++)
- if (P_parser.type.compare(it_type->first) == 0) {
- P_corba.Parametertype = it_type->second;
- break;
- }
- if(MYDEBUG) SCRUTE(P_corba.Parametertype);
-
// duplicate parameter type
// doesn't work ???
// P_corba.Parametertype
// = (it_type == DataStreamTypeConvert.end())
// ? it_type->second : SALOME_ModuleCatalog::DATASTREAM_UNKNOWN;
+
+ P_corba.Parametertype = CORBA::string_dup(P_parser.type.c_str());
+
+ // duplicate parameter dependency
if(MYDEBUG) SCRUTE(P_parser.dependency);
P_corba.Parameterdependency = SALOME_ModuleCatalog::DATASTREAM_UNDEFINED;