Back to index

salome-smesh  6.5.0
SMESH_Controls.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 #ifndef _SMESH_CONTROLS_HXX_
00024 #define _SMESH_CONTROLS_HXX_
00025 
00026 #include "SMDSAbs_ElementType.hxx"
00027 
00028 #include <boost/shared_ptr.hpp>
00029 
00030 #ifdef WNT
00031  #if defined SMESHCONTROLS_EXPORTS || defined SMESHControls_EXPORTS
00032   #define SMESHCONTROLS_EXPORT __declspec( dllexport )
00033  #else
00034   #define SMESHCONTROLS_EXPORT __declspec( dllimport )
00035  #endif
00036 #else
00037  #define SMESHCONTROLS_EXPORT
00038 #endif
00039 
00040 class SMDS_Mesh;
00041 
00042 namespace SMESH{
00043   namespace Controls{
00044 
00045     /*
00046       Class       : Functor
00047       Description : Root of all Functors
00048     */
00049     class SMESHCONTROLS_EXPORT Functor
00050     {
00051     public:
00052       ~Functor(){}
00053       virtual void SetMesh( const SMDS_Mesh* theMesh ) = 0;
00054       virtual SMDSAbs_ElementType GetType() const = 0;
00055     };
00056     typedef boost::shared_ptr<Functor> FunctorPtr;
00057 
00058 
00059     class NumericalFunctor;
00060     typedef boost::shared_ptr<NumericalFunctor> NumericalFunctorPtr;
00061   
00062     /*
00063       Class       : Predicate
00064       Description : Base class for all predicates
00065     */
00066     class SMESHCONTROLS_EXPORT Predicate: public virtual Functor{
00067     public:
00068       virtual bool IsSatisfy( long theElementId ) = 0;
00069       virtual SMDSAbs_ElementType GetType() const = 0;
00070     };
00071     typedef boost::shared_ptr<Predicate> PredicatePtr;
00072 
00073   }
00074 }
00075 
00076 typedef SMESH::Controls::PredicatePtr SMESH_PredicatePtr;
00077 
00078 
00079 #endif