Salome HOME
This commit was generated by cvs2git to create tag 'V1_3_0'.
[modules/kernel.git] / src / ModuleCatalog / SALOME_ModuleCatalog_Acomponent_impl.cxx
index 66672f7a0e85dbc03b8d6dc4a2694d65aa2a2511..35e5c2e3e49beef18b9ef8b721741cd41bb1a4b8 100644 (file)
@@ -39,6 +39,7 @@ using namespace std;
 //----------------------------------------------------------------------  
 SALOME_ModuleCatalog_AcomponentImpl::SALOME_ModuleCatalog_AcomponentImpl(
                    const char* name,
+                   const char* username,
                   const char* constraint,  
                   SALOME_ModuleCatalog::ComponentType componenttype,
                   CORBA::Boolean componentmultistudy,
@@ -51,6 +52,10 @@ SALOME_ModuleCatalog_AcomponentImpl::SALOME_ModuleCatalog_AcomponentImpl(
   _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);
@@ -83,6 +88,7 @@ SALOME_ModuleCatalog_AcomponentImpl::~SALOME_ModuleCatalog_AcomponentImpl()
   MESSAGE("Component destruction")
   // empty memory
   delete [] _component_name;
+  delete [] _component_user_name;
   delete [] _constraint;
 }
 
@@ -389,6 +395,15 @@ char* SALOME_ModuleCatalog_AcomponentImpl::componentname()
   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