1 // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SALOME_ModuleCatalog_impl.cxx
25 // Author : Estelle Deville
30 #include "SALOME_ModuleCatalog_impl.hxx"
31 #include "SALOME_ModuleCatalog_Acomponent_impl.hxx"
34 #include <qstringlist.h>
35 #include <qfileinfo.h>
37 static const char* SEPARATOR = ":";
39 //----------------------------------------------------------------------
40 // Function : SALOME_ModuleCatalogImpl
41 // Purpose : Constructor
42 //----------------------------------------------------------------------
43 SALOME_ModuleCatalogImpl::SALOME_ModuleCatalogImpl(int argc, char** argv)
45 MESSAGE("Catalog creation");
47 // Empty used variables
48 _general_module_list.resize(0);
49 _general_path_list.resize(0);
51 _personal_module_list.resize(0);
52 _personal_path_list.resize(0);
54 // Parse the arguments given at server run
55 if (!_parseArguments(argc, argv,&_general_path,&_personal_path))
56 MESSAGE( "Error while argument parsing" )
58 // Test existency of files
59 if (_general_path == NULL)
60 MESSAGE( "Error the general catalog should be indicated" )
63 //MESSAGE("Parse general catalog");
64 // Affect the variables _general_module_list and _general_path_list
65 // with the common catalog
67 QStringList dirList = QStringList::split( SEPARATOR, _general_path, false ); // skip empty entries
68 for ( int i = 0; i < dirList.count(); i++ ) {
69 QFileInfo fileInfo( dirList[ i ] );
70 if ( fileInfo.isFile() && fileInfo.exists() ) {
71 _parse_xml_file(fileInfo.filePath(),_general_module_list, _general_path_list);
75 // Verification of _general_path_list content
76 if(!_verify_path_prefix(_general_path_list))
77 MESSAGE( "Error while parsing the general path list, differents pathes are associated to one computer, the first will be choosen" )
78 else MESSAGE("General path list OK");
80 if(_personal_path != NULL)
82 //MESSAGE("Parse personal catalog");
83 // Affect the variables _personal_module_list and _personal_path_list
84 // with the personal catalog
85 _parse_xml_file(_personal_path,_personal_module_list, _personal_path_list);
87 // Verification of _general_path_list content
88 if(!_verify_path_prefix(_personal_path_list))
89 MESSAGE("Error while parsing the personal path list, differents pathes are associated to one computer, the first will be choosen" )
90 else MESSAGE("Personal path list OK");
92 else MESSAGE("No personal catalog indicated or error while opening the personal catalog");
96 //----------------------------------------------------------------------
97 // Function : ~SALOME_ModuleCatalogImpl
98 // Purpose : Destructor
99 //----------------------------------------------------------------------
100 SALOME_ModuleCatalogImpl::~SALOME_ModuleCatalogImpl()
102 MESSAGE("Catalog Destruction");
106 //----------------------------------------------------------------------
107 // Function : GetComputerList
108 // Purpose : get a computer list
109 //----------------------------------------------------------------------
110 SALOME_ModuleCatalog::ListOfComputers*
111 SALOME_ModuleCatalogImpl::GetComputerList()
113 SALOME_ModuleCatalog::ListOfComputers_var _list_computers =
114 new SALOME_ModuleCatalog::ListOfComputers;
115 return _list_computers._retn();
118 //----------------------------------------------------------------------
119 // Function : GetPathPrefix
120 // Purpose : get the PathPrefix of a computer
121 //----------------------------------------------------------------------
123 SALOME_ModuleCatalogImpl::GetPathPrefix(const char* machinename) {
124 MESSAGE("Begin of GetPathPrefix")
125 // Variables initialisation
129 // Parse all the path prefixes
130 // looking for the wanted computer
131 for (unsigned int ind = 0 ; ind < _personal_path_list.size() ; ind++)
133 for (unsigned int ind1 = 0 ; ind1 < _personal_path_list[ind].ListOfComputer.size() ; ind1++)
135 if (strcmp(machinename, _personal_path_list[ind].ListOfComputer[ind1].c_str()) == 0)
139 // affect the path to be returned
140 const char* _temp = _personal_path_list[ind].path.c_str() ;
141 _path = new char[strlen(_temp)+1];
149 for (unsigned int ind = 0 ; ind < _general_path_list.size() ; ind++)
151 for (unsigned int ind1 = 0 ; ind1 < _general_path_list[ind].ListOfComputer.size() ; ind1++)
153 if (strcmp(machinename, _general_path_list[ind].ListOfComputer[ind1].c_str()) == 0)
157 // affect the path to be returned
158 const char* _temp = _general_path_list[ind].path.c_str() ;
159 _path = new char[strlen(_temp)+1];
169 //----------------------------------------------------------------------
170 // Function : GetComponentList
171 // Purpose : get a component list
172 // If a component is defined in the personal catalog and
173 // in the general catalog (same name), the component defined
174 // in the personal catalog is used
175 //----------------------------------------------------------------------
176 SALOME_ModuleCatalog::ListOfComponents*
177 SALOME_ModuleCatalogImpl::GetComponentList()
179 MESSAGE("Begin of GetComponentList");
180 SALOME_ModuleCatalog::ListOfComponents_var _list_components =
181 new SALOME_ModuleCatalog::ListOfComponents;
183 _list_components->length(_personal_module_list.size());
185 // All the components defined in the personal catalog are taken
186 for (unsigned int ind=0; ind < _personal_module_list.size();ind++)
188 _list_components[ind]=(_personal_module_list[ind].Parsercomponentname).c_str();
189 //SCRUTE(_list_components[ind]) ;
192 int indice = _personal_module_list.size() ;
195 // The components in the general catalog are taken only if they're
196 // not defined in the personal catalog
197 for (unsigned int ind=0; ind < _general_module_list.size();ind++)
200 for (unsigned int ind1=0; ind1 < _personal_module_list.size();ind1++)
202 // searching if the component is already defined in
203 // the personal catalog
204 if ((_general_module_list[ind].Parsercomponentname.compare(_personal_module_list[ind1].Parsercomponentname)) == 0)
209 //MESSAGE("A new component " << _general_module_list[ind].Parsercomponentname << " has to be to added in the list");
210 _list_components->length(indice+1);
211 // The component is not already defined => has to be taken
212 _list_components[indice]=(_general_module_list[ind].Parsercomponentname).c_str();
213 //SCRUTE(_list_components[indice]) ;
218 //MESSAGE("The component " <<_general_module_list[ind].Parsercomponentname << " was already defined in the personal catalog") ;
221 return _list_components._retn();
225 //----------------------------------------------------------------------
226 // Function : GetComponentIconeList
227 // Purpose : get a component list of component name and component icone
228 // If a component is defined in the personal catalog and
229 // in the general catalog (same name), the component defined
230 // in the personal catalog is used
231 //----------------------------------------------------------------------
232 SALOME_ModuleCatalog::ListOfIAPP_Affich*
233 SALOME_ModuleCatalogImpl::GetComponentIconeList()
235 MESSAGE("Begin of GetComponentIconeList");
237 SALOME_ModuleCatalog::ListOfIAPP_Affich_var _list_components_icone =
238 new SALOME_ModuleCatalog::ListOfIAPP_Affich;
240 _list_components_icone->length(_personal_module_list.size());
242 // All the components defined in the personal catalog are taken
243 for (unsigned int ind=0; ind < _personal_module_list.size();ind++)
245 _list_components_icone[ind].modulename=(_personal_module_list[ind].Parsercomponentname).c_str();
246 _list_components_icone[ind].moduleicone=(_personal_module_list[ind].Parsercomponenticone).c_str();
247 //SCRUTE(_list_components_icone[ind].modulename);
248 //SCRUTE(_list_components_icone[ind].moduleicone);
251 int indice = _personal_module_list.size() ;
254 // The components in the general catalog are taken only if they're
255 // not defined in the personal catalog
256 for (unsigned int ind=0; ind < _general_module_list.size();ind++)
259 for (unsigned int ind1=0; ind1 < _personal_module_list.size();ind1++)
261 // searching if the component is aleready defined in
262 // the personal catalog
263 if ((_general_module_list[ind].Parsercomponentname.compare(_personal_module_list[ind1].Parsercomponentname)) == 0)
268 // MESSAGE("A new component " << _general_module_list[ind].Parsercomponentname << " has to be to added in the list");
269 _list_components_icone->length(indice+1);
270 // The component is not already defined => has to be taken
271 _list_components_icone[indice].modulename=(_general_module_list[ind].Parsercomponentname).c_str();
272 _list_components_icone[indice].moduleicone=(_general_module_list[ind].Parsercomponenticone).c_str();
273 //SCRUTE(_list_components_icone[indice].modulename) ;
274 //SCRUTE(_list_components_icone[indice].moduleicone);
279 //MESSAGE("The component " <<_general_module_list[ind].Parsercomponentname << " was already defined in the personal catalog");
282 return _list_components_icone._retn() ;
285 //----------------------------------------------------------------------
286 // Function : GetTypedComponentList
287 // Purpose : get a component list of a wanted type
288 // If a component is defined in the personal catalog and
289 // in the general catalog (same name), the component defined
290 // in the personal catalog is used
291 //----------------------------------------------------------------------
292 SALOME_ModuleCatalog::ListOfComponents*
293 SALOME_ModuleCatalogImpl::GetTypedComponentList(SALOME_ModuleCatalog::ComponentType component_type)
295 MESSAGE("Begin of GetTypedComponentList");
296 SALOME_ModuleCatalog::ListOfComponents_var _list_typed_component =
297 new SALOME_ModuleCatalog::ListOfComponents;
300 _list_typed_component->length(0);
301 // Transform SALOME_ModuleCatalog::ComponentType in ParserComponentType
302 ParserComponentType _temp_component_type;
303 switch(component_type){
304 case SALOME_ModuleCatalog::GEOM:
305 _temp_component_type = GEOM ;
307 case SALOME_ModuleCatalog::MESH:
308 _temp_component_type = MESH;
310 case SALOME_ModuleCatalog::Med:
311 _temp_component_type = Med;
313 case SALOME_ModuleCatalog::SOLVER:
314 _temp_component_type = SOLVER;
316 case SALOME_ModuleCatalog::DATA:
317 _temp_component_type = DATA;
319 case SALOME_ModuleCatalog::VISU:
320 _temp_component_type = VISU;
322 case SALOME_ModuleCatalog::SUPERV:
323 _temp_component_type = SUPERV;
325 case SALOME_ModuleCatalog::OTHER:
326 _temp_component_type = OTHER;
330 // All the components in the personal catalog are taken
331 for (unsigned int ind=0; ind < _personal_module_list.size();ind++)
333 if (_personal_module_list[ind].Parsercomponenttype == _temp_component_type)
335 _list_typed_component->length(_j + 1);
336 _list_typed_component[_j] = (_modulelist[ind].Parsercomponentname).c_str();
337 //SCRUTE(_list_typed_component[_j])
342 int indice = _list_typed_component->length() ;
345 // The components in the general catalog are taken only if they're
346 // not defined in the personal catalog
347 for (unsigned int ind=0; ind < _general_module_list.size();ind++)
351 if(_general_module_list[ind].Parsercomponenttype == _temp_component_type)
353 for (unsigned int ind1=0; ind1 < _personal_module_list.size();ind1++)
355 // searching if the component is aleready defined in
356 // the personal catalog
357 if ((_general_module_list[ind].Parsercomponentname.compare(_personal_module_list[ind1].Parsercomponentname)) == 0)
362 //MESSAGE("A new component " << _general_module_list[ind].Parsercomponentname << " has to be to added in the list");
363 _list_typed_component->length(indice+1);
364 // The component is not already defined => has to be taken
365 _list_typed_component[indice]=(_general_module_list[ind].Parsercomponentname).c_str();
366 //SCRUTE(_list_typed_component[indice]) ;
371 //MESSAGE("The component " <<_general_module_list[ind].Parsercomponentname << " was already defined in the personal catalog") ;
376 return _list_typed_component._retn();
379 //----------------------------------------------------------------------
380 // Function : GetComponent
381 // Purpose : get a component
382 // If a component is defined in the personal catalog and
383 // in the general catalog (same name), the component defined
384 // in the personal catalog is used
385 //----------------------------------------------------------------------
386 SALOME_ModuleCatalog::Acomponent_ptr
387 SALOME_ModuleCatalogImpl::GetComponent(const char* componentname)
389 SALOME_ModuleCatalog::Acomponent_ptr compo;
390 SALOME_ModuleCatalog::ListOfDefInterface _list_interfaces;
391 _list_interfaces.length(0);
392 char* _constraint = NULL;
394 SALOME_ModuleCatalog::ComponentType _componenttype = SALOME_ModuleCatalog::OTHER; // default initialisation
395 CORBA::Boolean _componentmultistudy = false ; // default initialisation
396 ListOfPathPrefix _pathes ;
402 // Looking for component named "componentname" in the personal catalog
403 // If found, get name, interfaces and constraint
404 // If not found, looking for component named "componentname" in
405 // the general catalog
406 // If found, get name, interfaces and constraint
407 // If not found, NULL pointer is returned
409 for (unsigned int ind=0; ind < _personal_module_list.size();ind++)
411 if (strcmp((_personal_module_list[ind].Parsercomponentname).c_str(),componentname) == 0)
413 //MESSAGE("Component named " << componentname << " found in the personal catalog");
417 _constraint = new char[strlen(_personal_module_list[ind].Parserconstraint.c_str()) + 1];
418 _constraint = CORBA::string_dup(_personal_module_list[ind].Parserconstraint.c_str());
420 // get component type
421 switch(_personal_module_list[ind].Parsercomponenttype){
423 _componenttype = SALOME_ModuleCatalog::GEOM;
426 _componenttype = SALOME_ModuleCatalog::MESH;
429 _componenttype = SALOME_ModuleCatalog::Med;
432 _componenttype = SALOME_ModuleCatalog::SOLVER;
435 _componenttype = SALOME_ModuleCatalog::DATA;
438 _componenttype = SALOME_ModuleCatalog::VISU;
441 _componenttype = SALOME_ModuleCatalog::SUPERV;
444 _componenttype = SALOME_ModuleCatalog::OTHER;
448 // get component multistudy
449 _componentmultistudy = _personal_module_list[ind].Parsercomponentmultistudy ;
451 // get component icone
452 _icone = CORBA::string_dup(_personal_module_list[ind].Parsercomponenticone.c_str());
454 // get component interfaces
455 _list_interfaces = duplicate_interfaces(_personal_module_list[ind].ParserListInterface);
458 _pathes = duplicate_pathes(_personal_path_list);
465 SALOME_ModuleCatalog_AcomponentImpl* aComponentImpl =
466 new SALOME_ModuleCatalog_AcomponentImpl(componentname,
469 _componentmultistudy,
474 compo = aComponentImpl->_this();
477 // Not found in the personal catalog => searching in the general catalog
479 for (unsigned int ind=0; ind < _general_module_list.size();ind++)
481 if (strcmp((_general_module_list[ind].Parsercomponentname).c_str(),componentname) == 0)
483 //MESSAGE("Component named " << componentname << " found in the general catalog");
487 _constraint = new char[strlen(_general_module_list[ind].Parserconstraint.c_str()) + 1];
488 _constraint = CORBA::string_dup(_general_module_list[ind].Parserconstraint.c_str());
491 // get component type
492 switch(_general_module_list[ind].Parsercomponenttype){
494 _componenttype = SALOME_ModuleCatalog::GEOM;
497 _componenttype = SALOME_ModuleCatalog::MESH;
500 _componenttype = SALOME_ModuleCatalog::Med;
503 _componenttype = SALOME_ModuleCatalog::SOLVER;
506 _componenttype = SALOME_ModuleCatalog::DATA;
509 _componenttype = SALOME_ModuleCatalog::VISU;
512 _componenttype = SALOME_ModuleCatalog::SUPERV;
515 _componenttype = SALOME_ModuleCatalog::OTHER;
520 // get component multistudy
521 _componentmultistudy = _general_module_list[ind].Parsercomponentmultistudy ;
523 // get component icone
524 _icone = CORBA::string_dup(_general_module_list[ind].Parsercomponenticone.c_str());
526 // get component interfaces
527 _list_interfaces = duplicate_interfaces(_general_module_list[ind].ParserListInterface);
530 _pathes = duplicate_pathes(_general_path_list);
536 SALOME_ModuleCatalog_AcomponentImpl* aComponentImpl =
537 new SALOME_ModuleCatalog_AcomponentImpl(componentname,
540 _componentmultistudy,
545 compo = aComponentImpl->_this();
548 // Not found in the personal catalog and in the general catalog
549 // return NULL object
551 MESSAGE("Component with name " << componentname << " not found in catalog");
558 //----------------------------------------------------------------------
559 // Function : _parse_xml_file
560 // Purpose : parse one module catalog
561 //----------------------------------------------------------------------
563 SALOME_ModuleCatalogImpl::_parse_xml_file(const char* file,
564 ListOfParserComponent& modulelist,
565 ListOfParserPathPrefix& pathlist)
567 SALOME_ModuleCatalog_Handler* handler = new SALOME_ModuleCatalog_Handler();
570 QXmlInputSource source(xmlFile);
572 QXmlSimpleReader reader;
573 reader.setContentHandler( handler );
574 reader.setErrorHandler( handler );
575 reader.parse( source );
578 for ( ind = 0; ind < _modulelist.size(); ind++)
579 modulelist.push_back(_modulelist[ind]) ;
580 for ( ind = 0; ind < _pathlist.size(); ind++)
581 pathlist.push_back(_pathlist[ind]) ;
584 //----------------------------------------------------------------------
585 // Function : duplicate_interfaces
586 // Purpose : create a list of interfaces from the parsing of the catalog
587 //----------------------------------------------------------------------
588 SALOME_ModuleCatalog::ListOfDefInterface
589 SALOME_ModuleCatalogImpl::duplicate_interfaces(ListOfDefinitionInterface list_interface)
591 SALOME_ModuleCatalog::ListOfDefInterface _list_interfaces;
592 unsigned int _length_interfaces = list_interface.size();
593 _list_interfaces.length(_length_interfaces);
595 for (unsigned int ind = 0; ind < _length_interfaces; ind++)
597 //duplicate interface name
598 _list_interfaces[ind].interfacename = CORBA::string_dup(list_interface[ind].Parserinterfacename.c_str());
600 // duplicate service list
601 unsigned int _length_services = list_interface[ind].Parserinterfaceservicelist.size();
602 _list_interfaces[ind].interfaceservicelist.length(_length_services);
604 for (unsigned int ind1 = 0; ind1 < _length_services ; ind1 ++)
606 // duplicate service name
607 _list_interfaces[ind].interfaceservicelist[ind1].ServiceName =
608 CORBA::string_dup(list_interface[ind].Parserinterfaceservicelist[ind1].ParserServiceName.c_str());
610 // duplicate service by default
611 _list_interfaces[ind].interfaceservicelist[ind1].Servicebydefault =
612 list_interface[ind].Parserinterfaceservicelist[ind1].ParserServicebydefault;
614 // duplicate in Parameters
615 unsigned int _length_in_param = list_interface[ind].Parserinterfaceservicelist[ind1].ParserServiceinParameter.size();
616 _list_interfaces[ind].interfaceservicelist[ind1].ServiceinParameter.length(_length_in_param);
617 for (unsigned int ind2 = 0; ind2 < _length_in_param ; ind2 ++)
619 // duplicate parameter type
620 _list_interfaces[ind].interfaceservicelist[ind1].ServiceinParameter[ind2].Parametertype = CORBA::string_dup(list_interface[ind].Parserinterfaceservicelist[ind1].ParserServiceinParameter[ind2].ParserParamtype.c_str());
622 // duplicate parameter name
623 _list_interfaces[ind].interfaceservicelist[ind1].ServiceinParameter[ind2].Parametername = CORBA::string_dup(list_interface[ind].Parserinterfaceservicelist[ind1].ParserServiceinParameter[ind2].ParserParamname.c_str());
626 // duplicate out Parameters
627 unsigned int _length_out_param = list_interface[ind].Parserinterfaceservicelist[ind1].ParserServiceoutParameter.size();
628 _list_interfaces[ind].interfaceservicelist[ind1].ServiceoutParameter.length(_length_out_param);
629 for (unsigned int ind2 = 0; ind2 < _length_out_param ; ind2 ++)
631 // duplicate parameter type
632 _list_interfaces[ind].interfaceservicelist[ind1].ServiceoutParameter[ind2].Parametertype = CORBA::string_dup(list_interface[ind].Parserinterfaceservicelist[ind1].ParserServiceoutParameter[ind2].ParserParamtype.c_str());
634 // duplicate parameter name
635 _list_interfaces[ind].interfaceservicelist[ind1].ServiceoutParameter[ind2].Parametername = CORBA::string_dup(list_interface[ind].Parserinterfaceservicelist[ind1].ParserServiceoutParameter[ind2].ParserParamname.c_str());
640 return _list_interfaces;
644 //----------------------------------------------------------------------
645 // Function : duplicate_pathes
646 // Purpose : create the path prefix structures from the catalog parsing
647 //----------------------------------------------------------------------
649 SALOME_ModuleCatalogImpl::duplicate_pathes(ListOfParserPathPrefix pathes)
651 ListOfPathPrefix _pathes ;
653 unsigned int _length = pathes.size() ;
654 _pathes.resize(_length);
655 unsigned int _length_comput = 0;
657 for (unsigned int ind = 0; ind < _length ; ind++)
660 _pathes[ind].path = CORBA::string_dup(pathes[ind].path.c_str()) ;
661 //MESSAGE("Prefix : " << _pathes[ind].path);
663 _length_comput = pathes[ind].ListOfComputer.size() ;
664 _pathes[ind].ListOfComputer.resize(_length_comput);
665 for (unsigned int ind1 = 0; ind1 <_length_comput ; ind1++)
667 // duplicate computer name
668 _pathes[ind].ListOfComputer[ind1] = CORBA::string_dup(pathes[ind].ListOfComputer[ind1].c_str());
669 //MESSAGE("Computer associated to the prefix : " <<_pathes[ind].ListOfComputer[ind1]);
676 //----------------------------------------------------------------------
677 // Function : _verify_path_prefix
678 // Purpose : verify the path prefix structures from the catalog parsing
679 // Verify that there only one path prefix associated to a
680 // particular computer
681 //----------------------------------------------------------------------
683 SALOME_ModuleCatalogImpl::_verify_path_prefix(ListOfParserPathPrefix pathlist)
685 bool _return_value = true;
686 vector<string> _machine_list;
687 _machine_list.resize(0);
689 // Fill a list of all computers indicated in the path list
690 for (unsigned int ind = 0; ind < pathlist.size(); ind++)
692 for (unsigned int ind1 = 0 ; ind1 < pathlist[ind].ListOfComputer.size(); ind1++)
694 _machine_list.push_back(pathlist[ind].ListOfComputer[ind1]);
698 // Parse if a computer name is twice in the list of computers
699 for (unsigned int ind = 0; ind < _machine_list.size(); ind++)
701 for (unsigned int ind1 = ind+1 ; ind1 < _machine_list.size(); ind1++)
703 if(_machine_list[ind].compare(_machine_list[ind1]) == 0)
705 MESSAGE( "The computer " << _machine_list[ind] << " is indicated more than once in the path list")
706 _return_value = false;
710 return _return_value;
714 //----------------------------------------------------------------------
715 // Function : _parseArguments
716 // Purpose : parse arguments to get general and personal catalog files
717 //----------------------------------------------------------------------
719 SALOME_ModuleCatalogImpl::_parseArguments(int argc, char **argv,
723 bool _return_value = true;
726 for (int ind = 0; ind < argc ; ind++)
729 if (strcmp(argv[ind],"-help") == 0)
731 INFOS( "Usage: " << argv[0] << " -common 'path to general catalog' -personal 'path to personal catalog' -ORBInitRef NameService=corbaname::localhost");
732 _return_value = false ;
734 if (strcmp(argv[ind],"-common") == 0)
738 // General catalog file
739 *_general = argv[ind + 1] ;
740 /* ifstream _general_file(*_general);
743 MESSAGE( "Sorry the file " << *_general << " can't be open" )
745 _return_value = false;
750 else if (strcmp(argv[ind],"-personal") == 0)
754 // Personal catalog file
755 *_personal = argv[ind + 1] ;
756 /* ifstream _personal_file(*_personal);
759 MESSAGE("Sorry the file " << *_personal << " can't be open" )
761 _return_value = false;
767 return _return_value;