X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_I%2FMG_ADAPT_i.hxx;h=edc398d0792d39566f02264e02a212117905b41d;hb=5c3b242751087298b8088e318b4a1cfc309768b9;hp=07fc78b8fba8678ee98d6952085cfe6cbeaa875b;hpb=214e994c0c9a259efad57b55e462ca3567d2aa34;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/MG_ADAPT_i.hxx b/src/SMESH_I/MG_ADAPT_i.hxx index 07fc78b8f..edc398d07 100644 --- a/src/SMESH_I/MG_ADAPT_i.hxx +++ b/src/SMESH_I/MG_ADAPT_i.hxx @@ -11,7 +11,9 @@ #include "SALOME_Component_i.hxx" #include "SALOME_NamingService.hxx" #include "Utils_CorbaException.hxx" - +#include +#include +#include #include //~struct MgAdaptHypothesisData; @@ -20,121 +22,141 @@ //~class MgAdapt; namespace SMESH { + class SMESH_I_EXPORT MG_ADAPT_i : public virtual SALOME::GenericObj_i, public virtual POA_SMESH::MG_ADAPT { public: - //~MG_ADAPT_i( CORBA::ORB_ptr orb, ADAPT::ADAPT_Gen_var gen_i ); - //~static SMESH::MG_ADAPT_ptr CreateMG_ADAPT(); - //~MG_ADAPT_i(PortableServer::POA_var poa); - MG_ADAPT_i(); - virtual ~MG_ADAPT_i(); - //~void setData( SMESH::MgAdaptHypothesisData* data); - void setData( SMESH::MgAdaptHypothesisData& data); - - void setMedFileIn(const char* str); - char* getMedFileIn(); - - void setMedFileOut(const char* str); - char* getMedFileOut(); - - void setMeshName(const char* str); - char* getMeshName(); - - void setMeshNameOut(const char* str); - char* getMeshNameOut(); - - void setMeshOutMed(bool mybool); - bool getMeshOutMed(); - - void setPublish(bool mybool); - bool getPublish(); - - void setFieldName(const char* str); - char* getFieldName(); - - void setTimeStep(CORBA::Long t); - CORBA::Long getTimeStep() ; - - void setRankTimeStep(CORBA::Long t, CORBA::Long r ); - CORBA::Long getRank(); - - void setTimeStepRankLast(); - void setNoTimeStep(); - - void setLogFile(const char* str); - char* getLogFile(); - - void setVerbosityLevel(CORBA::Long v); - CORBA::Long getVerbosityLevel(); - - void setRemoveOnSuccess(bool mybool); - bool getRemoveOnSuccess(); - - SMESH::MgAdaptHypothesisData* getData() ; - - void setUseLocalMap(bool mybool); - bool getUseLocalMap(); - - void setUseBackgroundMap(bool mybool); - bool getUseBackgroundMap(); - - void setUseConstantValue(bool mybool); - bool getUseConstantValue(); - - void setConstantValue(double value); - double getConstantValue(); - - void setSizeMapFile(const char* str); - char* getSizeMapFile(); - - void setFromMedFile(bool mybool); - bool isFromMedFile(); - - void setKeepWorkingFiles(bool mybool); - bool getKeepWorkingFiles(); - - //~void setPrCORBA::LongLogInFile(bool); - //~bool getPrCORBA::LongLogInFile(); - - void setWorkingDir(const char* str); - char* getWorkingDir() ; - - void setPrintLogInFile(bool mybool); - bool getPrintLogInFile(); - - bool setAll(); - char* getCommandToRun() ; - //~CORBA::Long compute(::CORBA::String_out errStr); - CORBA::Long compute(); - char* getFileName(); - char* getExeName(); - void copyMgAdaptHypothesisData( const SMESH::MgAdaptHypothesisData& data ) ; - //~void copyMgAdaptHypothesisData( const SMESH::MgAdaptHypothesisData& data ) { - //~copyMgAdaptHypothesisData(&data); - //~} - - //~void checkDirPath(char*& str); - - bool hasOptionDefined( const char* optionName ) ; - void setOptionValue(const char* optionName, - const char* optionValue) throw (std::invalid_argument); - char* getOptionValue(const char* optionName, - bool& isDefault) throw (std::invalid_argument); - str_array* getCustomOptionValuesStrVec() ; - str_array* getOptionValuesStrVec() ; - void copyHypothesisDataFromImpl(const ::MG_ADAPT::MgAdaptHypothesisData* from, SMESH::MgAdaptHypothesisData* to) const; - void copyHypothesisDataToImpl(const SMESH::MgAdaptHypothesisData& from, ::MG_ADAPT::MgAdaptHypothesisData* to) const; - //~TOptionValues getOptionValues() const; - //~const TOptionValues& getCustomOptionValues() const ; - char* getErrMsg(); + //~MG_ADAPT_i( CORBA::ORB_ptr orb, ADAPT::ADAPT_Gen_var gen_i ); + //~static SMESH::MG_ADAPT_ptr CreateMG_ADAPT(); + //~MG_ADAPT_i(PortableServer::POA_var poa); + MG_ADAPT_i(); + virtual ~MG_ADAPT_i(); + //~void setData( SMESH::MgAdaptHypothesisData* data); + void setData( SMESH::MgAdaptHypothesisData& data); + + void setMedFileIn(const char* str); + char* getMedFileIn(); + + void setMedFileOut(const char* str); + char* getMedFileOut(); + + void setMeshName(const char* str); + char* getMeshName(); + + void setMeshNameOut(const char* str); + char* getMeshNameOut(); + + void setMeshOutMed(bool mybool); + bool getMeshOutMed(); + + void setPublish(bool mybool); + bool getPublish(); + + void setSizeMapFieldName(const char* str); + char* getSizeMapFieldName(); + + void setTimeStep(CORBA::Long t); + CORBA::Long getTimeStep() ; + + void setTimeStepRank(CORBA::Long t, CORBA::Long r ); + CORBA::Long getRank(); + + void setTimeStepRankLast(); + void setNoTimeStep(); + + void setLogFile(const char* str); + char* getLogFile(); + + void setVerbosityLevel(CORBA::Long v); + CORBA::Long getVerbosityLevel(); + + void setRemoveOnSuccess(bool mybool); + bool getRemoveOnSuccess(); + + SMESH::MgAdaptHypothesisData* getData() ; + void setSizeMapType(const char* type); + void setUseLocalMap(bool mybool); + bool getUseLocalMap(); + + void setUseBackgroundMap(bool mybool); + bool getUseBackgroundMap(); + + void setUseConstantValue(bool mybool); + bool getUseConstantValue(); + + void setConstantSize(double value); + double getConstantSize(); + + void setSizeMapFile(const char* str); + char* getSizeMapFile(); + + void setFromMedFile(bool mybool); + bool isFromMedFile(); + + void setKeepWorkingFiles(bool mybool); + bool getKeepWorkingFiles(); + + //~void setPrCORBA::LongLogInFile(bool); + //~bool getPrCORBA::LongLogInFile(); + + void setWorkingDir(const char* str); + char* getWorkingDir() ; + + void setPrintLogInFile(bool mybool); + bool getPrintLogInFile(); + + bool setAll(); + char* getCommandToRun() ; + void compute(); + char* getFileName(); + char* getExeName(); + void copyMgAdaptHypothesisData( const SMESH::MgAdaptHypothesisData& data ) ; + //~void copyMgAdaptHypothesisData( const SMESH::MgAdaptHypothesisData& data ) { + //~copyMgAdaptHypothesisData(&data); + //~} + + //~void checkDirPath(char*& str); + + bool hasOptionDefined( const char* optionName ) ; + void setOptionValue(const char* optionName, + const char* optionValue) throw (std::invalid_argument); + char* getOptionValue(const char* optionName, + bool& isDefault) throw (std::invalid_argument); + str_array* getCustomOptionValuesStrVec() ; + str_array* getOptionValuesStrVec() ; + void copyHypothesisDataFromImpl(const ::MG_ADAPT::MgAdaptHypothesisData* from, SMESH::MgAdaptHypothesisData* to) const; + void copyHypothesisDataToImpl(const SMESH::MgAdaptHypothesisData& from, ::MG_ADAPT::MgAdaptHypothesisData* to) const; + //~TOptionValues getOptionValues() const; + //~const TOptionValues& getCustomOptionValues() const ; + char* getErrMsg(); private: ::MG_ADAPT::MgAdapt* myMgAdapt; std::string errStr; //~CORBA::ORB_ptr _orb; //~ADAPT::ADAPT_Gen_var _gen_i; - + }; + +class SMESH_I_EXPORT MG_ADAPT_OBJECT_i: + public virtual SALOME::GenericObj_i, + public virtual POA_SMESH::MG_ADAPT_OBJECT { +public : + MG_ADAPT_OBJECT_i(); + void setMeshIn( SMESH::SMESH_Mesh_ptr theMesh ); + void setMEDFileIn(const char* f); + void setMEDFileOut(const char* f); + void setMEDFileBackground(const char* f); + void AddHypothesis(SMESH::MG_ADAPT_ptr); + CORBA::Long Compute(bool Publish); +private: +std::string medFileIn, medFileOut, medFileBackground; +bool checkMeshFileIn(); +bool publish; +SMESH::SMESH_Mesh_ptr myMesh; +SMESH::MG_ADAPT_ptr hypothesis; +}; + } #endif // MG_ADAPT_I_HXX