Version: 6.3.1

src/SMESHGUI/SMESHGUI_HypothesesUtils.h

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  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 namespace SMESH
00061 {
00062   SMESHGUI_EXPORT
00063   void InitAvailableHypotheses();
00064 
00065   SMESHGUI_EXPORT
00066   QStringList GetAvailableHypotheses( const bool, 
00067                                       const int = -1, 
00068                                       const bool = false,
00069                                       const bool = true);
00070   SMESHGUI_EXPORT
00071   QStringList GetHypothesesSets( int maxDim );
00072 
00073   SMESHGUI_EXPORT
00074   HypothesesSet* GetHypothesesSet( const QString& );
00075 
00076   SMESHGUI_EXPORT
00077   HypothesisData* GetHypothesisData( const QString& );
00078 
00079   SMESHGUI_EXPORT
00080   bool IsAvailableHypothesis( const HypothesisData*,
00081                               const QString&,
00082                               bool& );
00083 
00084   SMESHGUI_EXPORT
00085   bool IsCompatibleAlgorithm( const HypothesisData*,
00086                               const HypothesisData* );
00087 
00088   SMESHGUI_EXPORT
00089   SMESHGUI_GenericHypothesisCreator* GetHypothesisCreator( const QString& );
00090 
00091   SMESHGUI_EXPORT
00092   SMESH::SMESH_Hypothesis_ptr CreateHypothesis( const QString&,
00093                                                 const QString&,
00094                                                 const bool = false );
00095 
00096   SMESHGUI_EXPORT
00097   bool AddHypothesisOnMesh( SMESH::SMESH_Mesh_ptr, SMESH::SMESH_Hypothesis_ptr );
00098 
00099   SMESHGUI_EXPORT
00100   bool AddHypothesisOnSubMesh( SMESH::SMESH_subMesh_ptr, SMESH::SMESH_Hypothesis_ptr );
00101 
00102   SMESHGUI_EXPORT
00103   bool RemoveHypothesisOrAlgorithmOnMesh( const Handle(SALOME_InteractiveObject)& );
00104 
00105   SMESHGUI_EXPORT
00106   bool RemoveHypothesisOrAlgorithmOnMesh( _PTR(SObject),
00107                                           SMESH::SMESH_Hypothesis_ptr );
00108 
00109   typedef std::vector<_PTR(SObject)> SObjectList;
00110   SObjectList GetMeshesUsingAlgoOrHypothesis( SMESH::SMESH_Hypothesis_ptr );
00111 
00112   SMESHGUI_EXPORT
00113   QString GetMessageOnAlgoStateErrors( const algo_error_array& );
00114 }
00115 
00116 #endif // SMESHGUI_HYPOTHESESUTILS_H
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS