Back to index

salome-smesh  6.5.0
SMESHGUI_HypothesesUtils.h
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 SMESHGUI : GUI for SMESH component
00024 // File   : SMESHGUI_HypothesesUtils.h
00025 // Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
00026 //
00027 #ifndef SMESHGUI_HYPOTHESESUTILS_H
00028 #define SMESHGUI_HYPOTHESESUTILS_H
00029 
00030 // SMESH includes
00031 #include "SMESH_SMESHGUI.hxx"
00032 
00033 // Qt includes
00034 #include <QString>
00035 #include <QStringList>
00036 
00037 // SALOME GUI includes
00038 #include <SALOME_InteractiveObject.hxx>
00039 
00040 // SALOME KERNEL includes
00041 #include <SALOMEDSClient_definitions.hxx>
00042 
00043 // IDL includes
00044 #include <SALOMEconfig.h>
00045 #include CORBA_SERVER_HEADER(SMESH_Mesh)
00046 #include CORBA_SERVER_HEADER(SMESH_Hypothesis)
00047 
00048 // STL includes
00049 #include <vector>
00050 
00051 // boost includes
00052 #include <boost/shared_ptr.hpp>
00053 
00054 class HypothesisData;
00055 class HypothesesSet;
00056 class SMESHGUI_GenericHypothesisCreator;
00057 class SALOMEDSClient_SObject;
00058 class algo_error_array;
00059 
00060 
00061 #define PLUGIN_NAME "PLUGIN_NAME"
00062 
00063 namespace SMESH
00064 {
00065   SMESHGUI_EXPORT
00066   void InitAvailableHypotheses();
00067 
00068   SMESHGUI_EXPORT
00069   QStringList GetAvailableHypotheses( const bool, 
00070                                       const int = -1, 
00071                                       const bool = false,
00072                                       const bool = true);
00073   SMESHGUI_EXPORT
00074   QStringList GetHypothesesSets( int maxDim );
00075 
00076   SMESHGUI_EXPORT
00077   HypothesesSet* GetHypothesesSet( const QString& );
00078 
00079   SMESHGUI_EXPORT
00080   HypothesisData* GetHypothesisData( const QString& );
00081 
00082   SMESHGUI_EXPORT
00083   bool IsAvailableHypothesis( const HypothesisData*,
00084                               const QString&,
00085                               bool& );
00086 
00087   SMESHGUI_EXPORT
00088   bool IsCompatibleAlgorithm( const HypothesisData*,
00089                               const HypothesisData* );
00090 
00091   SMESHGUI_EXPORT
00092   SMESHGUI_GenericHypothesisCreator* GetHypothesisCreator( const QString& );
00093 
00094   SMESHGUI_EXPORT
00095   SMESH::SMESH_Hypothesis_ptr CreateHypothesis( const QString&,
00096                                                 const QString&,
00097                                                 const bool = false );
00098 
00099   SMESHGUI_EXPORT
00100   bool AddHypothesisOnMesh( SMESH::SMESH_Mesh_ptr, SMESH::SMESH_Hypothesis_ptr );
00101 
00102   SMESHGUI_EXPORT
00103   bool AddHypothesisOnSubMesh( SMESH::SMESH_subMesh_ptr, SMESH::SMESH_Hypothesis_ptr );
00104 
00105   SMESHGUI_EXPORT
00106   bool RemoveHypothesisOrAlgorithmOnMesh( const Handle(SALOME_InteractiveObject)& );
00107 
00108   SMESHGUI_EXPORT
00109   bool RemoveHypothesisOrAlgorithmOnMesh( _PTR(SObject),
00110                                           SMESH::SMESH_Hypothesis_ptr );
00111 
00112   typedef std::vector<_PTR(SObject)> SObjectList;
00113   SObjectList GetMeshesUsingAlgoOrHypothesis( SMESH::SMESH_Hypothesis_ptr );
00114 
00115   SMESHGUI_EXPORT
00116   QString GetMessageOnAlgoStateErrors( const algo_error_array& );
00117 }
00118 
00119 #endif // SMESHGUI_HYPOTHESESUTILS_H