Incremental Update Stack for fast undo during search. More...
#include <SgIncrementalStack.h>
Classes | |
| union | IntOrPtr |
| Entry for SgIncrementalStack. More... | |
Public Member Functions | |
| SgIncrementalStack () | |
| void | Clear () |
| bool | IsEmpty () const |
| void | PushPts (int type, SgEmptyBlackWhite col, const SgPointSet &pts) |
| void | PushPt (int type, SgEmptyBlackWhite col, SgPoint pt) |
| void | PushPtr (void *ptr) |
| void | PushPtrEvent (int type, void *ptr) |
| void | PushInt (int i) |
| void | PushPoint (SgPoint p) |
| relies on SgPoint == int; add to union if that changes | |
| void | StartMoveInfo () |
| SgIncrementalStackEvent | PopEvent () |
| void * | PopPtr () |
| int | PopInt () |
| SgPoint | PopPoint () |
| relies on SgPoint == int; add to union if that changes | |
| void | SubtractPoints (SgPointSet *set) |
| void | AddPoints (SgPointSet *set) |
| void | SubtractPoints (SgBWSet *set) |
| void | AddPoints (SgBWSet *set) |
| void | SubtractAndAddPoints (SgBWSet *subtractset, SgBWSet *addset) |
| void | SubtractAndAddPoints (SgPointSet *subtractset, SgBWSet *addset) |
| void | SubtractAndAddPoints (SgBWSet *subtractset, SgPointSet *addset) |
Private Attributes | |
| SgVector< IntOrPtr > | m_stack |
| Stores incremental state changes for execute/undo moves. | |
Incremental Update Stack for fast undo during search.
Used by GoRegionBoard.
Definition at line 35 of file SgIncrementalStack.h.
| SgIncrementalStack::SgIncrementalStack | ( | ) |
Definition at line 38 of file SgIncrementalStack.h.
| void SgIncrementalStack::AddPoints | ( | SgPointSet * | set | ) |
Definition at line 75 of file SgIncrementalStack.cpp.
References PopInt(), PopPoint(), and SG_UNUSED().
| void SgIncrementalStack::AddPoints | ( | SgBWSet * | set | ) |
Definition at line 99 of file SgIncrementalStack.cpp.
References SgPointSet::Include(), PopInt(), and PopPoint().
| void SgIncrementalStack::Clear | ( | ) |
Definition at line 58 of file SgIncrementalStack.cpp.
References SgVector< T >::Clear(), and m_stack.
| bool SgIncrementalStack::IsEmpty | ( | ) | const |
Definition at line 42 of file SgIncrementalStack.h.
References SgVector< T >::IsEmpty(), and m_stack.
| SgIncrementalStackEvent SgIncrementalStack::PopEvent | ( | ) |
Definition at line 68 of file SgIncrementalStack.h.
References PopInt().
| int SgIncrementalStack::PopInt | ( | ) |
Definition at line 80 of file SgIncrementalStack.h.
References SgVector< T >::Back(), SgIncrementalStack::IntOrPtr::m_int, m_stack, and SgVector< T >::PopBack().
Referenced by AddPoints(), PopEvent(), PopPoint(), SubtractAndAddPoints(), and SubtractPoints().
| SgPoint SgIncrementalStack::PopPoint | ( | ) |
relies on SgPoint == int; add to union if that changes
Definition at line 88 of file SgIncrementalStack.h.
References PopInt().
Referenced by AddPoints(), SubtractAndAddPoints(), and SubtractPoints().
| void* SgIncrementalStack::PopPtr | ( | ) |
Definition at line 73 of file SgIncrementalStack.h.
References SgVector< T >::Back(), SgIncrementalStack::IntOrPtr::m_ptr, m_stack, and SgVector< T >::PopBack().
| void SgIncrementalStack::PushInt | ( | int | i | ) |
Definition at line 55 of file SgIncrementalStack.h.
References m_stack, and SgVector< T >::PushBack().
Referenced by PushPt(), PushPtrEvent(), PushPts(), and StartMoveInfo().
| void SgIncrementalStack::PushPoint | ( | SgPoint | p | ) |
relies on SgPoint == int; add to union if that changes
Definition at line 61 of file SgIncrementalStack.h.
References m_stack, and SgVector< T >::PushBack().
| void SgIncrementalStack::PushPt | ( | int | type, | |
| SgEmptyBlackWhite | col, | |||
| SgPoint | pt | |||
| ) |
Definition at line 37 of file SgIncrementalStack.cpp.
References PushInt(), and PushPoint().
| void SgIncrementalStack::PushPtr | ( | void * | ptr | ) |
Definition at line 48 of file SgIncrementalStack.h.
References m_stack, and SgVector< T >::PushBack().
Referenced by PushPtrEvent().
| void SgIncrementalStack::PushPtrEvent | ( | int | type, | |
| void * | ptr | |||
| ) |
Definition at line 47 of file SgIncrementalStack.cpp.
| void SgIncrementalStack::PushPts | ( | int | type, | |
| SgEmptyBlackWhite | col, | |||
| const SgPointSet & | pts | |||
| ) |
Definition at line 14 of file SgIncrementalStack.cpp.
References PushInt(), and PushPoint().
| void SgIncrementalStack::StartMoveInfo | ( | ) |
Definition at line 53 of file SgIncrementalStack.cpp.
References PushInt(), and SG_NEXTMOVE.
| void SgIncrementalStack::SubtractAndAddPoints | ( | SgBWSet * | subtractset, | |
| SgPointSet * | addset | |||
| ) |
Definition at line 141 of file SgIncrementalStack.cpp.
References SgPointSet::Exclude(), SgPointSet::Include(), PopInt(), and PopPoint().
Definition at line 111 of file SgIncrementalStack.cpp.
References SgPointSet::Exclude(), SgPointSet::Include(), PopInt(), and PopPoint().
| void SgIncrementalStack::SubtractAndAddPoints | ( | SgPointSet * | subtractset, | |
| SgBWSet * | addset | |||
| ) |
Definition at line 126 of file SgIncrementalStack.cpp.
References SgPointSet::Exclude(), SgPointSet::Include(), PopInt(), and PopPoint().
| void SgIncrementalStack::SubtractPoints | ( | SgBWSet * | set | ) |
Definition at line 87 of file SgIncrementalStack.cpp.
References SgPointSet::Exclude(), PopInt(), and PopPoint().
| void SgIncrementalStack::SubtractPoints | ( | SgPointSet * | set | ) |
Definition at line 63 of file SgIncrementalStack.cpp.
References PopInt(), PopPoint(), and SG_UNUSED().
SgVector<IntOrPtr> SgIncrementalStack::m_stack [private] |
Stores incremental state changes for execute/undo moves.
Definition at line 131 of file SgIncrementalStack.h.
Referenced by Clear(), IsEmpty(), PopInt(), PopPtr(), PushInt(), PushPoint(), and PushPtr().