1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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, or (at your option) any later version.
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
23 // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules
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"
38 static int MYDEBUG = 0;
40 static int MYDEBUG = 0;
43 //----------------------------------------------------------------------
44 // Function : SALOME_ModuleCatalog_Handler
45 // Purpose : Constructor
46 //----------------------------------------------------------------------
47 SALOME_ModuleCatalog_Handler::SALOME_ModuleCatalog_Handler(ParserPathPrefixes& pathList,
48 ParserComponents& moduleList,
50 TypeList& typeList):_typeMap(typeMap),_typeList(typeList),
51 _pathList(pathList),_moduleList(moduleList)
54 if(MYDEBUG) BEGIN_OF("SALOME_ModuleCatalog_Handler");
56 // XML Tags initialisation
57 // Used in the function endElement
58 test_path_prefix_name = "path-prefix-name";
59 test_computer_name = "computer-name" ;
60 test_computer_list = "computer-list" ;
61 test_path_prefix = "path-prefix" ;
62 test_path_prefix_list = "path-prefix-list" ;
64 test_component_name = "component-name";
65 test_component_username = "component-username";
66 test_component_type = "component-type" ;
67 test_component_multistudy = "component-multistudy";
68 test_component_icon = "component-icone" ;
69 test_component_impltype = "component-impltype";
70 test_component_implname = "component-implname";
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 MESSAGE("Registered basic type: " << aType.name << " " << aType.kind );
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 MESSAGE("Registered sequence type: " << aType.name << " " << aType.content );
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 MESSAGE("Registered objref type: " << aType.name << " " << aType.id );
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 MESSAGE("Registered struct type: " << aType.name << " " << aType.id );
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);
415 _aModule.implementationType ="";
416 _aModule.implementationName ="";
418 xmlNodePtr aComponentSubNode = aComponentNode->xmlChildrenNode;
419 while(aComponentSubNode != NULL)
421 xmlChar* aNodeContent = xmlNodeGetContent(aComponentSubNode);
423 if (aNodeContent == NULL) {
424 aComponentSubNode = aComponentSubNode->next;
428 std::string aContent = (const char*)aNodeContent;
430 // Tag test_component_name
431 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_name) )
432 _aModule.name = aContent;
434 // Tag test_component_username
435 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_username) )
436 _aModule.username = aContent;
438 // Tag test_component_type
439 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_type) ) {
440 std::string aType = aContent;
442 if ((aType.compare("MESH") == 0) ||
443 (aType.compare("Mesh") == 0) ||
444 (aType.compare("mesh") == 0))
445 _aModule.type = MESH ;
446 else if((aType.compare("MED") == 0) ||
447 (aType.compare("Med") == 0) ||
448 (aType.compare("med") == 0))
449 _aModule.type = Med ;
450 else if((aType.compare("GEOM") == 0) ||
451 (aType.compare("Geom") == 0) ||
452 (aType.compare("geom") == 0))
453 _aModule.type = GEOM ;
454 else if((aType.compare("SOLVER") == 0) ||
455 (aType.compare("Solver") == 0) ||
456 (aType.compare("solver") == 0))
457 _aModule.type = SOLVER ;
458 else if((aType.compare("SUPERV") == 0) ||
459 (aType.compare("Superv") == 0) ||
460 (aType.compare("Supervision") == 0) ||
461 (aType.compare("superv") == 0))
462 _aModule.type = SUPERV ;
463 else if((aType.compare("DATA") == 0) ||
464 (aType.compare("Data") == 0) ||
465 (aType.compare("data") == 0))
466 _aModule.type = DATA ;
467 else if((aType.compare("VISU") == 0) ||
468 (aType.compare("Visu") == 0) ||
469 (aType.compare("visu") == 0))
470 _aModule.type = VISU ;
471 else if((aType.compare("OTHER") == 0) ||
472 (aType.compare("Other") == 0) ||
473 (aType.compare("other") == 0))
474 _aModule.type = OTHER ;
476 // If it'not in all theses cases, the type is affected to OTHER
477 _aModule.type = OTHER ;
480 // Tag test_component_multistudy
481 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_multistudy) )
482 _aModule.multistudy = atoi( aContent.c_str() ) != 0;
484 // Tag test_component_impltype
485 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_impltype) )
486 _aModule.implementationType = aContent;
488 // Tag test_component_implname
489 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_implname) )
490 _aModule.implementationName = aContent;
492 // Tag test_component_icon
493 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_icon) )
494 _aModule.icon = aContent;
496 // Tag test_component_version
497 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_version) )
498 _aModule.version = aContent;
500 // Tag test_component_comment
501 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_comment) )
502 _aModule.comment = aContent;
504 // Tag test_constraint
505 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_constraint) )
506 _aModule.constraint = aContent;
508 xmlFree(aNodeContent);
510 // Process tag test_interface_list:
511 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_interface_list) ) {
513 // Form an interface list for the component
514 xmlNodePtr aSubNode = aComponentSubNode->xmlChildrenNode;
515 while(aSubNode != NULL) {
516 // Tag test_interface_name
517 if ( !xmlStrcmp(aSubNode->name, (const xmlChar*)test_interface_name) ) {
518 xmlChar* anInterfaceName = xmlNodeGetContent(aSubNode);
519 if (anInterfaceName != NULL) {
520 _aInterface.name = (const char*)anInterfaceName;
521 xmlFree(anInterfaceName);
525 // Tag test_service_list
526 if ( !xmlStrcmp(aSubNode->name, (const xmlChar*)test_service_list) ) {
527 // Form a service list for the interface
528 xmlNodePtr aCompServiceNode = aSubNode->xmlChildrenNode;
529 while(aCompServiceNode != NULL) {
531 if ( !xmlStrcmp(aCompServiceNode->name, (const xmlChar*)"component-service") ) {
532 xmlNodePtr aCompServiceSubNode = aCompServiceNode->xmlChildrenNode;
533 while(aCompServiceSubNode != NULL)
535 xmlChar* aCompServiceData = xmlNodeGetContent(aCompServiceSubNode);
537 if ( aCompServiceData != NULL)
539 // Tag test_service_name
540 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_service_name) )
541 _aService.name = (const char*)aCompServiceData;
543 // Tag test_defaultservice
544 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_defaultservice) )
545 _aService.byDefault = atoi((const char*)aCompServiceData) !=0 ;
547 // Tag test_typeofnode
548 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_typeofnode) )
549 _aService.typeOfNode = atoi((const char*)aCompServiceData) !=0 ;
551 xmlFree(aCompServiceData);
554 // Tag test_inParameter_list
555 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_inParameter_list) ) {
556 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
557 while (aParamNode != NULL)
559 // Tag test_inParameter
560 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_inParameter)) {
561 aParamNode = aParamNode->next;
565 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
566 while (aParamItemNode != NULL)
568 xmlChar* aParamData = xmlNodeGetContent(aParamItemNode);
570 if (aParamData != NULL)
572 // Tag test_inParameter_name
573 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inParameter_name) )
574 _inParam.name = (const char*)aParamData;
576 // Tag test_inParameter_type
577 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inParameter_type) )
578 _inParam.type = (const char*)aParamData;
583 aParamItemNode = aParamItemNode->next;
586 _inParamList.push_back(_inParam) ;
588 // Empty temporary structures
592 aParamNode = aParamNode->next;
595 _aService.inParameters = _inParamList;
596 _inParamList.resize(0);
599 // Tag test_outParameter_list
600 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_outParameter_list) ) {
601 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
602 while (aParamNode != NULL)
604 // Tag test_outParameter
605 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_outParameter)) {
606 aParamNode = aParamNode->next;
610 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
611 while (aParamItemNode != NULL)
613 xmlChar* anOutParamData = xmlNodeGetContent(aParamItemNode);
615 if (anOutParamData != NULL)
617 // Tag test_outParameter_name
618 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outParameter_name) )
619 _outParam.name = (const char*)anOutParamData;
621 // Tag test_outParameter_type
622 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outParameter_type) )
623 _outParam.type = (const char*)anOutParamData;
625 xmlFree(anOutParamData);
628 aParamItemNode = aParamItemNode->next;
631 _outParamList.push_back(_outParam) ;
633 // Empty temporary structures
637 aParamNode = aParamNode->next;
640 _aService.outParameters = _outParamList;
641 _outParamList.resize(0);
644 //@ Tag test_inDataStreamParameter_list
645 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_inDataStreamParameter_list) )
647 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
648 while (aParamNode != NULL)
650 // Tag test_inDataStreamParameter
651 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_inDataStreamParameter)) {
652 aParamNode = aParamNode->next;
656 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
657 while (aParamItemNode != NULL)
659 xmlChar* inDataStreamParamData = xmlNodeGetContent(aParamItemNode);
661 if (inDataStreamParamData != NULL)
663 // Tag test_inDataStreamParameter_name
664 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inDataStreamParameter_name) )
665 _inDataStreamParam.name = (const char*)inDataStreamParamData;
667 // Tag test_inDataStreamParameter_type
668 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inDataStreamParameter_type) )
669 _inDataStreamParam.type = (const char*)inDataStreamParamData;
671 // Tag test_inDataStreamParameter_dependency
672 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inDataStreamParameter_dependency) )
673 _inDataStreamParam.dependency = (const char*)inDataStreamParamData;
675 xmlFree(inDataStreamParamData);
678 aParamItemNode = aParamItemNode->next;
681 _inDataStreamParamList.push_back(_inDataStreamParam) ;
683 // Empty temporary structures
684 _inDataStreamParam.type = "";
685 _inDataStreamParam.name = "";
686 _inDataStreamParam.dependency = "";
688 aParamNode = aParamNode->next;
691 _aService.inDataStreamParameters = _inDataStreamParamList;
692 _inDataStreamParamList.resize(0);
695 // Tag test_outDataStreamParameter_list
696 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_outDataStreamParameter_list) )
698 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
699 while (aParamNode != NULL)
701 // Tag test_outDataStreamParameter
702 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_outDataStreamParameter)) {
703 aParamNode = aParamNode->next;
707 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
708 while (aParamItemNode != NULL)
710 xmlChar* outDataStreamParamData = xmlNodeGetContent(aParamItemNode);
712 if (outDataStreamParamData != NULL)
714 // Tag test_outDataStreamParameter_name
715 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outDataStreamParameter_name) )
716 _outDataStreamParam.name = (const char*)outDataStreamParamData;
718 // Tag test_outDataStreamParameter_type
719 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outDataStreamParameter_type) )
720 _outDataStreamParam.type = (const char*)outDataStreamParamData;
722 // Tag test_outDataStreamParameter_dependency
723 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outDataStreamParameter_dependency) )
724 _outDataStreamParam.dependency = (const char*)outDataStreamParamData;
726 xmlFree(outDataStreamParamData);
729 aParamItemNode = aParamItemNode->next;
732 _outDataStreamParamList.push_back(_outDataStreamParam) ;
734 // Empty temporary structures
735 _outDataStreamParam.type = "";
736 _outDataStreamParam.name = "";
737 _outDataStreamParam.dependency = "";
739 aParamNode = aParamNode->next;
742 _aService.outDataStreamParameters = _outDataStreamParamList;
743 _outDataStreamParamList.resize(0);
746 aCompServiceSubNode = aCompServiceSubNode->next;
749 // Put formed service into the list
750 _serviceList.push_back(_aService);
752 // Empty temporary structures
754 _aService.typeOfNode = 1;
755 _aService.inParameters.resize(0);
756 _aService.outParameters.resize(0);
757 _aService.inDataStreamParameters.resize(0);
758 _aService.outDataStreamParameters.resize(0);
761 aCompServiceNode = aCompServiceNode->next;
764 _aInterface.services = _serviceList ;
766 // Empty temporary structures
767 _serviceList.resize(0);
768 _interfaceList.push_back(_aInterface);
769 _aInterface.name ="";
770 _aInterface.services.resize(0);
773 aSubNode = aSubNode->next;
776 _aModule.interfaces = _interfaceList ;
777 _interfaceList.resize(0);
780 aComponentSubNode = aComponentSubNode->next;
783 _moduleList.push_back(_aModule);
785 aComponentNode = aComponentNode->next;
789 aCurNode = aCurNode->next;