Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Classes | Public Member Functions | Private Attributes

SgIncrementalStack Class Reference

Incremental Update Stack for fast undo during search. More...

#include <SgIncrementalStack.h>

List of all members.

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

Detailed Description

Incremental Update Stack for fast undo during search.

Used by GoRegionBoard.

Definition at line 35 of file SgIncrementalStack.h.


Constructor & Destructor Documentation

SgIncrementalStack::SgIncrementalStack (  ) 

Definition at line 38 of file SgIncrementalStack.h.


Member Function Documentation

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 (  ) 
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 (  ) 
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().

Referenced by PushPt(), and PushPts().

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.

References PushInt(), and PushPtr().

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 
)
void SgIncrementalStack::SubtractAndAddPoints ( SgBWSet subtractset,
SgBWSet addset 
)
void SgIncrementalStack::SubtractAndAddPoints ( SgPointSet subtractset,
SgBWSet addset 
)
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().


Member Data Documentation

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().


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


Sun Mar 13 2011 Doxygen 1.7.1