22 #ifndef __SMESHDS_SubMeshHolder_HXX__
23 #define __SMESHDS_SubMeshHolder_HXX__
37 template <
class SUBMESH>
41 std::map< int, SUBMESH* >
myMap;
57 if ( (
int)
myVec.size() <=
id )
66 typename std::map< int, SUBMESH* >::const_iterator i2sm =
myMap.find(
id );
67 return (
SUBMESH*) ( i2sm ==
myMap.end() ? NULL : i2sm->second );
76 for (
size_t i = 0; i <
myVec.size(); ++i )
84 typename std::map< int, SUBMESH* >::iterator i2sm =
myMap.begin();
85 for ( ; i2sm !=
myMap.end(); ++i2sm )
86 if (
SUBMESH* sm = i2sm->second )
95 return myMap.empty() ? 0 :
myMap.begin()->first;
110 int firstID,
int endID,
int delta )
void reverse(vector< T > &vec)
reverse order of vector elements
Definition: StdMeshers_FaceSide.cxx:941
Abstract class for iterators.
Definition: SMDS_Iterator.hxx:33
A binder of a sub-mesh to its ID which can be negative.
Definition: SMESHDS_TSubMeshHolder.hxx:39
SMDS_Iterator< SUBMESH * > * GetIterator(const bool reverse=false) const
Definition: SMESHDS_TSubMeshHolder.hxx:141
int GetMaxID() const
Definition: SMESHDS_TSubMeshHolder.hxx:97
~SMESHDS_TSubMeshHolder()
Definition: SMESHDS_TSubMeshHolder.hxx:45
void Add(int id, SUBMESH *sm)
Definition: SMESHDS_TSubMeshHolder.hxx:49
std::vector< SUBMESH * > myVec
Definition: SMESHDS_TSubMeshHolder.hxx:40
void DeleteAll()
Definition: SMESHDS_TSubMeshHolder.hxx:74
std::map< int, SUBMESH * > myMap
Definition: SMESHDS_TSubMeshHolder.hxx:41
int GetMinID() const
Definition: SMESHDS_TSubMeshHolder.hxx:93
SUBMESH * Get(int id) const
Definition: SMESHDS_TSubMeshHolder.hxx:62
@ SUBMESH
Definition: SMESH_Type.h:47
Definition: SMESHDS_TSubMeshHolder.hxx:104
void init(const SMESHDS_TSubMeshHolder< SUBMESH > *holder, int firstID, int endID, int delta)
Definition: SMESHDS_TSubMeshHolder.hxx:109
bool more()
Return true if and only if there are other object in this iterator.
Definition: SMESHDS_TSubMeshHolder.hxx:121
SUBMESH * next()
Return the current object and step to the next one.
Definition: SMESHDS_TSubMeshHolder.hxx:126
int myCurID
Definition: SMESHDS_TSubMeshHolder.hxx:107
virtual ~Iterator()
Definition: SMESHDS_TSubMeshHolder.hxx:137
SUBMESH * myNext
Definition: SMESHDS_TSubMeshHolder.hxx:106
const SMESHDS_TSubMeshHolder< SUBMESH > * myHolder
Definition: SMESHDS_TSubMeshHolder.hxx:105
int myEndID
Definition: SMESHDS_TSubMeshHolder.hxx:107
int myIDDelta
Definition: SMESHDS_TSubMeshHolder.hxx:107