1 // Copyright (C) 2007-2020 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):_pathList(pathList),_moduleList(moduleList),
51 _typeMap(typeMap),_typeList(typeList)
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 (aType.compare("FIELDS") == 0) ||
449 (aType.compare("Fields") == 0) ||
450 (aType.compare("fields") == 0))
451 _aModule.type = Med ;
452 else if((aType.compare("GEOM") == 0) ||
453 (aType.compare("Geom") == 0) ||
454 (aType.compare("geom") == 0))
455 _aModule.type = GEOM ;
456 else if((aType.compare("SOLVER") == 0) ||
457 (aType.compare("Solver") == 0) ||
458 (aType.compare("solver") == 0))
459 _aModule.type = SOLVER ;
460 else if((aType.compare("SUPERV") == 0) ||
461 (aType.compare("Superv") == 0) ||
462 (aType.compare("Supervision") == 0) ||
463 (aType.compare("superv") == 0))
464 _aModule.type = SUPERV ;
465 else if((aType.compare("DATA") == 0) ||
466 (aType.compare("Data") == 0) ||
467 (aType.compare("data") == 0))
468 _aModule.type = DATA ;
469 else if((aType.compare("VISU") == 0) ||
470 (aType.compare("Visu") == 0) ||
471 (aType.compare("visu") == 0))
472 _aModule.type = VISU ;
473 else if((aType.compare("OTHER") == 0) ||
474 (aType.compare("Other") == 0) ||
475 (aType.compare("other") == 0))
476 _aModule.type = OTHER ;
478 // If it'not in all theses cases, the type is affected to OTHER
479 _aModule.type = OTHER ;
482 // Tag test_component_impltype
483 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_impltype) )
484 _aModule.implementationType = aContent;
486 // Tag test_component_implname
487 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_implname) )
488 _aModule.implementationName = aContent;
490 // Tag test_component_icon
491 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_icon) )
492 _aModule.icon = aContent;
494 // Tag test_component_version
495 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_version) )
496 _aModule.version = aContent;
498 // Tag test_component_comment
499 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_comment) )
500 _aModule.comment = aContent;
502 // Tag test_constraint
503 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_constraint) )
504 _aModule.constraint = aContent;
506 xmlFree(aNodeContent);
508 // Process tag test_interface_list:
509 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_interface_list) ) {
511 // Form an interface list for the component
512 xmlNodePtr aSubNode = aComponentSubNode->xmlChildrenNode;
513 while(aSubNode != NULL) {
514 // Tag test_interface_name
515 if ( !xmlStrcmp(aSubNode->name, (const xmlChar*)test_interface_name) ) {
516 xmlChar* anInterfaceName = xmlNodeGetContent(aSubNode);
517 if (anInterfaceName != NULL) {
518 _aInterface.name = (const char*)anInterfaceName;
519 xmlFree(anInterfaceName);
523 // Tag test_service_list
524 if ( !xmlStrcmp(aSubNode->name, (const xmlChar*)test_service_list) ) {
525 // Form a service list for the interface
526 xmlNodePtr aCompServiceNode = aSubNode->xmlChildrenNode;
527 while(aCompServiceNode != NULL) {
529 if ( !xmlStrcmp(aCompServiceNode->name, (const xmlChar*)"component-service") ) {
530 xmlNodePtr aCompServiceSubNode = aCompServiceNode->xmlChildrenNode;
531 while(aCompServiceSubNode != NULL)
533 xmlChar* aCompServiceData = xmlNodeGetContent(aCompServiceSubNode);
535 if ( aCompServiceData != NULL)
537 // Tag test_service_name
538 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_service_name) )
539 _aService.name = (const char*)aCompServiceData;
541 // Tag test_defaultservice
542 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_defaultservice) )
543 _aService.byDefault = atoi((const char*)aCompServiceData) !=0 ;
545 // Tag test_typeofnode
546 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_typeofnode) )
547 _aService.typeOfNode = atoi((const char*)aCompServiceData) !=0 ;
549 xmlFree(aCompServiceData);
552 // Tag test_inParameter_list
553 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_inParameter_list) ) {
554 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
555 while (aParamNode != NULL)
557 // Tag test_inParameter
558 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_inParameter)) {
559 aParamNode = aParamNode->next;
563 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
564 while (aParamItemNode != NULL)
566 xmlChar* aParamData = xmlNodeGetContent(aParamItemNode);
568 if (aParamData != NULL)
570 // Tag test_inParameter_name
571 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inParameter_name) )
572 _inParam.name = (const char*)aParamData;
574 // Tag test_inParameter_type
575 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inParameter_type) )
576 _inParam.type = (const char*)aParamData;
581 aParamItemNode = aParamItemNode->next;
584 _inParamList.push_back(_inParam) ;
586 // Empty temporary structures
590 aParamNode = aParamNode->next;
593 _aService.inParameters = _inParamList;
594 _inParamList.resize(0);
597 // Tag test_outParameter_list
598 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_outParameter_list) ) {
599 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
600 while (aParamNode != NULL)
602 // Tag test_outParameter
603 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_outParameter)) {
604 aParamNode = aParamNode->next;
608 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
609 while (aParamItemNode != NULL)
611 xmlChar* anOutParamData = xmlNodeGetContent(aParamItemNode);
613 if (anOutParamData != NULL)
615 // Tag test_outParameter_name
616 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outParameter_name) )
617 _outParam.name = (const char*)anOutParamData;
619 // Tag test_outParameter_type
620 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outParameter_type) )
621 _outParam.type = (const char*)anOutParamData;
623 xmlFree(anOutParamData);
626 aParamItemNode = aParamItemNode->next;
629 _outParamList.push_back(_outParam) ;
631 // Empty temporary structures
635 aParamNode = aParamNode->next;
638 _aService.outParameters = _outParamList;
639 _outParamList.resize(0);
642 //@ Tag test_inDataStreamParameter_list
643 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_inDataStreamParameter_list) )
645 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
646 while (aParamNode != NULL)
648 // Tag test_inDataStreamParameter
649 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_inDataStreamParameter)) {
650 aParamNode = aParamNode->next;
654 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
655 while (aParamItemNode != NULL)
657 xmlChar* inDataStreamParamData = xmlNodeGetContent(aParamItemNode);
659 if (inDataStreamParamData != NULL)
661 // Tag test_inDataStreamParameter_name
662 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inDataStreamParameter_name) )
663 _inDataStreamParam.name = (const char*)inDataStreamParamData;
665 // Tag test_inDataStreamParameter_type
666 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inDataStreamParameter_type) )
667 _inDataStreamParam.type = (const char*)inDataStreamParamData;
669 // Tag test_inDataStreamParameter_dependency
670 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inDataStreamParameter_dependency) )
671 _inDataStreamParam.dependency = (const char*)inDataStreamParamData;
673 xmlFree(inDataStreamParamData);
676 aParamItemNode = aParamItemNode->next;
679 _inDataStreamParamList.push_back(_inDataStreamParam) ;
681 // Empty temporary structures
682 _inDataStreamParam.type = "";
683 _inDataStreamParam.name = "";
684 _inDataStreamParam.dependency = "";
686 aParamNode = aParamNode->next;
689 _aService.inDataStreamParameters = _inDataStreamParamList;
690 _inDataStreamParamList.resize(0);
693 // Tag test_outDataStreamParameter_list
694 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_outDataStreamParameter_list) )
696 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
697 while (aParamNode != NULL)
699 // Tag test_outDataStreamParameter
700 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_outDataStreamParameter)) {
701 aParamNode = aParamNode->next;
705 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
706 while (aParamItemNode != NULL)
708 xmlChar* outDataStreamParamData = xmlNodeGetContent(aParamItemNode);
710 if (outDataStreamParamData != NULL)
712 // Tag test_outDataStreamParameter_name
713 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outDataStreamParameter_name) )
714 _outDataStreamParam.name = (const char*)outDataStreamParamData;
716 // Tag test_outDataStreamParameter_type
717 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outDataStreamParameter_type) )
718 _outDataStreamParam.type = (const char*)outDataStreamParamData;
720 // Tag test_outDataStreamParameter_dependency
721 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outDataStreamParameter_dependency) )
722 _outDataStreamParam.dependency = (const char*)outDataStreamParamData;
724 xmlFree(outDataStreamParamData);
727 aParamItemNode = aParamItemNode->next;
730 _outDataStreamParamList.push_back(_outDataStreamParam) ;
732 // Empty temporary structures
733 _outDataStreamParam.type = "";
734 _outDataStreamParam.name = "";
735 _outDataStreamParam.dependency = "";
737 aParamNode = aParamNode->next;
740 _aService.outDataStreamParameters = _outDataStreamParamList;
741 _outDataStreamParamList.resize(0);
744 aCompServiceSubNode = aCompServiceSubNode->next;
747 // Put formed service into the list
748 _serviceList.push_back(_aService);
750 // Empty temporary structures
752 _aService.typeOfNode = 1;
753 _aService.inParameters.resize(0);
754 _aService.outParameters.resize(0);
755 _aService.inDataStreamParameters.resize(0);
756 _aService.outDataStreamParameters.resize(0);
759 aCompServiceNode = aCompServiceNode->next;
762 _aInterface.services = _serviceList ;
764 // Empty temporary structures
765 _serviceList.resize(0);
766 _interfaceList.push_back(_aInterface);
767 _aInterface.name ="";
768 _aInterface.services.resize(0);
771 aSubNode = aSubNode->next;
774 _aModule.interfaces = _interfaceList ;
775 _interfaceList.resize(0);
778 aComponentSubNode = aComponentSubNode->next;
781 _moduleList.push_back(_aModule);
783 aComponentNode = aComponentNode->next;
787 aCurNode = aCurNode->next;