1 // Copyright (C) 2007-2008 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.
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
22 // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules
23 // File : SALOME_ModuleCatalog_Parser_IO.cxx
24 // Author : Estelle Deville
28 #include "SALOME_ModuleCatalog_Parser_IO.hxx"
31 #include "utilities.h"
35 std::ostream & operator<< (std::ostream & f, const ParserParameter & P)
37 f << " name : " << P.name << std::endl;
38 f << " type : " << P.type << std::endl;
42 std::ostream & operator<< (std::ostream & f,
43 const ParserDataStreamParameter & P)
45 f << " name : " << P.name << std::endl;
46 f << " type : " << P.type << std::endl;
47 f << " dependency : " << P.dependency << std::endl;
51 std::ostream & operator<< (std::ostream & f,
52 const ParserService & S)
55 f << " name : " << S.name << std::endl;
56 f << " default : " << (S.byDefault ? "yes" : "no")
59 n = S.inParameters.size();
60 f << " in parameters : " << n << std::endl;
62 f << S.inParameters[i] << std::endl;
63 if (n == 0) f << std::endl;
65 n = S.inDataStreamParameters.size();
66 f << " in DataStream parameters : " << n << std::endl;
68 f << S.inDataStreamParameters[i] << std::endl;
69 if (n == 0) f << std::endl;
71 n = S.outParameters.size();
72 f << " out parameters : " << n << std::endl;
74 f << S.outParameters[i] << std::endl;
75 if (n == 0) f << std::endl;
77 n = S.outDataStreamParameters.size();
78 f << " out DataStream parameters : " << n << std::endl;
80 f << S.outDataStreamParameters[i] << std::endl;
81 if (n == 0) f << std::endl;
86 std::ostream & operator<< (std::ostream & f,
87 const ParserInterface & I)
90 f << " name : " << I.name << std::endl;
92 n = I.services.size();
93 f << " services : " << n << std::endl;
95 MESSAGE(I.services[j].name);
96 f << I.services[j] << std::endl;
102 std::ostream & operator<< (std::ostream & f,
103 const ParserComponentType & T)
107 case GEOM : s = "GEOM"; break;
108 case MESH : s = "MESH"; break;
109 case Med : s = "Med"; break;
110 case SOLVER : s = "SOLVER"; break;
111 case DATA : s = "DATA"; break;
112 case VISU : s = "VISU"; break;
113 case SUPERV : s = "SUPERV"; break;
114 default : s = "OTHER"; break;
120 std::ostream & operator<< (std::ostream & f,
121 const ParserComponent & C)
125 << " name : " << C.name << std::endl;
126 f << " user name : " << C.username << std::endl;
127 f << " type : " << C.type << std::endl;
128 f << " multistudy : " << (C.multistudy ? "yes" : "no")
130 f << " icon : " << C.icon << std::endl;
131 f << " constraint : " << C.constraint << std::endl;
133 n = C.interfaces.size();
134 f << " interfaces : " << n << std::endl;
136 f << C.interfaces[j] << std::endl;
137 if (n == 0) f << std::endl;