Back to index

salome-smesh  6.5.0
StdMeshers_NumberOfSegments_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 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
00024 //  File   : StdMeshers_NumberOfSegments_i.hxx
00025 //           Moved here from SMESH_NumberOfSegments_i.hxx
00026 //  Author : Paul RASCLE, EDF
00027 //  Module : SMESH
00028 //
00029 #ifndef _SMESH_NUMBEROFSEGMENTS_I_HXX_
00030 #define _SMESH_NUMBEROFSEGMENTS_I_HXX_
00031 
00032 #include "SMESH_StdMeshers_I.hxx"
00033 
00034 #include <SALOMEconfig.h>
00035 #include CORBA_SERVER_HEADER(SMESH_Mesh)
00036 #include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
00037 
00038 #include "SMESH_Hypothesis_i.hxx"
00039 #include "StdMeshers_NumberOfSegments.hxx"
00040 
00041 // ======================================================
00042 // Number of segments hypothesis
00043 // ======================================================
00044 class STDMESHERS_I_EXPORT StdMeshers_NumberOfSegments_i:
00045   public virtual POA_StdMeshers::StdMeshers_NumberOfSegments,
00046   public virtual SMESH_Hypothesis_i
00047 {
00048 public:
00049   // Constructor
00050   StdMeshers_NumberOfSegments_i( PortableServer::POA_ptr thePOA,
00051                             int                     theStudyId,
00052                             ::SMESH_Gen*            theGenImpl );
00053   // Destructor
00054   virtual ~StdMeshers_NumberOfSegments_i();
00055 
00056   // Builds point distribution according to passed function
00057   SMESH::double_array* BuildDistributionExpr( const char*, CORBA::Long, CORBA::Long )
00058     throw ( SALOME::SALOME_Exception );
00059   SMESH::double_array* BuildDistributionTab( const SMESH::double_array&, CORBA::Long, CORBA::Long )
00060     throw ( SALOME::SALOME_Exception );
00061 
00062   // Set number of segments
00063   void SetNumberOfSegments( CORBA::Long theSegmentsNumber )
00064     throw ( SALOME::SALOME_Exception );
00065   // Get number of segments
00066   CORBA::Long GetNumberOfSegments();
00067 
00068   // Set distribution type
00069   void SetDistrType(CORBA::Long typ)
00070     throw ( SALOME::SALOME_Exception );
00071   // Get distribution type
00072   CORBA::Long GetDistrType();
00073 
00074   // Set scalar factor
00075   void SetScaleFactor( CORBA::Double theScaleFactor )
00076     throw ( SALOME::SALOME_Exception );
00077   // Get scalar factor
00078   CORBA::Double GetScaleFactor()
00079     throw ( SALOME::SALOME_Exception );
00080 
00081   // Set table function for distribution DT_TabFunc
00082   void SetTableFunction(const SMESH::double_array& table)
00083     throw ( SALOME::SALOME_Exception );
00084   // Get table function for distribution DT_TabFunc
00085   SMESH::double_array* GetTableFunction()
00086     throw ( SALOME::SALOME_Exception );
00087 
00088   // Set expression function for distribution DT_ExprFunc
00089   void SetExpressionFunction(const char* expr)
00090     throw ( SALOME::SALOME_Exception );
00091   // Get expression function for distribution DT_ExprFunc
00092   char* GetExpressionFunction()
00093     throw ( SALOME::SALOME_Exception );
00094 
00095   // Set the exponent mode on/off
00096   void SetConversionMode( CORBA::Long conv )
00097     throw ( SALOME::SALOME_Exception );
00098   // Returns true if the exponent mode is set
00099   CORBA::Long ConversionMode()
00100     throw ( SALOME::SALOME_Exception );
00101 
00102   // Get implementation
00103   ::StdMeshers_NumberOfSegments* GetImpl();
00104   
00105   // Verify whether hypothesis supports given entity type 
00106   CORBA::Boolean IsDimSupported( SMESH::Dimension type );
00107 
00108   //Set Reversed Edges
00109   void SetReversedEdges( const SMESH::long_array& theIDs);
00110 
00111   //Get Reversed Edges
00112   SMESH::long_array*  GetReversedEdges();
00113 
00114   //Set Object Entry
00115   void SetObjectEntry( const char* entry);
00116 
00117   //Get Object Entry
00118   char* GetObjectEntry();
00119 
00120  protected:
00121   virtual std::string getMethodOfParameter(const int paramIndex, int nbVars) const;
00122 };
00123 
00124 #endif