Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
CGroupMap< MAPTYPE, SIZETYPE, COLLTYPE > Class Template Reference

This class is useful to gather items together and retrieve the elements gathered. More...

Detailed Description

template<class MAPTYPE, class SIZETYPE, template< class T1, class T2 > class COLLTYPE>
class CGroupMap< MAPTYPE, SIZETYPE, COLLTYPE >

This class is useful to gather items together and retrieve the elements gathered.

Ie. : for gathering confused points: Group1 [#1 #5 #8 #11] Group2 [#7 #9 #10 #15] Group3 [#16 #17 #18 #20] Then, giving any element of a group you can retrieve the other elements
Important: an element can belong to one group only

#include <AssociationMap.h>

Public Member Functions

void Free ()
 
void FreeExtra ()
 
void PreAllocate (unsigned int estimatedGroupNbr, unsigned int estimatedTotalElementNumber)
 
unsigned int AddGroup (unsigned int newGroupCount=1)
 
bool RemoveGroup (unsigned int group)
 
bool MergeGroup (unsigned int dstgroup, unsigned int srcgroup)
 
unsigned int AddElementInGroup (unsigned int group, MAPTYPE element)
 
bool RemoveElementByIndexPos (MAPTYPE element, int indexpos)
 
bool RemoveElement (MAPTYPE element)
 
unsigned int GetGroupCount () const
 
unsigned int GetGroupIndex (MAPTYPE element) const
 
const MAPTYPEGetGroup (unsigned int groupIndex, int &size) const
 
unsigned int GetGroupSize (unsigned int groupIndex) const
 
const CGroupMapoperator= (const CGroupMap &copyFrom)
 

The documentation for this class was generated from the following files: