struct IAPP_Affich
{
string modulename; /*!<Name of the module.*/
+ string moduleusername; /*!<UserName of the module.*/
string moduleicone; /*!<Icone representing the module.*/
};
/*!
*/
readonly attribute string componentname;
+/*!
+Sets/gets the user name of the component
+*/
+ readonly attribute string componentusername;
+
/*!
Defines whether the component can be multistudy or not
*/
//----------------------------------------------------------------------
SALOME_ModuleCatalog_AcomponentImpl::SALOME_ModuleCatalog_AcomponentImpl(
const char* name,
+ const char* username,
const char* constraint,
SALOME_ModuleCatalog::ComponentType componenttype,
CORBA::Boolean componentmultistudy,
_component_name = new char[strlen(name)+1];
strcpy(_component_name, name);
+ // Affect component user name
+ _component_user_name = new char[strlen(username)+1];
+ strcpy(_component_user_name, username);
+
// Affect constraint
_constraint =new char[strlen(constraint)+1];
strcpy(_constraint, constraint);
MESSAGE("Component destruction")
// empty memory
delete [] _component_name;
+ delete [] _component_user_name;
delete [] _constraint;
}
return CORBA::string_dup(_component_name);
}
+//----------------------------------------------------------------------
+// Function : componentusername
+// Purpose : obtain the componentusername
+//----------------------------------------------------------------------
+char* SALOME_ModuleCatalog_AcomponentImpl::componentusername()
+{
+ return CORBA::string_dup(_component_user_name);
+}
+
//----------------------------------------------------------------------
// Function : multistudy
// Purpose : define if a component can be multistudy or not
public:
//! standard constructor
SALOME_ModuleCatalog_AcomponentImpl(const char* name,
+ const char* username,
const char* constraint,
SALOME_ModuleCatalog::ComponentType componenttype,
CORBA::Boolean componentmultistudy,
*/
virtual char* componentname();
+ //! method to obtain the componentusername
+ /*!
+ \return the component user name
+ */
+ virtual char* componentusername();
+
//! method to define if a component can be multistudy or not
/*!
\return true if the component supports multistudy
private :
char* _component_name ;
+ char* _component_user_name ;
char* _constraint;
char* _icone;
SALOME_ModuleCatalog::ComponentType _componenttype;
test_path_prefix = "path-prefix" ;
test_component_name = "component-name";
+ test_component_username = "component-username";
test_component_type = "component-type" ;
test_component_multistudy="component-multistudy";
test_component_icone="component-icone" ;
// tag test_component_name
if((qName.compare(QString(test_component_name))==0))
_amodule.Parsercomponentname = content ;
+ // tag test_component_username
+ if((qName.compare(QString(test_component_username))==0))
+ _amodule.Parsercomponentusername = content ;
// tag test_component_type
if((qName.compare(QString(test_component_type))==0))
{
const char* test_path_prefix ;
const char* test_component_name;
+ const char* test_component_username;
const char* test_component_type ;
const char* test_component_multistudy ;
const char* test_component_icone ;
struct ParserComponent
{
string Parsercomponentname;
+ string Parsercomponentusername;
ParserComponentType Parsercomponenttype;
bool Parsercomponentmultistudy ;
string Parsercomponenticone;
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() ;
}
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();
}
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);
_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);
_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 ;
// 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);
{
SALOME_ModuleCatalog_AcomponentImpl* aComponentImpl =
new SALOME_ModuleCatalog_AcomponentImpl(componentname,
+ _componentusername,
_constraint,
_componenttype,
_componentmultistudy,
// 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);
{
SALOME_ModuleCatalog_AcomponentImpl* aComponentImpl =
new SALOME_ModuleCatalog_AcomponentImpl(componentname,
+ _componentusername,
_constraint,
_componenttype,
_componentmultistudy,