Back to index

salome-med  6.5.0
MEDMEM_Field_i.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //=============================================================================
00024 // File      : MEDMEM_Field_i.hxx
00025 // Project   : SALOME
00026 // Author    : EDF
00027 // $Header   : $
00028 //=============================================================================
00029 //
00030 #ifndef MED_FIELD_I_HXX_
00031 #define MED_FIELD_I_HXX_
00032 
00033 #include <MEDMEM_I.hxx>
00034 
00035 #include <map>
00036 #include <string>
00037 #include <sstream>
00038 
00039 #include "Utils_CorbaException.hxx"
00040 #include <SALOMEconfig.h>
00041 
00042 # include "Utils_ORB_INIT.hxx"
00043 # include "Utils_SINGLETON.hxx"
00044 
00045 #include CORBA_SERVER_HEADER(MED)
00046 #include CORBA_SERVER_HEADER(SALOMEDS)
00047 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
00048 
00049 #include "MEDMEM_Support_i.hxx"
00050 #include "MEDMEM_convert.hxx"
00051 #include "MEDMEM_Support.hxx"
00052 #include "MEDMEM_Field.hxx"
00053 
00054 namespace MEDMEM {
00055 class MEDMEM_I_EXPORT FIELD_i: public virtual POA_SALOME_MED::FIELD,
00056                public SALOME::GenericObj_i
00057 {
00058 public :
00059         static map < int, ::MEDMEM::FIELD_ * > fieldMap ;
00060 protected :
00061         static int fieldIndex ;
00062         bool _ownCppPtr;
00063 protected :
00064     // C++ object containing values and Constructor
00065     // are protected because it is not supposed to be instancied
00066 
00067     ::MEDMEM::FIELD_ * const  _fieldTptr;
00068     const int   _corbaIndex;
00069     string  _FieldId;
00070     FIELD_i();
00071     FIELD_i(MEDMEM::FIELD_ * const field, bool ownCppPtr);
00072     FIELD_i(FIELD_i & f);
00073 
00074 public :
00075     // Associated internal methods
00076     ~FIELD_i();
00077 
00078     char *                  getName()        throw (SALOME::SALOME_Exception);
00079     void                    setName(const char* theName)
00080                                              throw (SALOME::SALOME_Exception);
00081 
00082     char *                  getDescription() throw (SALOME::SALOME_Exception);
00083     SALOME_MED::SUPPORT_ptr getSupport()     throw (SALOME::SALOME_Exception);
00084     CORBA::Long             getNumberOfComponents()        
00085                                              throw (SALOME::SALOME_Exception);
00086     char *                  getComponentName(CORBA::Long i)   
00087                                              throw (SALOME::SALOME_Exception);
00088     char *                  getComponentUnit(CORBA::Long i)   
00089                                              throw (SALOME::SALOME_Exception);
00090     char *                  getComponentDescription(CORBA::Long i)   
00091                                              throw (SALOME::SALOME_Exception);
00092     CORBA::Long             getIterationNumber()               
00093                                              throw (SALOME::SALOME_Exception);
00094     CORBA::Long             getOrderNumber() throw (SALOME::SALOME_Exception);
00095     CORBA::Boolean getGaussPresence();
00096     CORBA::Double           getTime()        throw (SALOME::SALOME_Exception);
00097     CORBA::Long             getCorbaIndex()  throw (SALOME::SALOME_Exception);
00098 
00099     SALOME_TYPES::ListOfString * getComponentsNames()  throw (SALOME::SALOME_Exception);
00100     SALOME_TYPES::ListOfString * getComponentsUnits()  throw (SALOME::SALOME_Exception);
00101     SALOME_TYPES::ListOfString * getComponentsDescriptions()  throw (SALOME::SALOME_Exception);
00102 
00103     void addInStudy(SALOMEDS::Study_ptr myStudy,
00104                     SALOME_MED::FIELD_ptr myIor)
00105                     throw (SALOME::SALOME_Exception,
00106                            SALOMEDS::StudyBuilder::LockProtection);
00107 
00108     void addInStudyToComponent(SALOMEDS::SComponent_ptr myComponent,
00109                                SALOME_MED::FIELD_ptr    myIor)
00110                                throw (SALOME::SALOME_Exception,
00111                                       SALOMEDS::StudyBuilder::LockProtection);
00112 
00113     CORBA::Long addDriver (SALOME_MED::medDriverTypes driverType, 
00114                            const char* fileName, const char* fieldName)
00115                                           throw (SALOME::SALOME_Exception);
00116     void        rmDriver  (CORBA::Long i) throw (SALOME::SALOME_Exception);
00117     void        read      (CORBA::Long i) throw (SALOME::SALOME_Exception);
00118     void        write     (CORBA::Long i, const char* driverFieldName)
00119                                           throw (SALOME::SALOME_Exception);
00120     // Cuisine Interne
00121     MEDMEM::FIELD_ * constructConstField() const;
00122 
00123     // Publish MED Component
00124     SALOMEDS::SComponent_ptr PublishMedComponent(SALOMEDS::Study_ptr theStudy);
00125 
00126     // Return a default path to publish this field
00127     std::string getEntryPath ();
00128 
00129  };
00130 }
00131 
00132 //using namespace MEDMEM;
00133 
00134 #endif /* MED_FIELD_I_HXX_ */