2 // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules
4 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
5 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
7 // This library is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU Lesser General Public
9 // License as published by the Free Software Foundation; either
10 // version 2.1 of the License.
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // Lesser General Public License for more details.
17 // You should have received a copy of the GNU Lesser General Public
18 // License along with this library; if not, write to the Free Software
19 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
25 // File : SALOME_ModuleCatalog_Parser_IO.cxx
26 // Author : Estelle Deville
30 #include "SALOME_ModuleCatalog_Parser_IO.hxx"
32 #include "utilities.h"
34 std::ostream & operator<< (std::ostream & f, const ParserParameter & P)
36 f << " name : " << P.name << std::endl;
37 f << " type : " << P.type << std::endl;
41 std::ostream & operator<< (std::ostream & f,
42 const ParserDataStreamParameter & P)
44 f << " name : " << P.name << std::endl;
45 f << " type : " << P.type << std::endl;
46 f << " dependency : " << P.dependency << std::endl;
50 std::ostream & operator<< (std::ostream & f,
51 const ParserService & S)
54 f << " name : " << S.name << std::endl;
55 f << " default : " << (S.byDefault ? "yes" : "no")
58 n = S.inParameters.size();
59 f << " in parameters : " << n << std::endl;
61 f << S.inParameters[i] << std::endl;
62 if (n == 0) f << std::endl;
64 n = S.inDataStreamParameters.size();
65 f << " in DataStream parameters : " << n << std::endl;
67 f << S.inDataStreamParameters[i] << std::endl;
68 if (n == 0) f << std::endl;
70 n = S.outParameters.size();
71 f << " out parameters : " << n << std::endl;
73 f << S.outParameters[i] << std::endl;
74 if (n == 0) f << std::endl;
76 n = S.outDataStreamParameters.size();
77 f << " out DataStream parameters : " << n << std::endl;
79 f << S.outDataStreamParameters[i] << std::endl;
80 if (n == 0) f << std::endl;
85 std::ostream & operator<< (std::ostream & f,
86 const ParserInterface & I)
89 f << " name : " << I.name << std::endl;
91 n = I.services.size();
92 f << " services : " << n << std::endl;
94 MESSAGE(I.services[j].name);
95 f << I.services[j] << std::endl;
101 std::ostream & operator<< (std::ostream & f,
102 const ParserComponentType & T)
106 case GEOM : s = "GEOM"; break;
107 case MESH : s = "MESH"; break;
108 case Med : s = "Med"; break;
109 case SOLVER : s = "SOLVER"; break;
110 case DATA : s = "DATA"; break;
111 case VISU : s = "VISU"; break;
112 case SUPERV : s = "SUPERV"; break;
113 default : s = "OTHER"; break;
119 std::ostream & operator<< (std::ostream & f,
120 const ParserComponent & C)
124 << " name : " << C.name << std::endl;
125 f << " user name : " << C.username << std::endl;
126 f << " type : " << C.type << std::endl;
127 f << " multistudy : " << (C.multistudy ? "yes" : "no")
129 f << " icon : " << C.icon << std::endl;
130 f << " constraint : " << C.constraint << std::endl;
132 n = C.interfaces.size();
133 f << " interfaces : " << n << std::endl;
135 f << C.interfaces[j] << std::endl;
136 if (n == 0) f << std::endl;