Salome HOME
Final version of the V2_2_0 in the main trunk of the CVS tree.
[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
29 #include "MEDMEM_convert.hxx"
30
31 #include "MEDMEM_Support.hxx"
32 #include "MEDMEM_Field.hxx"
33
34 namespace MEDMEM {
35 class FIELD_i: public virtual POA_SALOME_MED::FIELD,
36                public PortableServer::RefCountServantBase
37 {
38 public :
39         static map < int, ::MEDMEM::FIELD_ * > fieldMap ;
40 protected :
41         static int fieldIndex ;
42         bool _ownCppPtr;
43 protected :
44     // C++ object containing values and Constructor
45     // are protected because it is not supposed to be instancied
46
47     ::MEDMEM::FIELD_ * const  _fieldTptr;
48     const int   _corbaIndex;
49     string  _FieldId;
50     FIELD_i();
51     FIELD_i(MEDMEM::FIELD_ * const field, bool ownCppPtr);
52     FIELD_i(FIELD_i & f);
53
54 public :
55     // Associated internal methods
56     ~FIELD_i();
57
58     char *                  getName()        throw (SALOME::SALOME_Exception);
59     char *                  getDescription() throw (SALOME::SALOME_Exception);
60     SALOME_MED::SUPPORT_ptr getSupport()     throw (SALOME::SALOME_Exception);
61     CORBA::Long             getNumberOfComponents()        
62                                              throw (SALOME::SALOME_Exception);
63     char *                  getComponentName(CORBA::Long i)   
64                                              throw (SALOME::SALOME_Exception);
65     char *                  getComponentUnit(CORBA::Long i)   
66                                              throw (SALOME::SALOME_Exception);
67     char *                  getComponentDescription(CORBA::Long i)   
68                                              throw (SALOME::SALOME_Exception);
69     CORBA::Long             getIterationNumber()               
70                                              throw (SALOME::SALOME_Exception);
71     CORBA::Long             getOrderNumber() throw (SALOME::SALOME_Exception);
72     CORBA::Double           getTime()        throw (SALOME::SALOME_Exception);
73     CORBA::Long             getCorbaIndex()  throw (SALOME::SALOME_Exception);
74
75     SALOME_MED::string_array * getComponentsNames()  throw (SALOME::SALOME_Exception);
76     SALOME_MED::string_array * getComponentsUnits()  throw (SALOME::SALOME_Exception);
77     SALOME_MED::string_array * getComponentsDescriptions()  throw (SALOME::SALOME_Exception);
78     void addInStudy(SALOMEDS::Study_ptr myStudy, 
79                     SALOME_MED::FIELD_ptr myIor)  
80                     throw (SALOME::SALOME_Exception, 
81                            SALOMEDS::StudyBuilder::LockProtection);
82
83     CORBA::Long addDriver (SALOME_MED::medDriverTypes driverType, 
84                            const char* fileName, const char* fieldName)
85                                           throw (SALOME::SALOME_Exception);
86     void        rmDriver  (CORBA::Long i) throw (SALOME::SALOME_Exception);
87     void        read      (CORBA::Long i) throw (SALOME::SALOME_Exception);
88     void        write     (CORBA::Long i, const char* driverFieldName)
89                                           throw (SALOME::SALOME_Exception);
90   void release();
91     // Cuisine Interne
92     MEDMEM::FIELD_ * constructConstField() const;
93
94  };
95 }
96
97 //using namespace MEDMEM;
98
99 #endif /* MED_FIELD_I_HXX_ */