Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SgIncrementalStack Class Reference

#include <SgIncrementalStack.h>

List of all members.


Detailed Description

Incremental Update Stack for fast undo during search.

Used by GoRegionBoard.

Definition at line 37 of file SgIncrementalStack.h.

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< IntOrPtrm_stack
 Stores incremental state changes for execute/undo moves.

Classes

union  IntOrPtr
 Entry for SgIncrementalStack. More...


Constructor & Destructor Documentation

SgIncrementalStack::SgIncrementalStack (  ) 

Definition at line 40 of file SgIncrementalStack.h.


Member Function Documentation

void SgIncrementalStack::AddPoints ( SgBWSet set  ) 

Definition at line 100 of file SgIncrementalStack.cpp.

References SgPointSet::Include(), PopInt(), and PopPoint().

void SgIncrementalStack::AddPoints ( SgPointSet set  ) 

Definition at line 76 of file SgIncrementalStack.cpp.

References SgPointSet::Include(), PopInt(), PopPoint(), and SG_UNUSED().

void SgIncrementalStack::Clear (  ) 

Definition at line 59 of file SgIncrementalStack.cpp.

References m_stack.

bool SgIncrementalStack::IsEmpty (  )  const

Definition at line 44 of file SgIncrementalStack.h.

References m_stack.

SgIncrementalStackEvent SgIncrementalStack::PopEvent (  ) 

Definition at line 70 of file SgIncrementalStack.h.

References PopInt().

int SgIncrementalStack::PopInt (  ) 

Definition at line 82 of file SgIncrementalStack.h.

References m_stack.

Referenced by AddPoints(), PopEvent(), PopPoint(), SubtractAndAddPoints(), and SubtractPoints().

SgPoint SgIncrementalStack::PopPoint (  ) 

relies on SgPoint == int; add to union if that changes

Definition at line 90 of file SgIncrementalStack.h.

References PopInt().

Referenced by AddPoints(), SubtractAndAddPoints(), and SubtractPoints().

void* SgIncrementalStack::PopPtr (  ) 

Definition at line 75 of file SgIncrementalStack.h.

References m_stack.

void SgIncrementalStack::PushInt ( int  i  ) 

Definition at line 57 of file SgIncrementalStack.h.

References m_stack.

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 63 of file SgIncrementalStack.h.

References m_stack.

Referenced by PushPt(), and PushPts().

void SgIncrementalStack::PushPt ( int  type,
SgEmptyBlackWhite  col,
SgPoint  pt 
)

Definition at line 38 of file SgIncrementalStack.cpp.

References PushInt(), and PushPoint().

void SgIncrementalStack::PushPtr ( void *  ptr  ) 

Definition at line 50 of file SgIncrementalStack.h.

References m_stack.

Referenced by PushPtrEvent().

void SgIncrementalStack::PushPtrEvent ( int  type,
void *  ptr 
)

Definition at line 48 of file SgIncrementalStack.cpp.

References PushInt(), and PushPtr().

void SgIncrementalStack::PushPts ( int  type,
SgEmptyBlackWhite  col,
const SgPointSet pts 
)

Definition at line 15 of file SgIncrementalStack.cpp.

References PushInt(), and PushPoint().

void SgIncrementalStack::StartMoveInfo (  ) 

Definition at line 54 of file SgIncrementalStack.cpp.

References PushInt(), and SG_NEXTMOVE.

void SgIncrementalStack::SubtractAndAddPoints ( SgBWSet subtractset,
SgPointSet addset 
)

Definition at line 142 of file SgIncrementalStack.cpp.

References SgPointSet::Exclude(), SgPointSet::Include(), PopInt(), and PopPoint().

void SgIncrementalStack::SubtractAndAddPoints ( SgPointSet subtractset,
SgBWSet addset 
)

Definition at line 127 of file SgIncrementalStack.cpp.

References SgPointSet::Exclude(), SgPointSet::Include(), PopInt(), and PopPoint().

void SgIncrementalStack::SubtractAndAddPoints ( SgBWSet subtractset,
SgBWSet addset 
)

Definition at line 112 of file SgIncrementalStack.cpp.

References SgPointSet::Exclude(), SgPointSet::Include(), PopInt(), and PopPoint().

void SgIncrementalStack::SubtractPoints ( SgBWSet set  ) 

Definition at line 88 of file SgIncrementalStack.cpp.

References SgPointSet::Exclude(), PopInt(), and PopPoint().

void SgIncrementalStack::SubtractPoints ( SgPointSet set  ) 

Definition at line 64 of file SgIncrementalStack.cpp.

References SgPointSet::Exclude(), PopInt(), PopPoint(), and SG_UNUSED().


Member Data Documentation

SgVector<IntOrPtr> SgIncrementalStack::m_stack [private]

Stores incremental state changes for execute/undo moves.

Definition at line 133 of file SgIncrementalStack.h.

Referenced by Clear(), IsEmpty(), PopInt(), PopPtr(), PushInt(), PushPoint(), and PushPtr().


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


17 Jun 2010 Doxygen 1.4.7