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_implname = "component-implname";
72 test_component_version = "component-version";
73 test_component_comment = "component-comment";
75 test_interface_name = "component-interface-name" ;
77 test_service_name = "service-name";
78 test_defaultservice = "service-by-default";
80 test_typeofnode = "type-of-node";
82 test_inParameter_type = "inParameter-type";
83 test_inParameter_name = "inParameter-name";
84 test_inParameter = "inParameter";
85 test_inParameter_list = "inParameter-list";
87 test_outParameter_type = "outParameter-type";
88 test_outParameter_name = "outParameter-name";
89 test_outParameter = "outParameter";
90 test_outParameter_list = "outParameter-list";
92 test_inDataStreamParameter_type = "inParameter-type";
93 test_inDataStreamParameter_name = "inParameter-name";
94 test_inDataStreamParameter_dependency = "inParameter-dependency";
95 test_inDataStreamParameter = "inParameter";
96 test_inDataStreamParameter_list = "DataStream-list";
98 test_outDataStreamParameter_type = "outParameter-type";
99 test_outDataStreamParameter_name = "outParameter-name";
100 test_outDataStreamParameter_dependency = "outParameter-dependency";
101 test_outDataStreamParameter = "outParameter";
102 test_outDataStreamParameter_list = "DataStream-list";
104 test_service = "component-service";
105 test_service_list = "component-service-list";
106 test_interface_list = "component-interface-list";
108 test_constraint = "constraint";
110 test_component_list = "component-list";
111 test_component="component";
113 if(MYDEBUG) END_OF("SALOME_ModuleCatalog_Handler");
116 //----------------------------------------------------------------------
117 // Function : ~SALOME_ModuleCatalog_Handler
118 // Purpose : Destructor
119 //----------------------------------------------------------------------
120 SALOME_ModuleCatalog_Handler::~SALOME_ModuleCatalog_Handler()
122 if(MYDEBUG) BEGIN_OF("~SALOME_ModuleCatalog_Handler()")
123 if(MYDEBUG) END_OF("~SALOME_ModuleCatalog_Handler()")
127 //=============================================================================
129 * Processes XML document and fills the list of modules
131 //=============================================================================
133 void SALOME_ModuleCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc)
135 if(MYDEBUG) MESSAGE("Begin parse document");
136 // Empty the private elements
138 _pathPrefix.listOfComputer.resize(0);
139 _serviceList.resize(0);
140 _interfaceList.resize(0);
141 _moduleList.resize(0);
142 _inDataStreamParamList.resize(0);
143 _outDataStreamParamList.resize(0);
144 _inParamList.resize(0);
145 _outParamList.resize(0);
147 // Get the document root node
148 xmlNodePtr aCurNode = xmlDocGetRootElement(theDoc);
149 aCurNode = aCurNode->xmlChildrenNode;
151 // Processing the document nodes
152 while(aCurNode != NULL)
154 // Part 1: Process path prefix list (tag test_path_prefix_list)
155 if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)test_path_prefix_list) )
157 xmlNodePtr aCurSubNode = aCurNode->xmlChildrenNode;
158 while(aCurSubNode != NULL)
160 // Forming a PathPrefix structure (tag test_path_prefix)
161 if ( xmlStrcmp(aCurSubNode->name, (const xmlChar*)test_path_prefix) ) {
162 aCurSubNode = aCurSubNode->next;
166 xmlNodePtr aCurSubSubNode = aCurSubNode->xmlChildrenNode;
167 while(aCurSubSubNode != NULL)
169 // Tag test_path_prefix_name
170 if ( !xmlStrcmp(aCurSubSubNode->name, (const xmlChar*)test_path_prefix_name) ) {
171 xmlChar* aPath = xmlNodeGetContent(aCurSubSubNode);
173 _pathPrefix.path = (const char*)aPath;
178 // Tag test_computer_list
179 if ( !xmlStrcmp(aCurSubSubNode->name, (const xmlChar*)test_computer_list) ) {
180 xmlNodePtr aComputerNode = aCurSubSubNode->xmlChildrenNode;
181 while (aComputerNode != NULL) {
182 // Tag test_computer_name
183 if ( !xmlStrcmp(aComputerNode->name, (const xmlChar*) test_computer_name) ) {
184 xmlChar* aCompName = xmlNodeGetContent(aComputerNode);
185 if (aCompName != NULL) {
186 _pathPrefix.listOfComputer.push_back((const char*)aCompName);
191 aComputerNode = aComputerNode->next;
195 aCurSubSubNode = aCurSubSubNode->next;
198 _pathList.push_back(_pathPrefix);
199 _pathPrefix.listOfComputer.resize(0);
201 aCurSubNode = aCurSubNode->next;
205 //Part 2: Process list of types
206 if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)"type-list") )
208 xmlNodePtr aTypeNode = aCurNode->xmlChildrenNode;
209 while (aTypeNode != NULL)
212 if ( !xmlStrcmp(aTypeNode->name, (const xmlChar*)"type" ))
214 // Here is a basic type description
216 xmlChar * name=xmlGetProp(aTypeNode,(const xmlChar*)"name");
219 aType.name = (const char*)name;
222 xmlChar *kind=xmlGetProp(aTypeNode,(const xmlChar*)"kind");
225 aType.kind = (const char*)kind;
228 if(aType.kind == "double" ||
229 aType.kind == "int" ||
230 aType.kind == "bool" ||
231 aType.kind == "string")
233 if ( _typeMap.find(aType.name) == _typeMap.end() )
235 std::cerr << "Registered basic type: " << aType.name << " " << aType.kind << std::endl;
236 _typeMap[aType.name]=aType;
237 _typeList.push_back(aType);
240 std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." << std::endl;
243 std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") has incorrect kind, it will be ignored." << std::endl;
245 else if ( !xmlStrcmp(aTypeNode->name, (const xmlChar*)"sequence" ))
247 // Here is a sequence type description
248 ParserSequence aType;
249 xmlChar * name=xmlGetProp(aTypeNode,(const xmlChar*)"name");
252 aType.name = (const char*)name;
255 xmlChar *content=xmlGetProp(aTypeNode,(const xmlChar*)"content");
258 aType.content = (const char*)content;
261 if ( _typeMap.find(aType.content) != _typeMap.end() )
263 if ( _typeMap.find(aType.name) == _typeMap.end() )
265 std::cerr << "Registered sequence type: " << aType.name << " " << aType.content << std::endl;
266 _typeMap[aType.name]=aType;
267 _typeList.push_back(aType);
270 std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." << std::endl;
274 std::cerr << "Warning: this sequence type (" << aType.name << "," << aType.content << ") has unknown content type, it will be ignored." << std::endl;
277 else if ( !xmlStrcmp(aTypeNode->name, (const xmlChar*)"objref" ))
279 // Here is an objref type description
282 xmlChar * name=xmlGetProp(aTypeNode,(const xmlChar*)"name");
285 aType.name = (const char*)name;
288 xmlChar *id=xmlGetProp(aTypeNode,(const xmlChar*)"id");
291 aType.id = (const char*)id;
295 xmlNodePtr aTypeSubNode = aTypeNode->xmlChildrenNode;
296 while (aTypeSubNode != NULL)
298 if ( !xmlStrcmp(aTypeSubNode->name, (const xmlChar*)"base" ))
301 xmlChar* content = xmlNodeGetContent(aTypeSubNode);
304 std::string base=(const char*)content;
306 if ( _typeMap.find(base) != _typeMap.end() && _typeMap[base].kind == "objref")
308 aType.bases.push_back(base);
312 std::cerr << "Warning: this objref type (" << aType.name << ") has unknown base type (" << base << "), it will be ignored." << std::endl;
318 aTypeSubNode = aTypeSubNode->next;
322 if ( _typeMap.find(aType.name) == _typeMap.end() )
324 std::cerr << "Registered objref type: " << aType.name << " " << aType.id << std::endl;
325 _typeMap[aType.name]=aType;
326 _typeList.push_back(aType);
329 std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." << std::endl;
332 else if ( !xmlStrcmp(aTypeNode->name, (const xmlChar*)"struct" ))
334 // Here is a struct type description
337 xmlChar * name=xmlGetProp(aTypeNode,(const xmlChar*)"name");
340 aType.name = (const char*)name;
343 xmlChar *id=xmlGetProp(aTypeNode,(const xmlChar*)"id");
346 aType.id = (const char*)id;
350 xmlNodePtr aTypeSubNode = aTypeNode->xmlChildrenNode;
351 while (aTypeSubNode != NULL)
353 if ( !xmlStrcmp(aTypeSubNode->name, (const xmlChar*)"member" ))
355 std::pair<std::string,std::string> member;
356 xmlChar * m_name=xmlGetProp(aTypeSubNode,(const xmlChar*)"name");
359 member.first=(const char*)m_name;
362 xmlChar * m_type=xmlGetProp(aTypeSubNode,(const xmlChar*)"type");
365 member.second=(const char*)m_type;
368 if ( _typeMap.find(member.second) != _typeMap.end() )
370 aType.members.push_back(member);
374 std::cerr << "Warning: this struct type (" << aType.name << ") has unknown member type (" << member.first << "," << member.second << "), it will be ignored." << std::endl;
379 aTypeSubNode = aTypeSubNode->next;
383 if ( _typeMap.find(aType.name) == _typeMap.end() )
385 std::cerr << "Registered struct type: " << aType.name << " " << aType.id << std::endl;
386 _typeMap[aType.name]=aType;
387 _typeList.push_back(aType);
390 std::cerr << "Warning: this type (" << aType.name << "," << aType.kind << ") already exists, it will be ignored." << std::endl;
393 aTypeNode = aTypeNode->next;
397 //Part 3: Process list of components (tag test_component_list)
398 if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)test_component_list) )
400 xmlNodePtr aComponentNode = aCurNode->xmlChildrenNode;
401 while (aComponentNode != NULL)
403 // Do not process tags differ from test_component here
404 if ( xmlStrcmp(aComponentNode->name, (const xmlChar*)test_component) ) {
405 aComponentNode = aComponentNode->next;
409 // Component identification
411 // Empty temporary structures
413 _aModule.constraint = "";
415 _aModule.interfaces.resize(0);
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_multistudy
480 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_multistudy) )
481 _aModule.multistudy = atoi( aContent.c_str() );
483 // Tag test_component_impltype
484 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_impltype) )
485 _aModule.implementationType = aContent;
487 // Tag test_component_implname
488 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_implname) )
489 _aModule.implementationName = aContent;
491 // Tag test_component_icon
492 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_icon) )
493 _aModule.icon = aContent;
495 // Tag test_component_version
496 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_version) )
497 _aModule.version = aContent;
499 // Tag test_component_comment
500 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_comment) )
501 _aModule.comment = aContent;
503 // Tag test_constraint
504 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_constraint) )
505 _aModule.constraint = aContent;
507 xmlFree(aNodeContent);
509 // Process tag test_interface_list:
510 if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_interface_list) ) {
512 // Form an interface list for the component
513 xmlNodePtr aSubNode = aComponentSubNode->xmlChildrenNode;
514 while(aSubNode != NULL) {
515 // Tag test_interface_name
516 if ( !xmlStrcmp(aSubNode->name, (const xmlChar*)test_interface_name) ) {
517 xmlChar* anInterfaceName = xmlNodeGetContent(aSubNode);
518 if (anInterfaceName != NULL) {
519 _aInterface.name = (const char*)anInterfaceName;
520 xmlFree(anInterfaceName);
524 // Tag test_service_list
525 if ( !xmlStrcmp(aSubNode->name, (const xmlChar*)test_service_list) ) {
526 // Form a service list for the interface
527 xmlNodePtr aCompServiceNode = aSubNode->xmlChildrenNode;
528 while(aCompServiceNode != NULL) {
530 if ( !xmlStrcmp(aCompServiceNode->name, (const xmlChar*)"component-service") ) {
531 xmlNodePtr aCompServiceSubNode = aCompServiceNode->xmlChildrenNode;
532 while(aCompServiceSubNode != NULL)
534 xmlChar* aCompServiceData = xmlNodeGetContent(aCompServiceSubNode);
536 if ( aCompServiceData != NULL)
538 // Tag test_service_name
539 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_service_name) )
540 _aService.name = (const char*)aCompServiceData;
542 // Tag test_defaultservice
543 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_defaultservice) )
544 _aService.byDefault = (const char*)aCompServiceData;
546 // Tag test_typeofnode
547 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_typeofnode) )
548 _aService.typeOfNode = (const char*)aCompServiceData;
550 xmlFree(aCompServiceData);
553 // Tag test_inParameter_list
554 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_inParameter_list) ) {
555 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
556 while (aParamNode != NULL)
558 // Tag test_inParameter
559 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_inParameter)) {
560 aParamNode = aParamNode->next;
564 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
565 while (aParamItemNode != NULL)
567 xmlChar* aParamData = xmlNodeGetContent(aParamItemNode);
569 if (aParamData != NULL)
571 // Tag test_inParameter_name
572 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inParameter_name) )
573 _inParam.name = (const char*)aParamData;
575 // Tag test_inParameter_type
576 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inParameter_type) )
577 _inParam.type = (const char*)aParamData;
582 aParamItemNode = aParamItemNode->next;
585 _inParamList.push_back(_inParam) ;
587 // Empty temporary structures
591 aParamNode = aParamNode->next;
594 _aService.inParameters = _inParamList;
595 _inParamList.resize(0);
598 // Tag test_outParameter_list
599 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_outParameter_list) ) {
600 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
601 while (aParamNode != NULL)
603 // Tag test_outParameter
604 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_outParameter)) {
605 aParamNode = aParamNode->next;
609 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
610 while (aParamItemNode != NULL)
612 xmlChar* anOutParamData = xmlNodeGetContent(aParamItemNode);
614 if (anOutParamData != NULL)
616 // Tag test_outParameter_name
617 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outParameter_name) )
618 _outParam.name = (const char*)anOutParamData;
620 // Tag test_outParameter_type
621 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outParameter_type) )
622 _outParam.type = (const char*)anOutParamData;
624 xmlFree(anOutParamData);
627 aParamItemNode = aParamItemNode->next;
630 _outParamList.push_back(_outParam) ;
632 // Empty temporary structures
636 aParamNode = aParamNode->next;
639 _aService.outParameters = _outParamList;
640 _outParamList.resize(0);
643 //@ Tag test_inDataStreamParameter_list
644 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_inDataStreamParameter_list) )
646 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
647 while (aParamNode != NULL)
649 // Tag test_inDataStreamParameter
650 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_inDataStreamParameter)) {
651 aParamNode = aParamNode->next;
655 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
656 while (aParamItemNode != NULL)
658 xmlChar* inDataStreamParamData = xmlNodeGetContent(aParamItemNode);
660 if (inDataStreamParamData != NULL)
662 // Tag test_inDataStreamParameter_name
663 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inDataStreamParameter_name) )
664 _inDataStreamParam.name = (const char*)inDataStreamParamData;
666 // Tag test_inDataStreamParameter_type
667 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inDataStreamParameter_type) )
668 _inDataStreamParam.type = (const char*)inDataStreamParamData;
670 // Tag test_inDataStreamParameter_dependency
671 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_inDataStreamParameter_dependency) )
672 _inDataStreamParam.dependency = (const char*)inDataStreamParamData;
674 xmlFree(inDataStreamParamData);
677 aParamItemNode = aParamItemNode->next;
680 _inDataStreamParamList.push_back(_inDataStreamParam) ;
682 // Empty temporary structures
683 _inDataStreamParam.type = "";
684 _inDataStreamParam.name = "";
685 _inDataStreamParam.dependency = "";
687 aParamNode = aParamNode->next;
690 _aService.inDataStreamParameters = _inDataStreamParamList;
691 _inDataStreamParamList.resize(0);
694 // Tag test_outDataStreamParameter_list
695 if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_outDataStreamParameter_list) )
697 xmlNodePtr aParamNode = aCompServiceSubNode->xmlChildrenNode;
698 while (aParamNode != NULL)
700 // Tag test_outDataStreamParameter
701 if (xmlStrcmp(aParamNode->name, (const xmlChar*)test_outDataStreamParameter)) {
702 aParamNode = aParamNode->next;
706 xmlNodePtr aParamItemNode = aParamNode->xmlChildrenNode;
707 while (aParamItemNode != NULL)
709 xmlChar* outDataStreamParamData = xmlNodeGetContent(aParamItemNode);
711 if (outDataStreamParamData != NULL)
713 // Tag test_outDataStreamParameter_name
714 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outDataStreamParameter_name) )
715 _outDataStreamParam.name = (const char*)outDataStreamParamData;
717 // Tag test_outDataStreamParameter_type
718 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outDataStreamParameter_type) )
719 _outDataStreamParam.type = (const char*)outDataStreamParamData;
721 // Tag test_outDataStreamParameter_dependency
722 if ( !xmlStrcmp(aParamItemNode->name, (const xmlChar*)test_outDataStreamParameter_dependency) )
723 _outDataStreamParam.dependency = (const char*)outDataStreamParamData;
725 xmlFree(outDataStreamParamData);
728 aParamItemNode = aParamItemNode->next;
731 _outDataStreamParamList.push_back(_outDataStreamParam) ;
733 // Empty temporary structures
734 _outDataStreamParam.type = "";
735 _outDataStreamParam.name = "";
736 _outDataStreamParam.dependency = "";
738 aParamNode = aParamNode->next;
741 _aService.outDataStreamParameters = _outDataStreamParamList;
742 _outDataStreamParamList.resize(0);
745 aCompServiceSubNode = aCompServiceSubNode->next;
748 // Put formed service into the list
749 _serviceList.push_back(_aService);
751 // Empty temporary structures
753 _aService.typeOfNode = 1;
754 _aService.inParameters.resize(0);
755 _aService.outParameters.resize(0);
756 _aService.inDataStreamParameters.resize(0);
757 _aService.outDataStreamParameters.resize(0);
760 aCompServiceNode = aCompServiceNode->next;
763 _aInterface.services = _serviceList ;
765 // Empty temporary structures
766 _serviceList.resize(0);
767 _interfaceList.push_back(_aInterface);
768 _aInterface.name ="";
769 _aInterface.services.resize(0);
772 aSubNode = aSubNode->next;
775 _aModule.interfaces = _interfaceList ;
776 _interfaceList.resize(0);
779 aComponentSubNode = aComponentSubNode->next;
782 _moduleList.push_back(_aModule);
784 aComponentNode = aComponentNode->next;
788 aCurNode = aCurNode->next;