struct PathPrefix
{
string path ;
- vector<string> ListOfComputer ;
+ vector<string> listOfComputer ;
} ;
typedef vector<PathPrefix> ListOfPathPrefix ;
SALOME_ModuleCatalog::ListOfDefInterface list_interfaces,
ListOfPathPrefix pathes)
{
- MESSAGE("Component creation")
+ BEGIN_OF("SALOME_ModuleCatalog_AcomponentImpl");
+ SCRUTE(name);
+ SCRUTE(username);
+ SCRUTE(constraint);
+ SCRUTE(componenttype);
+ SCRUTE(componentmultistudy);
+ SCRUTE(icone);
+
// Affect component name
_component_name = new char[strlen(name)+1];
strcpy(_component_name, name);
strcpy(_icone, icone);
//Affect interfaces
- _list_interfaces.length(list_interfaces.length());
_list_interfaces = list_interfaces;
// affect path prefixes
- _pathes.resize(pathes.size());
+ // _pathes.resize(pathes.size());
_pathes = pathes ;
+
+ END_OF("SALOME_ModuleCatalog_AcomponentImpl");
}
//----------------------------------------------------------------------
//----------------------------------------------------------------------
SALOME_ModuleCatalog_AcomponentImpl::~SALOME_ModuleCatalog_AcomponentImpl()
{
- MESSAGE("Component destruction")
+ BEGIN_OF("~SALOME_ModuleCatalog_AcomponentImpl");
+
// empty memory
delete [] _component_name;
delete [] _component_user_name;
delete [] _constraint;
+
+ END_OF("~SALOME_ModuleCatalog_AcomponentImpl");
}
//----------------------------------------------------------------------
SALOME_ModuleCatalog::ListOfInterfaces*
SALOME_ModuleCatalog_AcomponentImpl::GetInterfaceList()
{
+ BEGIN_OF("GetInterfaceList");
+
SALOME_ModuleCatalog::ListOfInterfaces_var _list = new SALOME_ModuleCatalog::ListOfInterfaces;
// All the interfaces are defined in _list_interfaces affected at the
MESSAGE("The component " << _component_name << " contains " << _list[ind] << " as interface")
}
+ END_OF("GetInterfaceList");
return _list._retn();
}
SALOME_ModuleCatalog_AcomponentImpl::GetInterface(const char* interfacename)
throw(SALOME_ModuleCatalog::NotFound)
{
+ BEGIN_OF("GetInterface");
+ SCRUTE(interfacename);
+
SALOME_ModuleCatalog::DefinitionInterface_var _interface = new SALOME_ModuleCatalog::DefinitionInterface;
SALOME_ModuleCatalog::Service_var _service = new SALOME_ModuleCatalog::Service;
// Variables initialisation
if (!_find)
{
// The interface was not found, the exception should be thrown
- char * message = new char[100];
- strcpy(message, "The interface ");
- strcat(message,interfacename);
- strcat(message, " of the component ");
- strcat(message,_component_name);
- strcat(message, " was not found") ;
- MESSAGE("The interface " << interfacename << " of the component " << _component_name << " was not found")
- throw SALOME_ModuleCatalog::NotFound(message);
- delete [] message;
+ string message = "The interface";
+ message += interfacename;
+ message += " of the component ";
+ message += _component_name;
+ message += " was not found";
+ MESSAGE(message)
+ throw SALOME_ModuleCatalog::NotFound(message.c_str());
}
+ END_OF("GetInterfaceList");
return _interface._retn();
}
SALOME_ModuleCatalog_AcomponentImpl::GetServiceList(const char* interfacename)
throw(SALOME_ModuleCatalog::NotFound)
{
+ BEGIN_OF("GetServiceList");
+ SCRUTE(interfacename);
+
SALOME_ModuleCatalog::ListOfServices_var _list = new SALOME_ModuleCatalog::ListOfServices;
// Variables initialisation
if (!_find)
{
// The interface was not found, the exception should be thrown
- char * message = new char[100];
- strcpy(message, "The interface ");
- strcat(message,interfacename);
- strcat(message, " of the component ");
- strcat(message,_component_name);
- strcat(message, " was not found") ;
- MESSAGE("The interface " << interfacename << " of the component " << _component_name << " was not found")
- throw SALOME_ModuleCatalog::NotFound(message);
- delete [] message;
+ string message = "The interface";
+ message += interfacename;
+ message += " of the component ";
+ message += _component_name;
+ message += " was not found";
+ MESSAGE(message)
+ throw SALOME_ModuleCatalog::NotFound(message.c_str());
}
+ END_OF("GetServiceList");
return _list._retn();
}
const char* servicename)
throw(SALOME_ModuleCatalog::NotFound)
{
+ BEGIN_OF("GetService");
+ SCRUTE(interfacename);
+ SCRUTE(servicename);
+
SALOME_ModuleCatalog::Service_var _service = new SALOME_ModuleCatalog::Service;
// Varaibles initialisation
bool _find = false ;
+ MESSAGE("");
// looking for the specified interface
for (unsigned int ind = 0; ind < _list_interfaces.length(); ind++)
{
+ SCRUTE(ind);
+ SCRUTE(_list_interfaces[ind].interfacename);
+
if (strcmp(interfacename, _list_interfaces[ind].interfacename) == 0)
{
// wanted interface
// looking for the specified service
for (unsigned int ind1 = 0; ind1 < _list_interfaces[ind].interfaceservicelist.length() ; ind1++)
{
+ SCRUTE(ind1);
+ SCRUTE(_list_interfaces[ind].interfaceservicelist[ind1].ServiceName);
+
if (strcmp(servicename, _list_interfaces[ind].interfaceservicelist[ind1].ServiceName) == 0)
{
// Wanted Service
}
}
+ SCRUTE(_find);
if (!_find)
{
- // The service was not found, the exception should be thrown
- char * message = new char[100];
- strcpy(message, "The service ");
- strcat(message, servicename);
- strcat(message," of the interface ");
- strcat(message,interfacename);
- strcat(message, " of the component ");
- strcat(message,_component_name);
- strcat(message, " was not found") ;
- MESSAGE("The service " << servicename << " of the interface " << interfacename << " of the component " << _component_name << " was not found")
- throw SALOME_ModuleCatalog::NotFound(message);
- delete [] message;
+ // The interface was not found, the exception should be thrown
+ string message = "The service";
+ message += servicename;
+ message += " of the interface ";
+ message += interfacename;
+ message += " of the component ";
+ message += _component_name;
+ message += " was not found";
+ MESSAGE(message)
+ throw SALOME_ModuleCatalog::NotFound(message.c_str());
}
+ END_OF("GetService");
return _service._retn();
}
SALOME_ModuleCatalog_AcomponentImpl::GetDefaultService(const char* interfacename)
throw(SALOME_ModuleCatalog::NotFound)
{
+ BEGIN_OF("GetDefaultService");
+ SCRUTE(interfacename);
+
SALOME_ModuleCatalog::Service_var _service = new SALOME_ModuleCatalog::Service;
// Variables initialisation
if (!_find)
{
// The service was not found, the exception should be thrown
- char * message = new char[100];
- strcpy(message, "The default service of the interface ");
- strcat(message,interfacename);
- strcat(message, " of the component ");
- strcat(message,_component_name);
- strcat(message, " was not found") ;
- MESSAGE("The default service of the interface " << interfacename << " of the component " << _component_name << " was not found")
- throw SALOME_ModuleCatalog::NotFound(message);
- delete [] message;
+ string message = "The default service of the interface ";
+ message += interfacename;
+ message += " of the component ";
+ message += _component_name;
+ message += " was not found";
+ MESSAGE(message)
+ throw SALOME_ModuleCatalog::NotFound(message.c_str());
}
+ END_OF("GetDefaultService");
return _service._retn();
}
SALOME_ModuleCatalog_AcomponentImpl::GetPathPrefix(const char* machinename)
throw(SALOME_ModuleCatalog::NotFound)
{
- MESSAGE("Begin of GetPathPrefix")
+ BEGIN_OF("GetPathPrefix");
+ SCRUTE(machinename);
+
// Variables initialisation
char* _path = NULL;
bool _find = false ;
// looking for the wanted computer
for (unsigned int ind = 0 ; ind < _pathes.size() ; ind++)
{
- for (unsigned int ind1 = 0 ; ind1 < _pathes[ind].ListOfComputer.size() ; ind1++)
+ for (unsigned int ind1 = 0 ; ind1 < _pathes[ind].listOfComputer.size() ; ind1++)
{
- if (strcmp(machinename, _pathes[ind].ListOfComputer[ind1].c_str()) == 0)
+ if (strcmp(machinename, _pathes[ind].listOfComputer[ind1].c_str()) == 0)
{
_find = true ;
// Wanted computer
if (!_find)
{
// The computer was not found, the exception should be thrown
- char * message = new char[100];
- strcpy(message, "The computer ");
- strcat(message,machinename);
- strcat(message, " was not found in the catalog associated to the component ") ;
- strcat(message,_component_name);
- MESSAGE("The computer " << machinename << " was not found in the catalog associated to the component " << _component_name)
- throw SALOME_ModuleCatalog::NotFound(message);
- delete [] message;
+ string message = "The computer ";
+ message += machinename;
+ message += " was not found in the catalog associated to the component ";
+ message += _component_name;
+ MESSAGE(message)
+ throw SALOME_ModuleCatalog::NotFound(message.c_str());
}
+ END_OF("GetPathPrefix");
return _path;
}
// Purpose : duplicate a service
//----------------------------------------------------------------------
SALOME_ModuleCatalog::Service_var
-SALOME_ModuleCatalog_AcomponentImpl::_duplicate_service(SALOME_ModuleCatalog::Service service)
+SALOME_ModuleCatalog_AcomponentImpl::_duplicate_service(SALOME_ModuleCatalog::Service & service)
{
+ BEGIN_OF("_duplicate_service");
+
+ unsigned int _length;
SALOME_ModuleCatalog::Service_var _service = new SALOME_ModuleCatalog::Service;
// service name
// service by default
_service->Servicebydefault = service.Servicebydefault;
+ MESSAGE("");
// in Parameters service
- unsigned int _length_in_param = service.ServiceinParameter.length();
- for(unsigned int ind = 0; ind < _length_in_param; ind++)
+ _length = service.ServiceinParameter.length();
+ SCRUTE(_length);
+ for(unsigned int ind = 0; ind < _length; ind++)
{
- _service->ServiceinParameter.length(_length_in_param);
+ SCRUTE(service.ServiceinParameter[ind].Parametername);
+ _service->ServiceinParameter.length(_length);
// in Parameter type
- _service->ServiceinParameter[ind].Parametertype = CORBA::string_dup(service.ServiceinParameter[ind].Parametertype);
+ _service->ServiceinParameter[ind].Parametertype
+ = CORBA::string_dup(service.ServiceinParameter[ind].Parametertype);
// in Parameter name
- _service->ServiceinParameter[ind].Parametername = CORBA::string_dup(service.ServiceinParameter[ind].Parametername);
+ _service->ServiceinParameter[ind].Parametername
+ = CORBA::string_dup(service.ServiceinParameter[ind].Parametername);
}
// out Parameters service
- unsigned int _length_out_param = service.ServiceoutParameter.length();
- for(unsigned int ind = 0; ind < _length_out_param; ind++)
+ _length = service.ServiceoutParameter.length();
+ SCRUTE(_length);
+ for(unsigned int ind = 0; ind < _length; ind++)
{
- _service->ServiceoutParameter.length(_length_out_param);
+ SCRUTE(service.ServiceoutParameter[ind].Parametername);
+ _service->ServiceoutParameter.length(_length);
// out Parameter type
- _service->ServiceoutParameter[ind].Parametertype = CORBA::string_dup(service.ServiceoutParameter[ind].Parametertype);
+ _service->ServiceoutParameter[ind].Parametertype
+ = CORBA::string_dup(service.ServiceoutParameter[ind].Parametertype);
// out Parameter name
- _service->ServiceoutParameter[ind].Parametername = CORBA::string_dup(service.ServiceoutParameter[ind].Parametername);
+ _service->ServiceoutParameter[ind].Parametername
+ = CORBA::string_dup(service.ServiceoutParameter[ind].Parametername);
+ }
+
+ // in DataStreamParameters service
+ _length = service.ServiceinDataStreamParameter.length();
+ SCRUTE(_length);
+ for(unsigned int ind = 0; ind < _length; ind++)
+ {
+ SCRUTE(service.ServiceinDataStreamParameter[ind].Parametername);
+ _service->ServiceinDataStreamParameter.length(_length);
+ // in DataStreamParameter type
+ _service->ServiceinDataStreamParameter[ind].Parametertype
+ = service.ServiceinDataStreamParameter[ind].Parametertype;
+ // in DataStreamParameter dependency
+ _service->ServiceinDataStreamParameter[ind].Parameterdependency
+ = service.ServiceinDataStreamParameter[ind].Parameterdependency;
+ // in DataStreamParameter name
+ _service->ServiceinDataStreamParameter[ind].Parametername
+ = CORBA::string_dup(service.ServiceinDataStreamParameter[ind].Parametername);
+ }
+
+ // out DataStreamParameters service
+ _length = service.ServiceoutDataStreamParameter.length();
+ SCRUTE(_length);
+ for(unsigned int ind = 0; ind < _length; ind++)
+ {
+ SCRUTE(service.ServiceoutDataStreamParameter[ind].Parametername);
+ _service->ServiceoutDataStreamParameter.length(_length);
+ // out DataStreamParameter type
+ _service->ServiceoutDataStreamParameter[ind].Parametertype
+ = service.ServiceoutDataStreamParameter[ind].Parametertype;
+ // in DataStreamParameter dependency
+ _service->ServiceoutDataStreamParameter[ind].Parameterdependency
+ = service.ServiceoutDataStreamParameter[ind].Parameterdependency;
+ // out DataStreamParameter name
+ _service->ServiceoutDataStreamParameter[ind].Parametername
+ = CORBA::string_dup(service.ServiceoutDataStreamParameter[ind].Parametername);
}
+ END_OF("_duplicate_service");
return _service;
}
\param service SALOME_ModuleCatalog::Service arguments
\return the service
*/
- virtual SALOME_ModuleCatalog::Service_var _duplicate_service(SALOME_ModuleCatalog::Service service);
+ virtual SALOME_ModuleCatalog::Service_var _duplicate_service(SALOME_ModuleCatalog::Service & service);
};
#endif // ACOMPONENT_IMPL_H
#include "utilities.h"
using namespace std;
+void PrintService(SALOME_ModuleCatalog::Acomponent_ptr C,
+ const string & InterfaceName,
+ const string & ServiceName);
+
+void PrintInterface(SALOME_ModuleCatalog::Acomponent_ptr C,
+ const string & InterfaceName);
+
+void PrintComponent(SALOME_ModuleCatalog::Acomponent_ptr C);
+
int main(int argc,char **argv)
{
- char* name_to_find = "Geometry";
CORBA::ORB_var orb;
CosNaming::NamingContext_var _rootContext;
SALOME_NamingService NS(orb);
CORBA::Object_var objVarN = NS.Resolve("/Kernel/ModulCatalog");
- SALOME_ModuleCatalog::ModuleCatalog_var Catalogue = SALOME_ModuleCatalog::ModuleCatalog::_narrow(objVarN);
+ SALOME_ModuleCatalog::ModuleCatalog_var Catalogue
+ = SALOME_ModuleCatalog::ModuleCatalog::_narrow(objVarN);
MESSAGE("Distant catalog of component found")
// Get component list
- SALOME_ModuleCatalog::ListOfComponents_var list_composants = Catalogue->GetComponentList();
+ SALOME_ModuleCatalog::ListOfComponents_var list_composants
+ = Catalogue->GetComponentList();
// Typed component list
MESSAGE("Get Typed Component list (GEOM Type)");
- SALOME_ModuleCatalog::ListOfComponents_var list_typed_composants = Catalogue->GetTypedComponentList(SALOME_ModuleCatalog::GEOM);
+ SALOME_ModuleCatalog::ListOfComponents_var list_typed_composants
+ = Catalogue->GetTypedComponentList(SALOME_ModuleCatalog::GEOM);
for (unsigned int ind = 0; ind < list_typed_composants->length();ind++)
MESSAGE("Component GEOM list : " << list_typed_composants[ind]);
MESSAGE("Get Typed Component list (SUPERV Type)");
- SALOME_ModuleCatalog::ListOfComponents_var list_styped_composants = Catalogue->GetTypedComponentList(SALOME_ModuleCatalog::SUPERV);
- for (unsigned int ind = 0; ind < list_styped_composants->length();ind++)
- MESSAGE("Component SUPERV list : " << list_styped_composants[ind]);
+ list_typed_composants
+ = Catalogue->GetTypedComponentList(SALOME_ModuleCatalog::SUPERV);
+ for (unsigned int ind = 0; ind < list_typed_composants->length();ind++)
+ MESSAGE("Component SUPERV list : " << list_typed_composants[ind]);
// Get list of couple (component name, component icone)
- SALOME_ModuleCatalog::ListOfIAPP_Affich_var list_composants_icone = Catalogue->GetComponentIconeList();
+ SALOME_ModuleCatalog::ListOfIAPP_Affich_var list_composants_icone
+ = Catalogue->GetComponentIconeList();
for (unsigned int ind = 0; ind < list_composants_icone->length();ind++)
{
MESSAGE("Component name: " << list_composants_icone[ind].modulename);
exit (-1);
}
- MESSAGE("Component of name : " << Geom->componentname() << " created ");
- MESSAGE("Component type : " << Geom->component_type() << " multistudy : " <<Geom->multistudy());
- MESSAGE("Component constraint : " << Geom->constraint());
- MESSAGE("Component icone : " << Geom->component_icone());
+ PrintComponent(Geom);
// Obtain another component
SALOME_ModuleCatalog::Acomponent_ptr Superv = Catalogue->GetComponent("Supervision");
INFOS("Catalog Error : Component Supervision not found in the catalog")
exit (-1);
}
-
- MESSAGE("Component of name : " << Superv->componentname() << " created ");
- MESSAGE("Component type : " << Superv->component_type() << " multistudy : " <<Superv->multistudy());
- MESSAGE("Component constraint : " << Superv->constraint());
- MESSAGE("Component icone : " << Superv->component_icone());
+ PrintComponent(Superv);
// obtain prefix path for a computer
char* path;
path =Geom->GetPathPrefix("eri");
MESSAGE("Path prefix pour eri : " << path);
- // obtain interfaces list of the component
- SALOME_ModuleCatalog::ListOfInterfaces_var _list = new SALOME_ModuleCatalog::ListOfInterfaces;
- _list = Geom->GetInterfaceList();
- for (unsigned int ind = 0; ind < _list->length();ind++)
- MESSAGE("Interface name : " << _list[ind]);
-
- // obtain interfaces list of the component
- SALOME_ModuleCatalog::ListOfInterfaces_var _list1 = new SALOME_ModuleCatalog::ListOfInterfaces;
- _list1 = Superv->GetInterfaceList();
- for (unsigned int ind = 0; ind < _list1->length();ind++)
- MESSAGE("Interface name : " << _list1[ind])
-
-
- // Obtain one interface of a component
- SALOME_ModuleCatalog::DefinitionInterface_var _interf = new SALOME_ModuleCatalog::DefinitionInterface;
- _interf = Geom->GetInterface("Geometry");
- MESSAGE ("Interface " << _interf->interfacename << " getted")
- for (unsigned int ind = 0; ind < _interf->interfaceservicelist.length();ind++)
- MESSAGE("Service name : " << _interf->interfaceservicelist[ind].ServiceName)
-
-
- // obtain services list of the component
-
- SALOME_ModuleCatalog::ListOfServices_var list_services_component = new SALOME_ModuleCatalog::ListOfServices;
- list_services_component = Geom->GetServiceList("Geometry");
- for (unsigned int ind = 0; ind < list_services_component->length();ind++)
- MESSAGE("Service name : " << list_services_component[ind])
-
-
- // Get a service of the component
-
- SALOME_ModuleCatalog::Service_var second_service = new SALOME_ModuleCatalog::Service;
- second_service = Geom->GetDefaultService("Geometry");
-
- MESSAGE("Default Service name: " << second_service->ServiceName)
- for (unsigned int ind1 = 0; ind1 <second_service->ServiceinParameter.length();ind1++)
- {
- MESSAGE("Type of the in Parameter of this service : " << second_service->ServiceinParameter[ind1].Parametertype)
- MESSAGE("Name of the in Parameter of this service : " << second_service->ServiceinParameter[ind1].Parametername)
- }
- for (unsigned int ind1 = 0; ind1 <second_service->ServiceoutParameter.length();ind1++)
- {
- MESSAGE("Type of the out Parameter of this service : " << second_service->ServiceoutParameter[ind1].Parametertype)
- MESSAGE("Name of the out Parameter of this service : " << second_service->ServiceoutParameter[ind1].Parametername)
- }
-
-
-
- second_service = Geom->GetDefaultService("Geometry");
-
- MESSAGE("Default Service name: " << second_service->ServiceName)
- for (unsigned int ind1 = 0; ind1 <second_service->ServiceinParameter.length();ind1++)
- {
- MESSAGE("Type of the in Parameter of this service : " << second_service->ServiceinParameter[ind1].Parametertype)
- MESSAGE("Name of the in Parameter of this service : " << second_service->ServiceinParameter[ind1].Parametername)
- }
- for (unsigned int ind1 = 0; ind1 <second_service->ServiceoutParameter.length();ind1++)
- {
- MESSAGE("Type of the out Parameter of this service : " << second_service->ServiceoutParameter[ind1].Parametertype)
- MESSAGE("Name of the out Parameter of this service : " << second_service->ServiceoutParameter[ind1].Parametername)
- }
-
-
-
- // Get service of the component
-
- SALOME_ModuleCatalog::Service_var service_1 = new SALOME_ModuleCatalog::Service;
-
- service_1 = Geom->GetService("Geometry","MakeSphere") ;
-
- MESSAGE("Service name: " << service_1->ServiceName)
- for (unsigned int ind1 = 0; ind1 <service_1->ServiceinParameter.length();ind1++)
- {
- MESSAGE("Type of the in Parameter of this service : " << service_1->ServiceinParameter[ind1].Parametertype)
- MESSAGE("Name of the in Parameter of this service : " << service_1->ServiceinParameter[ind1].Parametername)
- }
-
- for (unsigned int ind1 = 0; ind1 <service_1->ServiceoutParameter.length();ind1++)
- {
- MESSAGE("Type of the out Parameter of this service : " << service_1->ServiceoutParameter[ind1].Parametertype)
- MESSAGE("Name of the out Parameter of this service : " << service_1->ServiceoutParameter[ind1].Parametername)
- }
-
- // Test levée exception
- service_1 = Geom->GetService("BOX","makeBox") ;
-
-
}
catch(SALOME_ModuleCatalog::NotFound &ex){
INFOS("SALOME_ModuleCatalog::NotFound")
return 0;
}
+void PrintComponent(SALOME_ModuleCatalog::Acomponent_ptr C)
+{
+ const char *_name = C->componentname();
+ MESSAGE("Name : " << C->componentname());
+ MESSAGE("Type : " << C->component_type() << " multistudy : " << C->multistudy());
+ MESSAGE("Constraint : " << C->constraint());
+ MESSAGE("Icon : " << C->component_icone());
+ // obtain interfaces list of the component
+ SALOME_ModuleCatalog::ListOfInterfaces_var _list = C->GetInterfaceList();
+ for (unsigned int i = 0; i < _list->length();i++) {
+ const char * s = _list[i];
+ PrintInterface(C, s);
+ }
+}
+void PrintInterface(SALOME_ModuleCatalog::Acomponent_ptr C,
+ const string & InterfaceName)
+{
+ unsigned int i, n;
+
+ SALOME_ModuleCatalog::DefinitionInterface_var _interf
+ = C->GetInterface(InterfaceName.c_str());
+ MESSAGE ("Interface : " << _interf->interfacename);
+
+ SALOME_ModuleCatalog::ListOfInterfaceService S = _interf->interfaceservicelist;
+ n = S.length();
+ for (i = 0; i < n; i++) {
+ const char * _S = S[i].ServiceName;
+ PrintService(C, InterfaceName, _S);
+ }
+}
+void PrintService(SALOME_ModuleCatalog::Acomponent_ptr C,
+ const string & InterfaceName,
+ const string & ServiceName)
+{
+ int i, n;
+
+ SALOME_ModuleCatalog::Service_var Service
+ = (ServiceName.compare("") == 0)
+ ? C->GetDefaultService(InterfaceName.c_str())
+ : C->GetService(InterfaceName.c_str(), ServiceName.c_str());
+
+ MESSAGE("Service : " << Service->ServiceName);
+
+ MESSAGE("In Parameter(s):");
+ n = Service->ServiceinParameter.length();
+ for (i = 0; i<n; i++)
+ {
+ MESSAGE(" Parameter "
+ << Service->ServiceinParameter[i].Parametername);
+ MESSAGE(" Type : "
+ << Service->ServiceinParameter[i].Parametertype);
+ }
+
+ MESSAGE("Out Parameter(s):");
+ n = Service->ServiceoutParameter.length();
+ for (i = 0; i<n; i++)
+ {
+ MESSAGE(" Parameter "
+ << Service->ServiceoutParameter[i].Parametername);
+ MESSAGE(" Type : "
+ << Service->ServiceoutParameter[i].Parametertype);
+ }
+
+ MESSAGE("In DataStreamParameter(s):");
+ n = Service->ServiceinDataStreamParameter.length();
+ for (i = 0; i<n; i++)
+ {
+ MESSAGE(" Parameter "
+ << Service->ServiceinDataStreamParameter[i].Parametername);
+ MESSAGE(" Type : "
+ << Service->ServiceinDataStreamParameter[i].Parametertype);
+ MESSAGE(" Dependency : "
+ << Service->ServiceinDataStreamParameter[i].Parametertype);
+ }
+
+ MESSAGE("Out DataStreamParameter(s):");
+ n = Service->ServiceoutDataStreamParameter.length();
+ for (i = 0; i<n; i++)
+ {
+ MESSAGE(" Parameter "
+ << Service->ServiceoutDataStreamParameter[i].Parametername);
+ MESSAGE(" Type : "
+ << Service->ServiceoutDataStreamParameter[i].Parametertype);
+ MESSAGE(" Dependency : "
+ << Service->ServiceoutDataStreamParameter[i].Parametertype);
+ }
+
-
-
-
+}
test_outParameter="outParameter";
test_outParameter_list="outParameter-list";
+ test_inDataStreamParameter_type="inDataStreamParameter-type";
+ test_inDataStreamParameter_dependency="inDataStreamParameter-dependency";
+ test_inDataStreamParameter_name="inDataStreamParameter-name";
+ test_inDataStreamParameter="inDataStreamParameter";
+ test_inDataStreamParameter_list="inDataStreamParameter-list";
+
+ test_outDataStreamParameter_type="outDataStreamParameter-dependency";
+ test_outDataStreamParameter_type="outDataStreamParameter-type";
+ test_outDataStreamParameter_name="outDataStreamParameter-name";
+ test_outDataStreamParameter="outDataStreamParameter";
+ test_outDataStreamParameter_list="outDataStreamParameter-list";
+
test_service= "component-service";
test_service_list="component-service-list";
test_interface_list="component-interface-list";
{
MESSAGE("Begin parse document")
// Empty the private elements
- _pathlist.resize(0);
- _path_prefix.ListOfComputer.resize(0);
- _servicelist.resize(0);
- _interfacelist.resize(0);
- _modulelist.resize(0);
- _inparamlist.resize(0);
- _outparamlist.resize(0);
+ _pathList.resize(0);
+ _pathPrefix.listOfComputer.resize(0);
+ _serviceList.resize(0);
+ _interfaceList.resize(0);
+ _moduleList.resize(0);
+ _inDataStreamParamList.resize(0);
+ _outDataStreamParamList.resize(0);
+ _inParamList.resize(0);
+ _outParamList.resize(0);
return true;
}
const QString& qName,
const QXmlAttributes& atts)
{
+ SCRUTE(qName);
return true;
}
// tag test_path_prefix_name
if((qName.compare(QString(test_path_prefix_name))==0))
- _path_prefix.path = content;
+ _pathPrefix.path = content;
// tag test_computer_name
if((qName.compare(QString(test_computer_name))==0))
- _path_prefix.ListOfComputer.push_back(content);
+ _pathPrefix.listOfComputer.push_back(content);
// tag test_path_prefix
if((qName.compare(QString(test_path_prefix))==0))
{
- _pathlist.push_back(_path_prefix);
- _path_prefix.ListOfComputer.resize(0);
+ _pathList.push_back(_pathPrefix);
+ _pathPrefix.listOfComputer.resize(0);
}
// Component identification
// tag test_component_name
if((qName.compare(QString(test_component_name))==0))
- _amodule.Parsercomponentname = content ;
+ _aModule.parserComponentName = content ;
// tag test_component_username
if((qName.compare(QString(test_component_username))==0))
- _amodule.Parsercomponentusername = content ;
+ _aModule.parserComponentUsername = content ;
// tag test_component_type
if((qName.compare(QString(test_component_type))==0))
{
if ((content.compare("MESH") == 0) ||
(content.compare("Mesh") == 0) ||
(content.compare("mesh") == 0))
- _amodule.Parsercomponenttype = MESH ;
+ _aModule.parserComponentType = MESH ;
else if((content.compare("MED") == 0) ||
(content.compare("Med") == 0) ||
(content.compare("med") == 0))
- _amodule.Parsercomponenttype = Med ;
+ _aModule.parserComponentType = Med ;
else if((content.compare("GEOM") == 0) ||
(content.compare("Geom") == 0) ||
(content.compare("geom") == 0))
- _amodule.Parsercomponenttype = GEOM ;
+ _aModule.parserComponentType = GEOM ;
else if((content.compare("SOLVER") == 0) ||
(content.compare("Solver") == 0) ||
(content.compare("solver") == 0))
- _amodule.Parsercomponenttype = SOLVER ;
+ _aModule.parserComponentType = SOLVER ;
else if((content.compare("SUPERV") == 0) ||
(content.compare("Superv") == 0) ||
(content.compare("Supervision") == 0) ||
(content.compare("superv") == 0))
- _amodule.Parsercomponenttype = SUPERV ;
+ _aModule.parserComponentType = SUPERV ;
else if((content.compare("DATA") == 0) ||
(content.compare("Data") == 0) ||
(content.compare("data") == 0))
- _amodule.Parsercomponenttype = DATA ;
+ _aModule.parserComponentType = DATA ;
else if((content.compare("VISU") == 0) ||
(content.compare("Visu") == 0) ||
(content.compare("visu") == 0))
- _amodule.Parsercomponenttype = VISU ;
+ _aModule.parserComponentType = VISU ;
else if((content.compare("OTHER") == 0) ||
(content.compare("Other") == 0) ||
(content.compare("other") == 0))
- _amodule.Parsercomponenttype = OTHER ;
+ _aModule.parserComponentType = OTHER ;
else
// If it'not in all theses cases, the type is affected to OTHER
- _amodule.Parsercomponenttype = OTHER ;
+ _aModule.parserComponentType = OTHER ;
}
// tag test_component_multistudy
if((qName.compare(QString(test_component_multistudy))==0))
- _amodule.Parsercomponentmultistudy = atoi(content.c_str()) ;
+ _aModule.parserComponentMultistudy = atoi(content.c_str()) ;
// tag test_component_icone
if((qName.compare(QString(test_component_icone))==0))
- _amodule.Parsercomponenticone = content ;
+ _aModule.parserComponentIcon = content ;
// interface identification
// tag test_interface_name
if((qName.compare(QString(test_interface_name))==0))
- _aInterface.Parserinterfacename = content ;
+ _aInterface.parserInterfaceName = content ;
// Service identification
// tag test_service_name
if((qName.compare(QString(test_service_name))==0))
- _aService.ParserServiceName = content ;
+ _aService.parserServiceName = content ;
//tag test_defaultservice
if((qName.compare(QString(test_defaultservice))==0))
- _aService.ParserServicebydefault = atoi(content.c_str()) ;
+ _aService.parserServiceByDefault = atoi(content.c_str()) ;
// Parameter in
// tag test_inParameter_type
if((qName.compare(QString(test_inParameter_type))==0))
- _inparam.ParserParamtype = content ;
+ _inParam.parserParamType = content ;
//tag test_inParameter_name
if((qName.compare(QString(test_inParameter_name))==0))
- _inparam.ParserParamname = content ;
+ _inParam.parserParamName = content ;
//tag test_inParameter
if((qName.compare(QString(test_inParameter))==0))
{
- _inparamlist.push_back(_inparam) ;
+ _inParamList.push_back(_inParam) ;
// Empty temporary structures
- _inparam.ParserParamtype = "";
- _inparam.ParserParamname = "";
+ _inParam.parserParamType = "";
+ _inParam.parserParamName = "";
}
//tag test_inParameter_list
if((qName.compare(QString(test_inParameter_list))==0))
{
- _aService.ParserServiceinParameter = _inparamlist;
- _inparamlist.resize(0);
+ _aService.parserServiceInParameter = _inParamList;
+ _inParamList.resize(0);
}
// Parameter out
// tag test_outParameter_type
if((qName.compare(QString(test_outParameter_type))==0))
- _outparam.ParserParamtype = content ;
+ _outParam.parserParamType = content ;
//tag test_outParameter_name
if((qName.compare(QString(test_outParameter_name))==0))
- _outparam.ParserParamname = content ;
+ _outParam.parserParamName = content ;
//tag test_outParameter
if((qName.compare(QString(test_outParameter))==0))
{
- _outparamlist.push_back(_outparam) ;
+ _outParamList.push_back(_outParam) ;
// Empty temporary structures
- _outparam.ParserParamtype = "";
- _outparam.ParserParamname = "";
+ _outParam.parserParamType = "";
+ _outParam.parserParamName = "";
}
//tag test_outParameter_list
if((qName.compare(QString(test_outParameter_list))==0))
{
- _aService.ParserServiceoutParameter=_outparamlist;
- _outparamlist.resize(0);
+ _aService.parserServiceOutParameter=_outParamList;
+ _outParamList.resize(0);
+ }
+
+
+
+ // DataStreamParameter in
+
+ // tag test_inDataStreamParameter_type
+ if((qName.compare(QString(test_inDataStreamParameter_type))==0))
+ _inDataStreamParam.parserParamType = content ;
+ //tag test_inDataStreamParameter_name
+ if((qName.compare(QString(test_inDataStreamParameter_name))==0))
+ _inDataStreamParam.parserParamName = content ;
+
+ //tag test_inDataStreamParameter
+ if((qName.compare(QString(test_inDataStreamParameter))==0))
+ {
+ _inDataStreamParamList.push_back(_inDataStreamParam) ;
+
+ // Empty temporary structures
+ _inDataStreamParam.parserParamType = "";
+ _inDataStreamParam.parserParamName = "";
+ }
+
+ //tag test_inDataStreamParameter_list
+ if((qName.compare(QString(test_inDataStreamParameter_list))==0))
+ {
+ _aService.parserServiceInDataStreamParameter = _inDataStreamParamList;
+ _inDataStreamParamList.resize(0);
+ }
+
+ // DataStreamParameter out
+
+ // tag test_outDataStreamParameter_type
+ if((qName.compare(QString(test_outDataStreamParameter_type))==0))
+ _outDataStreamParam.parserParamType = content ;
+ //tag test_outDataStreamParameter_name
+ if((qName.compare(QString(test_outDataStreamParameter_name))==0))
+ _outDataStreamParam.parserParamName = content ;
+
+ //tag test_outDataStreamParameter
+ if((qName.compare(QString(test_outDataStreamParameter))==0))
+ {
+ _outDataStreamParamList.push_back(_outDataStreamParam) ;
+
+ // Empty temporary structures
+ _outDataStreamParam.parserParamType = "";
+ _outDataStreamParam.parserParamName = "";
+ }
+ //tag test_outDataStreamParameter_list
+ if((qName.compare(QString(test_outDataStreamParameter_list))==0))
+ {
+ _aService.parserServiceOutDataStreamParameter=_outDataStreamParamList;
+ _outDataStreamParamList.resize(0);
}
// tag test_service
if((qName.compare(QString(test_service))==0))
{
- _servicelist.push_back(_aService);
+ _serviceList.push_back(_aService);
// Empty temporary structures
- _aService.ParserServiceName = "";
- _aService.ParserServiceinParameter.resize(0);
- _aService.ParserServiceoutParameter.resize(0);
+ _aService.parserServiceName = "";
+ _aService.parserServiceInParameter.resize(0);
+ _aService.parserServiceOutParameter.resize(0);
+ _aService.parserServiceInDataStreamParameter.resize(0);
+ _aService.parserServiceOutDataStreamParameter.resize(0);
}
// tag test_service_list
if((qName.compare(QString(test_service_list))==0))
{
- _aInterface.Parserinterfaceservicelist = _servicelist ;
+ _aInterface.parserInterfaceServiceList = _serviceList ;
// Empty temporary structures
- _servicelist.resize(0);
- _interfacelist.push_back(_aInterface);
- _aInterface.Parserinterfacename ="";
- _aInterface.Parserinterfaceservicelist.resize(0);
+ _serviceList.resize(0);
+ _interfaceList.push_back(_aInterface);
+ _aInterface.parserInterfaceName ="";
+ _aInterface.parserInterfaceServiceList.resize(0);
}
//tag test_interface_list
if((qName.compare(QString(test_interface_list))==0))
{
- _amodule.ParserListInterface = _interfacelist ;
- _interfacelist.resize(0);
+ _aModule.parserListInterface = _interfaceList ;
+ SCRUTE(_aModule.parserListInterface[0].parserInterfaceServiceList[0].parserServiceInDataStreamParameter.size());
+ _interfaceList.resize(0);
}
//tag test_constraint
if((qName.compare(QString(test_constraint))==0))
- _amodule.Parserconstraint = content ;
+ _aModule.parserConstraint = content ;
// tag test_component
if((qName.compare(QString(test_component))==0))
{
- _modulelist.push_back(_amodule) ;
+ _moduleList.push_back(_aModule) ;
// Empty temporary structures
- _amodule.Parsercomponentname = "";
- _amodule.Parserconstraint = "";
- _amodule.Parsercomponenticone="";
- _amodule.ParserListInterface.resize(0);
+ _aModule.parserComponentName = "";
+ _aModule.parserConstraint = "";
+ _aModule.parserComponentIcon="";
+ _aModule.parserListInterface.resize(0);
}
return true;
//----------------------------------------------------------------------
bool SALOME_ModuleCatalog_Handler::endDocument()
{
+ BEGIN_OF("endDocument");
//_pathlist
- for (unsigned int ind = 0; ind < _pathlist.size(); ind++)
+ for (unsigned int ind = 0; ind < _pathList.size(); ind++)
{
- MESSAGE("Path :"<<_pathlist[ind].path)
- for (unsigned int i = 0; i < _pathlist[ind].ListOfComputer.size(); i++)
- MESSAGE("Computer name :" << _pathlist[ind].ListOfComputer[i])
+ MESSAGE("Path :"<<_pathList[ind].path)
+ for (unsigned int i = 0; i < _pathList[ind].listOfComputer.size(); i++)
+ MESSAGE("Computer name :" << _pathList[ind].listOfComputer[i])
}
- // _modulelist
- for (unsigned int ind = 0; ind < _modulelist.size(); ind++)
+ // _moduleList
+ SCRUTE(_moduleList.size());
+ for (unsigned int ind = 0; ind < _moduleList.size(); ind++)
{
- MESSAGE("Component name : " << _modulelist[ind].Parsercomponentname);
- // MESSAGE("Component type : " <<_modulelist[ind].Parsercomponenttype);
-// MESSAGE("Component constraint : " << _modulelist[ind].Parserconstraint);
-// MESSAGE("Component icone : " << _modulelist[ind].Parsercomponenticone);
-// for (unsigned int i = 0; i < _modulelist[ind].ParserListInterface.size(); i++)
-// {
-// MESSAGE("Component interface name : " << _modulelist[ind].ParserListInterface[i].Parserinterfacename);
-// for (unsigned int j=0; j< _modulelist[ind].ParserListInterface[i].Parserinterfaceservicelist.size(); j++)
-// {
-// MESSAGE("Service name : " << _modulelist[ind].ParserListInterface[i].Parserinterfaceservicelist[j].ParserServiceName);
-// MESSAGE("Service default : " << _modulelist[ind].ParserListInterface[i].Parserinterfaceservicelist[j].ParserServicebydefault);
-// for (unsigned int k=0; k< _modulelist[ind].ParserListInterface[i].Parserinterfaceservicelist[j].ParserServiceinParameter.size() ; k++)
-// {
-// MESSAGE("Service Parameter in name : " <<_modulelist[ind].ParserListInterface[i].Parserinterfaceservicelist[j].ParserServiceinParameter[k].ParserParamname);
-// MESSAGE("Service Parameter in type : " << _modulelist[ind].ParserListInterface[i].Parserinterfaceservicelist[j].ParserServiceinParameter[k].ParserParamtype);
-// }
-// for (unsigned int k=0; k< _modulelist[ind].ParserListInterface[i].Parserinterfaceservicelist[j].ParserServiceoutParameter.size() ; k++)
-// {
-// MESSAGE("Service Parameter out name : " << _modulelist[ind].ParserListInterface[i].Parserinterfaceservicelist[j].ParserServiceoutParameter[k].ParserParamname);
-// MESSAGE("Service Parameter out type : " << _modulelist[ind].ParserListInterface[i].Parserinterfaceservicelist[j].ParserServiceoutParameter[k].ParserParamtype);
-// }
-// }
- }
-// }
- //MESSAGE("Document parsed");
+ DebugParserComponent( _moduleList[ind]);
+ }
+
+ MESSAGE("Document parsed");
+ END_OF("endDocument");
return true;
}
const char* test_outParameter_name;
const char* test_outParameter;
const char* test_outParameter_list;
+ const char* test_inDataStreamParameter_dependency;
+ const char* test_inDataStreamParameter_type;
+ const char* test_inDataStreamParameter_name;
+ const char* test_inDataStreamParameter;
+ const char* test_inDataStreamParameter_list;
+ const char* test_outDataStreamParameter_dependency;
+ const char* test_outDataStreamParameter_type;
+ const char* test_outDataStreamParameter_name;
+ const char* test_outDataStreamParameter;
+ const char* test_outDataStreamParameter_list;
const char* test_service;
const char* test_service_list;
const char* test_component;
- ParserPathPrefix _path_prefix;
+ ParserPathPrefix _pathPrefix;
- ParserComponent _amodule;
+ ParserComponent _aModule;
- ListOfDefinitionInterface _interfacelist;
+ ListOfDefinitionInterface _interfaceList;
ParserDefInterface _aInterface;
- ListOfParserServices _servicelist;
+ ListOfParserServices _serviceList;
ParserService _aService;
- ParserServParam _inparam;
- ParserServParam _outparam;
- ListOfParserServicesParameter _inparamlist;
- ListOfParserServicesParameter _outparamlist;
+ ParserServParam _inParam;
+ ParserServParam _outParam;
+ ParserServDataStreamParam _inDataStreamParam;
+ ParserServDataStreamParam _outDataStreamParam;
+ ListOfParserServicesParameter _inParamList;
+ ListOfParserServicesParameter _outParamList;
+ ListOfParserServicesDataStreamParameter _inDataStreamParamList;
+ ListOfParserServicesDataStreamParameter _outDataStreamParamList;
};
#endif // SALOME_CATALOG_HANDLER_H
struct ParserPathPrefix
{
string path;
- vector<string> ListOfComputer ;
+ vector<string> listOfComputer ;
};
typedef vector<ParserPathPrefix> ListOfParserPathPrefix ;
struct ParserServParam
{
- string ParserParamtype;
- string ParserParamname;
+ string parserParamType;
+ string parserParamName;
+} ;
+
+
+struct ParserServDataStreamParam
+{
+ string parserParamType;
+ string parserParamName;
+ string parserParamDependency;
} ;
typedef vector<ParserServParam> ListOfParserServicesParameter;
+typedef vector<ParserServDataStreamParam> ListOfParserServicesDataStreamParameter;
struct ParserService
{
- string ParserServiceName;
- ListOfParserServicesParameter ParserServiceinParameter;
- ListOfParserServicesParameter ParserServiceoutParameter;
- bool ParserServicebydefault;
+ string parserServiceName;
+ ListOfParserServicesParameter parserServiceInParameter;
+ ListOfParserServicesParameter parserServiceOutParameter;
+ ListOfParserServicesDataStreamParameter parserServiceInDataStreamParameter;
+ ListOfParserServicesDataStreamParameter parserServiceOutDataStreamParameter;
+ bool parserServiceByDefault;
} ;
typedef vector<ParserService> ListOfParserServices ;
struct ParserDefInterface
{
- string Parserinterfacename ;
- ListOfParserServices Parserinterfaceservicelist ;
+ string parserInterfaceName ;
+ ListOfParserServices parserInterfaceServiceList ;
} ;
typedef vector<ParserDefInterface> ListOfDefinitionInterface;
struct ParserComponent
{
- string Parsercomponentname;
- string Parsercomponentusername;
- ParserComponentType Parsercomponenttype;
- bool Parsercomponentmultistudy ;
- string Parsercomponenticone;
- ListOfDefinitionInterface ParserListInterface;
- string Parserconstraint ;
+ string parserComponentName;
+ string parserComponentUsername;
+ ParserComponentType parserComponentType;
+ bool parserComponentMultistudy ;
+ string parserComponentIcon;
+ ListOfDefinitionInterface parserListInterface;
+ string parserConstraint ;
};
typedef vector<ParserComponent> ListOfParserComponent ;
#ifdef WRITE_CATA_COMPONENT
// contains all the paths and the computers defined in the catalog
-ListOfParserPathPrefix _pathlist;
+ListOfParserPathPrefix _pathList;
// contains all the modules defined in the catalog
-ListOfParserComponent _modulelist;
+ListOfParserComponent _moduleList;
#else
-extern ListOfParserPathPrefix _pathlist;
-extern ListOfParserComponent _modulelist;
+extern ListOfParserPathPrefix _pathList;
+extern ListOfParserComponent _moduleList;
#endif
+inline void DebugParserService(const ParserService &S)
+{
+ MESSAGE("Service name : " << S.parserServiceName);
+ MESSAGE("Service default : " << S.parserServiceByDefault);
+
+ for (unsigned int k=0; k<S.parserServiceInParameter.size() ; k++)
+ {
+ const ParserServParam & P = S.parserServiceInParameter[k];
+ MESSAGE("Service Parameter in name : " << P.parserParamName);
+ MESSAGE("Service Parameter in type : " << P.parserParamType);
+ }
+ for (unsigned int k=0; k<S.parserServiceOutParameter.size() ; k++)
+ {
+ const ParserServParam & P = S.parserServiceOutParameter[k];
+ MESSAGE("Service Parameter out name : " << P.parserParamName);
+ MESSAGE("Service Parameter out type : " << P.parserParamType);
+ }
+
+ for (unsigned int k=0; k<S.parserServiceInDataStreamParameter.size() ; k++)
+ {
+ const ParserServDataStreamParam & P = S.parserServiceInDataStreamParameter[k];
+ MESSAGE("Service DataStreamParameter in name : " << P.parserParamName);
+ MESSAGE("Service DataStreamParameter in type : " << P.parserParamType);
+ }
+ for (unsigned int k=0; k<S.parserServiceOutDataStreamParameter.size() ; k++)
+ {
+ const ParserServDataStreamParam & P = S.parserServiceOutDataStreamParameter[k];
+ MESSAGE("Service DataStreamParameter out name : " << P.parserParamName);
+ MESSAGE("Service DataStreamParameter out type : " << P.parserParamType);
+ }
+}
+
+inline void DebugParserComponent(const ParserComponent &P)
+{
+ MESSAGE("Component name : " << P.parserComponentName);
+ MESSAGE("Component type : " << P.parserComponentType);
+ MESSAGE("Component constraint : " << P.parserConstraint);
+ MESSAGE("Component icone : " << P.parserComponentIcon);
+ for (unsigned int i = 0; i < P.parserListInterface.size(); i++)
+ {
+ const ParserDefInterface &L = P.parserListInterface[i];
+
+ MESSAGE("Component interface name : " << L.parserInterfaceName);
+ for (unsigned int j=0; j<L.parserInterfaceServiceList.size(); j++)
+ DebugParserService(L.parserInterfaceServiceList[j]);
+ }
+};
#endif // SALOME_CATALOG_PARSER_H
#include "SALOME_ModuleCatalog_impl.hxx"
#include "SALOME_ModuleCatalog_Acomponent_impl.hxx"
#include <fstream>
+#include <map>
#include <qstringlist.h>
#include <qfileinfo.h>
// looking for the wanted computer
for (unsigned int ind = 0 ; ind < _personal_path_list.size() ; ind++)
{
- for (unsigned int ind1 = 0 ; ind1 < _personal_path_list[ind].ListOfComputer.size() ; ind1++)
+ for (unsigned int ind1 = 0 ; ind1 < _personal_path_list[ind].listOfComputer.size() ; ind1++)
{
- if (strcmp(machinename, _personal_path_list[ind].ListOfComputer[ind1].c_str()) == 0)
+ if (strcmp(machinename, _personal_path_list[ind].listOfComputer[ind1].c_str()) == 0)
{
_find = true ;
// Wanted computer
{
for (unsigned int ind = 0 ; ind < _general_path_list.size() ; ind++)
{
- for (unsigned int ind1 = 0 ; ind1 < _general_path_list[ind].ListOfComputer.size() ; ind1++)
+ for (unsigned int ind1 = 0 ; ind1 < _general_path_list[ind].listOfComputer.size() ; ind1++)
{
- if (strcmp(machinename, _general_path_list[ind].ListOfComputer[ind1].c_str()) == 0)
+ if (strcmp(machinename, _general_path_list[ind].listOfComputer[ind1].c_str()) == 0)
{
_find = true ;
// Wanted computer
// All the components defined in the personal catalog are taken
for (unsigned int ind=0; ind < _personal_module_list.size();ind++)
{
- _list_components[ind]=(_personal_module_list[ind].Parsercomponentname).c_str();
+ _list_components[ind]=(_personal_module_list[ind].parserComponentName).c_str();
SCRUTE(_list_components[ind]) ;
}
{
// searching if the component is already defined in
// the personal catalog
- if ((_general_module_list[ind].Parsercomponentname.compare(_personal_module_list[ind1].Parsercomponentname)) == 0)
+ if ((_general_module_list[ind].parserComponentName.compare(_personal_module_list[ind1].parserComponentName)) == 0)
_find = true;
}
if (!_find)
{
- MESSAGE("A new component " << _general_module_list[ind].Parsercomponentname << " has to be to added in the list");
+ MESSAGE("A new component " << _general_module_list[ind].parserComponentName << " has to be to added in the list");
_list_components->length(indice+1);
// The component is not already defined => has to be taken
- _list_components[indice]=(_general_module_list[ind].Parsercomponentname).c_str();
+ _list_components[indice]=(_general_module_list[ind].parserComponentName).c_str();
SCRUTE(_list_components[indice]) ;
indice++;
}
else
- MESSAGE("The component " <<_general_module_list[ind].Parsercomponentname << " was already defined in the personal catalog") ;
+ MESSAGE("The component " <<_general_module_list[ind].parserComponentName << " was already defined in the personal catalog") ;
}
MESSAGE ( "End of GetComponentList" )
// All the components defined in the personal catalog are taken
for (unsigned int ind=0; ind < _personal_module_list.size();ind++)
{
- _list_components_icone[ind].modulename=(_personal_module_list[ind].Parsercomponentname).c_str();
- _list_components_icone[ind].moduleusername=(_personal_module_list[ind].Parsercomponentusername).c_str();
- _list_components_icone[ind].moduleicone=(_personal_module_list[ind].Parsercomponenticone).c_str();
+ _list_components_icone[ind].modulename=(_personal_module_list[ind].parserComponentName).c_str();
+ _list_components_icone[ind].moduleusername=(_personal_module_list[ind].parserComponentUsername).c_str();
+ _list_components_icone[ind].moduleicone=(_personal_module_list[ind].parserComponentIcon).c_str();
//SCRUTE(_list_components_icone[ind].modulename);
//SCRUTE(_list_components_icone[ind].moduleicone);
}
{
// searching if the component is aleready defined in
// the personal catalog
- if ((_general_module_list[ind].Parsercomponentname.compare(_personal_module_list[ind1].Parsercomponentname)) == 0)
+ if ((_general_module_list[ind].parserComponentName.compare(_personal_module_list[ind1].parserComponentName)) == 0)
_find = true;
}
if (!_find)
{
- // MESSAGE("A new component " << _general_module_list[ind].Parsercomponentname << " has to be to added in the list");
+ // MESSAGE("A new component " << _general_module_list[ind].parserComponentName << " has to be to added in the list");
_list_components_icone->length(indice+1);
// The component is not already defined => has to be taken
- _list_components_icone[indice].modulename=(_general_module_list[ind].Parsercomponentname).c_str();
- _list_components_icone[indice].moduleusername=(_general_module_list[ind].Parsercomponentusername).c_str();
- _list_components_icone[indice].moduleicone=(_general_module_list[ind].Parsercomponenticone).c_str();
+ _list_components_icone[indice].modulename=(_general_module_list[ind].parserComponentName).c_str();
+ _list_components_icone[indice].moduleusername=(_general_module_list[ind].parserComponentUsername).c_str();
+ _list_components_icone[indice].moduleicone=(_general_module_list[ind].parserComponentIcon).c_str();
//SCRUTE(_list_components_icone[indice].modulename) ;
//SCRUTE(_list_components_icone[indice].moduleicone);
indice++;
}
// else
- //MESSAGE("The component " <<_general_module_list[ind].Parsercomponentname << " was already defined in the personal catalog");
+ //MESSAGE("The component " <<_general_module_list[ind].parserComponentName << " was already defined in the personal catalog");
}
return _list_components_icone._retn() ;
// All the components in the personal catalog are taken
for (unsigned int ind=0; ind < _personal_module_list.size();ind++)
{
- if (_personal_module_list[ind].Parsercomponenttype == _temp_component_type)
+ if (_personal_module_list[ind].parserComponentType == _temp_component_type)
{
_list_typed_component->length(_j + 1);
- _list_typed_component[_j] = (_modulelist[ind].Parsercomponentname).c_str();
+ _list_typed_component[_j] = (_moduleList[ind].parserComponentName).c_str();
//SCRUTE(_list_typed_component[_j])
_j++;
}
{
_find = false;
- if(_general_module_list[ind].Parsercomponenttype == _temp_component_type)
+ if(_general_module_list[ind].parserComponentType == _temp_component_type)
{
for (unsigned int ind1=0; ind1 < _personal_module_list.size();ind1++)
{
// searching if the component is aleready defined in
// the personal catalog
- if ((_general_module_list[ind].Parsercomponentname.compare(_personal_module_list[ind1].Parsercomponentname)) == 0)
+ if ((_general_module_list[ind].parserComponentName.compare(_personal_module_list[ind1].parserComponentName)) == 0)
_find = true;
}
if (!_find)
{
- //MESSAGE("A new component " << _general_module_list[ind].Parsercomponentname << " has to be to added in the list");
+ //MESSAGE("A new component " << _general_module_list[ind].parserComponentName << " has to be to added in the list");
_list_typed_component->length(indice+1);
// The component is not already defined => has to be taken
- _list_typed_component[indice]=(_general_module_list[ind].Parsercomponentname).c_str();
+ _list_typed_component[indice]=(_general_module_list[ind].parserComponentName).c_str();
//SCRUTE(_list_typed_component[indice]) ;
indice++;
}
//else
- //MESSAGE("The component " <<_general_module_list[ind].Parsercomponentname << " was already defined in the personal catalog") ;
+ //MESSAGE("The component " <<_general_module_list[ind].parserComponentName << " was already defined in the personal catalog") ;
}
}
char* _constraint = NULL;
char* _icone = NULL;
char* _componentusername = NULL;
- SALOME_ModuleCatalog::ComponentType _componenttype = SALOME_ModuleCatalog::OTHER; // default initialisation
+ SALOME_ModuleCatalog::ComponentType _componentType = SALOME_ModuleCatalog::OTHER; // default initialisation
CORBA::Boolean _componentmultistudy = false ; // default initialisation
ListOfPathPrefix _pathes ;
_pathes.resize(0);
-
- bool find = false ;
-
// Looking for component named "componentname" in the personal catalog
// If found, get name, interfaces and constraint
// If not found, looking for component named "componentname" in
// If found, get name, interfaces and constraint
// If not found, NULL pointer is returned
+ ParserComponent *p = NULL;
+ ListOfParserPathPrefix *pp = NULL;
+
for (unsigned int ind=0; ind < _personal_module_list.size();ind++)
{
- if (strcmp((_personal_module_list[ind].Parsercomponentname).c_str(),componentname) == 0)
+ if (strcmp((_personal_module_list[ind].parserComponentName).c_str(),componentname) == 0)
{
- //MESSAGE("Component named " << componentname << " found in the personal catalog");
- find = true;
-
- // get constraint
- _constraint = new char[strlen(_personal_module_list[ind].Parserconstraint.c_str()) + 1];
- _constraint = CORBA::string_dup(_personal_module_list[ind].Parserconstraint.c_str());
-
- // get component type
- switch(_personal_module_list[ind].Parsercomponenttype){
- case GEOM:
- _componenttype = SALOME_ModuleCatalog::GEOM;
- break;
- case MESH:
- _componenttype = SALOME_ModuleCatalog::MESH;
- break;
- case Med:
- _componenttype = SALOME_ModuleCatalog::Med;
- break;
- case SOLVER:
- _componenttype = SALOME_ModuleCatalog::SOLVER;
- break;
- case DATA:
- _componenttype = SALOME_ModuleCatalog::DATA;
- break;
- case VISU:
- _componenttype = SALOME_ModuleCatalog::VISU;
- break;
- case SUPERV:
- _componenttype = SALOME_ModuleCatalog::SUPERV;
- break;
- case OTHER:
- _componenttype = SALOME_ModuleCatalog::OTHER;
- break;
- }
-
- // get component multistudy
- _componentmultistudy = _personal_module_list[ind].Parsercomponentmultistudy ;
-
- // get component icone
- _icone = CORBA::string_dup(_personal_module_list[ind].Parsercomponenticone.c_str());
-
- // get component user name
- _componentusername = CORBA::string_dup(_personal_module_list[ind].Parsercomponentusername.c_str());
+ MESSAGE("Component named " << componentname << " found in the personal catalog");
+ p = &(_personal_module_list[ind]);
+ pp = &_personal_path_list;
+ }
+ }
- // get component interfaces
- _list_interfaces = duplicate_interfaces(_personal_module_list[ind].ParserListInterface);
+ if (!p)
+ for (unsigned int ind=0; ind < _general_module_list.size();ind++)
+ {
+ if (strcmp((_general_module_list[ind].parserComponentName).c_str(),componentname) == 0)
+ {
+ MESSAGE("Component named " << componentname << " found in the general catalog");
+ p = &(_general_module_list[ind]);
+ pp = &_general_path_list;
+ }
+ }
- // get pathes prefix
- _pathes = duplicate_pathes(_personal_path_list);
+ if (p) {
+
+ DebugParserComponent(*p);
- }
- }
-
- if (find)
- {
- SALOME_ModuleCatalog_AcomponentImpl* aComponentImpl =
- new SALOME_ModuleCatalog_AcomponentImpl(componentname,
- _componentusername,
- _constraint,
- _componenttype,
- _componentmultistudy,
- _icone,
- _list_interfaces,
- _pathes);
-
- compo = aComponentImpl->_this();
+ // get constraint
+ _constraint = CORBA::string_dup(p->parserConstraint.c_str());
+
+ // get component type
+ switch(p->parserComponentType) {
+ case GEOM:
+ _componentType = SALOME_ModuleCatalog::GEOM;
+ break;
+ case MESH:
+ _componentType = SALOME_ModuleCatalog::MESH;
+ break;
+ case Med:
+ _componentType = SALOME_ModuleCatalog::Med;
+ break;
+ case SOLVER:
+ _componentType = SALOME_ModuleCatalog::SOLVER;
+ break;
+ case DATA:
+ _componentType = SALOME_ModuleCatalog::DATA;
+ break;
+ case VISU:
+ _componentType = SALOME_ModuleCatalog::VISU;
+ break;
+ case SUPERV:
+ _componentType = SALOME_ModuleCatalog::SUPERV;
+ break;
+ case OTHER:
+ _componentType = SALOME_ModuleCatalog::OTHER;
+ break;
}
+
+ // get component multistudy
+ _componentmultistudy = p->parserComponentMultistudy ;
+
+ // get component icone
+ _icone = CORBA::string_dup(p->parserComponentIcon.c_str());
+
+ // get component user name
+ _componentusername = CORBA::string_dup(p->parserComponentUsername.c_str());
+
+ // get component interfaces
+ _list_interfaces = duplicate_interfaces(p->parserListInterface);
+
+ // get pathes prefix
+ _pathes = duplicate_pathes(*pp);
+
+ SALOME_ModuleCatalog_AcomponentImpl* aComponentImpl =
+ new SALOME_ModuleCatalog_AcomponentImpl(componentname,
+ _componentusername,
+ _constraint,
+ _componentType,
+ _componentmultistudy,
+ _icone,
+ _list_interfaces,
+ _pathes);
+
+ compo = aComponentImpl->_this();
+ }
else
- // Not found in the personal catalog => searching in the general catalog
+ // Not found in the personal catalog and in the general catalog
+ // return NULL object
{
- for (unsigned int ind=0; ind < _general_module_list.size();ind++)
- {
- if (strcmp((_general_module_list[ind].Parsercomponentname).c_str(),componentname) == 0)
- {
- //MESSAGE("Component named " << componentname << " found in the general catalog");
- find = true;
-
- // get constraint
- _constraint = new char[strlen(_general_module_list[ind].Parserconstraint.c_str()) + 1];
- _constraint = CORBA::string_dup(_general_module_list[ind].Parserconstraint.c_str());
-
-
- // get component type
- switch(_general_module_list[ind].Parsercomponenttype){
- case GEOM:
- _componenttype = SALOME_ModuleCatalog::GEOM;
- break;
- case MESH:
- _componenttype = SALOME_ModuleCatalog::MESH;
- break;
- case Med:
- _componenttype = SALOME_ModuleCatalog::Med;
- break;
- case SOLVER:
- _componenttype = SALOME_ModuleCatalog::SOLVER;
- break;
- case DATA:
- _componenttype = SALOME_ModuleCatalog::DATA;
- break;
- case VISU:
- _componenttype = SALOME_ModuleCatalog::VISU;
- break;
- case SUPERV:
- _componenttype = SALOME_ModuleCatalog::SUPERV;
- break;
- case OTHER:
- _componenttype = SALOME_ModuleCatalog::OTHER;
- break;
- }
-
-
- // get component multistudy
- _componentmultistudy = _general_module_list[ind].Parsercomponentmultistudy ;
-
- // get component icone
- _icone = CORBA::string_dup(_general_module_list[ind].Parsercomponenticone.c_str());
-
- // get component user name
- _componentusername = CORBA::string_dup(_general_module_list[ind].Parsercomponentusername.c_str());
-
- // get component interfaces
- _list_interfaces = duplicate_interfaces(_general_module_list[ind].ParserListInterface);
-
- // get pathes prefix
- _pathes = duplicate_pathes(_general_path_list);
- }
- }
-
- if (find)
- {
- SALOME_ModuleCatalog_AcomponentImpl* aComponentImpl =
- new SALOME_ModuleCatalog_AcomponentImpl(componentname,
- _componentusername,
- _constraint,
- _componenttype,
- _componentmultistudy,
- _icone,
- _list_interfaces,
- _pathes);
-
- compo = aComponentImpl->_this();
- }
- else
- // Not found in the personal catalog and in the general catalog
- // return NULL object
- {
- MESSAGE("Component with name " << componentname << " not found in catalog");
- compo = NULL;
- }
+ MESSAGE("Component with name " << componentname << " not found in catalog");
+ compo = NULL;
}
+
return compo;
}
+
//----------------------------------------------------------------------
// Function : _parse_xml_file
// Purpose : parse one module catalog
void
SALOME_ModuleCatalogImpl::_parse_xml_file(const char* file,
ListOfParserComponent& modulelist,
- ListOfParserPathPrefix& pathlist)
+ ListOfParserPathPrefix& pathList)
{
+ BEGIN_OF("_parse_xml_file");
+ SCRUTE(file);
+
SALOME_ModuleCatalog_Handler* handler = new SALOME_ModuleCatalog_Handler();
QFile xmlFile(file);
reader.parse( source );
xmlFile.close();
unsigned int ind;
- for ( ind = 0; ind < _modulelist.size(); ind++)
- modulelist.push_back(_modulelist[ind]) ;
- for ( ind = 0; ind < _pathlist.size(); ind++)
- pathlist.push_back(_pathlist[ind]) ;
+ for ( ind = 0; ind < _moduleList.size(); ind++)
+ modulelist.push_back(_moduleList[ind]) ;
+ for ( ind = 0; ind < _pathList.size(); ind++)
+ pathList.push_back(_pathList[ind]) ;
}
//----------------------------------------------------------------------
SALOME_ModuleCatalog::ListOfDefInterface
SALOME_ModuleCatalogImpl::duplicate_interfaces(ListOfDefinitionInterface list_interface)
{
+
+ // Choices for DataStream port types (en dur ... pas terrible) (MT)
+ std::map < string, SALOME_ModuleCatalog::DataStreamType > DataStreamTypeConvert;
+ 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;
+ std::map < string, SALOME_ModuleCatalog::DataStreamType >::iterator it_type;
+
+ // Choices for DataStream ports dependencies (en dur ... pas terrible) (MT)
+ std::map<string,SALOME_ModuleCatalog::DataStreamDependency> DataStreamDepConvert;
+ DataStreamDepConvert["UNDEFINED"] = SALOME_ModuleCatalog::DATASTREAM_UNDEFINED;
+ DataStreamDepConvert["T"] = SALOME_ModuleCatalog::DATASTREAM_TEMPORAL;
+ DataStreamDepConvert["I"] = SALOME_ModuleCatalog::DATASTREAM_ITERATIVE;
+ std::map < string, SALOME_ModuleCatalog::DataStreamDependency >::iterator it_dep;
+
+
SALOME_ModuleCatalog::ListOfDefInterface _list_interfaces;
unsigned int _length_interfaces = list_interface.size();
_list_interfaces.length(_length_interfaces);
for (unsigned int ind = 0; ind < _length_interfaces; ind++)
{
+ SALOME_ModuleCatalog::DefinitionInterface & I_corba = _list_interfaces[ind];
+ ParserDefInterface & I_parser = list_interface[ind];
+
//duplicate interface name
- _list_interfaces[ind].interfacename = CORBA::string_dup(list_interface[ind].Parserinterfacename.c_str());
+ I_corba.interfacename = CORBA::string_dup(I_parser.parserInterfaceName.c_str());
// duplicate service list
- unsigned int _length_services = list_interface[ind].Parserinterfaceservicelist.size();
- _list_interfaces[ind].interfaceservicelist.length(_length_services);
+ unsigned int _length_services = I_parser.parserInterfaceServiceList.size();
+ SCRUTE(_length_services);
+ I_corba.interfaceservicelist.length(_length_services);
for (unsigned int ind1 = 0; ind1 < _length_services ; ind1 ++)
{
+ // input structure form XML parser
+ const ParserService & S_parser = I_parser.parserInterfaceServiceList[ind1];
+ // output structure to CORBA
+ SALOME_ModuleCatalog::Service & S_corba = I_corba.interfaceservicelist[ind1];
+
// duplicate service name
- _list_interfaces[ind].interfaceservicelist[ind1].ServiceName =
- CORBA::string_dup(list_interface[ind].Parserinterfaceservicelist[ind1].ParserServiceName.c_str());
+ S_corba.ServiceName
+ = CORBA::string_dup(S_parser.parserServiceName.c_str());
// duplicate service by default
- _list_interfaces[ind].interfaceservicelist[ind1].Servicebydefault =
- list_interface[ind].Parserinterfaceservicelist[ind1].ParserServicebydefault;
+ S_corba.Servicebydefault
+ = S_parser.parserServiceByDefault;
// duplicate in Parameters
- unsigned int _length_in_param = list_interface[ind].Parserinterfaceservicelist[ind1].ParserServiceinParameter.size();
- _list_interfaces[ind].interfaceservicelist[ind1].ServiceinParameter.length(_length_in_param);
+ unsigned int _length_in_param = S_parser.parserServiceInParameter.size();
+ S_corba.ServiceinParameter.length(_length_in_param);
for (unsigned int ind2 = 0; ind2 < _length_in_param ; ind2 ++)
{
+ SALOME_ModuleCatalog::ServicesParameter & P_corba = S_corba.ServiceinParameter[ind2];
+ const ParserServParam & P_parser = S_parser.parserServiceInParameter[ind2];
// duplicate parameter type
- _list_interfaces[ind].interfaceservicelist[ind1].ServiceinParameter[ind2].Parametertype = CORBA::string_dup(list_interface[ind].Parserinterfaceservicelist[ind1].ParserServiceinParameter[ind2].ParserParamtype.c_str());
+ P_corba.Parametertype = CORBA::string_dup(P_parser.parserParamType.c_str());
// duplicate parameter name
- _list_interfaces[ind].interfaceservicelist[ind1].ServiceinParameter[ind2].Parametername = CORBA::string_dup(list_interface[ind].Parserinterfaceservicelist[ind1].ParserServiceinParameter[ind2].ParserParamname.c_str());
+ P_corba.Parametername = CORBA::string_dup(P_parser.parserParamName.c_str());
}
// duplicate out Parameters
- unsigned int _length_out_param = list_interface[ind].Parserinterfaceservicelist[ind1].ParserServiceoutParameter.size();
- _list_interfaces[ind].interfaceservicelist[ind1].ServiceoutParameter.length(_length_out_param);
+ unsigned int _length_out_param = S_parser.parserServiceOutParameter.size();
+ S_corba.ServiceoutParameter.length(_length_out_param);
for (unsigned int ind2 = 0; ind2 < _length_out_param ; ind2 ++)
{
+ SALOME_ModuleCatalog::ServicesParameter & P_corba
+ = S_corba.ServiceoutParameter[ind2];
+ const ParserServParam & P_parser
+ = S_parser.parserServiceOutParameter[ind2];
+
+ // duplicate parameter type
+ P_corba.Parametertype = CORBA::string_dup(P_parser.parserParamType.c_str());
+
+ // duplicate parameter name
+ P_corba.Parametername = CORBA::string_dup(P_parser.parserParamName.c_str());
+ }
+
+ // duplicate in DataStreamParameters
+ unsigned int _length_in_datastream_param
+ = S_parser.parserServiceInDataStreamParameter.size();
+ S_corba.ServiceinDataStreamParameter.length(_length_in_datastream_param);
+ for (unsigned int ind2 = 0; ind2 < _length_in_datastream_param ; ind2 ++)
+ {
+ SALOME_ModuleCatalog::ServicesDataStreamParameter & P_corba
+ = S_corba.ServiceinDataStreamParameter[ind2];
+ const ParserServDataStreamParam & P_parser
+ = S_parser.parserServiceInDataStreamParameter[ind2];
+
+ // duplicate parameter type
+ it_type = DataStreamTypeConvert.find(P_parser.parserParamType);
+ S_corba.ServiceinDataStreamParameter[ind2].Parametertype
+ = (it_type == DataStreamTypeConvert.end())
+ ? it_type->second : SALOME_ModuleCatalog::DATASTREAM_UNKNOWN;
+
+ // duplicate parameter name
+ S_corba.ServiceinDataStreamParameter[ind2].Parametername
+ = CORBA::string_dup(P_parser.parserParamName.c_str());
+ }
+
+ // duplicate out DataStreamParameters
+ unsigned int _length_out_datastream_param
+ = S_parser.parserServiceOutDataStreamParameter.size();
+ S_corba.ServiceoutDataStreamParameter.length(_length_out_datastream_param);
+
+ for (unsigned int ind2 = 0; ind2 < _length_out_datastream_param ; ind2 ++)
+ {
+ SALOME_ModuleCatalog::ServicesDataStreamParameter & P_corba
+ = S_corba.ServiceoutDataStreamParameter[ind2];
+ const ParserServDataStreamParam & P_parser
+ = S_parser.parserServiceOutDataStreamParameter[ind2];
+
// duplicate parameter type
- _list_interfaces[ind].interfaceservicelist[ind1].ServiceoutParameter[ind2].Parametertype = CORBA::string_dup(list_interface[ind].Parserinterfaceservicelist[ind1].ParserServiceoutParameter[ind2].ParserParamtype.c_str());
+ it_type = DataStreamTypeConvert.find(P_parser.parserParamType);
+ S_corba.ServiceoutDataStreamParameter[ind2].Parametertype
+ = (it_type == DataStreamTypeConvert.end())
+ ? it_type->second : SALOME_ModuleCatalog::DATASTREAM_UNKNOWN;
// duplicate parameter name
- _list_interfaces[ind].interfaceservicelist[ind1].ServiceoutParameter[ind2].Parametername = CORBA::string_dup(list_interface[ind].Parserinterfaceservicelist[ind1].ParserServiceoutParameter[ind2].ParserParamname.c_str());
+ P_corba.Parametername = CORBA::string_dup(P_parser.parserParamName.c_str());
}
}
_pathes[ind].path = CORBA::string_dup(pathes[ind].path.c_str()) ;
//MESSAGE("Prefix : " << _pathes[ind].path);
- _length_comput = pathes[ind].ListOfComputer.size() ;
- _pathes[ind].ListOfComputer.resize(_length_comput);
+ _length_comput = pathes[ind].listOfComputer.size() ;
+ _pathes[ind].listOfComputer.resize(_length_comput);
for (unsigned int ind1 = 0; ind1 <_length_comput ; ind1++)
{
// duplicate computer name
- _pathes[ind].ListOfComputer[ind1] = CORBA::string_dup(pathes[ind].ListOfComputer[ind1].c_str());
- //MESSAGE("Computer associated to the prefix : " <<_pathes[ind].ListOfComputer[ind1]);
+ _pathes[ind].listOfComputer[ind1] = CORBA::string_dup(pathes[ind].listOfComputer[ind1].c_str());
+ //MESSAGE("Computer associated to the prefix : " <<_pathes[ind].listOfComputer[ind1]);
}
}
return _pathes ;
// particular computer
//----------------------------------------------------------------------
bool
-SALOME_ModuleCatalogImpl::_verify_path_prefix(ListOfParserPathPrefix pathlist)
+SALOME_ModuleCatalogImpl::_verify_path_prefix(ListOfParserPathPrefix pathList)
{
bool _return_value = true;
vector<string> _machine_list;
_machine_list.resize(0);
// Fill a list of all computers indicated in the path list
- for (unsigned int ind = 0; ind < pathlist.size(); ind++)
+ for (unsigned int ind = 0; ind < pathList.size(); ind++)
{
- for (unsigned int ind1 = 0 ; ind1 < pathlist[ind].ListOfComputer.size(); ind1++)
+ for (unsigned int ind1 = 0 ; ind1 < pathList[ind].listOfComputer.size(); ind1++)
{
- _machine_list.push_back(pathlist[ind].ListOfComputer[ind1]);
+ _machine_list.push_back(pathList[ind].listOfComputer[ind1]);
}
}