1 // SMESH SMESHDS : management of mesh data and SMESH document
3 // Copyright (C) 2004 CEA
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License.
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // See http://www.salome-platform.org or email : webmaster.salome@opencascade.org
23 // File : SMESHDS_Group.hxx
27 #ifndef _SMESHDS_GroupBase_HeaderFile
28 #define _SMESHDS_GroupBase_HeaderFile
31 #include "SMDSAbs_ElementType.hxx"
32 #include "SMDS_MeshElement.hxx"
36 class SMESHDS_GroupBase
40 SMESHDS_GroupBase (const int theID,
41 const SMESHDS_Mesh* theMesh,
42 const SMDSAbs_ElementType theType);
44 int GetID() const { return myID; }
46 const SMESHDS_Mesh* GetMesh() const { return myMesh; }
48 virtual void SetType(SMDSAbs_ElementType theType);
50 SMDSAbs_ElementType GetType() const { return myType; }
52 void SetStoreName (const char* theName) { myStoreName = theName; }
54 const char* GetStoreName () const { return myStoreName.c_str(); }
58 virtual bool IsEmpty();
60 virtual bool Contains (const int theID);
62 virtual SMDS_ElemIteratorPtr GetElements() = 0;
64 int GetID (const int theIndex);
65 // use it for iterations 1..Extent()
67 virtual ~SMESHDS_GroupBase() {}
69 void SetColorGroup (int theColorGroup)
70 { myColorGroup = theColorGroup;}
72 int GetColorGroup() const
73 { return myColorGroup;}
76 const SMDS_MeshElement* findInMesh (const int theID) const;
80 SMESHDS_GroupBase (const SMESHDS_GroupBase& theOther);
81 // prohibited copy constructor
82 SMESHDS_GroupBase& operator = (const SMESHDS_GroupBase& theOther);
83 // prohibited assign operator
86 const SMESHDS_Mesh* myMesh;
87 SMDSAbs_ElementType myType;
88 std::string myStoreName;
92 SMDS_ElemIteratorPtr myIterator;