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.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 // File : SALOME_ModuleCatalog_Handler.cxx
25 // Author : Estelle Deville
29 #define WRITE_CATA_COMPONENT
31 #include "SALOME_ModuleCatalog_Handler.hxx"
32 #include "SALOME_ModuleCatalog_Parser_IO.hxx"
33 #include "utilities.h"
39 static int MYDEBUG = 0;
41 static int MYDEBUG = 0;
44 //----------------------------------------------------------------------
45 // Function : SALOME_ModuleCatalog_Handler
46 // Purpose : Constructor
47 //----------------------------------------------------------------------
48 SALOME_ModuleCatalog_Handler::SALOME_ModuleCatalog_Handler(ParserPathPrefixes& pathList,
49 ParserComponents& moduleList,
51 TypeList& typeList):_typeMap(typeMap),_typeList(typeList),
52 _pathList(pathList),_moduleList(moduleList)
55 if(MYDEBUG) BEGIN_OF("SALOME_ModuleCatalog_Handler");
57 // XML Tags initialisation
58 // Used in the function endElement
59 test_path_prefix_name = "path-prefix-name";
60 test_computer_name = "computer-name" ;
61 test_computer_list = "computer-list" ;
62 test_path_prefix = "path-prefix" ;
63 test_path_prefix_list = "path-prefix-list" ;
65 test_component_name = "component-name";
66 test_component_username = "component-username";
67 test_component_type = "component-type" ;
68 test_component_multistudy = "component-multistudy";
69 test_component_icon = "component-icone" ;
70 test_component_impltype = "component-impltype";
71 test_component_version = "component-version";
72 test_component_comment = "component-comment";
74 test_interface_name = "component-interface-name" ;
76 test_service_name = "service-name";
77 test_defaultservice = "service-by-default";
79 test_typeofnode = "type-of-node";
81 test_inParameter_type = "inParameter-type";
82 test_inParameter_name = "inParameter-name";
83 test_inParameter = "inParameter";
84 test_inParameter_list = "inParameter-list";
86 test_outParameter_type = "outParameter-type";
87 test_outParameter_name = "outParameter-name";
88 test_outParameter = "outParameter";
89 test_outParameter_list = "outParameter-list";
91 test_inDataStreamParameter_type = "inParameter-type";
92 test_inDataStreamParameter_name = "inParameter-name";
93 test_inDataStreamParameter_dependency = "inParameter-dependency";
94 test_inDataStreamParameter = "inParameter";
95 test_inDataStreamParameter_list = "DataStream-list";
97 test_outDataStreamParameter_type = "outParameter-type";
98 test_outDataStreamParameter_name = "outParameter-name";
99 test_outDataStreamParameter_dependency = "outParameter-dependency";
100 test_outDataStreamParameter = "outParameter";
101 test_outDataStreamParameter_list = "DataStream-list";
103 test_service = "component-service";
104 test_service_list = "component-service-list";
105 test_interface_list = "component-interface-list";
107 test_constraint = "constraint";
109 test_component_list = "component-list";
110 test_component="component";
112 if(MYDEBUG) END_OF("SALOME_ModuleCatalog_Handler");
115 //----------------------------------------------------------------------
116 // Function : ~SALOME_ModuleCatalog_Handler
117 // Purpose : Destructor
118 //----------------------------------------------------------------------
119 SALOME_ModuleCatalog_Handler::~SALOME_ModuleCatalog_Handler()
121 if(MYDEBUG) BEGIN_OF("~SALOME_ModuleCatalog_Handler()")
122 if(MYDEBUG) END_OF("~SALOME_ModuleCatalog_Handler()")
126 //=============================================================================
128 * Processes XML document and fills the list of modules
130 //=============================================================================
132 void SALOME_ModuleCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc)
134 if(MYDEBUG) MESSAGE("Begin parse document");
135 // Empty the private elements
137 _pathPrefix.listOfComputer.resize(0);
138 _serviceList.resize(0);
139 _interfaceList.resize(0);
140 _moduleList.resize(0);
141 _inDataStreamParamList.resize(0);
142 _outDataStreamParamList.resize(0);
143 _inParamList.resize(0);
144 _outParamList.resize(0);
146 // Get the document root node
147 xmlNodePtr aCurNode = xmlDocGetRootElement(theDoc);
148 aCurNode = aCurNode->xmlChildrenNode;
150 // Processing the document nodes
151 while(aCurNode != NULL)
153 // Part 1: Process path prefix list (tag test_path_prefix_list)
154 if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)test_path_prefix_list) )
156 xmlNodePtr aCurSubNode = aCurNode->xmlChildrenNode;
157 while(aCurSubNode != NULL)
159 // Forming a PathPrefix structure (tag test_path_prefix)
160 if ( xmlStrcmp(aCurSubNode->name, (const xmlChar*)test_path_prefix) ) {
161 aCurSubNode = aCurSubNode->next;
165 xmlNodePtr aCurSubSubNode = aCurSubNode->xmlChildrenNode;
166 while(aCurSubSubNode != NULL)
168 // Tag test_path_prefix_name
169 if ( !xmlStrcmp(aCurSubSubNode->name, (const xmlChar*)test_path_prefix_name) ) {
170 xmlChar* aPath = xmlNodeGetContent(aCurSubSubNode);
172 _pathPrefix.path = (const char*)aPath;
177 // Tag test_computer_list
178 if ( !xmlStrcmp(aCurSubSubNode->name, (const xmlChar*)test_computer_list) ) {
179 xmlNodePtr aComputerNode = aCurSubSubNode->xmlChildrenNode;
180 while (aComputerNode != NULL) {
181 // Tag test_computer_name
182 if ( !xmlStrcmp(aComputerNode->name, (const xmlChar*) test_computer_name) ) {
183 xmlChar* aCompName = xmlNodeGetContent(aComputerNode);
184 if (aCompName != NULL) {
185 _pathPrefix.listOfComputer.push_back((const char*)aCompName);
190 aComputerNode = aComputerNode->next;
194 aCurSubSubNode = aCurSubSubNode->next;
197 _pathList.push_back(_pathPrefix);
198 _pathPrefix.listOfComputer.resize(0);
200 aCurSubNode = aCurSubNode->next;
204 //Part 2: Process list of types
205 if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)"type-list") )
207 xmlNodePtr aTypeNode = aCurNode->xmlChildrenNode;
208 while (aTypeNode != NULL)
211 if ( !xmlStrcmp(aTypeNode->name, (const xmlChar*)"type" ))
213 // Here is a basic type description
215 xmlChar * name=xmlGetProp(aTypeNode,(const xmlChar*)"name");
218 aType.name = (const char*)name;
221 xmlChar *kind=xmlGetProp(aTypeNode,(const xmlChar*)"kind");
224 aType.kind = (const char*)kind;
227 if(aType.kind == "double" ||
228 aType.kind == "int" ||
229 aType.kind == "bool" ||
230 aType.kind == "string")
232 if ( _typeMap.find(aType.name) == _typeMap.end() )
234 std::cerr << "Registered basic type: " << aType.name << " " << aType.kind << std::endl;
235 _typeMap[aType.name]=aType;
236 _typeList.push_back(aType);
239 std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." << std::endl;
242 std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") has incorrect kind, it will be ignored." << std::endl;
244 else if ( !xmlStrcmp(aTypeNode->name, (const xmlChar*)"sequence" ))
246 // Here is a sequence type description
247 ParserSequence aType;
248 xmlChar * name=xmlGetProp(aTypeNode,(const xmlChar*)"name");
251 aType.name = (const char*)name;
254 xmlChar *content=xmlGetProp(aTypeNode,(const xmlChar*)"content");
257 aType.content = (const char*)content;
260 if ( _typeMap.find(aType.content) != _typeMap.end() )
262 if ( _typeMap.find(aType.name) == _typeMap.end() )
264 std::cerr << "Registered sequence type: " << aType.name << " " << aType.content << std::endl;
265 _typeMap[aType.name]=aType;
266 _typeList.push_back(aType);
269 std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." << std::endl;
273 std::cerr << "Warning: this sequence type (" << aType.name << "," << aType.content << ") has unknown content type, it will be ignored." << std::endl;
276 else if ( !xmlStrcmp(aTypeNode->name, (const xmlChar*)"objref" ))
278 // Here is an objref type description
281 xmlChar * name=xmlGetProp(aTypeNode,(const xmlChar*)"name");
284 aType.name = (const char*)name;
287 xmlChar *id=xmlGetProp(aTypeNode,(const xmlChar*)"id");
290 aType.id = (const char*)id;
294 xmlNodePtr aTypeSubNode = aTypeNode->xmlChildrenNode;
295 while (aTypeSubNode != NULL)
297 if ( !xmlStrcmp(aTypeSubNode->name, (const xmlChar*)"base" ))
300 xmlChar* content = xmlNodeGetContent(aTypeSubNode);
303 std::string base=(const char*)content;
305 if ( _typeMap.find(base) != _typeMap.end() && _typeMap[base].kind == "objref")
307 aType.bases.push_back(base);
311 std::cerr << "Warning: this objref type (" << aType.name << ") has unknown base type (" << base << "), it will be ignored." << std::endl;
317 aTypeSubNode = aTypeSubNode->next;
321 if ( _typeMap.find(aType.name) == _typeMap.end() )
323 std::cerr << "Registered objref type: " << aType.name << " " << aType.id << std::endl;
324 _typeMap[aType.name]=aType;
325 _typeList.push_back(aType);
328 std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." << std::endl;
331 else if ( !xmlStrcmp(aTypeNode->name, (const xmlChar*)"struct" ))
333 // Here is a struct type description
336 xmlChar * name=xmlGetProp(aTypeNode,(const xmlChar*)"name");
339 aType.name = (const char*)name;
342 xmlChar *id=xmlGetProp(aTypeNode,(const xmlChar*)"id");
345 aType.id = (const char*)id;
349 xmlNodePtr aTypeSubNode = aTypeNode->xmlChildrenNode;
350 while (aTypeSubNode != NULL)
352 if ( !xmlStrcmp(aTypeSubNode->name, (const xmlChar*)"member" ))
354 std::pair<std::string,std::string> member;
355 xmlChar * m_name=xmlGetProp(aTypeSubNode,(const xmlChar*)"name");
358 member.first=(const char*)m_name;
361 xmlChar * m_type=xmlGetProp(aTypeSubNode,(const xmlChar*)"type");
364 member.second=(const char*)m_type;
367 if ( _typeMap.find(member.second) != _typeMap.end() )
369 aType.members.push_back(member);
373 std::cerr << "Warning: this struct type (" << aType.name << ") has unknown member type (" << member.first << "," << member.second << "), it will be ignored." << std::endl;
378 aTypeSubNode = aTypeSubNode->next;
382 if ( _typeMap.find(aType.name) == _typeMap.end() )
384 std::cerr << "Registered struct type: " << aType.name << " " << aType.id << std::endl;
385 _typeMap[aType.name]=aType;
386 _typeList.push_back(aType);
389 std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." << std::endl;
392 aTypeNode = aTypeNode->next;
396 //Part 3: Process list of components (tag test_component_list)
397 if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)test_component_list) )
399 xmlNodePtr aComponentNode = aCurNode->xmlChildrenNode;
400 while (aComponentNode != NULL)
402 // Do not process tags differ from test_component here
403 if ( xmlStrcmp(aComponentNode->name, (const xmlChar*)test_component) ) {
404 aComponentNode = aComponentNode->next;
408 // Component identification
410 // Empty temporary structures
412 _aModule.constraint = "";
414 _aModule.interfaces.resize(0);
416 xmlNodePtr aComponentSubNode = aComponentNode->xmlChildrenNode;
417 while(aComponentSubNode != NULL)
419 xmlChar* aNodeContent = xmlNodeGetContent(aComponentSubNode);
421 if (aNodeContent == NULL) {
422 aComponentSubNode = aComponentSubNode->next;
426 std::string aContent = (const char*)aNodeContent;
428 // Tag test_component_name
429 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_name) )
430 _aModule.name = aContent;
432 // Tag test_component_username
433 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_username) )
434 _aModule.username = aContent;
436 // Tag test_component_type
437 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_type) ) {
438 std::string aType = aContent;
440 if ((aType.compare("MESH") == 0) ||
441 (aType.compare("Mesh") == 0) ||
442 (aType.compare("mesh") == 0))
443 _aModule.type = MESH ;
444 else if((aType.compare("MED") == 0) ||
445 (aType.compare("Med") == 0) ||
446 (aType.compare("med") == 0))
447 _aModule.type = Med ;
448 else if((aType.compare("GEOM") == 0) ||
449 (aType.compare("Geom") == 0) ||
450 (aType.compare("geom") == 0))
451 _aModule.type = GEOM ;
452 else if((aType.compare("SOLVER") == 0) ||
453 (aType.compare("Solver") == 0) ||
454 (aType.compare("solver") == 0))
455 _aModule.type = SOLVER ;
456 else if((aType.compare("SUPERV") == 0) ||
457 (aType.compare("Superv") == 0) ||
458 (aType.compare("Supervision") == 0) ||
459 (aType.compare("superv") == 0))
460 _aModule.type = SUPERV ;
461 else if((aType.compare("DATA") == 0) ||
462 (aType.compare("Data") == 0) ||
463 (aType.compare("data") == 0))
464 _aModule.type = DATA ;
465 else if((aType.compare("VISU") == 0) ||
466 (aType.compare("Visu") == 0) ||
467 (aType.compare("visu") == 0))
468 _aModule.type = VISU ;
469 else if((aType.compare("OTHER") == 0) ||
470 (aType.compare("Other") == 0) ||
471 (aType.compare("other") == 0))
472 _aModule.type = OTHER ;
474 // If it'not in all theses cases, the type is affected to OTHER
475 _aModule.type = OTHER ;
478 // Tag test_component_multistudy
479 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_multistudy) )
480 _aModule.multistudy = atoi( aContent.c_str() );
482 // Tag test_component_impltype
483 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_impltype) )
484 _aModule.implementationType = atoi(aContent.c_str());
486 // Tag test_component_icon
487 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_icon) )
488 _aModule.icon = aContent;
490 // Tag test_component_version
491 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_version) )
492 _aModule.version = aContent;
494 // Tag test_component_comment
495 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_comment) )
496 _aModule.comment = aContent;
498 // Tag test_constraint
499 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_constraint) )
500 _aModule.constraint = aContent;
502 xmlFree(aNodeContent);
504 // Process tag test_interface_list:
505 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_interface_list) ) {
507 // Form an interface list for the component
508 xmlNodePtr aSubNode = aComponentSubNode->xmlChildrenNode;
509 while(aSubNode != NULL) {
510 // Tag test_interface_name
511 if ( !xmlStrcmp(aSubNode->name, (const xmlChar*)test_interface_name) ) {
512 xmlChar* anInterfaceName = xmlNodeGetContent(aSubNode);
513 if (anInterfaceName != NULL) {
514 _aInterface.name = (const char*)anInterfaceName;
515 xmlFree(anInterfaceName);
519 // Tag test_service_list
520 if ( !xmlStrcmp(aSubNode->name, (const xmlChar*)test_service_list) ) {
521 // Form a service list for the interface
522 xmlNodePtr aCompServiceNode = aSubNode->xmlChildrenNode;
523 while(aCompServiceNode != NULL) {
525 if ( !xmlStrcmp(aCompServiceNode->name, (const xmlChar*)"component-service") ) {
526 xmlNodePtr aCompServiceSubNode = aCompServiceNode->xmlChildrenNode;
527 while(aCompServiceSubNode != NULL)
529 xmlChar* aCompServiceData = xmlNodeGetContent(aCompServiceSubNode);
531 if ( aCompServiceData != NULL)
533 // Tag test_service_name
534 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_service_name) )
535 _aService.name = (const char*)aCompServiceData;
537 // Tag test_defaultservice
538 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_defaultservice) )
539 _aService.byDefault = (const char*)aCompServiceData;
541 // Tag test_typeofnode
542 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_typeofnode) )
543 _aService.typeOfNode = (const char*)aCompServiceData;
545 xmlFree(aCompServiceData);
548 // Tag test_inParameter_list
549 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_inParameter_list) ) {
550 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
551 while (aParamNode != NULL)
553 // Tag test_inParameter
554 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_inParameter)) {
555 aParamNode = aParamNode->next;
559 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
560 while (aParamItemNode != NULL)
562 xmlChar* aParamData = xmlNodeGetContent(aParamItemNode);
564 if (aParamData != NULL)
566 // Tag test_inParameter_name
567 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inParameter_name) )
568 _inParam.name = (const char*)aParamData;
570 // Tag test_inParameter_type
571 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inParameter_type) )
572 _inParam.type = (const char*)aParamData;
577 aParamItemNode = aParamItemNode->next;
580 _inParamList.push_back(_inParam) ;
582 // Empty temporary structures
586 aParamNode = aParamNode->next;
589 _aService.inParameters = _inParamList;
590 _inParamList.resize(0);
593 // Tag test_outParameter_list
594 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_outParameter_list) ) {
595 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
596 while (aParamNode != NULL)
598 // Tag test_outParameter
599 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_outParameter)) {
600 aParamNode = aParamNode->next;
604 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
605 while (aParamItemNode != NULL)
607 xmlChar* anOutParamData = xmlNodeGetContent(aParamItemNode);
609 if (anOutParamData != NULL)
611 // Tag test_outParameter_name
612 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outParameter_name) )
613 _outParam.name = (const char*)anOutParamData;
615 // Tag test_outParameter_type
616 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outParameter_type) )
617 _outParam.type = (const char*)anOutParamData;
619 xmlFree(anOutParamData);
622 aParamItemNode = aParamItemNode->next;
625 _outParamList.push_back(_outParam) ;
627 // Empty temporary structures
631 aParamNode = aParamNode->next;
634 _aService.outParameters = _outParamList;
635 _outParamList.resize(0);
638 //@ Tag test_inDataStreamParameter_list
639 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_inDataStreamParameter_list) )
641 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
642 while (aParamNode != NULL)
644 // Tag test_inDataStreamParameter
645 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_inDataStreamParameter)) {
646 aParamNode = aParamNode->next;
650 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
651 while (aParamItemNode != NULL)
653 xmlChar* inDataStreamParamData = xmlNodeGetContent(aParamItemNode);
655 if (inDataStreamParamData != NULL)
657 // Tag test_inDataStreamParameter_name
658 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inDataStreamParameter_name) )
659 _inDataStreamParam.name = (const char*)inDataStreamParamData;
661 // Tag test_inDataStreamParameter_type
662 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inDataStreamParameter_type) )
663 _inDataStreamParam.type = (const char*)inDataStreamParamData;
665 // Tag test_inDataStreamParameter_dependency
666 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inDataStreamParameter_dependency) )
667 _inDataStreamParam.dependency = (const char*)inDataStreamParamData;
669 xmlFree(inDataStreamParamData);
672 aParamItemNode = aParamItemNode->next;
675 _inDataStreamParamList.push_back(_inDataStreamParam) ;
677 // Empty temporary structures
678 _inDataStreamParam.type = "";
679 _inDataStreamParam.name = "";
680 _inDataStreamParam.dependency = "";
682 aParamNode = aParamNode->next;
685 _aService.inDataStreamParameters = _inDataStreamParamList;
686 _inDataStreamParamList.resize(0);
689 // Tag test_outDataStreamParameter_list
690 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_outDataStreamParameter_list) )
692 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
693 while (aParamNode != NULL)
695 // Tag test_outDataStreamParameter
696 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_outDataStreamParameter)) {
697 aParamNode = aParamNode->next;
701 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
702 while (aParamItemNode != NULL)
704 xmlChar* outDataStreamParamData = xmlNodeGetContent(aParamItemNode);
706 if (outDataStreamParamData != NULL)
708 // Tag test_outDataStreamParameter_name
709 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outDataStreamParameter_name) )
710 _outDataStreamParam.name = (const char*)outDataStreamParamData;
712 // Tag test_outDataStreamParameter_type
713 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outDataStreamParameter_type) )
714 _outDataStreamParam.type = (const char*)outDataStreamParamData;
716 // Tag test_outDataStreamParameter_dependency
717 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outDataStreamParameter_dependency) )
718 _outDataStreamParam.dependency = (const char*)outDataStreamParamData;
720 xmlFree(outDataStreamParamData);
723 aParamItemNode = aParamItemNode->next;
726 _outDataStreamParamList.push_back(_outDataStreamParam) ;
728 // Empty temporary structures
729 _outDataStreamParam.type = "";
730 _outDataStreamParam.name = "";
731 _outDataStreamParam.dependency = "";
733 aParamNode = aParamNode->next;
736 _aService.outDataStreamParameters = _outDataStreamParamList;
737 _outDataStreamParamList.resize(0);
740 aCompServiceSubNode = aCompServiceSubNode->next;
743 // Put formed service into the list
744 _serviceList.push_back(_aService);
746 // Empty temporary structures
748 _aService.typeOfNode = 1;
749 _aService.inParameters.resize(0);
750 _aService.outParameters.resize(0);
751 _aService.inDataStreamParameters.resize(0);
752 _aService.outDataStreamParameters.resize(0);
755 aCompServiceNode = aCompServiceNode->next;
758 _aInterface.services = _serviceList ;
760 // Empty temporary structures
761 _serviceList.resize(0);
762 _interfaceList.push_back(_aInterface);
763 _aInterface.name ="";
764 _aInterface.services.resize(0);
767 aSubNode = aSubNode->next;
770 _aModule.interfaces = _interfaceList ;
771 _interfaceList.resize(0);
774 aComponentSubNode = aComponentSubNode->next;
777 _moduleList.push_back(_aModule);
779 aComponentNode = aComponentNode->next;
783 aCurNode = aCurNode->next;