Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SgNodeUtil.h

Go to the documentation of this file.
00001 //----------------------------------------------------------------------------
00002 /** @file SgNodeUtil.h */
00003 //----------------------------------------------------------------------------
00004 
00005 #ifndef SG_NODEUTIL_H
00006 #define SG_NODEUTIL_H
00007 
00008 #include "SgProp.h"
00009 
00010 class SgNode;
00011 class SgTimeRecord;
00012 
00013 //----------------------------------------------------------------------------
00014 
00015 namespace SgNodeUtil
00016 {
00017     /** Get number of moves since root or last node with setup properties. */
00018     int GetMoveNumber(const SgNode* node);
00019 
00020     /** Remove all occurrences of a property in the subtree of a node. */
00021     void RemovePropInSubtree(SgNode& root, SgPropID id);
00022 
00023     /** Update the current time information corresponding to a node.
00024         Visits all nodes in the path from root to the target node and applies
00025         the following properties to the time record: SG_PROP_LOSE_TIME,
00026         SG_PROP_OT_NU_MOVES, SG_PROP_OT_NU_MOVES, SG_PROP_OT_PERIOD,
00027         SG_PROP_OVERHEAD.
00028         @todo Initial time settings property @c TM is not handled,
00029         SgTimeRecord does presently not support main time (without a finite
00030         number of moves left) */
00031     void UpdateTime(SgTimeRecord& time, const SgNode* node);
00032 }
00033 
00034 //----------------------------------------------------------------------------
00035 
00036 #endif // SG_NODEUTIL_H


Sun Mar 13 2011 Doxygen 1.7.1