Salome HOME
Merge from V6_main 01/04/2013
[modules/med.git] / src / MEDMEM_I / MEDMEM_Support_i.hxx
1 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 //=============================================================================
24 // File      : MEDMEM_Support_i.hxx
25 // Project   : SALOME
26 // Author    : EDF 
27 // $Header: /export/home/PAL/MED/src/MEDMEM_I/MEDMEM_Support_i.hxx
28 //=============================================================================
29 //
30 #ifndef _MED_SUPPORT_I_HXX_
31 #define _MED_SUPPORT_I_HXX_
32
33 #include "MEDMEM_I.hxx"
34
35 #include <map>
36 #include <string>
37
38 #include <SALOMEconfig.h>
39
40 #include "SALOMEMultiComm.hxx"
41 #include "SALOME_GenericObj_i.hh"
42 #include CORBA_SERVER_HEADER(MED)
43 #include CORBA_SERVER_HEADER(SALOME_Comm)
44
45 namespace MEDMEM {
46 class SUPPORT;
47
48 class MEDMEM_I_EXPORT SUPPORT_i: virtual public POA_SALOME_MED::SUPPORT,
49                    virtual public SALOMEMultiComm,
50                    virtual public SALOME::GenericObj_i
51 {
52 public :
53     static std::map < int,::MEDMEM::SUPPORT *> supportMap;
54 private :
55     static int supportIndex;
56
57 protected :
58
59      // C++ object containing values
60      const ::MEDMEM::SUPPORT * const _support;
61      const int   _corbaIndex ;
62      std::string      _supportId ;
63
64 public:
65
66     SUPPORT_i();
67     ~SUPPORT_i();
68
69     // Constructors and associated internal methods
70     SUPPORT_i(const ::MEDMEM::SUPPORT * const s);
71     SUPPORT_i(const SUPPORT_i & s);
72
73     // IDL Methods
74     char *               getName()         throw (SALOME::SALOME_Exception);
75     char *               getDescription()  throw (SALOME::SALOME_Exception);
76     SALOME_MED::GMESH_ptr getMesh()         throw (SALOME::SALOME_Exception);
77     CORBA::Boolean       isOnAllElements() throw (SALOME::SALOME_Exception);
78     SALOME_MED::medEntityMesh getEntity()  throw (SALOME::SALOME_Exception);
79     CORBA::Long          getNumberOfElements(SALOME_MED::medGeometryElement geomElement) 
80                                            throw (SALOME::SALOME_Exception);
81     CORBA::Long          getNumberOfTypes()
82                                            throw (SALOME::SALOME_Exception);
83     SALOME_TYPES::ListOfLong* getNumber(SALOME_MED::medGeometryElement geomElement) 
84                                            throw (SALOME::SALOME_Exception);
85
86     SALOME_TYPES::ListOfLong* getNumberFromFile(SALOME_MED::medGeometryElement geomElement) 
87                                            throw (SALOME::SALOME_Exception);
88
89     SALOME::SenderInt_ptr getSenderForNumber(SALOME_MED::medGeometryElement geomElement) 
90                                            throw (SALOME::SALOME_Exception);
91     SALOME_TYPES::ListOfLong* getNumberIndex() 
92                                            throw (SALOME::SALOME_Exception);
93     SALOME::SenderInt_ptr getSenderForNumberIndex() 
94                                            throw (SALOME::SALOME_Exception);
95     CORBA::Long          getNumberOfGaussPoint(SALOME_MED::medGeometryElement geomElement) 
96                                            throw (SALOME::SALOME_Exception);
97     SALOME_TYPES::ListOfLong* getNumbersOfGaussPoint()
98                                            throw (SALOME::SALOME_Exception);
99
100     SALOME_MED::medGeometryElement_array* getTypes() 
101                                            throw (SALOME::SALOME_Exception);
102
103     void getBoundaryElements()             throw (SALOME::SALOME_Exception);
104
105
106   // Others
107   void           addInStudy (SALOMEDS::Study_ptr myStudy, 
108                           SALOME_MED::SUPPORT_ptr myIor)
109     throw (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
110
111   static std::string getEntryPath (const MEDMEM::SUPPORT * aSupport);
112
113   void release();
114   //                                    Cuisine interne
115   CORBA::Long    getCorbaIndex()   throw (SALOME::SALOME_Exception);
116   SALOME_MED::SUPPORT::supportInfos * getSupportGlobal()   throw (SALOME::SALOME_Exception);
117 };
118 }
119
120 #endif /* _MED_SUPPORT_I_HXX_ */