From 2ddb295e4a77c8f5f2e169e170576aaa0f8e34e4 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 10 Aug 2011 10:04:00 +0000 Subject: [PATCH] 0020511: EDF 1101 SMESH : Add CGNS to Mesh Format Supported - virtual int Extent(); + virtual int Extent() const; --- src/SMESHDS/SMESHDS_Group.cxx | 2 +- src/SMESHDS/SMESHDS_Group.hxx | 2 +- src/SMESHDS/SMESHDS_GroupBase.cxx | 2 +- src/SMESHDS/SMESHDS_GroupBase.hxx | 5 +++-- src/SMESHDS/SMESHDS_GroupOnFilter.cxx | 2 +- src/SMESHDS/SMESHDS_GroupOnFilter.hxx | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/SMESHDS/SMESHDS_Group.cxx b/src/SMESHDS/SMESHDS_Group.cxx index a011fd6d0..1a9a75655 100644 --- a/src/SMESHDS/SMESHDS_Group.cxx +++ b/src/SMESHDS/SMESHDS_Group.cxx @@ -49,7 +49,7 @@ SMESHDS_Group::SMESHDS_Group (const int theID, //purpose : //======================================================================= -int SMESHDS_Group::Extent() +int SMESHDS_Group::Extent() const { return myGroup.Extent(); } diff --git a/src/SMESHDS/SMESHDS_Group.hxx b/src/SMESHDS/SMESHDS_Group.hxx index 489d8dcb0..8dea353dd 100644 --- a/src/SMESHDS/SMESHDS_Group.hxx +++ b/src/SMESHDS/SMESHDS_Group.hxx @@ -46,7 +46,7 @@ class SMESHDS_EXPORT SMESHDS_Group : public SMESHDS_GroupBase virtual void SetType(SMDSAbs_ElementType theType); - virtual int Extent(); + virtual int Extent() const; virtual bool IsEmpty(); diff --git a/src/SMESHDS/SMESHDS_GroupBase.cxx b/src/SMESHDS/SMESHDS_GroupBase.cxx index c9d98f823..91330d541 100644 --- a/src/SMESHDS/SMESHDS_GroupBase.cxx +++ b/src/SMESHDS/SMESHDS_GroupBase.cxx @@ -105,7 +105,7 @@ void SMESHDS_GroupBase::resetIterator() //purpose : //======================================================================= -int SMESHDS_GroupBase::Extent() +int SMESHDS_GroupBase::Extent() const { SMDS_ElemIteratorPtr it = GetElements(); int nb = 0; diff --git a/src/SMESHDS/SMESHDS_GroupBase.hxx b/src/SMESHDS/SMESHDS_GroupBase.hxx index 0c0c41b85..cd3378b1d 100644 --- a/src/SMESHDS/SMESHDS_GroupBase.hxx +++ b/src/SMESHDS/SMESHDS_GroupBase.hxx @@ -58,7 +58,7 @@ class SMESHDS_EXPORT SMESHDS_GroupBase const char* GetStoreName () const { return myStoreName.c_str(); } - virtual int Extent(); + virtual int Extent() const; virtual bool IsEmpty(); @@ -97,11 +97,12 @@ class SMESHDS_EXPORT SMESHDS_GroupBase const SMESHDS_Mesh* myMesh; SMDSAbs_ElementType myType; std::string myStoreName; + Quantity_Color myColor; + // for GetID() int myCurIndex; int myCurID; SMDS_ElemIteratorPtr myIterator; - Quantity_Color myColor; }; #endif diff --git a/src/SMESHDS/SMESHDS_GroupOnFilter.cxx b/src/SMESHDS/SMESHDS_GroupOnFilter.cxx index 8a984c275..8870f971f 100644 --- a/src/SMESHDS/SMESHDS_GroupOnFilter.cxx +++ b/src/SMESHDS/SMESHDS_GroupOnFilter.cxx @@ -66,7 +66,7 @@ void SMESHDS_GroupOnFilter::SetPredicate( const SMESH_PredicatePtr& thePredicate */ //================================================================================ -int SMESHDS_GroupOnFilter::Extent() +int SMESHDS_GroupOnFilter::Extent() const { update(); return myElements.size(); diff --git a/src/SMESHDS/SMESHDS_GroupOnFilter.hxx b/src/SMESHDS/SMESHDS_GroupOnFilter.hxx index 805378704..5b820a0cf 100644 --- a/src/SMESHDS/SMESHDS_GroupOnFilter.hxx +++ b/src/SMESHDS/SMESHDS_GroupOnFilter.hxx @@ -46,7 +46,7 @@ class SMESHDS_EXPORT SMESHDS_GroupOnFilter: public SMESHDS_GroupBase SMESH_PredicatePtr GetPredicate() const { return myPredicate; } - virtual int Extent(); + virtual int Extent() const; virtual bool Contains (const int theID); -- 2.39.2