Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/med.git] / src / MEDCouplingCorba / MEDCouplingMultiFieldsServant.hxx
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef __MEDCOUPLINGMULTIFIELDSSERVANT_HXX__
21 #define __MEDCOUPLINGMULTIFIELDSSERVANT_HXX__
22
23 #include "SALOMEconfig.h"
24 #ifdef WNT
25 #define NOMINMAX
26 #endif
27 #include CORBA_SERVER_HEADER(MEDCouplingCorbaServant)
28 #include "MEDCouplingCorba.hxx"
29 #include "MEDCouplingFieldServant.hxx"
30 #include "MEDCouplingMeshServant.hxx"
31
32 #include <vector>
33
34 namespace ParaMEDMEM
35 {
36   class RefCountObject;
37   class MEDCouplingMultiFields;
38
39   class MEDCOUPLINGCORBA_EXPORT MEDCouplingMultiFieldsServant : public MEDCouplingRefCountServant,
40                                                                 public virtual POA_SALOME_MED::MEDCouplingMultiFieldsCorbaInterface
41   {
42   public:
43     typedef MEDCouplingMultiFields CppType;
44     MEDCouplingMultiFieldsServant(const MEDCouplingMultiFields *cppPointer);
45   protected:
46     const MEDCouplingMultiFields *getPointer() const { return (const MEDCouplingMultiFields *)(_cpp_pointer); }
47   protected:
48     char *getName();
49     SALOME_TYPES::ListOfString *getInfoOnComponents();
50     CORBA::Long getMainTinyInfo(SALOME_TYPES::ListOfLong_out la, SALOME_TYPES::ListOfDouble_out da, CORBA::Long& nbOfArrays, CORBA::Long& nbOfFields);
51     // for field templates
52     void getTinyInfo(CORBA::Long id, SALOME_TYPES::ListOfLong_out la, SALOME_TYPES::ListOfDouble_out da, SALOME_TYPES::ListOfString_out sa);
53     void getSerialisationData(CORBA::Long id, SALOME_TYPES::ListOfLong_out la);
54     // for arrays
55     SALOME_MED::DataArrayDoubleCorbaInterface_ptr getArray(CORBA::Long id);
56     // for meshes
57     SALOME_MED::MEDCouplingMeshesCorbaInterface *getMeshes();
58     SALOME_MED::MEDCouplingMeshCorbaInterface_ptr getMeshWithId(CORBA::Long id);
59     //
60     CORBA::Boolean ExportDataAs(const char *format, SALOME::GenericObj_out exporter);
61   };
62 }
63
64 #endif