libsgfc++ 2.0.1
A C++ library that uses SGFC to read and write SGF (Smart Game Format) data.
|
The SgfcConstants class is a container class for constants. More...
#include <SgfcConstants.h>
Static Public Attributes | |
libsgfc++ constants | |
static const std::string | LibraryName = "libsgfc++" |
The library name. | |
static const std::string | LibraryVersion = "2.0.1" |
The library version. | |
static const std::string | SgfcVersion = "2.0" |
The SGFC version used by the library. | |
ISgfcMessage related constants | |
static const unsigned long | InvalidLineNumber = 0 |
Indicates an invalid line number. This is used for messages that do not refer to a specific line number in a piece of SGF content. | |
static const unsigned long | InvalidColumnNumber = 0 |
Indicates an invalid column number. This is used for messages that do not refer to a specific column number in a piece of SGF content. | |
static const int | LibraryErrorNumberNoError = 0 |
A library error number (= errno value) indicating "no error". This is defined to be the value 0 (zero). | |
String constants defined by the SGF standard | |
static const std::string | NoneValueString = SgfcPrivateConstants::EmptyString |
The raw string value that corresponds to the None value as defined by the SGF standard. | |
static const std::string | DoubleNormalString = "1" |
The raw string value that corresponds to the Double value SgfcDouble::Normal, as defined by the SGF standard. | |
static const std::string | DoubleEmphasizedString = "2" |
The raw string value that corresponds to the Double value SgfcDouble::Emphasized, as defined by the SGF standard. | |
static const std::string | ColorBlackString = "B" |
The raw string value that corresponds to the Color value SgfcColor::Black, as defined by the SGF standard. | |
static const std::string | ColorWhiteString = "W" |
The raw string value that corresponds to the Color value SgfcColor::White, as defined by the SGF standard. | |
static const std::string | GoMovePassString = SgfcPrivateConstants::EmptyString |
The raw string value that corresponds to a pass Move value for SgfcGameType::Go, as defined by the SGF standard. | |
String constants defined by the SGF standard for SgfcPropertyType::RU | |
static const SgfcSimpleText | GoRulesetAGA = "AGA" |
The SgfcPropertyType::RU property value defined by the SGF standard to denote SgfcGoRulesetType::AGA. | |
static const SgfcSimpleText | GoRulesetIng = "GOE" |
The SgfcPropertyType::RU property value defined by the SGF standard to denote SgfcGoRulesetType::Ing. | |
static const SgfcSimpleText | GoRulesetJapanese = "Japanese" |
The SgfcPropertyType::RU property value defined by the SGF standard to denote SgfcGoRulesetType::Japanese. | |
static const SgfcSimpleText | GoRulesetNZ = "NZ" |
The SgfcPropertyType::RU property value defined by the SGF standard to denote SgfcGoRulesetType::NZ. | |
Mappings between libsgfc++ values and SGF standard values, and vice versa | |
static const std::map< std::string, SgfcPropertyType > | PropertyNameToPropertyTypeMap |
Maps property names as defined by the SGF standard to values from the enumeration SgfcPropertyType. | |
static const std::map< SgfcPropertyType, std::string > | PropertyTypeToPropertyNameMap |
Maps values from the enumeration SgfcPropertyType to property names as defined by the SGF standard. SgfcPropertyType::Unknown does not appear in the map. | |
static const std::map< SgfcPropertyType, SgfcPropertyCategory > | PropertyTypeToPropertyCategoryMap |
Maps values from the enumeration SgfcPropertyType to values from the enumeration SgfcPropertyCategory. | |
static const std::map< SgfcPropertyType, SgfcPropertyTraits > | PropertyTypeToPropertyTraitsMap |
Maps values from the enumeration SgfcPropertyType to SgfcPropertyTraits values. | |
static const std::map< SgfcNumber, SgfcGameType > | GameTypeAsNumberToGameTypeMap |
Maps game type Number values as defined by the SGF standard to values from the enumeration SgfcGameType. | |
static const std::map< SgfcGameType, SgfcNumber > | GameTypeToGameTypeAsNumberMap |
Maps values from the enumeration SgfcGameType to Number values as defined by the SGF standard. SgfcGameType::Unknown does not appear in the map. | |
Other constants for values defined by the SGF standard | |
static const SgfcGameType | DefaultGameType = SgfcGameType::Go |
The default game type if the SgfcPropertyType::GM property does not exist. | |
static const SgfcNumber | GameTypeNaN = std::numeric_limits<SgfcNumber>::min() |
An SgfcNumber value that denotes a game type that is "not a number". | |
static const SgfcBoardSize | BoardSizeMinimum = { 1, 1 } |
The minimum board size that is required for SgfcPropertyType::SZ. | |
static const SgfcBoardSize | BoardSizeMaximumGo = { 52, 52 } |
The maximum board size that is allowed for SgfcPropertyType::SZ if the game type is SgfcGameType::Go. | |
static const SgfcBoardSize | BoardSizeDefaultGo = { 19, 19 } |
The default board size if the game type is SgfcGameType::Go. | |
static const SgfcBoardSize | BoardSizeDefaultChess = { 8, 8 } |
The default board size if the game type is SgfcGameType::Chess. | |
Other constants | |
static const SgfcBoardSize | BoardSizeNone = { -1, -1 } |
A board size value denoting "no board size". | |
static const SgfcBoardSize | BoardSizeInvalid = { -2, -2 } |
A board size value denoting "invalid board size". | |
static const SgfcNumber | HandicapStonesNone = 0 |
A Number value that denotes "no handicap stones" value for SgfcPropertyType::HA (a Go specific property). | |
static const SgfcReal | KomiNone = 0.0 |
A Real value that denotes "no komi" value for SgfcPropertyType::KM (a Go specific property). | |
static const SgfcNodeTraits | NodeTraitsNone = 0 |
An SgfcNodeTraits value that denotes a node that has no traits. | |
static const SgfcNodeTraits | NodeTraitsAll = std::numeric_limits<SgfcNodeTraits>::max() |
An SgfcNodeTraits value that denotes a node that has all traits. It makes no sense for a node to actually have all traits, this is merely a convenience constant for working with flags. | |
static const SgfcPropertyTraits | PropertyTraitsNone = 0 |
An SgfcPropertyTraits value that denotes a property that has no traits. | |
static const SgfcPropertyTraits | PropertyTraitsAll = std::numeric_limits<SgfcPropertyTraits>::max() |
An SgfcPropertyTraits value that denotes a property that has all traits. It makes no sense for a property to actually have all traits, this is merely a convenience constant for working with flags. | |
The SgfcConstants class is a container class for constants.
|
static |
The default board size if the game type is SgfcGameType::Chess.
The SGF standard defines this to be 8x8.
|
static |
The default board size if the game type is SgfcGameType::Go.
The SGF standard defines this to be 19x19.
|
static |
A board size value denoting "invalid board size".
A board size is invalid if it violates the constraints defined by the SGF standard:
ISgfcGame::GetBoardSize() returns this value, for instance, if the SgfcPropertyType::SZ property is present in a game's root node but has an invalid size.
|
static |
The maximum board size that is allowed for SgfcPropertyType::SZ if the game type is SgfcGameType::Go.
The SGF standard defines this to be 52x52.
|
static |
The minimum board size that is required for SgfcPropertyType::SZ.
The SGF standard defines this to be 1x1.
|
static |
A board size value denoting "no board size".
ISgfcGame::GetBoardSize() returns this value, for instance, if the SgfcPropertyType::SZ property is not present in a game's root node, or if the game has no root node, and the game type is not one of the few game types with a known default board size.
|
static |
The raw string value that corresponds to the Color value SgfcColor::Black, as defined by the SGF standard.
The SGF standard defines this to be the string "B".
|
static |
The raw string value that corresponds to the Color value SgfcColor::White, as defined by the SGF standard.
The SGF standard defines this to be the string "W".
|
static |
The default game type if the SgfcPropertyType::GM property does not exist.
The SGF standard defines this to be SgfcGameType::Go.
|
static |
The raw string value that corresponds to the Double value SgfcDouble::Emphasized, as defined by the SGF standard.
The SGF standard defines this to be the string "2".
|
static |
The raw string value that corresponds to the Double value SgfcDouble::Normal, as defined by the SGF standard.
The SGF standard defines this to be the string "1".
|
static |
An SgfcNumber value that denotes a game type that is "not a number".
ISgfcGame and ISgfcGameTypeProperty both provide a GetGameTypeAsNumber() method to obtain the raw SgfcNumber value of an SgfcPropertyType::GM property. If the raw SgfcNumber value cannot be determined because it has multiple property values, or a single property value that cannot be converted to an SgfcNumber value, then the GetGameTypeAsNumber() methods return this constant.
The constant has an underlying numeric value, but one that is extremely unlikely to occur in real SGF content. Do not rely on the actual constant's numeric value.
|
static |
The raw string value that corresponds to a pass Move value for SgfcGameType::Go, as defined by the SGF standard.
The SGF standard defines this to be an empty string.
|
static |
An SgfcNodeTraits value that denotes a node that has all traits. It makes no sense for a node to actually have all traits, this is merely a convenience constant for working with flags.
This constant is set up to have all bits set in the underlying primitive numeric type, so you should not rely on any particular numeric value.
|
static |
The raw string value that corresponds to the None value as defined by the SGF standard.
The SGF standard defines this to be an empty string.
|
static |
An SgfcPropertyTraits value that denotes a property that has all traits. It makes no sense for a property to actually have all traits, this is merely a convenience constant for working with flags.
This constant is set up to have all bits set in the underlying primitive numeric type, so you should not rely on any particular numeric value.