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.salome-platform.org/ or email : webmaster.salome@opencascade.com
25 // File : SALOME_ModuleCatalog_Parser_IO.cxx
26 // Author : Estelle Deville
30 #include "SALOME_ModuleCatalog_Parser_IO.hxx"
33 #include "utilities.h"
37 std::ostream & operator<< (std::ostream & f, const ParserParameter & P)
39 f << " name : " << P.name << std::endl;
40 f << " type : " << P.type << std::endl;
44 std::ostream & operator<< (std::ostream & f,
45 const ParserDataStreamParameter & P)
47 f << " name : " << P.name << std::endl;
48 f << " type : " << P.type << std::endl;
49 f << " dependency : " << P.dependency << std::endl;
53 std::ostream & operator<< (std::ostream & f,
54 const ParserService & S)
57 f << " name : " << S.name << std::endl;
58 f << " default : " << (S.byDefault ? "yes" : "no")
61 n = S.inParameters.size();
62 f << " in parameters : " << n << std::endl;
64 f << S.inParameters[i] << std::endl;
65 if (n == 0) f << std::endl;
67 n = S.inDataStreamParameters.size();
68 f << " in DataStream parameters : " << n << std::endl;
70 f << S.inDataStreamParameters[i] << std::endl;
71 if (n == 0) f << std::endl;
73 n = S.outParameters.size();
74 f << " out parameters : " << n << std::endl;
76 f << S.outParameters[i] << std::endl;
77 if (n == 0) f << std::endl;
79 n = S.outDataStreamParameters.size();
80 f << " out DataStream parameters : " << n << std::endl;
82 f << S.outDataStreamParameters[i] << std::endl;
83 if (n == 0) f << std::endl;
88 std::ostream & operator<< (std::ostream & f,
89 const ParserInterface & I)
92 f << " name : " << I.name << std::endl;
94 n = I.services.size();
95 f << " services : " << n << std::endl;
97 MESSAGE(I.services[j].name);
98 f << I.services[j] << std::endl;
104 std::ostream & operator<< (std::ostream & f,
105 const ParserComponentType & T)
109 case GEOM : s = "GEOM"; break;
110 case MESH : s = "MESH"; break;
111 case Med : s = "Med"; break;
112 case SOLVER : s = "SOLVER"; break;
113 case DATA : s = "DATA"; break;
114 case VISU : s = "VISU"; break;
115 case SUPERV : s = "SUPERV"; break;
116 default : s = "OTHER"; break;
122 std::ostream & operator<< (std::ostream & f,
123 const ParserComponent & C)
127 << " name : " << C.name << std::endl;
128 f << " user name : " << C.username << std::endl;
129 f << " type : " << C.type << std::endl;
130 f << " multistudy : " << (C.multistudy ? "yes" : "no")
132 f << " icon : " << C.icon << std::endl;
133 f << " constraint : " << C.constraint << std::endl;
135 n = C.interfaces.size();
136 f << " interfaces : " << n << std::endl;
138 f << C.interfaces[j] << std::endl;
139 if (n == 0) f << std::endl;