libsgfc++ 2.0.1
A C++ library that uses SGFC to read and write SGF (Smart Game Format) data.
|
The SgfcGoPlayerRank struct is a simple type that can hold the decomposed values of an SgfcPropertyType::BR or SgfcPropertyType::WR property value. More...
#include <SgfcGoPlayerRank.h>
Public Member Functions | |
bool | operator== (const SgfcGoPlayerRank &other) const |
Returns true if the properties Rank, RankType, RatingType and IsValid are the same for the current SgfcGoPlayerRank object and for other. Returns false if any of these properties are different. | |
bool | operator!= (const SgfcGoPlayerRank &other) const |
Returns true if any of the properties Rank, RankType, RatingType or IsValid are different for the current SgfcGoPlayerRank object and for other. Returns false if all properties are the same. | |
Static Public Member Functions | |
static SgfcGoPlayerRank | FromPropertyValue (const SgfcSimpleText &propertyValue) |
Decomposes the content of propertyValue into distinct rank, rank type and rating type values. | |
static SgfcSimpleText | ToPropertyValue (SgfcGoPlayerRank goPlayerRank) |
Composes a property value for SgfcPropertyType::BR or SgfcPropertyType::WR from the rank, rank type and rating type values in goPlayerRank. | |
Public Attributes | |
SgfcNumber | Rank = 30 |
The rank. The default is 30. | |
SgfcGoPlayerRankType | RankType = SgfcGoPlayerRankType::Kyu |
The rank type. The default is SgfcGoPlayerRankType::Kyu. | |
SgfcGoPlayerRatingType | RatingType = SgfcGoPlayerRatingType::Unspecified |
The optional rating type that applies to the rank (e.g. the rank is established). The default is SgfcGoPlayerRatingType::Unspecified. | |
bool | IsValid = false |
True if the SgfcGoPlayerRank object holds a valid Go player rank. False if the SgfcGoPlayerRank object holds an invalid Go player rank. The default is false. | |
The SgfcGoPlayerRank struct is a simple type that can hold the decomposed values of an SgfcPropertyType::BR or SgfcPropertyType::WR property value.
|
static |
Decomposes the content of propertyValue into distinct rank, rank type and rating type values.
See the SGF standard specification for the recommended structure of an SgfcPropertyType::BR or SgfcPropertyType::WR property value.
In addition to what the SGF standard recommends, this also recognizes the notation "1p", "2p", etc. to express professional Dan ranks.
|
static |
Composes a property value for SgfcPropertyType::BR or SgfcPropertyType::WR from the rank, rank type and rating type values in goPlayerRank.
See the SGF standard specification for the recommended structure of an SgfcPropertyType::BR or SgfcPropertyType::WR property value.
In addition to what the SGF standard recommends, this also produces the notation "1p", "2p", etc. to express professional Dan ranks.
bool LibSgfcPlusPlus::SgfcGoPlayerRank::IsValid = false |
True if the SgfcGoPlayerRank object holds a valid Go player rank. False if the SgfcGoPlayerRank object holds an invalid Go player rank. The default is false.
This is mainly used to indicate whether SgfcGoPlayerRank::FromPropertyValue() was successful in decomposing the SgfcPropertyType::BR or SgfcPropertyType::WR property value. A library client that manually creates an SgfcGoPlayerRank object can simply set this to true to assert a valid Go player rank.