1 // Copyright (C) 2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : calcium_port_factory.cxx
23 // Author : Eric Fayolle (EDF)
25 // Modified by : $LastChangedBy$
26 // Date : $LastChangedDate: 2007-01-08 19:01:14 +0100 (lun, 08 jan 2007) $
29 #include "calcium_port_factory.hxx"
31 calcium_port_factory::calcium_port_factory() {}
33 calcium_port_factory::~calcium_port_factory() {}
36 calcium_port_factory::create_data_servant(string type) {
37 provides_port * rtn_port = NULL;
39 if ( type == "integer")
40 rtn_port = new calcium_integer_port_provides();
42 rtn_port = new calcium_real_port_provides();
43 if ( type == "double")
44 rtn_port = new calcium_double_port_provides();
45 if ( type == "string")
46 rtn_port = new calcium_string_port_provides();
47 if ( type == "logical")
48 rtn_port = new calcium_logical_port_provides();
49 if ( type == "complex")
50 rtn_port = new calcium_complex_port_provides();
56 calcium_port_factory::create_data_proxy(string type) {
57 uses_port * rtn_port = NULL;
59 if ( type == "integer")
60 rtn_port = new calcium_integer_port_uses();
62 rtn_port = new calcium_real_port_uses();
63 if ( type == "double")
64 rtn_port = new calcium_double_port_uses();
65 if ( type == "string")
66 rtn_port = new calcium_string_port_uses();
67 if ( type == "logical")
68 rtn_port = new calcium_logical_port_uses();
69 if ( type == "complex")
70 rtn_port = new calcium_complex_port_uses();