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_icon = "component-icone" ;
68 test_component_impltype = "component-impltype";
69 test_component_implname = "component-implname";
70 test_component_version = "component-version";
71 test_component_comment = "component-comment";
73 test_interface_name = "component-interface-name" ;
75 test_service_name = "service-name";
76 test_defaultservice = "service-by-default";
78 test_typeofnode = "type-of-node";
80 test_inParameter_type = "inParameter-type";
81 test_inParameter_name = "inParameter-name";
82 test_inParameter = "inParameter";
83 test_inParameter_list = "inParameter-list";
85 test_outParameter_type = "outParameter-type";
86 test_outParameter_name = "outParameter-name";
87 test_outParameter = "outParameter";
88 test_outParameter_list = "outParameter-list";
90 test_inDataStreamParameter_type = "inParameter-type";
91 test_inDataStreamParameter_name = "inParameter-name";
92 test_inDataStreamParameter_dependency = "inParameter-dependency";
93 test_inDataStreamParameter = "inParameter";
94 test_inDataStreamParameter_list = "DataStream-list";
96 test_outDataStreamParameter_type = "outParameter-type";
97 test_outDataStreamParameter_name = "outParameter-name";
98 test_outDataStreamParameter_dependency = "outParameter-dependency";
99 test_outDataStreamParameter = "outParameter";
100 test_outDataStreamParameter_list = "DataStream-list";
102 test_service = "component-service";
103 test_service_list = "component-service-list";
104 test_interface_list = "component-interface-list";
106 test_constraint = "constraint";
108 test_component_list = "component-list";
109 test_component="component";
111 if(MYDEBUG) END_OF("SALOME_ModuleCatalog_Handler");
114 //----------------------------------------------------------------------
115 // Function : ~SALOME_ModuleCatalog_Handler
116 // Purpose : Destructor
117 //----------------------------------------------------------------------
118 SALOME_ModuleCatalog_Handler::~SALOME_ModuleCatalog_Handler()
120 if(MYDEBUG) BEGIN_OF("~SALOME_ModuleCatalog_Handler()")
121 if(MYDEBUG) END_OF("~SALOME_ModuleCatalog_Handler()")
125 //=============================================================================
127 * Processes XML document and fills the list of modules
129 //=============================================================================
131 void SALOME_ModuleCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc)
133 if(MYDEBUG) MESSAGE("Begin parse document");
134 // Empty the private elements
136 _pathPrefix.listOfComputer.resize(0);
137 _serviceList.resize(0);
138 _interfaceList.resize(0);
139 _moduleList.resize(0);
140 _inDataStreamParamList.resize(0);
141 _outDataStreamParamList.resize(0);
142 _inParamList.resize(0);
143 _outParamList.resize(0);
145 // Get the document root node
146 xmlNodePtr aCurNode = xmlDocGetRootElement(theDoc);
147 aCurNode = aCurNode->xmlChildrenNode;
149 // Processing the document nodes
150 while(aCurNode != NULL)
152 // Part 1: Process path prefix list (tag test_path_prefix_list)
153 if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)test_path_prefix_list) )
155 xmlNodePtr aCurSubNode = aCurNode->xmlChildrenNode;
156 while(aCurSubNode != NULL)
158 // Forming a PathPrefix structure (tag test_path_prefix)
159 if ( xmlStrcmp(aCurSubNode->name, (const xmlChar*)test_path_prefix) ) {
160 aCurSubNode = aCurSubNode->next;
164 xmlNodePtr aCurSubSubNode = aCurSubNode->xmlChildrenNode;
165 while(aCurSubSubNode != NULL)
167 // Tag test_path_prefix_name
168 if ( !xmlStrcmp(aCurSubSubNode->name, (const xmlChar*)test_path_prefix_name) ) {
169 xmlChar* aPath = xmlNodeGetContent(aCurSubSubNode);
171 _pathPrefix.path = (const char*)aPath;
176 // Tag test_computer_list
177 if ( !xmlStrcmp(aCurSubSubNode->name, (const xmlChar*)test_computer_list) ) {
178 xmlNodePtr aComputerNode = aCurSubSubNode->xmlChildrenNode;
179 while (aComputerNode != NULL) {
180 // Tag test_computer_name
181 if ( !xmlStrcmp(aComputerNode->name, (const xmlChar*) test_computer_name) ) {
182 xmlChar* aCompName = xmlNodeGetContent(aComputerNode);
183 if (aCompName != NULL) {
184 _pathPrefix.listOfComputer.push_back((const char*)aCompName);
189 aComputerNode = aComputerNode->next;
193 aCurSubSubNode = aCurSubSubNode->next;
196 _pathList.push_back(_pathPrefix);
197 _pathPrefix.listOfComputer.resize(0);
199 aCurSubNode = aCurSubNode->next;
203 //Part 2: Process list of types
204 if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)"type-list") )
206 xmlNodePtr aTypeNode = aCurNode->xmlChildrenNode;
207 while (aTypeNode != NULL)
210 if ( !xmlStrcmp(aTypeNode->name, (const xmlChar*)"type" ))
212 // Here is a basic type description
214 xmlChar * name=xmlGetProp(aTypeNode,(const xmlChar*)"name");
217 aType.name = (const char*)name;
220 xmlChar *kind=xmlGetProp(aTypeNode,(const xmlChar*)"kind");
223 aType.kind = (const char*)kind;
226 if(aType.kind == "double" ||
227 aType.kind == "int" ||
228 aType.kind == "bool" ||
229 aType.kind == "string")
231 if ( _typeMap.find(aType.name) == _typeMap.end() )
233 MESSAGE("Registered basic type: " << aType.name << " " << aType.kind );
234 _typeMap[aType.name]=aType;
235 _typeList.push_back(aType);
238 std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." << std::endl;
241 std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") has incorrect kind, it will be ignored." << std::endl;
243 else if ( !xmlStrcmp(aTypeNode->name, (const xmlChar*)"sequence" ))
245 // Here is a sequence type description
246 ParserSequence aType;
247 xmlChar * name=xmlGetProp(aTypeNode,(const xmlChar*)"name");
250 aType.name = (const char*)name;
253 xmlChar *content=xmlGetProp(aTypeNode,(const xmlChar*)"content");
256 aType.content = (const char*)content;
259 if ( _typeMap.find(aType.content) != _typeMap.end() )
261 if ( _typeMap.find(aType.name) == _typeMap.end() )
263 MESSAGE("Registered sequence type: " << aType.name << " " << aType.content );
264 _typeMap[aType.name]=aType;
265 _typeList.push_back(aType);
268 std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." << std::endl;
272 std::cerr << "Warning: this sequence type (" << aType.name << "," << aType.content << ") has unknown content type, it will be ignored." << std::endl;
275 else if ( !xmlStrcmp(aTypeNode->name, (const xmlChar*)"objref" ))
277 // Here is an objref type description
280 xmlChar * name=xmlGetProp(aTypeNode,(const xmlChar*)"name");
283 aType.name = (const char*)name;
286 xmlChar *id=xmlGetProp(aTypeNode,(const xmlChar*)"id");
289 aType.id = (const char*)id;
293 xmlNodePtr aTypeSubNode = aTypeNode->xmlChildrenNode;
294 while (aTypeSubNode != NULL)
296 if ( !xmlStrcmp(aTypeSubNode->name, (const xmlChar*)"base" ))
299 xmlChar* content = xmlNodeGetContent(aTypeSubNode);
302 std::string base=(const char*)content;
304 if ( _typeMap.find(base) != _typeMap.end() && _typeMap[base].kind == "objref")
306 aType.bases.push_back(base);
310 std::cerr << "Warning: this objref type (" << aType.name << ") has unknown base type (" << base << "), it will be ignored." << std::endl;
316 aTypeSubNode = aTypeSubNode->next;
320 if ( _typeMap.find(aType.name) == _typeMap.end() )
322 MESSAGE("Registered objref type: " << aType.name << " " << aType.id );
323 _typeMap[aType.name]=aType;
324 _typeList.push_back(aType);
327 std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." << std::endl;
330 else if ( !xmlStrcmp(aTypeNode->name, (const xmlChar*)"struct" ))
332 // Here is a struct type description
335 xmlChar * name=xmlGetProp(aTypeNode,(const xmlChar*)"name");
338 aType.name = (const char*)name;
341 xmlChar *id=xmlGetProp(aTypeNode,(const xmlChar*)"id");
344 aType.id = (const char*)id;
348 xmlNodePtr aTypeSubNode = aTypeNode->xmlChildrenNode;
349 while (aTypeSubNode != NULL)
351 if ( !xmlStrcmp(aTypeSubNode->name, (const xmlChar*)"member" ))
353 std::pair<std::string,std::string> member;
354 xmlChar * m_name=xmlGetProp(aTypeSubNode,(const xmlChar*)"name");
357 member.first=(const char*)m_name;
360 xmlChar * m_type=xmlGetProp(aTypeSubNode,(const xmlChar*)"type");
363 member.second=(const char*)m_type;
366 if ( _typeMap.find(member.second) != _typeMap.end() )
368 aType.members.push_back(member);
372 std::cerr << "Warning: this struct type (" << aType.name << ") has unknown member type (" << member.first << "," << member.second << "), it will be ignored." << std::endl;
377 aTypeSubNode = aTypeSubNode->next;
381 if ( _typeMap.find(aType.name) == _typeMap.end() )
383 MESSAGE("Registered struct type: " << aType.name << " " << aType.id );
384 _typeMap[aType.name]=aType;
385 _typeList.push_back(aType);
388 std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." << std::endl;
391 aTypeNode = aTypeNode->next;
395 //Part 3: Process list of components (tag test_component_list)
396 if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)test_component_list) )
398 xmlNodePtr aComponentNode = aCurNode->xmlChildrenNode;
399 while (aComponentNode != NULL)
401 // Do not process tags differ from test_component here
402 if ( xmlStrcmp(aComponentNode->name, (const xmlChar*)test_component) ) {
403 aComponentNode = aComponentNode->next;
407 // Component identification
409 // Empty temporary structures
411 _aModule.constraint = "";
413 _aModule.interfaces.resize(0);
414 _aModule.implementationType ="";
415 _aModule.implementationName ="";
417 xmlNodePtr aComponentSubNode = aComponentNode->xmlChildrenNode;
418 while(aComponentSubNode != NULL)
420 xmlChar* aNodeContent = xmlNodeGetContent(aComponentSubNode);
422 if (aNodeContent == NULL) {
423 aComponentSubNode = aComponentSubNode->next;
427 std::string aContent = (const char*)aNodeContent;
429 // Tag test_component_name
430 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_name) )
431 _aModule.name = aContent;
433 // Tag test_component_username
434 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_username) )
435 _aModule.username = aContent;
437 // Tag test_component_type
438 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_type) ) {
439 std::string aType = aContent;
441 if ((aType.compare("MESH") == 0) ||
442 (aType.compare("Mesh") == 0) ||
443 (aType.compare("mesh") == 0))
444 _aModule.type = MESH ;
445 else if((aType.compare("MED") == 0) ||
446 (aType.compare("Med") == 0) ||
447 (aType.compare("med") == 0))
448 _aModule.type = Med ;
449 else if((aType.compare("GEOM") == 0) ||
450 (aType.compare("Geom") == 0) ||
451 (aType.compare("geom") == 0))
452 _aModule.type = GEOM ;
453 else if((aType.compare("SOLVER") == 0) ||
454 (aType.compare("Solver") == 0) ||
455 (aType.compare("solver") == 0))
456 _aModule.type = SOLVER ;
457 else if((aType.compare("SUPERV") == 0) ||
458 (aType.compare("Superv") == 0) ||
459 (aType.compare("Supervision") == 0) ||
460 (aType.compare("superv") == 0))
461 _aModule.type = SUPERV ;
462 else if((aType.compare("DATA") == 0) ||
463 (aType.compare("Data") == 0) ||
464 (aType.compare("data") == 0))
465 _aModule.type = DATA ;
466 else if((aType.compare("VISU") == 0) ||
467 (aType.compare("Visu") == 0) ||
468 (aType.compare("visu") == 0))
469 _aModule.type = VISU ;
470 else if((aType.compare("OTHER") == 0) ||
471 (aType.compare("Other") == 0) ||
472 (aType.compare("other") == 0))
473 _aModule.type = OTHER ;
475 // If it'not in all theses cases, the type is affected to OTHER
476 _aModule.type = OTHER ;
479 // Tag test_component_impltype
480 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_impltype) )
481 _aModule.implementationType = aContent;
483 // Tag test_component_implname
484 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_implname) )
485 _aModule.implementationName = aContent;
487 // Tag test_component_icon
488 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_icon) )
489 _aModule.icon = aContent;
491 // Tag test_component_version
492 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_version) )
493 _aModule.version = aContent;
495 // Tag test_component_comment
496 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_comment) )
497 _aModule.comment = aContent;
499 // Tag test_constraint
500 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_constraint) )
501 _aModule.constraint = aContent;
503 xmlFree(aNodeContent);
505 // Process tag test_interface_list:
506 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_interface_list) ) {
508 // Form an interface list for the component
509 xmlNodePtr aSubNode = aComponentSubNode->xmlChildrenNode;
510 while(aSubNode != NULL) {
511 // Tag test_interface_name
512 if ( !xmlStrcmp(aSubNode->name, (const xmlChar*)test_interface_name) ) {
513 xmlChar* anInterfaceName = xmlNodeGetContent(aSubNode);
514 if (anInterfaceName != NULL) {
515 _aInterface.name = (const char*)anInterfaceName;
516 xmlFree(anInterfaceName);
520 // Tag test_service_list
521 if ( !xmlStrcmp(aSubNode->name, (const xmlChar*)test_service_list) ) {
522 // Form a service list for the interface
523 xmlNodePtr aCompServiceNode = aSubNode->xmlChildrenNode;
524 while(aCompServiceNode != NULL) {
526 if ( !xmlStrcmp(aCompServiceNode->name, (const xmlChar*)"component-service") ) {
527 xmlNodePtr aCompServiceSubNode = aCompServiceNode->xmlChildrenNode;
528 while(aCompServiceSubNode != NULL)
530 xmlChar* aCompServiceData = xmlNodeGetContent(aCompServiceSubNode);
532 if ( aCompServiceData != NULL)
534 // Tag test_service_name
535 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_service_name) )
536 _aService.name = (const char*)aCompServiceData;
538 // Tag test_defaultservice
539 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_defaultservice) )
540 _aService.byDefault = atoi((const char*)aCompServiceData) !=0 ;
542 // Tag test_typeofnode
543 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_typeofnode) )
544 _aService.typeOfNode = atoi((const char*)aCompServiceData) !=0 ;
546 xmlFree(aCompServiceData);
549 // Tag test_inParameter_list
550 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_inParameter_list) ) {
551 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
552 while (aParamNode != NULL)
554 // Tag test_inParameter
555 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_inParameter)) {
556 aParamNode = aParamNode->next;
560 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
561 while (aParamItemNode != NULL)
563 xmlChar* aParamData = xmlNodeGetContent(aParamItemNode);
565 if (aParamData != NULL)
567 // Tag test_inParameter_name
568 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inParameter_name) )
569 _inParam.name = (const char*)aParamData;
571 // Tag test_inParameter_type
572 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inParameter_type) )
573 _inParam.type = (const char*)aParamData;
578 aParamItemNode = aParamItemNode->next;
581 _inParamList.push_back(_inParam) ;
583 // Empty temporary structures
587 aParamNode = aParamNode->next;
590 _aService.inParameters = _inParamList;
591 _inParamList.resize(0);
594 // Tag test_outParameter_list
595 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_outParameter_list) ) {
596 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
597 while (aParamNode != NULL)
599 // Tag test_outParameter
600 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_outParameter)) {
601 aParamNode = aParamNode->next;
605 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
606 while (aParamItemNode != NULL)
608 xmlChar* anOutParamData = xmlNodeGetContent(aParamItemNode);
610 if (anOutParamData != NULL)
612 // Tag test_outParameter_name
613 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outParameter_name) )
614 _outParam.name = (const char*)anOutParamData;
616 // Tag test_outParameter_type
617 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outParameter_type) )
618 _outParam.type = (const char*)anOutParamData;
620 xmlFree(anOutParamData);
623 aParamItemNode = aParamItemNode->next;
626 _outParamList.push_back(_outParam) ;
628 // Empty temporary structures
632 aParamNode = aParamNode->next;
635 _aService.outParameters = _outParamList;
636 _outParamList.resize(0);
639 //@ Tag test_inDataStreamParameter_list
640 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_inDataStreamParameter_list) )
642 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
643 while (aParamNode != NULL)
645 // Tag test_inDataStreamParameter
646 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_inDataStreamParameter)) {
647 aParamNode = aParamNode->next;
651 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
652 while (aParamItemNode != NULL)
654 xmlChar* inDataStreamParamData = xmlNodeGetContent(aParamItemNode);
656 if (inDataStreamParamData != NULL)
658 // Tag test_inDataStreamParameter_name
659 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inDataStreamParameter_name) )
660 _inDataStreamParam.name = (const char*)inDataStreamParamData;
662 // Tag test_inDataStreamParameter_type
663 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inDataStreamParameter_type) )
664 _inDataStreamParam.type = (const char*)inDataStreamParamData;
666 // Tag test_inDataStreamParameter_dependency
667 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inDataStreamParameter_dependency) )
668 _inDataStreamParam.dependency = (const char*)inDataStreamParamData;
670 xmlFree(inDataStreamParamData);
673 aParamItemNode = aParamItemNode->next;
676 _inDataStreamParamList.push_back(_inDataStreamParam) ;
678 // Empty temporary structures
679 _inDataStreamParam.type = "";
680 _inDataStreamParam.name = "";
681 _inDataStreamParam.dependency = "";
683 aParamNode = aParamNode->next;
686 _aService.inDataStreamParameters = _inDataStreamParamList;
687 _inDataStreamParamList.resize(0);
690 // Tag test_outDataStreamParameter_list
691 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_outDataStreamParameter_list) )
693 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
694 while (aParamNode != NULL)
696 // Tag test_outDataStreamParameter
697 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_outDataStreamParameter)) {
698 aParamNode = aParamNode->next;
702 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
703 while (aParamItemNode != NULL)
705 xmlChar* outDataStreamParamData = xmlNodeGetContent(aParamItemNode);
707 if (outDataStreamParamData != NULL)
709 // Tag test_outDataStreamParameter_name
710 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outDataStreamParameter_name) )
711 _outDataStreamParam.name = (const char*)outDataStreamParamData;
713 // Tag test_outDataStreamParameter_type
714 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outDataStreamParameter_type) )
715 _outDataStreamParam.type = (const char*)outDataStreamParamData;
717 // Tag test_outDataStreamParameter_dependency
718 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outDataStreamParameter_dependency) )
719 _outDataStreamParam.dependency = (const char*)outDataStreamParamData;
721 xmlFree(outDataStreamParamData);
724 aParamItemNode = aParamItemNode->next;
727 _outDataStreamParamList.push_back(_outDataStreamParam) ;
729 // Empty temporary structures
730 _outDataStreamParam.type = "";
731 _outDataStreamParam.name = "";
732 _outDataStreamParam.dependency = "";
734 aParamNode = aParamNode->next;
737 _aService.outDataStreamParameters = _outDataStreamParamList;
738 _outDataStreamParamList.resize(0);
741 aCompServiceSubNode = aCompServiceSubNode->next;
744 // Put formed service into the list
745 _serviceList.push_back(_aService);
747 // Empty temporary structures
749 _aService.typeOfNode = 1;
750 _aService.inParameters.resize(0);
751 _aService.outParameters.resize(0);
752 _aService.inDataStreamParameters.resize(0);
753 _aService.outDataStreamParameters.resize(0);
756 aCompServiceNode = aCompServiceNode->next;
759 _aInterface.services = _serviceList ;
761 // Empty temporary structures
762 _serviceList.resize(0);
763 _interfaceList.push_back(_aInterface);
764 _aInterface.name ="";
765 _aInterface.services.resize(0);
768 aSubNode = aSubNode->next;
771 _aModule.interfaces = _interfaceList ;
772 _interfaceList.resize(0);
775 aComponentSubNode = aComponentSubNode->next;
778 _moduleList.push_back(_aModule);
780 aComponentNode = aComponentNode->next;
784 aCurNode = aCurNode->next;