Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Functions

SgPropUtil Namespace Reference

Functions

std::string EscapeSpecialCharacters (const std::string &s, bool escapeColon)
SgPropPointFmt GetPointFmt (int gameNumber)
 Return point format for a given game.
std::string PointToSgfString (SgMove p, int boardSize, SgPropPointFmt fmt, int fileFormat=4)
 Convert point to SGF point string.
SgPoint SgfStringToPoint (const std::string &s, int boardSize, SgPropPointFmt fmt)
 Convert SGF point string to point.

Function Documentation

string SgPropUtil::EscapeSpecialCharacters ( const std::string &  s,
bool  escapeColon 
)
SgPropPointFmt SgPropUtil::GetPointFmt ( int  gameNumber  ) 

Return point format for a given game.

Returns SG_PROPPOINTFMT_GO for unknown game numbers.

Definition at line 30 of file SgProp.cpp.

Referenced by SgGameReader::HandleProperties(), and SgGameWriter::WriteGame().

string SgPropUtil::PointToSgfString ( SgMove  p,
int  boardSize,
SgPropPointFmt  fmt,
int  fileFormat = 4 
)
SgMove SgPropUtil::SgfStringToPoint ( const std::string &  s,
int  boardSize,
SgPropPointFmt  fmt 
)

Convert SGF point string to point.

Returns:
The point or SG_PASS (only allowed if point format is SG_PROPPOINTFMT_GO) or SG_NULLMOVE, if s is not a valid point.

Definition at line 98 of file SgProp.cpp.

References SgUtil::InRange(), SgPointUtil::Pt(), SG_ASSERT, SG_MAX_SIZE, SG_MIN_SIZE, SG_NULLMOVE, SG_PASS, SG_PROPPOINTFMT_GO, and SG_PROPPOINTFMT_HEX.

Referenced by SgPropMove::FromString(), SgPropTextList::FromString(), and SgPropPointList::FromString().


Sun Mar 13 2011 Doxygen 1.7.1