From ebc64f68bf3d4005762eebc43354d101670dcaed Mon Sep 17 00:00:00 2001 From: sln Date: Tue, 23 Aug 2005 08:38:00 +0000 Subject: [PATCH] IsDimSupported method added --- src/SMESH_I/SMESH_1D_Algo_i.cxx | 28 ++++++++++++++++++++++++++++ src/SMESH_I/SMESH_1D_Algo_i.hxx | 3 +++ src/SMESH_I/SMESH_2D_Algo_i.cxx | 14 ++++++++++++++ src/SMESH_I/SMESH_2D_Algo_i.hxx | 3 +++ src/SMESH_I/SMESH_3D_Algo_i.cxx | 15 +++++++++++++++ src/SMESH_I/SMESH_3D_Algo_i.hxx | 3 +++ 6 files changed, 66 insertions(+) diff --git a/src/SMESH_I/SMESH_1D_Algo_i.cxx b/src/SMESH_I/SMESH_1D_Algo_i.cxx index a792ec287..06f621dc9 100644 --- a/src/SMESH_I/SMESH_1D_Algo_i.cxx +++ b/src/SMESH_I/SMESH_1D_Algo_i.cxx @@ -59,3 +59,31 @@ SMESH_1D_Algo_i::~SMESH_1D_Algo_i() { MESSAGE( "SMESH_1D_Algo_i::~SMESH_1D_Algo_i" ); } + +//================================================================================ +/*! + * \brief Verify whether algorithm supports given entity type + * \param type - dimension (see SMESH::Dimension enumeration) + * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise + * + * Verify whether algorithm supports given entity type (see SMESH::Dimension enumeration) + */ +//================================================================================ +CORBA::Boolean SMESH_1D_Algo_i::IsDimSupported( SMESH::Dimension type ) +{ + return type == SMESH::DIM_1D; +} + + + + + + + + + + + + + + diff --git a/src/SMESH_I/SMESH_1D_Algo_i.hxx b/src/SMESH_I/SMESH_1D_Algo_i.hxx index 16ab9b441..1112a4019 100644 --- a/src/SMESH_I/SMESH_1D_Algo_i.hxx +++ b/src/SMESH_I/SMESH_1D_Algo_i.hxx @@ -48,6 +48,9 @@ protected: public: // Destructor virtual ~SMESH_1D_Algo_i(); + + // Verify whether algorithm supports given entity type + CORBA::Boolean IsDimSupported( SMESH::Dimension type ); }; #endif diff --git a/src/SMESH_I/SMESH_2D_Algo_i.cxx b/src/SMESH_I/SMESH_2D_Algo_i.cxx index 833be2ac9..00744eea4 100644 --- a/src/SMESH_I/SMESH_2D_Algo_i.cxx +++ b/src/SMESH_I/SMESH_2D_Algo_i.cxx @@ -59,3 +59,17 @@ SMESH_2D_Algo_i::~SMESH_2D_Algo_i() { MESSAGE( "SMESH_2D_Algo_i::~SMESH_2D_Algo_i" ); } + +//================================================================================ +/*! + * \brief Verify whether algorithm supports given entity type + * \param type - dimension (see SMESH::Dimension enumeration) + * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise + * + * Verify whether algorithm supports given entity type (see SMESH::Dimension enumeration) + */ +//================================================================================ +CORBA::Boolean SMESH_2D_Algo_i::IsDimSupported( SMESH::Dimension type ) +{ + return type == SMESH::DIM_2D; +} diff --git a/src/SMESH_I/SMESH_2D_Algo_i.hxx b/src/SMESH_I/SMESH_2D_Algo_i.hxx index cebda6197..58664c9cf 100644 --- a/src/SMESH_I/SMESH_2D_Algo_i.hxx +++ b/src/SMESH_I/SMESH_2D_Algo_i.hxx @@ -48,6 +48,9 @@ protected: public: // Destructor virtual ~SMESH_2D_Algo_i(); + + // Verify whether algorithm supports given entity type + CORBA::Boolean IsDimSupported( SMESH::Dimension type ); }; #endif diff --git a/src/SMESH_I/SMESH_3D_Algo_i.cxx b/src/SMESH_I/SMESH_3D_Algo_i.cxx index 197fc4448..14276fe12 100644 --- a/src/SMESH_I/SMESH_3D_Algo_i.cxx +++ b/src/SMESH_I/SMESH_3D_Algo_i.cxx @@ -59,3 +59,18 @@ SMESH_3D_Algo_i::~SMESH_3D_Algo_i() { MESSAGE( "SMESH_3D_Algo_i::~SMESH_3D_Algo_i" ); } + +//================================================================================ +/*! + * \brief Verify whether algorithm supports given entity type + * \param type - dimension (see SMESH::Dimension enumeration) + * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise + * + * Verify whether algorithm supports given entity type (see SMESH::Dimension enumeration) + */ +//================================================================================ +CORBA::Boolean SMESH_3D_Algo_i::IsDimSupported( SMESH::Dimension type ) +{ + return type == SMESH::DIM_3D; +} + diff --git a/src/SMESH_I/SMESH_3D_Algo_i.hxx b/src/SMESH_I/SMESH_3D_Algo_i.hxx index a45336a39..8589e166a 100644 --- a/src/SMESH_I/SMESH_3D_Algo_i.hxx +++ b/src/SMESH_I/SMESH_3D_Algo_i.hxx @@ -48,6 +48,9 @@ protected: public: // Destructor virtual ~SMESH_3D_Algo_i(); + + // Verify whether algorithm supports given entity type + CORBA::Boolean IsDimSupported( SMESH::Dimension type ); }; #endif -- 2.39.2