From: nri Date: Fri, 16 May 2003 15:59:48 +0000 (+0000) Subject: NRI : Add componentusername. X-Git-Tag: V1_4_0~120 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dc36a3bbce62e88454d490e78d25c29f049fad83;p=modules%2Fkernel.git NRI : Add componentusername. --- diff --git a/idl/SALOME_ModuleCatalog.idl b/idl/SALOME_ModuleCatalog.idl index d7e079c39..789722be4 100644 --- a/idl/SALOME_ModuleCatalog.idl +++ b/idl/SALOME_ModuleCatalog.idl @@ -87,6 +87,7 @@ This struct contains GUI elements used for representation of the module in %IAPP struct IAPP_Affich { string modulename; /*! ListOfDefinitionInterface; struct ParserComponent { string Parsercomponentname; + string Parsercomponentusername; ParserComponentType Parsercomponenttype; bool Parsercomponentmultistudy ; string Parsercomponenticone; diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx index 9cf8efc5b..ba6ff0a51 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx @@ -165,7 +165,7 @@ SALOME_ModuleCatalogImpl::GetComponentList() for (unsigned int ind=0; ind < _personal_module_list.size();ind++) { _list_components[ind]=(_personal_module_list[ind].Parsercomponentname).c_str(); - //SCRUTE(_list_components[ind]) ; + SCRUTE(_list_components[ind]) ; } int indice = _personal_module_list.size() ; @@ -185,18 +185,19 @@ SALOME_ModuleCatalogImpl::GetComponentList() } 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(); - //SCRUTE(_list_components[indice]) ; + SCRUTE(_list_components[indice]) ; indice++; } - // else - //MESSAGE("The component " <<_general_module_list[ind].Parsercomponentname << " was already defined in the personal catalog") ; + else + MESSAGE("The component " <<_general_module_list[ind].Parsercomponentname << " was already defined in the personal catalog") ; } + MESSAGE ( "End of GetComponentList" ) return _list_components._retn(); } @@ -222,6 +223,7 @@ SALOME_ModuleCatalogImpl::GetComponentIconeList() 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(); //SCRUTE(_list_components_icone[ind].modulename); //SCRUTE(_list_components_icone[ind].moduleicone); @@ -248,6 +250,7 @@ SALOME_ModuleCatalogImpl::GetComponentIconeList() _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(); //SCRUTE(_list_components_icone[indice].modulename) ; //SCRUTE(_list_components_icone[indice].moduleicone); @@ -370,6 +373,7 @@ SALOME_ModuleCatalogImpl::GetComponent(const char* componentname) _list_interfaces.length(0); char* _constraint = NULL; char* _icone = NULL; + char* _componentusername = NULL; SALOME_ModuleCatalog::ComponentType _componenttype = SALOME_ModuleCatalog::OTHER; // default initialisation CORBA::Boolean _componentmultistudy = false ; // default initialisation ListOfPathPrefix _pathes ; @@ -430,6 +434,9 @@ SALOME_ModuleCatalogImpl::GetComponent(const char* componentname) // 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()); + // get component interfaces _list_interfaces = duplicate_interfaces(_personal_module_list[ind].ParserListInterface); @@ -443,6 +450,7 @@ SALOME_ModuleCatalogImpl::GetComponent(const char* componentname) { SALOME_ModuleCatalog_AcomponentImpl* aComponentImpl = new SALOME_ModuleCatalog_AcomponentImpl(componentname, + _componentusername, _constraint, _componenttype, _componentmultistudy, @@ -502,6 +510,9 @@ SALOME_ModuleCatalogImpl::GetComponent(const char* componentname) // 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); @@ -514,6 +525,7 @@ SALOME_ModuleCatalogImpl::GetComponent(const char* componentname) { SALOME_ModuleCatalog_AcomponentImpl* aComponentImpl = new SALOME_ModuleCatalog_AcomponentImpl(componentname, + _componentusername, _constraint, _componenttype, _componentmultistudy,