Used to mark points on the board. More...
#include <SgMarker.h>
Public Member Functions | |
SgMarker () | |
void | Include (SgPoint p) |
bool | Contains (SgPoint p) const |
bool | NewMark (SgPoint p) |
Mark a point and return true if it was not already marked. | |
void | Clear () |
void | GetPoints (SgPointSet *points) const |
Private Member Functions | |
void | Init () |
SgMarker (const SgMarker &) | |
Not implemented. | |
SgMarker & | operator= (const SgMarker &) |
Not implemented. | |
Private Attributes | |
int | m_thisMark |
Current marker number. | |
SgArray< int, SG_MAXPOINT > | m_mark |
Marked points. | |
bool | m_markerInUse |
See ReserveBoardMarker. | |
Friends | |
class | SgReserveMarker |
Used to mark points on the board.
Like SgPointSet but uses more memory and is faster at marking and clearing all marks.
Definition at line 18 of file SgMarker.h.
SgMarker::SgMarker | ( | ) |
Definition at line 57 of file SgMarker.h.
SgMarker::SgMarker | ( | const SgMarker & | ) | [private] |
Not implemented.
void SgMarker::Clear | ( | ) |
Definition at line 65 of file SgMarker.h.
References Init(), and m_thisMark.
bool SgMarker::Contains | ( | SgPoint | p | ) | const |
Definition at line 71 of file SgMarker.h.
References m_mark, and m_thisMark.
Referenced by GetPoints(), and NewMark().
void SgMarker::GetPoints | ( | SgPointSet * | points | ) | const |
Definition at line 76 of file SgMarker.h.
References SgPointSet::Clear(), Contains(), SgPointSet::Include(), and SG_MAXPOINT.
void SgMarker::Include | ( | SgPoint | p | ) |
Definition at line 84 of file SgMarker.h.
References m_mark, m_thisMark, and SG_ASSERT_BOARDRANGE.
Referenced by NewMark().
void SgMarker::Init | ( | ) | [private] |
Definition at line 90 of file SgMarker.h.
References SgArray< T, SIZE >::Fill(), m_mark, and m_thisMark.
Referenced by Clear().
bool SgMarker::NewMark | ( | SgPoint | p | ) |
Mark a point and return true if it was not already marked.
Definition at line 96 of file SgMarker.h.
References Contains(), and Include().
friend class SgReserveMarker [friend] |
Definition at line 47 of file SgMarker.h.
SgArray<int,SG_MAXPOINT> SgMarker::m_mark [private] |
Marked points.
Definition at line 41 of file SgMarker.h.
Referenced by Contains(), Include(), and Init().
bool SgMarker::m_markerInUse [private] |
See ReserveBoardMarker.
Definition at line 45 of file SgMarker.h.
Referenced by SgReserveMarker::SgReserveMarker(), and SgReserveMarker::~SgReserveMarker().
int SgMarker::m_thisMark [private] |
Current marker number.
Definition at line 38 of file SgMarker.h.
Referenced by Clear(), Contains(), Include(), and Init().