Salome HOME
update after merging trhe branches CEA_V3_0_x, OCC_V3_1_0_a1_x, and the main
[modules/med.git] / src / MEDMEM_I / MEDMEM_Field_i.hxx
1 //=============================================================================
2 // File      : MEDMEM_Field_i.hxx
3 // Project   : SALOME
4 // Author    : EDF
5 // Copyright : EDF 2002
6 // $Header: /export/home/PAL/MED_SRC/src/MEDMEM_I/MEDMEM_Field_i.hxx
7 //=============================================================================
8
9
10 #ifndef MED_FIELD_I_HXX_
11 #define MED_FIELD_I_HXX_
12
13 #include <map>
14 #include <string>
15 #include <sstream>
16
17 #include "Utils_CorbaException.hxx"
18 #include <SALOMEconfig.h>
19
20 # include "Utils_ORB_INIT.hxx"
21 # include "Utils_SINGLETON.hxx"
22
23 #include CORBA_SERVER_HEADER(MED)
24 #include CORBA_SERVER_HEADER(SALOMEDS)
25 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
26
27 #include "MEDMEM_Support_i.hxx"
28 #include "MEDMEM_convert.hxx"
29 #include "MEDMEM_Support.hxx"
30 #include "MEDMEM_Field.hxx"
31
32 namespace MEDMEM {
33 class FIELD_i: public virtual POA_SALOME_MED::FIELD,
34                public SALOME::GenericObj_i
35 {
36 public :
37         static map < int, ::MEDMEM::FIELD_ * > fieldMap ;
38 protected :
39         static int fieldIndex ;
40         bool _ownCppPtr;
41 protected :
42     // C++ object containing values and Constructor
43     // are protected because it is not supposed to be instancied
44
45     ::MEDMEM::FIELD_ * const  _fieldTptr;
46     const int   _corbaIndex;
47     string  _FieldId;
48     FIELD_i();
49     FIELD_i(MEDMEM::FIELD_ * const field, bool ownCppPtr);
50     FIELD_i(FIELD_i & f);
51
52 public :
53     // Associated internal methods
54     ~FIELD_i();
55
56     char *                  getName()        throw (SALOME::SALOME_Exception);
57     char *                  getDescription() throw (SALOME::SALOME_Exception);
58     SALOME_MED::SUPPORT_ptr getSupport()     throw (SALOME::SALOME_Exception);
59     CORBA::Long             getNumberOfComponents()        
60                                              throw (SALOME::SALOME_Exception);
61     char *                  getComponentName(CORBA::Long i)   
62                                              throw (SALOME::SALOME_Exception);
63     char *                  getComponentUnit(CORBA::Long i)   
64                                              throw (SALOME::SALOME_Exception);
65     char *                  getComponentDescription(CORBA::Long i)   
66                                              throw (SALOME::SALOME_Exception);
67     CORBA::Long             getIterationNumber()               
68                                              throw (SALOME::SALOME_Exception);
69     CORBA::Long             getOrderNumber() throw (SALOME::SALOME_Exception);
70     CORBA::Double           getTime()        throw (SALOME::SALOME_Exception);
71     CORBA::Long             getCorbaIndex()  throw (SALOME::SALOME_Exception);
72
73     SALOME_MED::string_array * getComponentsNames()  throw (SALOME::SALOME_Exception);
74     SALOME_MED::string_array * getComponentsUnits()  throw (SALOME::SALOME_Exception);
75     SALOME_MED::string_array * getComponentsDescriptions()  throw (SALOME::SALOME_Exception);
76     void addInStudy(SALOMEDS::Study_ptr myStudy, 
77                     SALOME_MED::FIELD_ptr myIor)  
78                     throw (SALOME::SALOME_Exception, 
79                            SALOMEDS::StudyBuilder::LockProtection);
80
81     CORBA::Long addDriver (SALOME_MED::medDriverTypes driverType, 
82                            const char* fileName, const char* fieldName)
83                                           throw (SALOME::SALOME_Exception);
84     void        rmDriver  (CORBA::Long i) throw (SALOME::SALOME_Exception);
85     void        read      (CORBA::Long i) throw (SALOME::SALOME_Exception);
86     void        write     (CORBA::Long i, const char* driverFieldName)
87                                           throw (SALOME::SALOME_Exception);
88     // Cuisine Interne
89     MEDMEM::FIELD_ * constructConstField() const;
90
91  };
92 }
93
94 //using namespace MEDMEM;
95
96 #endif /* MED_FIELD_I_HXX_ */