libsgfc++ 2.0.1
A C++ library that uses SGFC to read and write SGF (Smart Game Format) data.
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations
Public API

The Public API module contains types that belong to the public API of the library. More...

Classes

class  LibSgfcPlusPlus::ISgfcArgument
 The ISgfcArgument interface represents a single argument to be passed on to SGFC when it reads or writes SGF content. Depending on the argument type, the argument also has either an integer type or an SgfcPropertyType parameter. More...
 
class  LibSgfcPlusPlus::ISgfcArguments
 The ISgfcArguments interface represents a collection of arguments to be passed on to SGFC when it reads or writes SGF content. More...
 
class  LibSgfcPlusPlus::ISgfcBoardSizeProperty
 The ISgfcBoardSizeProperty interface is a specialization of ISgfcProperty for SgfcPropertyType::SZ. It simplifies access to the property value and provides the value in the form of an SgfcBoardSize object. More...
 
class  LibSgfcPlusPlus::ISgfcColorPropertyValue
 The ISgfcColorPropertyValue interface provides access to one of the values of a property of an SGF node. The value type is SgfcPropertyValueType::Color. More...
 
class  LibSgfcPlusPlus::ISgfcCommandLine
 The ISgfcCommandLine interface is used to operate the SGFC backend in command line mode. Use SgfcPlusPlusFactory to construct new ISgfcCommandLine objects. More...
 
class  LibSgfcPlusPlus::ISgfcComposedPropertyValue
 The ISgfcComposedPropertyValue interface provides access to one of the values of a property of an SGF node. The value is a composite of two ISgfcSinglePropertyValue objects. More...
 
class  LibSgfcPlusPlus::ISgfcDocument
 The ISgfcDocument interface provides access to a collection of SGF games. When you read an SGF file, the SGF data in that file becomes an ISgfcDocument. More...
 
class  LibSgfcPlusPlus::ISgfcDocumentReader
 The ISgfcDocumentReader interface provides functions to generate ISgfcDocument objects by reading SGF data from the filesystem or from in-memory data. ISgfcDocumentReader operates the SGFC backend to achieve its task. Use SgfcPlusPlusFactory to construct new ISgfcDocumentReader objects. More...
 
class  LibSgfcPlusPlus::ISgfcDocumentReadResult
 The ISgfcDocumentReadResult interface provides access to the result of a read operation performed by ISgfcDocumentReader. More...
 
class  LibSgfcPlusPlus::ISgfcDocumentWriter
 The ISgfcDocumentWriter interface provides functions to generate SGF data from ISgfcDocument objects and to either write that data to the filesystem or make it available as an in-memory string. ISgfcDocumentWriter operates the SGFC backend to achieve its task. Use SgfcPlusPlusFactory to construct new ISgfcDocumentWriter objects. More...
 
class  LibSgfcPlusPlus::ISgfcDocumentWriteResult
 The ISgfcDocumentWriteResult interface provides access to the result of a write operation performed by ISgfcDocumentWriter. More...
 
class  LibSgfcPlusPlus::ISgfcDoublePropertyValue
 The ISgfcDoublePropertyValue interface provides access to one of the values of a property of an SGF node. The value type is SgfcPropertyValueType::Double. More...
 
class  LibSgfcPlusPlus::ISgfcGame
 The ISgfcGame interface provides access to the data of one SGF game tree, in the form of a tree of ISgfcNode objects. More...
 
class  LibSgfcPlusPlus::ISgfcGameInfo
 The ISgfcGameInfo interface ia a collection of meta data that describes one SGF game. For instance, the meta data includes information such as the name of the game, when and where it was played, by whom, etc. More...
 
class  LibSgfcPlusPlus::ISgfcGameTypeProperty
 The ISgfcGameTypeProperty interface is a specialization of ISgfcProperty for SgfcPropertyType::GM. It simplifies access to the property value and provides the value in the form of an SgfcGameType value. More...
 
class  LibSgfcPlusPlus::ISgfcGoGameInfo
 The ISgfcGoGameInfo interface is a specialization of ISgfcGameInfo that contains additional game information that is specific for the game of Go (e.g. komi). More...
 
class  LibSgfcPlusPlus::ISgfcGoMove
 The ISgfcGoMove interface represents a move in a Go game. More...
 
class  LibSgfcPlusPlus::ISgfcGoMovePropertyValue
 The ISgfcGoMovePropertyValue interface makes the property value data of a property of type SgfcPropertyValueType::Move available as an ISgfcGoMove object. More...
 
class  LibSgfcPlusPlus::ISgfcGoPoint
 The ISgfcGoPoint interface represents a point on a Go board. More...
 
class  LibSgfcPlusPlus::ISgfcGoPointPropertyValue
 The ISgfcGoPointPropertyValue interface makes the property value data of a property of type SgfcPropertyValueType::Point available as an ISgfcGoPoint object. More...
 
class  LibSgfcPlusPlus::ISgfcGoStone
 The ISgfcGoStone interface represents a Go stone. More...
 
class  LibSgfcPlusPlus::ISgfcGoStonePropertyValue
 The ISgfcGoStonePropertyValue interface makes the property value data of a property of type SgfcPropertyValueType::Stone available as an ISgfcGoStone object. More...
 
class  LibSgfcPlusPlus::ISgfcMessage
 The ISgfcMessage interface represents a message that is generated when SGF data is loaded and parsed, or when SGF data is saved. Most messages are generated by SGFC, but there are a few error cases where libsgfc++ also generates messages. ISgfcMessage objects are immutable. More...
 
class  LibSgfcPlusPlus::ISgfcMovePropertyValue
 The ISgfcMovePropertyValue interface provides access to one of the values of a property of an SGF node. The value type is SgfcPropertyValueType::Move. More...
 
class  LibSgfcPlusPlus::ISgfcNode
 The ISgfcNode interface provides access to the data of a single SGF node in a tree of SGF nodes. ISgfcNode also provides methods to navigate the game tree. ISgfcNode provides no methods to manipulate the game tree - use ISgfcTreeBuilder for that purpose. More...
 
class  LibSgfcPlusPlus::ISgfcNumberPropertyValue
 The ISgfcNumberPropertyValue interface provides access to one of the values of a property of an SGF node. The value type is SgfcPropertyValueType::Number. More...
 
class  LibSgfcPlusPlus::ISgfcPointPropertyValue
 The ISgfcPointPropertyValue interface provides access to one of the values of a property of an SGF node. The value type is SgfcPropertyValueType::Point. More...
 
class  LibSgfcPlusPlus::ISgfcProperty
 The ISgfcProperty interface provides access to the data of a single property of an SGF node. One property has 0-n values. More...
 
class  LibSgfcPlusPlus::ISgfcPropertyFactory
 The ISgfcPropertyFactory interface provides factory methods for creating ISgfcProperty objects, and objects of every known sub-type of ISgfcProperty. More...
 
class  LibSgfcPlusPlus::ISgfcPropertyValue
 The ISgfcPropertyValue interface provides access to one of the values of a property of an SGF node. More...
 
class  LibSgfcPlusPlus::ISgfcPropertyValueFactory
 The ISgfcPropertyValueFactory interface provides factory methods for creating ISgfcPropertyValue objects, and objects of every known sub-type of ISgfcPropertyValue. More...
 
class  LibSgfcPlusPlus::ISgfcRealPropertyValue
 The ISgfcRealPropertyValue interface provides access to one of the values of a property of an SGF node. The value type is SgfcPropertyValueType::Real. More...
 
class  LibSgfcPlusPlus::ISgfcSimpleTextPropertyValue
 The ISgfcSimpleTextPropertyValue interface provides access to one of the values of a property of an SGF node. The value type is SgfcPropertyValueType::SimpleText. More...
 
class  LibSgfcPlusPlus::ISgfcSinglePropertyValue
 The ISgfcSinglePropertyValue interface provides access to one of the values of a property of an SGF node. The value is a single value of a basic value type. Some properties allow composed values - see ISgfcComposedPropertyValue for details. More...
 
class  LibSgfcPlusPlus::ISgfcStonePropertyValue
 The ISgfcStonePropertyValue interface provides access to one of the values of a property of an SGF node. The value type is SgfcPropertyValueType::Stone. More...
 
class  LibSgfcPlusPlus::ISgfcTextPropertyValue
 The ISgfcTextPropertyValue interface provides access to one of the values of a property of an SGF node. The value type is SgfcPropertyValueType::Text. More...
 
class  LibSgfcPlusPlus::ISgfcTreeBuilder
 The ISgfcTreeBuilder interface provides methods to manipulate the nodes of a game tree. More...
 
struct  LibSgfcPlusPlus::SgfcBoardSize
 The SgfcBoardSize struct is a simple type that can hold the value of SgfcPropertyType::SZ. The constant SgfcConstants::BoardSizeNone is used to indicate that SgfcPropertyType::SZ does not exist on a game tree's root node. More...
 
class  LibSgfcPlusPlus::SgfcConstants
 The SgfcConstants class is a container class for constants. More...
 
struct  LibSgfcPlusPlus::SgfcDate
 The SgfcDate struct is a simple type that can hold one of the 1-n decomposed date values of an SgfcPropertyType::DT property value. More...
 
struct  LibSgfcPlusPlus::SgfcGameResult
 The SgfcGameResult struct is a simple type that can hold the decomposed values of an SgfcPropertyType::RE property value. More...
 
struct  LibSgfcPlusPlus::SgfcGoPlayerRank
 The SgfcGoPlayerRank struct is a simple type that can hold the decomposed values of an SgfcPropertyType::BR or SgfcPropertyType::WR property value. More...
 
struct  LibSgfcPlusPlus::SgfcGoRuleset
 The SgfcGoRuleset struct is a simple type that can hold the decomposed values of an SgfcPropertyType::RU property value. More...
 
class  LibSgfcPlusPlus::SgfcPlusPlusFactory
 The SgfcPlusPlusFactory class is a class that contains only static functions. The functions are used to construct various library objects. More...
 
struct  LibSgfcPlusPlus::SgfcRoundInformation
 The SgfcRoundInformation struct is a simple type that can hold the decomposed values of an SgfcPropertyType::RO property value. More...
 

Typedefs

typedef unsigned long long LibSgfcPlusPlus::SgfcNodeTraits
 An SgfcNodeTraits value describes the traits of an ISgfcNode object. The value is a combination of individual flags defined in the SgfcNodeTrait enumeration.
 
typedef unsigned long long LibSgfcPlusPlus::SgfcPropertyTraits
 An SgfcPropertyTraits value describes the traits of an ISgfcProperty object. The value is a combination of individual flags defined in the SgfcPropertyTrait enumeration.
 
typedef long LibSgfcPlusPlus::SgfcNumber
 The SgfcNumber type represents the Number value type defined by the SGF standard. Values are signed integer numbers.
 
typedef double LibSgfcPlusPlus::SgfcReal
 The SgfcReal type represents the Real value type defined by the SGF standard. Values are signed floating point numbers.
 
typedef std::string LibSgfcPlusPlus::SgfcSimpleText
 The SgfcSimpleText type represents the SimpleText value type defined by the SGF standard. Values are strings that contain only space characters as whitespace, i.e. no linebreaks, tabs, vertical tabs, etc..
 
typedef std::string LibSgfcPlusPlus::SgfcText
 The SgfcText type represents the Text value type defined by the SGF standard. Values are strings that contain only space characters and linebreaks as whitespace, i.e. no tabs, vertical tabs, etc..
 
typedef std::string LibSgfcPlusPlus::SgfcMove
 The SgfcMove type represents the Move value type defined by the SGF standard. The SGF standard does not provide a universal definition of how a Move value should look like. Instead it says that the interpretation of Move values is game specific.
 
typedef std::string LibSgfcPlusPlus::SgfcPoint
 The SgfcPoint type represents the Point value type defined by the SGF standard. The SGF standard does not provide a universal definition of how a Point value should look like. Instead it says that the interpretation of Point values is game specific.
 
typedef std::string LibSgfcPlusPlus::SgfcStone
 The SgfcStone type represents the Stone value type defined by the SGF standard. The SGF standard does not provide a universal definition of how a Stone value should look like. Instead it says that the interpretation of Stone values is game specific.
 

Enumerations

enum class  LibSgfcPlusPlus::SgfcArgumentType {
  LibSgfcPlusPlus::SgfcArgumentType::BeginningOfSgfData , LibSgfcPlusPlus::SgfcArgumentType::DisableMessageID , LibSgfcPlusPlus::SgfcArgumentType::DisableWarningMessages , LibSgfcPlusPlus::SgfcArgumentType::HardLineBreakMode ,
  LibSgfcPlusPlus::SgfcArgumentType::LineBreakAtEndOfNode , LibSgfcPlusPlus::SgfcArgumentType::NoSoftLineBreaksInTextValues , LibSgfcPlusPlus::SgfcArgumentType::DeleteMarkupOnCurrentMove , LibSgfcPlusPlus::SgfcArgumentType::DeleteEmptyNodes ,
  LibSgfcPlusPlus::SgfcArgumentType::DeleteObsoleteProperties , LibSgfcPlusPlus::SgfcArgumentType::DeleteUnknownProperties , LibSgfcPlusPlus::SgfcArgumentType::DeletePropertyType , LibSgfcPlusPlus::SgfcArgumentType::UseOldPassMoveNotation ,
  LibSgfcPlusPlus::SgfcArgumentType::EnableRestrictiveChecking , LibSgfcPlusPlus::SgfcArgumentType::CorrectVariationLevelAndRootMoves , LibSgfcPlusPlus::SgfcArgumentType::ReverseVariationOrdering , LibSgfcPlusPlus::SgfcArgumentType::ExpandCompressedPointLists ,
  LibSgfcPlusPlus::SgfcArgumentType::EncodingMode , LibSgfcPlusPlus::SgfcArgumentType::DefaultEncoding , LibSgfcPlusPlus::SgfcArgumentType::ForcedEncoding
}
 SgfcArgumentType enumerates the arguments that can be passed on to SGFC when it reads or writes SGF content. More...
 
enum class  LibSgfcPlusPlus::SgfcColor { LibSgfcPlusPlus::SgfcColor::Black , LibSgfcPlusPlus::SgfcColor::White }
 SgfcColor enumerates the values that a property value of type SgfcPropertyValueType::Color can have. More...
 
enum class  LibSgfcPlusPlus::SgfcCoordinateSystem { LibSgfcPlusPlus::SgfcCoordinateSystem::UpperLeftOrigin , LibSgfcPlusPlus::SgfcCoordinateSystem::LowerLeftOrigin }
 SgfcCoordinateSystem enumerates the coordinate systems supported by game-specific representations of Point values. More...
 
enum class  LibSgfcPlusPlus::SgfcDouble { LibSgfcPlusPlus::SgfcDouble::Normal , LibSgfcPlusPlus::SgfcDouble::Emphasized }
 SgfcDouble enumerates the values that a property value of type SgfcPropertyValueType::Double can have. More...
 
enum class  LibSgfcPlusPlus::SgfcExitCode { LibSgfcPlusPlus::SgfcExitCode::Ok = 0 , LibSgfcPlusPlus::SgfcExitCode::Warning = 5 , LibSgfcPlusPlus::SgfcExitCode::Error = 10 , LibSgfcPlusPlus::SgfcExitCode::FatalError = 20 }
 SgfcExitCode enumerates all SGFC exit codes supported by the library. More...
 
enum class  LibSgfcPlusPlus::SgfcGameType {
  Go , Othello , Chess , GomokuAndRenju ,
  NineMensMorris , Backgammon , ChineseChess , Shogi ,
  LinesOfAction , Ataxx , Hex , Jungle ,
  Neutron , PhilosophersFootball , Quadrature , Trax ,
  Tantrix , Amazons , Octi , Gess ,
  Twixt , Zertz , Plateau , Yinsh ,
  Punct , Gobblet , Hive , Exxit ,
  Hnefatal , Kuba , Tripples , Chase ,
  TumblingDown , Sahara , Byte , Focus ,
  Dvonn , Tamsk , Gipf , Kropki ,
  Unknown
}
 SgfcGameType enumerates all game types defined by the SGF standard. The enum value SgfcGameType::Unknown is used for all non-standard game game types. More...
 
enum class  LibSgfcPlusPlus::SgfcGoPointNotation { LibSgfcPlusPlus::SgfcGoPointNotation::Sgf , LibSgfcPlusPlus::SgfcGoPointNotation::Figure , LibSgfcPlusPlus::SgfcGoPointNotation::Hybrid }
 SgfcGoPointNotation enumerates all notations supported for representing a Point location for SgfcGameType::Go. More...
 
enum class  LibSgfcPlusPlus::SgfcMessageID {
  SGFC messages , LibSgfcPlusPlus::SgfcMessageID::UnknownCommand = 1 , LibSgfcPlusPlus::SgfcMessageID::UnknownCommandLineOption = 2 , LibSgfcPlusPlus::SgfcMessageID::CouldNotOpenSourceFile = 3 ,
  LibSgfcPlusPlus::SgfcMessageID::CouldNotReadSourceFile = 4 , LibSgfcPlusPlus::SgfcMessageID::MemoryAllocationFailed = 5 , LibSgfcPlusPlus::SgfcMessageID::SgfDataBeforeGameTree = 6 , LibSgfcPlusPlus::SgfcMessageID::NoSgfData = 7 ,
  LibSgfcPlusPlus::SgfcMessageID::IllegalCharacters = 8 , LibSgfcPlusPlus::SgfcMessageID::VariationNestingIncomplete = 9 , LibSgfcPlusPlus::SgfcMessageID::UnexpectedEndOfFile = 10 , LibSgfcPlusPlus::SgfcMessageID::PropertyIdentifierTooLong = 11 ,
  LibSgfcPlusPlus::SgfcMessageID::EmptyVariationIgnored = 12 , LibSgfcPlusPlus::SgfcMessageID::SurplusValuesDeleted = 13 , LibSgfcPlusPlus::SgfcMessageID::IllegalValueDeleted = 14 , LibSgfcPlusPlus::SgfcMessageID::IllegalSingleValueCorrected = 15 ,
  LibSgfcPlusPlus::SgfcMessageID::PropertyIdentifierWithLowercaseCharacter = 16 , LibSgfcPlusPlus::SgfcMessageID::EmptyValueDeleted = 17 , LibSgfcPlusPlus::SgfcMessageID::IllegalRootPropertyValue = 18 , LibSgfcPlusPlus::SgfcMessageID::GameIsNotGo = 19 ,
  LibSgfcPlusPlus::SgfcMessageID::PropertyWithoutValuesIgnored = 20 , LibSgfcPlusPlus::SgfcMessageID::IllegalVariationStartIgnored = 21 , LibSgfcPlusPlus::SgfcMessageID::ZeroByteDeleted = 22 , LibSgfcPlusPlus::SgfcMessageID::NonComposedValueDeleted = 23 ,
  LibSgfcPlusPlus::SgfcMessageID::MoveInRootNodeSplit = 24 , LibSgfcPlusPlus::SgfcMessageID::IllegalComposedValueCorrected = 25 , LibSgfcPlusPlus::SgfcMessageID::CouldNotOpenDestinationFile = 26 , LibSgfcPlusPlus::SgfcMessageID::CouldNotWriteDestinationFile = 27 ,
  LibSgfcPlusPlus::SgfcMessageID::DuplicatePropertyDeleted = 28 , LibSgfcPlusPlus::SgfcMessageID::RequestedPropertyDeleted = 29 , LibSgfcPlusPlus::SgfcMessageID::MixedSetupAndMove = 30 , LibSgfcPlusPlus::SgfcMessageID::LongPropertyIdentifier = 31 ,
  LibSgfcPlusPlus::SgfcMessageID::RootPropertyDeleted = 32 , LibSgfcPlusPlus::SgfcMessageID::GameInfoPropertyWithIllegalFormat = 33 , LibSgfcPlusPlus::SgfcMessageID::NotSavedBecauseOfCriticalErrors = 34 , LibSgfcPlusPlus::SgfcMessageID::UnknownPropertyDeleted = 35 ,
  LibSgfcPlusPlus::SgfcMessageID::MissingSemicolonAtGameTreeStart = 36 , LibSgfcPlusPlus::SgfcMessageID::BlackAndWhiteMoveSplit = 37 , LibSgfcPlusPlus::SgfcMessageID::PositionNotUnique = 38 , LibSgfcPlusPlus::SgfcMessageID::AddStoneDeleted = 39 ,
  LibSgfcPlusPlus::SgfcMessageID::PropertyNotDefinedInFF = 40 , LibSgfcPlusPlus::SgfcMessageID::ContradictingAnnotationDeleted = 41 , LibSgfcPlusPlus::SgfcMessageID::CombinationOfPropertiesConverted = 42 , LibSgfcPlusPlus::SgfcMessageID::MoveAnnotationDeleted = 43 ,
  LibSgfcPlusPlus::SgfcMessageID::GameInfoDeleted = 44 , LibSgfcPlusPlus::SgfcMessageID::DifferentFileFormats = 45 , LibSgfcPlusPlus::SgfcMessageID::UnknownFileFormat = 46 , LibSgfcPlusPlus::SgfcMessageID::SquareBoardSizeCorrected = 47 ,
  LibSgfcPlusPlus::SgfcMessageID::SourceFileNotSpecified = 48 , LibSgfcPlusPlus::SgfcMessageID::BadCommandLineOptionParameter = 49 , LibSgfcPlusPlus::SgfcMessageID::TooLargeBoardSizeCorrected = 50 , LibSgfcPlusPlus::SgfcMessageID::UsedFeatureNotDefinedInFileFormat = 51 ,
  LibSgfcPlusPlus::SgfcMessageID::ViewError = 52 , LibSgfcPlusPlus::SgfcMessageID::DifferentGameTypes = 53 , LibSgfcPlusPlus::SgfcMessageID::ValuesWithoutPropertyDeleted = 54 , LibSgfcPlusPlus::SgfcMessageID::EmptyNodeDeleted = 55 ,
  LibSgfcPlusPlus::SgfcMessageID::VariationLevelNotCorrected = 56 , LibSgfcPlusPlus::SgfcMessageID::VariationLevelCorrected = 57 , LibSgfcPlusPlus::SgfcMessageID::ForbiddenMove = 58 , LibSgfcPlusPlus::SgfcMessageID::IntegerKomiDeleted = 59 ,
  LibSgfcPlusPlus::SgfcMessageID::MoreThanOneGameTree = 60 , LibSgfcPlusPlus::SgfcMessageID::HandicapDiffersFromSetup = 61 , LibSgfcPlusPlus::SgfcMessageID::SetupStonesOutsideRootNode = 62 , LibSgfcPlusPlus::SgfcMessageID::TwoMovesWithSameColor = 63 ,
  LibSgfcPlusPlus::SgfcMessageID::VariationReorderFailed = 64 , LibSgfcPlusPlus::SgfcMessageID::NewStylePassMove = 65 , LibSgfcPlusPlus::SgfcMessageID::NodeNotInVariation = 66 , LibSgfcPlusPlus::SgfcMessageID::IllegalVariationStartCorrected = 67 ,
  LibSgfcPlusPlus::SgfcMessageID::UnknownLongCommandLineOption = 68 , LibSgfcPlusPlus::SgfcMessageID::UnknownEncodingInArgument = 69 , LibSgfcPlusPlus::SgfcMessageID::UnknownIconvError = 70 , LibSgfcPlusPlus::SgfcMessageID::EncodingErrorsDetected = 71 ,
  LibSgfcPlusPlus::SgfcMessageID::UnknownEncodingInSgfContent = 72 , LibSgfcPlusPlus::SgfcMessageID::EncodingDetectionFailed = 73 , LibSgfcPlusPlus::SgfcMessageID::SgfContentHasDifferentEncodings = 74 , LibSgfcPlusPlus::SgfcMessageID::SgfContentHasDifferentEncodingsFatal = 75 ,
  LibSgfcPlusPlus::SgfcMessageID::UnknownSgfcMessageID = std::numeric_limits<int>::max() , libsgfc++messages , LibSgfcPlusPlus::SgfcMessageID::InvalidMessageID = -1 , LibSgfcPlusPlus::SgfcMessageID::ParseArgumentError = -2 ,
  LibSgfcPlusPlus::SgfcMessageID::SaveSgfContentToFilesystemError = -3 , LibSgfcPlusPlus::SgfcMessageID::ReadSgfContentFromFilesystemError = -4 , LibSgfcPlusPlus::SgfcMessageID::DeleteFileError = -5 , LibSgfcPlusPlus::SgfcMessageID::OutOfMemoryError = -6 ,
  LibSgfcPlusPlus::SgfcMessageID::ParseSgfContentError = -7 , LibSgfcPlusPlus::SgfcMessageID::SGFCInterfacingError = -8
}
 SgfcMessageID enumerates the message identification numbers that an ISgfcMessage object can have. More...
 
enum class  LibSgfcPlusPlus::SgfcMessageType { LibSgfcPlusPlus::SgfcMessageType::Warning , LibSgfcPlusPlus::SgfcMessageType::Error , LibSgfcPlusPlus::SgfcMessageType::FatalError }
 SgfcMessageType enumerates all message types generated by SGFC. More...
 
enum class  LibSgfcPlusPlus::SgfcNodeTrait : SgfcNodeTraits {
  LibSgfcPlusPlus::SgfcNodeTrait::Root = 1ULL , LibSgfcPlusPlus::SgfcNodeTrait::GameInfo = 2ULL , LibSgfcPlusPlus::SgfcNodeTrait::Move = 4ULL , LibSgfcPlusPlus::SgfcNodeTrait::Setup = 8ULL ,
  LibSgfcPlusPlus::SgfcNodeTrait::NodeAnnotation = 16ULL , LibSgfcPlusPlus::SgfcNodeTrait::MoveAnnotation = 32ULL , LibSgfcPlusPlus::SgfcNodeTrait::Markup = 64ULL , LibSgfcPlusPlus::SgfcNodeTrait::Timing = 128ULL ,
  LibSgfcPlusPlus::SgfcNodeTrait::Inheritable = 256ULL
}
 SgfcNodeTrait enumerates the individual traits that an ISgfcNode object can have. An ISgfcNode object can have several traits, which is why the enumeration values are defined as flags that can be combined into a single SgfcNodeTraits value. More...
 
enum class  LibSgfcPlusPlus::SgfcPropertyCategory {
  LibSgfcPlusPlus::SgfcPropertyCategory::Root , LibSgfcPlusPlus::SgfcPropertyCategory::GameInfo , LibSgfcPlusPlus::SgfcPropertyCategory::Move , LibSgfcPlusPlus::SgfcPropertyCategory::Setup ,
  LibSgfcPlusPlus::SgfcPropertyCategory::NodeAnnotation , LibSgfcPlusPlus::SgfcPropertyCategory::MoveAnnotation , LibSgfcPlusPlus::SgfcPropertyCategory::Markup , LibSgfcPlusPlus::SgfcPropertyCategory::Timing ,
  LibSgfcPlusPlus::SgfcPropertyCategory::Miscellaneous
}
 SgfcPropertyCategory enumerates the categories used in the SGF standard to classify properties. A property can fall into one category only. More...
 
enum class  LibSgfcPlusPlus::SgfcPropertyTrait : SgfcPropertyTraits { LibSgfcPlusPlus::SgfcPropertyTrait::Inheritable = 1ULL }
 SgfcPropertyTrait enumerates the individual traits that an ISgfcProperty object can have. An ISgfcProperty object can have several traits, which is why the enumeration values are defined as flags that can be combined into a single SgfcPropertyTraits value. More...
 
enum class  LibSgfcPlusPlus::SgfcPropertyType {
  LibSgfcPlusPlus::SgfcPropertyType::B , LibSgfcPlusPlus::SgfcPropertyType::KO , LibSgfcPlusPlus::SgfcPropertyType::MN , LibSgfcPlusPlus::SgfcPropertyType::W ,
  LibSgfcPlusPlus::SgfcPropertyType::AB , LibSgfcPlusPlus::SgfcPropertyType::AE , LibSgfcPlusPlus::SgfcPropertyType::AW , LibSgfcPlusPlus::SgfcPropertyType::PL ,
  LibSgfcPlusPlus::SgfcPropertyType::C , LibSgfcPlusPlus::SgfcPropertyType::DM , LibSgfcPlusPlus::SgfcPropertyType::GB , LibSgfcPlusPlus::SgfcPropertyType::GW ,
  LibSgfcPlusPlus::SgfcPropertyType::HO , LibSgfcPlusPlus::SgfcPropertyType::N , LibSgfcPlusPlus::SgfcPropertyType::UC , LibSgfcPlusPlus::SgfcPropertyType::V ,
  LibSgfcPlusPlus::SgfcPropertyType::BM , LibSgfcPlusPlus::SgfcPropertyType::DO , LibSgfcPlusPlus::SgfcPropertyType::IT , LibSgfcPlusPlus::SgfcPropertyType::TE ,
  LibSgfcPlusPlus::SgfcPropertyType::AR , LibSgfcPlusPlus::SgfcPropertyType::CR , LibSgfcPlusPlus::SgfcPropertyType::DD , LibSgfcPlusPlus::SgfcPropertyType::LB ,
  LibSgfcPlusPlus::SgfcPropertyType::LN , LibSgfcPlusPlus::SgfcPropertyType::MA , LibSgfcPlusPlus::SgfcPropertyType::SL , LibSgfcPlusPlus::SgfcPropertyType::SQ ,
  LibSgfcPlusPlus::SgfcPropertyType::TR , LibSgfcPlusPlus::SgfcPropertyType::AP , LibSgfcPlusPlus::SgfcPropertyType::CA , LibSgfcPlusPlus::SgfcPropertyType::FF ,
  LibSgfcPlusPlus::SgfcPropertyType::GM , LibSgfcPlusPlus::SgfcPropertyType::ST , LibSgfcPlusPlus::SgfcPropertyType::SZ , AN ,
  BR , BT , CP , DT ,
  EV , GN , GC , ON ,
  OT , PB , PC , PW ,
  RE , RO , RU , SO ,
  TM , US , WR , WT ,
  BL , OB , OW , WL ,
  FG , PM , VW , BS ,
  CH , EL , EX , ID ,
  L , LT , M , OM ,
  OP , OV , RG , SC ,
  SE , SI , TC , WS ,
  LibSgfcPlusPlus::SgfcPropertyType::HA , LibSgfcPlusPlus::SgfcPropertyType::KM , TB , TW ,
  LibSgfcPlusPlus::SgfcPropertyType::Unknown
}
 SgfcPropertyType enumerates all property types defined by the SGF standard, plus a small number of non-standard property types that are specially handled by SGFC. The enum value SgfcPropertyType::Unknown is used for all other non-standard properties. More...
 
enum class  LibSgfcPlusPlus::SgfcPropertyValueType {
  LibSgfcPlusPlus::SgfcPropertyValueType::None , LibSgfcPlusPlus::SgfcPropertyValueType::Number , LibSgfcPlusPlus::SgfcPropertyValueType::Real , LibSgfcPlusPlus::SgfcPropertyValueType::Double ,
  LibSgfcPlusPlus::SgfcPropertyValueType::Color , LibSgfcPlusPlus::SgfcPropertyValueType::SimpleText , LibSgfcPlusPlus::SgfcPropertyValueType::Text , LibSgfcPlusPlus::SgfcPropertyValueType::Point ,
  LibSgfcPlusPlus::SgfcPropertyValueType::Move , LibSgfcPlusPlus::SgfcPropertyValueType::Stone , LibSgfcPlusPlus::SgfcPropertyValueType::Unknown
}
 SgfcPropertyValueType enumerates the basic SGF property value types. More...
 

Detailed Description

The Public API module contains types that belong to the public API of the library.

Typedef Documentation

◆ SgfcNodeTraits

typedef unsigned long long LibSgfcPlusPlus::SgfcNodeTraits

An SgfcNodeTraits value describes the traits of an ISgfcNode object. The value is a combination of individual flags defined in the SgfcNodeTrait enumeration.

All bitwise operators have been overloaded to make the SgfcNodeTraits typedef interoperate with the SgfcNodeTrait enumeration as conveniently as possible. There are some limitations, though, because SgfcNodeTraits is a typedef and not a true type (i.e. it's not a class or struct). For instance, the assignment operator cannot be overloaded so it's not possible to assign an SgfcNodeTrait enumeration member directly to an SgfcNodeTraits variable. Consequently, whenever SgfcNodeTrait (the enum type) needs to be treated interchangeably with SgfcNodeTraits (the typdef) a static_cast must be done. This works because SgfcNodeTraits (the typedef) is used as the underlying type of SgfcNodeTrait (the enum type).

/// SgfcNodeTraits traits = static_cast<SgfcNodeTraits>(SgfcNodeTrait::Inheritable);
/// 
@see SgfcConstants::NodeTraitsNone
@see SgfcConstants::NodeTraitsAll

@note Using an unsigned numerical type as the underlying type of this
typedef is important to make the bitwise operators, specifically the
shift left and shift right operators, unambiguous and safe to use. 

◆ SgfcPropertyTraits

typedef unsigned long long LibSgfcPlusPlus::SgfcPropertyTraits

An SgfcPropertyTraits value describes the traits of an ISgfcProperty object. The value is a combination of individual flags defined in the SgfcPropertyTrait enumeration.

All bitwise operators have been overloaded to make the SgfcPropertyTraits typedef interoperate with the SgfcPropertyTrait enumeration as conveniently as possible. There are some limitations, though, because SgfcPropertyTraits is a typedef and not a true type (i.e. it's not a class or struct). For instance, the assignment operator cannot be overloaded so it's not possible to assign an SgfcPropertyTrait enumeration member directly to an SgfcPropertyTraits variable. Consequently, whenever SgfcPropertyTrait (the enum type) needs to be treated interchangeably with SgfcPropertyTraits (the typdef) a static_cast must be done. This works because SgfcPropertyTraits (the typedef) is used as the underlying type of SgfcPropertyTrait (the enum type).

/// SgfcPropertyTraits traits = static_cast<SgfcPropertyTraits>(SgfcPropertyTrait::Inheritable);
/// 
@see SgfcConstants::PropertyTraitsNone
@see SgfcConstants::PropertyTraitsAll

@note Using an unsigned numerical type as the underlying type of this
typedef is important to make the bitwise operators, specifically the
shift left and shift right operators, unambiguous and safe to use. 

Enumeration Type Documentation

◆ SgfcArgumentType

SgfcArgumentType enumerates the arguments that can be passed on to SGFC when it reads or writes SGF content.

Some arguments have a parameter, but most arguments do not. Unless documented otherwise an argument does not have a parameter.

Some of the arguments with parameters can be specified multiple times. Unless documented otherwise an argument can be specified only once.

Some arguments are specific for games of type Go (GM[1]), but most arguments are generic. Unless documented otherwise an argument works for all game types.

The following SGFC command line options are not supported as SGFC arguments by libsgfc++:

  • Option -k. The library currently does not support preserving the header in front of the SGF data. See GitHub issue #24 for details on this decision.
  • Option -g. The library currently does not support game signatures.
  • Option -v. The library currently does not support querying the SGFC version.
  • Option -s. The library currently does not support splitting a game collection into separate files when writing out SGF content. This is a limitation when working with ISgfcCommandLine. When working with ISgfcDocumentWriter the library client can implement the splitting function itself by writing out documents with a single game tree only.
  • Option -c. Unlike the SGFC command line program, the library gives the client free rein in writing out SGF content even when it was read with critical errors. It is the library client's job to examine the parse results and take appropriate steps when it encounters critical errors.
  • Options -i, -h and –help. The library does not support these options because they are useful only for an interactive command line program.
  • Option -U. The library client can achieve the same by specifying SgfcArgumentType::DefaultEncoding with parameter "UTF-8".
Enumerator
BeginningOfSgfData 

Select how to search for the beginning of SGF data. This argument requires a numeric parameter value 1, 2 or 3. The corresponding SGFC command line option is -bx.

The argument is invalid if you specify a parameter value that is not 1, 2 or 3.

The parameter values 1-3 have the following meaning:

  • 1 = Advanced search algorithm (default)
  • 2 = First occurence of "(;"
  • 3 = First occurence of "("

The advanced search algorithm can be said to be a combination of the more simple and straightforward algorithms 2 and 3. SGFC basically searches for "(;", but some erroneous files mark the beginning only with "(". To detect such files SGFC uses a more sophisticated search. In rare cases this might go wrong, so if you find yourself in that position you may wish to use the algorithm 2 or 3.

DisableMessageID 

Disable a given message ID. This argument requires an SgfcMessageID parameter value, the value denotes the ID of the message to disable. This argument can be specified multiple times. The corresponding SGFC command line option is -dn.

If you feel that the SGFC syntax checking is too pedantic and generates too many messages, then you can use this argument to reduce the number of messages. You cannot use this argument to disable fatal error messages.

Hints for a few non-critical warnings that you may wish to disable are SgfcMessageID::EmptyValueDeleted, SgfcMessageID::RequestedPropertyDeleted (since these messages are generated in response to an explicit request by the library client) and SgfcMessageID::PropertyNotDefinedInFF.

DisableWarningMessages 

Disable all warning messages. The corresponding SGFC command line option is -w.

If you feel that the SGFC syntax checking is too pedantic and generates too many messages, then you can use this argument to reduce the number of messages.

Use this argument with care!

HardLineBreakMode 

Select how to interpret line breaks when reading Text property values. This argument requires a numeric parameter value 1, 2, 3 or 4. The corresponding SGFC command line option is -lx.

This argument only affects how SGFC interprets SGF content during reading. When SGFC writes SGF content the output is always in FF4 format.

The argument is invalid if you specify a parameter value that is not 1, 2, 3 or 4.

The parameter values 1-4 have the following meaning:

  • 1 = A line break preceded by a backslash ("\") character is treated as a soft line break. All other line breaks are treated as a hard line break. This is the default behaviour. - 2 = A line break preceded by a backslash ("") character is treated as a soft line break. A line break preceded by a space character is converted to a space character (the result is that there are now two space characters, the one that was in the original SGF content and the one that was created by converting the line break). All other line breaks are treated as a hard line break. The SGFC documentation indicates that the MS-DOS/Windows application "MGT" writes SGF content in this format.
  • 3 = A line break preceded by a backslash ("\") character is treated as a soft line break. A single line break is converted to a space character. Two line breaks are treated as a hard line break. - 4 = Experimentally determined that this seems to be almost the same as parameter value 3. The distinction seems to be that the double line break is preserved on writing. The SGFC documentation characterizes this line break behaviour as "paragraph style (ISHI format, MFGO)".
Todo
Find out more about parameter value 4. What does "paragraph style" mean? What is the ISHI format? MFGO is likely the abbreviation for the Go playing application "Many Faces of Go".
LineBreakAtEndOfNode 

When writing SGF content try to make each line end at the end of a node. The corresponding SGFC command line option is -L.

This argument affects how SGFC formats the output when it writes SGF content:

  • By default SGFC attempts to keep the line length to a certain maximum. If that length were to be exceeded SGFC inserts a line break before it writes out the next property. In case of a Text property SGFC inserts a soft line break in the middle of the property value.
  • When this argument is specified, SGFC instead focuses on keeping a node's content on the same line, inserting a line break before it writes out the next node. This can lead to longer lines being written when a node has many properties or properties have many values. Also SGFC does not insert soft line breaks in the middle of a Text property value.
NoSoftLineBreaksInTextValues 

Do not insert soft line breaks into Text values. The corresponding SGFC command line option is -t.

This argument affects how SGFC formats the output when it writes SGF content:

  • By default SGFC attempts to keep the line length to a certain maximum. If that length were to be exceeded SGFC inserts a line break before it writes out the next property. In case of a Text property SGFC inserts a soft line break in the middle of the property value.
  • When this argument is specified, SGFC never inserts soft line breaks in the middle of a Text property value.

Old SGF handling applications that pre-date FF4 cannot deal with soft line breaks. If you are concerned about compatibility to old applications you should specify this argument to avoid soft line breaks.

DeleteMarkupOnCurrentMove 

Delete markup on current move. This argument works only for games of type Go (GM[1]). The corresponding SGFC command line option is -m.

Definition of "markup on current move":

  • A node contains a move property (e.g. B[aa]).
  • The same node also contains a markup property (MA, CR, TR, SQ, SL).
  • The markup property marks the point on which the move in the same node played a stone.

Some Go game servers create SGF files where the current move is marked with e.g. a circle (CR[]). Some people find this annoying. Specifying this argument tells SGFC to delete any markup properties on the position of the current move.

Note
When a markup property is deleted because of this argument type, this results in an error type message with SgfcMessageID::PositionNotUnique. Example: "Markup <CR> position not unique ([partially] deleted)".
DeleteEmptyNodes 

Delete empty nodes, i.e. nodes that contain no properties. The corresponding SGFC command line option is -n.

There are empty nodes which cannot be deleted. These nodes are:

  • Root node, if it has more than one child.
  • A node which has siblings and has more than one child.
Note
When an empty node is deleted because of this argument type, this results in a warning type message with SgfcMessageID::EmptyNodeDeleted. Example: "empty node deleted".
DeleteObsoleteProperties 

Delete obsolete properties, i.e. properties that are not part of FF4. The corresponding SGFC command line option is -o.

SGFC knows all FF4 properties (general ones and Go specific ones) and all FF1-FF3 properties. Properties that are defined only in FF1-FF3 but not in FF4 are considered obsolete. When this argument is specified SGFC deletes all such obsolete properties it encounters. Exceptions:

  • "L" is converted to its FF4 counterpart "LB".
  • "M" is converted to an FF4 counterpart, either "MA" or "TR".
Note
When an obsolete property is deleted because of this argument type, this results in a warning type message with SgfcMessageID::RequestedPropertyDeleted. Example: "obsolete property <EL> deleted". Regardless of whether this argument type is used or not, SGFC generates a warning type message with SgfcMessageID::PropertyNotDefinedInFF when it encounters an obsolete property. Example: "property <EL> is not defined in FF[4] (parsing done anyway)".
DeleteUnknownProperties 

Delete unknown properties, i.e. properties that are not part of FF1-FF4. The corresponding SGFC command line option is -u.

SGFC knows all FF4 properties (general ones and Go specific ones) and all FF1-FF3 properties. Properties that are not defined in any of these versions of the SGF standard are considered to be private properties of the application that was used to create the SGF content. When this argument is specified SGFC deletes all such unknown properties it encounters. Exceptions:

  • The "KI" property, which is a private property of the "Smart Game Board" application (SGB), is converted to its FF4 counterpart "KM".
Note
When an unknown property is deleted because of this argument type, this results in a warning type message with SgfcMessageID::UnknownPropertyDeleted. Example: "unknown property <XX> deleted".
DeletePropertyType 

Delete properties of a given property type. This argument requires an SgfcPropertyType parameter value, the value denotes the properties to delete. This option can be specified multiple times. The corresponding SGFC command line option is -yP.

SGFC converts certain obsolete and unknown properties to an FF4 counterpart. To delete these properties you have to specify their original type, i.e. the type before the conversion takes place. Exmaple: SGFC converts the "L" property to its FF4 counterpart "LB". You have to specify SgfcPropertyType::L do delete this property.

The SgfcPropertyType enumeration contains a number of values for properties that SGFC does not know about. Example: Game-specific property types like "CO" (Backgammon) or "BO" (Octi). The argument is invalid if you specify an SgfcPropertyType value that refers to a property type that is not known by SGFC.

Note
When a property is deleted because of this argument type, this results in a warning type message with SgfcMessageID::RequestedPropertyDeleted. Example: "property <FF> deleted".
UseOldPassMoveNotation 

Write pass moves as "[tt]" if possible. This argument works only for games of type Go (GM[1]). The corresponding SGFC command line option is -p.

The Go-specific part of FF4 specifies that pass moves should be written with an empty property value (e.g. B[]). For compatibility with FF3 the value "tt" is still allowed, though (e.g. B[tt]). Specifying this argument causes SGFC to write pass moves out using the old "tt" notation. This is only possible if the board size is <= 19x19, because for board sizes 20x20 and larger the value "tt" refers to a valid location on the board. So for board sizes 20x20 and larger, SGFC writes a pass move with an empty property value even if this argument is specified.

EnableRestrictiveChecking 

Enable restrictive checking. The corresponding SGFC command line option is -r.

If this argument is set then SGFC is even more pedantic than usual. The argument is designed to flag all kinds of bad style or uncommon characteristics that can cause problems with applications that are just able to deal with common cases. For example, if the SGF content contains more than one game tree SGFC now issues an error instead of a warning.

Furthermore for games of type Go (GM[1]) SGFC now checks that no two successive moves have the same color, that no setup properties (AB/AW/AE) appear in the main branch apart from the root node, and that the "HA" property is set correctly.

CorrectVariationLevelAndRootMoves 

Correct variation level and root moves. Variation level correction works only for games of type Go (GM[1]). The corresponding SGFC command line option is -v.

It is bad style to have alternative moves at different tree levels. Some applications chose that way to represent variations as siblings instead of children - they add a child node, remove the latest move by using an "AE" property and put the alternative move into the node. When this argument is specified SGFC tries to correct such variations. Note that this kind of corrective action works only for games of type Go (GM[1]).

Example: >>(;GM[1];B[aa](;W[bb])(;AE[aa]B[cc])(;AE[aa]B[dd]))<< Correct: >>(;GM[1](;B[aa];W[bb])(;B[cc])(;B[dd]))<<

Another bad style is having the first move in the root node of a game tree. When this argument is specified SGFC splits the root node into two nodes and moves the first move into the second node. Note that this kind of corrective action works for all game types.

Example: >>(;GM[1]C[first move in root node]GC[bad style]B[aa])<< Correct: >>(;GM[1]GC[good style];B[aa]C[first move not in root node])<<

Note
Variation fixes and root move fixes made because of this argument type result in warning type messages with SgfcMessageID::VariationLevelCorrected and SgfcMessageID::MoveInRootNodeSplit, respectively. Examples: "variation level corrected" and "move in root node found (splitted node into two)".
ReverseVariationOrdering 

Reverse ordering of variations. The corresponding SGFC command line option is -z.

It is bad style to have the main line of the game not in the main branch (variation "A"). When this argument is specified SGFC reverses the ordering of all variations in a game tree, assuming that the main line of the game is actually in the last branch. Example: Variations A,B,C,D are reordered as D,C,B,A.

The function can reorder only up to a hardcoded limit of variations of a single node. If you hit this limit you need to adjust the preprocessor macro MAX_REORDER_VARIATIONS in file all.h to a higher value and recompile SGFC and libsgfc++.

ExpandCompressedPointLists 

When writing SGF content, expand compressed point lists. This argument works only for games of type Go (GM[1]). The corresponding SGFC command line option is -e.

This argument affects how SGFC formats the output when it writes SGF content:

  • By default when the game type is Go (GM[1]) and SGFC encounters a property with a point list value type (e.g. property "MA"), it attempts to compress the point values to take advantage of the FF4 "compressed point lists" format. If SGFC reads in SGF content that already contains point lists in the compressed format, it retains the compressed format when writing the SGF content.
  • When this argument is specified, SGFC does not compress uncompressed point lists, and it actively expands point lists that were in the compressed format in the original SGF content.

Old SGF handling applications that pre-date FF4 cannot deal with the compressed format. If you are concerned about compatibility to old applications you should specify this argument to avoid compressed point lists.

Note
After reading in SGF content point lists are always made available to the library client in uncompressed form in the document object tree.
EncodingMode 

Select how to determine the character encoding(s) used to decode SGF content. This argument requires a numeric parameter value 1, 2 or 3. The corresponding SGFC command line option is -Ex.

The argument is invalid if you specify a parameter value that is not 1, 2 or 3.

The parameter values 1-3 have the following meaning:

  • Mode 1 (the default mode): A single encoding is used to decode the entire SGF content. The encoding to use is detected by probing the SGF content. If a Unicode BOM marker is found then the encoding defined by that marker is used, but the first CA property in the decoded SGF content must match the encoding detected from the BOM. If no Unicode BOM marker is found then the SGF content is probed for CA properties, and the first CA property value found is used as the encoding. If no CA property is found the default encoding ISO-8859-1 is used. Note that only this mode allows the wide-character encodings UTF-16 and UTF-32 to be processed (via BOM detection).
  • Mode 2 (specification conformant): A separate encoding is used to decode each game tree in the SGF content. The encoding is defined by the CA property value of that game tree. If a game tree has no CA property the default encoding ISO-8859-1 is used. Only SimpleText and Text property values are decoded! The SGF formatting skeleton as well as property values that are not SimpleText or Text are parsed using ASCII/ISO-8859-1.
  • Mode 3: No decoding takes place.
Note
Mode 2 is the behaviour as designed by the SGF standard. This is somewhat antiquated as it not only allows SGF content to be partially encoded, it even allows different encodings to be used within the same piece of SGF content. It also breaks the notion of SGF as text files. Mode 1, even though it does not conform to the SGF standard, is what most likely can be expected from modern-day applications that encode an entire file and use the same encoding for the entire file.
Attention
When mode 1 is used decoding occurs before parsing, when mode 2 is used decoding occurs after parsing. This can be important when SGF content is encoded with a multi-byte encoding, and one or more multi-byte characters contain bytes that correspond to ASCII characters that are relevant for the SGF format (escape character, property closing character). Examples that illustrate the problem can be found in SgfNotes.md.

When mode 1 or 2 are used for reading, the SGF content is decoded and made available to the library client as UTF-8. Accordingly each decoded game tree's root node is populated with a CA property value "UTF-8". See the documentation of ISgfcDocumentReader for details how this is done. When mode 3 is used no decoding takes place and the library client receives the SGF content as-is.

When node 1 or 2 are used for writing, the SGF content in the object tree is internally decoded according to the rules documented above before it is actually written out. This allows library clients to provide content in encodings that are not UTF-8. Care must be taken not to mix encodings in the same object tree! For instance a library client might first read SGF content from some source using encoding mode 1 or 2, which produces an object tree in UTF-8, then it could modify the object tree with values in an encoding that is not UTF-8. Writing out such an object tree that contains values in mixed encodings is likely to produce invalid results.

See also
SgfcArgumentType::DefaultEncoding
SgfcArgumentType::ForcedEncoding
DefaultEncoding 

Select the default encoding to be used if the SGF content does not contain a CA property. This argument requires a string parameter value. The corresponding SGFC command line option is –default-encoding.

The default value is ISO-8859-1. Valid values depend on the iconv implementation used by libsgfc++. Invoke "iconv --list" on the command line to see a list of supported encodings.

See also
SgfcArgumentType::EncodingMode
SgfcArgumentType::ForcedEncoding
ForcedEncoding 

Select the encoding to be used. This overrides even a CA property found in the SGF content. This argument requires a string parameter value. The corresponding SGFC command line option is –encoding.

The argument has no default value. Valid values depend on the iconv implementation used by libsgfc++. Invoke "iconv --list" on the command line to see a list of supported encodings.

See also
SgfcArgumentType::EncodingMode
SgfcArgumentType::DefaultEncoding

◆ SgfcColor

enum class LibSgfcPlusPlus::SgfcColor
strong

SgfcColor enumerates the values that a property value of type SgfcPropertyValueType::Color can have.

Enumerator
Black 

The property value signifies the abstract color "Black".

The raw property string value is "B". 
White 

The property value signifies the abstract color "White".

The raw property string value is "W". 

◆ SgfcCoordinateSystem

SgfcCoordinateSystem enumerates the coordinate systems supported by game-specific representations of Point values.

Enumerator
UpperLeftOrigin 

The coordinate system's origin is in the upper-left corner.

For instance, this coordinate system is used by SgfcGoPointNotation::Sgf
and SgfcGoPointNotation::Figure. 
LowerLeftOrigin 

The coordinate system's origin is in the lower-left corner.

For instance, this coordinate system is used by
SgfcGoPointNotation::Hybrid. 

◆ SgfcDouble

enum class LibSgfcPlusPlus::SgfcDouble
strong

SgfcDouble enumerates the values that a property value of type SgfcPropertyValueType::Double can have.

Attention
Do not rely on the numeric value underlying each enumeration member. Specifically, do not attempt to map the numeric value to the Double representation in the SGF content.
Enumerator
Normal 

The property value signifies "normal" importance. Example: If the property SgfcPropertyType::GB has this value, then it means "good for black".

The raw property string value is "1".

Emphasized 

The property value signifies "emphasized" importance. Example: If the property SgfcPropertyType::GB has this value, then it means "very good for black".

The raw property string value is "2".

◆ SgfcExitCode

enum class LibSgfcPlusPlus::SgfcExitCode
strong

SgfcExitCode enumerates all SGFC exit codes supported by the library.

Enumerator
Ok 

The SGFC operation did not generate any warning or error messages. If the SgfcArgumentType::DisableMessageID argument was passed to SGFC some messages may have been ignored.

Warning 

The SGFC operation generated one or more warning messages, but no fatal error messages and no non-fatal error messages.

Error 

The SGFC operation generated one or more error messages, but no fatal error messages. It may have generated 0-n warning messages.

FatalError 

The SGFC operation generated a fatal error message. It may have generated 0-n warning or error messages. Note that because the SGFC operation aborts immediately when a fatal error occurs, there is guaranteed to be exactly one fatal error message (i.e. not more than 1).

◆ SgfcGameType

enum class LibSgfcPlusPlus::SgfcGameType
strong

SgfcGameType enumerates all game types defined by the SGF standard. The enum value SgfcGameType::Unknown is used for all non-standard game game types.

Attention
Do not rely on the numeric value underlying each enumeration member. Specifically, do not attempt to map the numeric value to the game type's representation in the SGF content.

◆ SgfcGoPointNotation

SgfcGoPointNotation enumerates all notations supported for representing a Point location for SgfcGameType::Go.

Enumerator
Sgf 

The notation of the SGF standard for representing a Go Point location. Example: "fq".

The SGF standard defines the following notation:

  • The coordinate system's origin is in the upper-left corner of the board.
  • Positions on both axis are labeled with letters, starting with a lowercase "a" at the coordinate system's origin and progressing towards a lowercase "z". This allows 26 positions in both directions. If the Go board dimension is larger than 26 then labeling continues with uppercase letters. The lowercase letter "z" is followed by the uppercase letter "A". The sequence looks like this: a...zA...Z.
  • The SGF notation of a point location (which corresponds to the raw SGF property string) consists of two letters: The first letter designates the x-axis, the second the y-axis. Examples: "aa", "fq", "Sc", etc.
  • The maximum board size that can be used with the SGF notation is 52x52.
Figure 

The "1-1" figure notation for representing a Go Point location. Example: "6-17".

The "1-1" figure notation is defined like this:

  • The coordinate system's origin is in the upper-left corner of the board.
  • Positions on both axis are labeled with figures that correspond to numeric values. The first figure / numeric value at the coordinate system's origin is "1", figures / numeric values then progress by increases of 1.
  • The "1-1" figure notation of a point location consists of two figures separated by a dash character ("-"). The first figure designates the x-axis, the second the y-axis. Examples: "1-1", "6-17", "45-3", etc.
  • In theory the "1-1" figure notation can be used for arbitrary board sizes, but in practice SGF limits the board size to a maximum of 52x52.
Hybrid 

The "A1" hybrid notation for representing a Go Point location. Example: "F17".

The "A1" hybrid notation is defined like this:

  • The coordinate system's origin is in the lower-left corner of the board.
  • Positions on the x-axis are labeled with uppercase letters, starting with an uppercase "A" at the coordinate system's origin and progressing towards an uppercase "Z". The letter "I" is not used to avoid confusion with "J".
  • Positions on the y-axis are labeled with numbers, starting with 1 at the coordinate system's origin and progressing by increases of 1.
  • The "A1" figure notation of a point location consists of a letter followed by a number without any separator. The letter designates the x-axis, the number the y-axis. Examples: "A1", "F17".
  • The maximum board size that can be used with the "A1" hybrid notation is 25x25. The maximum is not 26x26 because of the unused letter "I".

◆ SgfcMessageID

enum class LibSgfcPlusPlus::SgfcMessageID
strong

SgfcMessageID enumerates the message identification numbers that an ISgfcMessage object can have.

Every enumerator has an underlying numeric value. Library clients should not rely on a specific value as they can change without notice. The only guarantee given is that positive values (including zero) are for messages that are generated by SGFC, and negative values are for messages generated by libsgfc++.

For messages that are generated by SGFC the numeric value underlying the enumerator is equal to the message ID as documented by SGFC. Please consult the SGFC documentation if in doubt about the meaning of a message. SGFC calls them "error codes".

Enumerator
UnknownCommand 

SGFC was invoked with an argument that is neither an option, an input file or an output file.

This message cannot actually occur when using SGFC via libsgfc++.

UnknownCommandLineOption 

SGFC was invoked with an argument that is not a supported short command line option.

This message cannot actually occur when using SGFC via libsgfc++.

CouldNotOpenSourceFile 

SGFC was unable to open the source file.

CouldNotReadSourceFile 

SGFC was unable to read the source file.

MemoryAllocationFailed 

SGFC was unable to allocate enough memory.

SgfDataBeforeGameTree 

SGFC found what looks like SGF data before a game tree, i.e. before the character sequence "(;".

NoSgfData 

SGFC was unable to find any SGF data.

IllegalCharacters 

SGFC found illegal characters in between SGF markup.

VariationNestingIncomplete 

SGFC found a variation that is missing the closing paranthesis.

UnexpectedEndOfFile 

SGFC parsed incomplete SGF content.

PropertyIdentifierTooLong 

SGFC found a property identifier that is too long. This may indicate that the content is not SGF.

EmptyVariationIgnored 

SGFC found (and ignored) an empty variation.

SurplusValuesDeleted 

SGFC found a property with more than one value although it can have only one value. SGFC deleted the surplus values.

IllegalValueDeleted 

SGFC found (and deleted) an illegal property value.

IllegalSingleValueCorrected 

SGFC found (and corrected) an illegal single property value.

If the SGF content is in FF3 format this message has
#SgfcMessageType::Warning. If the SGF content is in FF4 format this
message has #SgfcMessageType::Error.

@see SgfcMessageID::IllegalComposedValueCorrected 
PropertyIdentifierWithLowercaseCharacter 

SGFC found a property identifier that contains lowercase characters. This message is only generated for SGF content in FF4 format.

EmptyValueDeleted 

SGFC found (and deleted) an empty property value.

Depending on the context this message has either
#SgfcMessageType::Warning or #SgfcMessageType::Error. 
IllegalRootPropertyValue 

SGFC found (and took action) a root property with an illegal value. The value may have been deleted or corrected.

GameIsNotGo 

SGFC found a game type that is not Go. Move and position values are not checked.

PropertyWithoutValuesIgnored 

SGFC found (and ignored) a property without any values.

IllegalVariationStartIgnored 

SGFC found (and ignored) an illegal variation start.

ZeroByteDeleted 

SGFC found a zero byte. The byte was replaced with a space character.

NonComposedValueDeleted 

SGFC found a property that expects composed values but the actual values are one or more single values. SGFC deleted the single value(s).

MoveInRootNodeSplit 

SGFC found a move property in a game tree's root node and split the root node into two, with the move property being in the second node.

IllegalComposedValueCorrected 

SGFC found (and corrected) an illegal composed property value.

@see SgfcMessageID::IllegalSingleValueCorrected 
CouldNotOpenDestinationFile 

SGFC was unable to open the destination file.

CouldNotWriteDestinationFile 

SGFC was unable to write the destination file.

DuplicatePropertyDeleted 

SGFC found (and deleted) a property that already exists.

RequestedPropertyDeleted 

SGFC found (and deleted) a property whose deletion was requested by the library client.

The library client can request either specific properties to be deleted, or it can request the entire class of obsolete properties to be deleted.

See also
SgfcArgumentType::DeletePropertyType.
SgfcArgumentType::DeleteObsoleteProperties.
MixedSetupAndMove 

SGFC found a node that contains both setup and move properties.

If the SGF content is in FF3 format this message has
#SgfcMessageType::Warning. If the SGF content is in FF4 format this
message has #SgfcMessageType::Error. 
LongPropertyIdentifier 

SGFC found a property with an identifier that consists of more than two uppercase characters.

RootPropertyDeleted 

SGFC found (and deleted) a root property in a node that is not the root node.

GameInfoPropertyWithIllegalFormat 

SGFC found a game info property that is illegally formatted.

If the SGF content is in FF3 format this message has
#SgfcMessageType::Warning. If the SGF content is in FF4 format this
message has #SgfcMessageType::Error. 
NotSavedBecauseOfCriticalErrors 

SGFC did not save the SGF content because parsing generated one or more critical errors.

This message cannot actually occur when using SGFC via libsgfc++.

UnknownPropertyDeleted 

SGFC found (and deleted) an unknown (i.e. a custom) property.

MissingSemicolonAtGameTreeStart 

SGFC did not find a semicolon in front of what looks like a game tree.

See also
SgfcArgumentType::BeginningOfSgfData.
BlackAndWhiteMoveSplit 

SGFC found a node that contains moves by both the black and the white player. The node was split into two, with the black move and one with the white move.

PositionNotUnique 

SGFC found a position that is not unique, i.e. some combination of properties that operate on the same point with contradicting meaning (e.g. different markup or stones on the same point).

AddStoneDeleted 

SGFC found (and deleted) a property that adds a stone to the board (AB, AW, AE), but the addition is redundant because there is already a stone on the board in that location.

PropertyNotDefinedInFF 

SGFC found a property that is not defined in the version of the SGF standard denoted by the FF property in the SGF content. The property may have been converted or even deleted.

ContradictingAnnotationDeleted 

SGFC found (and deleted) an annotation property whose value contradicts a previous property.

CombinationOfPropertiesConverted 

SGFC found a combination of certain properties and converted them to another property.

Combinations of TE and BM get converted to DO and IT.

If the SGF content is in FF3 format this message has SgfcMessageType::Warning. If the SGF content is in FF4 format this message has SgfcMessageType::Error.

MoveAnnotationDeleted 

SGFC found (and deleted) a move annotation property in a node that didn't also contain a move property.

GameInfoDeleted 

SGFC found (and deleted) a game info property outside of a game info node.

If the SGF content is in FF3 format this message has SgfcMessageType::Warning. If the SGF content is in FF4 format this message has SgfcMessageType::Error.

DifferentFileFormats 

SGFC found different file formats in the SGF content.

UnknownFileFormat 

SGFC found an unknown file format in the SGF content. SGFC can handle only file formats up to FF4.

SquareBoardSizeCorrected 

SGFC found (and corrected) an SZ property with two values defining a rectangular board, but the two values were the same, so SGFC corrected this to an SZ property with a single value defining a square board.

SourceFileNotSpecified 

SGFC was invoked without a source file argument.

This message cannot actually occur when using SGFC via libsgfc++. 
BadCommandLineOptionParameter 

SGFC was invoked with an argument that takes a parameter, but the specified parameter is illegal for the argument.

TooLargeBoardSizeCorrected 

SGFC found (and corrected) a board size property with a value that is too large.

UsedFeatureNotDefinedInFileFormat 

SGFC found a feature that is not defined in the particular file format of the SGF content.

ViewError 

SGFC found one of various error cases related to the VW property. The exact problem is in the message text.

DifferentGameTypes 

SGFC found different game types in the SGF content.

ValuesWithoutPropertyDeleted 

SGFC found (and deleted) one or more values not associated with any property.

EmptyNodeDeleted 

SGFC found (and deleted) an empty node.

@see SgfcArgumentType::DeleteEmptyNodes. 
VariationLevelNotCorrected 

SGFC found what could possibly be a wrong variation level. It was unable to take corrective action.

VariationLevelCorrected 

SGFC found a wrong variation level. It was able to take corrective action.

ForbiddenMove 

SGFC found a forbidden move that played a stone on a point that is already occupied by another stone.

IntegerKomiDeleted 

SGFC found (and deleted/converted) an obsolete KI property.

MoreThanOneGameTree 

SGFC found more than one game tree in the SGF content.

@see SgfcArgumentType::EnableRestrictiveChecking. 
HandicapDiffersFromSetup 

SGFC found a HA property whose value differs from the number of stones that were set up with setup properties.

See also
SgfcArgumentType::EnableRestrictiveChecking.
SetupStonesOutsideRootNode 

SGFC found setup properties in a node that is not the root node.

@see SgfcArgumentType::EnableRestrictiveChecking. 
TwoMovesWithSameColor 

SGFC found two successive moves that have the same color.

@see SgfcArgumentType::EnableRestrictiveChecking. 
VariationReorderFailed 

SGFC was unable to reorder variations because there were too many variations in the SGF content.

NewStylePassMove 

SGFC found a pass move in the new FF4 style in SGF content that has an older file format.

NodeNotInVariation 

SGFC found (and fixed) a node that was not in any variation.

IllegalVariationStartCorrected 

SGFC found (and corrected) an illegal variation start.

UnknownLongCommandLineOption 

SGFC was invoked with an argument that is not a supported long command line option.

This message cannot actually occur when using SGFC via libsgfc++.

UnknownEncodingInArgument 

An unknown encoding was specified for one of the encoding argument types.

See also
SgfcArgumentType::DefaultEncoding
SgfcArgumentType::ForcedEncoding
UnknownIconvError 

SGFC encountered an unknown iconv error during the encoding phase. This is an internal error which cannot be handled gracefully.

EncodingErrorsDetected 

SGFC encountered one or more errors during the encoding phase. A typical example is that a byte sequence was encountered which is illegal according to the encoding to be used. The error was handled by ignoring the faulty bytes, but the resulting SGF content might well be unusable.

UnknownEncodingInSgfContent 

An unknown encoding was specified in the SGF content (i.e. as value of a CA property). The error is handled by falling back to the default encoding.

EncodingDetectionFailed 

SGFC failed to detect the encoding that it should use. This error can be prevented only by specifying a forced encoding to use.

See also
SgfcArgumentType::ForcedEncoding
SgfContentHasDifferentEncodings 

SGFC found different encodings in the same SGF content. This happens when SGF content has multiple game trees and at least two of them specify a different CA property value.

This message occurs when encoding modes 2 or 3 are used. The message is a critical warning only, so unlike SgfcMessageID::SgfContentHasDifferentEncodingsFatal the library client will be able to process the result. If the encodings used are multibyte encodings there is still a good chance that the encoding phase of SGFC will produce an unusable result.

See also
SgfcArgumentType::EncodingMode
SgfContentHasDifferentEncodingsFatal 

SGFC found different encodings in the same SGF content. This happens when SGF content has multiple game trees and at least two of them specify a different CA property value.

This message occurs when encoding mode 1 is used. The message is a fatal error because the encoding phase of SGFC is practically guaranteed to produce an unusable result. The library client must use encoding modes 2 or 3 to process the SGF content. Even then SGFC will generate SgfcMessageID::SgfContentHasDifferentEncodings.

See also
SgfcArgumentType::EncodingMode
UnknownSgfcMessageID 

Indicates that the message was generated by SGFC, but libsgfc++ was unable to determine the message ID.

This message ID is a positive number in order to satisfy the guarantee that SGFC-generated messages always have message IDs >= 0. libsgfc++ strives to use a number that is not in the list of message IDs that are documented by SGFC.

InvalidMessageID 

Indicates a message without a valid ID. If a message with this ID is seen by a library client this indicates a coding error in libsgfc++.

ParseArgumentError 

Indicates that a fatal error occurred when SGFC parsed arguments, but libsgfc++ was unable to obtain the fatal error message from SGFC.

SaveSgfContentToFilesystemError 

Indicates a fatal error that occurred while libsgfc++ attempted to save a piece of SGF content to the filesystem.

ReadSgfContentFromFilesystemError 

Indicates a fatal error that occurred while libsgfc++ attempted to read a piece of SGF content from the filesystem.

DeleteFileError 

Indicates a fatal error that occurred while libsgfc++ attempted to delete a file in the filesystem.

OutOfMemoryError 

Indicates a fatal error because memory allocation failed in SGFC.

ParseSgfContentError 

Indicates a fatal error that occurred while libsgfc++ attempted to parse SGF content in order to generate a document.

This is likely to be a data-related issue, such as when libsgfc++ attempts to construct an ISgfcGameTypeProperty or ISgfcBoardSizeProperty object with invalid property values.

SGFCInterfacingError 

Indicates a fatal interfacing error between libsgfc++ and SGFC.

Problems can range from simple (but fundamental) things such as an
unexpected @e nullptr in one of the SGFC data structures, to more
complex data-related issues such as when SGFC and libsgfc++ disagree
about the data type(s) of a property value.

The message text is technical and unlikely to have any meaning for an
end user. 

◆ SgfcMessageType

SgfcMessageType enumerates all message types generated by SGFC.

Enumerator
Warning 

The message describes something that is likely a minor problem in the SGF data parsed by SGFC. The message may also document a corrective action taken by SGFC.

Error 

The message describes an error in the SGF data parsed by SGFC.

FatalError 

The message describes a fatal error in the SGF data parsed by SGFC, or it describes a fatal error that occurred during the SGFC operation (e.g. a file handling error).

◆ SgfcNodeTrait

SgfcNodeTrait enumerates the individual traits that an ISgfcNode object can have. An ISgfcNode object can have several traits, which is why the enumeration values are defined as flags that can be combined into a single SgfcNodeTraits value.

See also
SgfcConstants::NodeTraitsNone
SgfcConstants::NodeTraitsAll
Enumerator
Root 

The node is a root node. Root nodes are nodes that are at the root of a tree of nodes, i.e. which have no parent node.

As per the SGF standard, root properties can be stored only in root nodes. A root property is a property that is classified as SgfcPropertyCategory::Root.

GameInfo 

The node is a game info node. Game info nodes are nodes that contain one or more game info properties. A game info property is a property that is classified as SgfcPropertyCategory::GameInfo.

As per the SGF standard, game info properties are usually (but not always) stored in root nodes. A root node is a node that has the trait SgfcNodeTrait::Root. When several game trees are located below a common root node, game info properties are stored in the nodes where a game first becomes distinguishable from all other games in the tree.

As per the SGF standard, there may be only one game info node on any path within a tree of nodes, i.e. if some game info properties occur in one node there may not be any further game info properties in the following nodes:

  • On the path from the root node to this node.
  • In the subtree below this node.

libsgfc++ does not enforce this rule from the SGF standard, but it uses the rule in certain parts of its implementation, such as when an ISgfcGame is queried for game info nodes.

Move 

The node is a move node. Move nodes are nodes that contain one or more move properties. A move property is a property that is classified as SgfcPropertyCategory::Move.

As per the SGF standard, move properties must not be mixed with setup properties within the same node. In theory a node can therefore not have both traits SgfcNodeTrait::Move and SgfcNodeTrait::Setup at the same time. In practice libsgfc++ does not enforce the SGF standard rule.

As per the SGF standard, it's bad style to have move properties in root nodes, although it isn't forbidden. Ideally a node should therefore not have both traits SgfcNodeTrait::Move and SgfcNodeTrait::Root at the same time.

Setup 

The node is a setup node. Setup nodes are nodes that contain one or more setup properties. A setup property is a property that is classified as SgfcPropertyCategory::Setup.

As per the SGF standard, setup properties must not be mixed with move properties within the same node. In theory a node can therefore not have both traits SgfcNodeTrait::Setup and SgfcNodeTrait::Move at the same time. In practice libsgfc++ does not enforce the SGF standard rule.

NodeAnnotation 

The node contains one or more properties that are classified as SgfcPropertyCategory::NodeAnnotation.

MoveAnnotation 

The node contains one or more properties that are classified as SgfcPropertyCategory::MoveAnnotation.

A node with this trait should also have the trait SgfcNodeTrait::Move.

Markup 

The node contains one or more properties that are classified as SgfcPropertyCategory::Markup.

Timing 

The node contains one or more properties that are classified as SgfcPropertyCategory::Timing.

Inheritable 

The node contains one or more properties with the trait SgfcPropertyTrait::Inheritable.

◆ SgfcPropertyCategory

SgfcPropertyCategory enumerates the categories used in the SGF standard to classify properties. A property can fall into one category only.

The SGF standard uses the term "property type" instead of "property category". Because libsgfc++ already has the SgfcPropertyType enumeration it was necessary to invent the new term "category".

Enumerator
Root 

The property is a root property. Root properties define some global "attribute" that applies to the entire tree of nodes below the node that contains them. Examples: Board size, game type, SGF file format.

As per the SGF standard, root properties can be stored only in root nodes. A root node is a node that has the trait SgfcNodeTrait::Root.

GameInfo 

The property is a game info property. Game info properties provide some information about the game played (e.g. who, where, when, what, result, rules, etc.).

A node that contains one or more game info properties has the trait SgfcNodeTrait::GameInfo.

As per the SGF standard, game info properties are usually (but not always) stored in root nodes. A root node is a node that has the trait SgfcNodeTrait::Root. When several game trees are located below a common root node, game info properties are stored in the nodes where a game first becomes distinguishable from all other games in the tree.

As per the SGF standard, there may be only one game info node on any path within a tree of nodes, i.e. if some game info properties occur in one node there may not be any further game info properties in the following nodes:

  • On the path from the root node to this node.
  • In the subtree below this node.

libsgfc++ does not enforce this rule from the SGF standard, but it uses the rule in certain parts of its implementation, such as when an ISgfcGame is queried for game info nodes.

Move 

The property is a move property. Move properties concentrate on the move made, not on the position arrived at by the move.

A node that contains one or more move properties has the trait SgfcNodeTrait::Move.

As per the SGF standard, move properties must not be mixed with setup properties within the same node. In theory a node can therefore not have both traits SgfcNodeTrait::Move and SgfcNodeTrait::Setup at the same time. In practice libsgfc++ does not enforce the SGF standard rule.

As per the SGF standard, it's bad style to have move properties in root nodes, although it isn't forbidden. Ideally a node should therefore not have both traits SgfcNodeTrait::Move and SgfcNodeTrait::Root at the same time.

Setup 

The property is a setup property. Setup properties concentrate on the current position.

A node that contains one or more setup properties has the trait SgfcNodeTrait::Setup.

As per the SGF standard, setup properties must not be mixed with move properties within the same node. In theory a node can therefore not have both traits SgfcNodeTrait::Setup and SgfcNodeTrait::Move at the same time. In practice libsgfc++ does not enforce the SGF standard rule.

NodeAnnotation 

The property in some way annotates the node that contains it.

A node that contains one or more node annotation properties has the
trait SgfcNodeTrait::NodeAnnotation. 
MoveAnnotation 

The property in some way annotates the move that is contained in the same node as the property.

A node that contains one or more move annotation properties has the trait SgfcNodeTrait::MoveAnnotation.

Markup 

The property in some way marks up one or more points.

A node that contains one or more markup properties has the
trait SgfcNodeTrait::Markup. 
Timing 

The property provides a value related to timing.

A node that contains one or more timing properties has the
trait SgfcNodeTrait::Timing. 
Miscellaneous 

The property is a miscellaneous property, i.e. it cannot be placed in a more specific category.

◆ SgfcPropertyTrait

SgfcPropertyTrait enumerates the individual traits that an ISgfcProperty object can have. An ISgfcProperty object can have several traits, which is why the enumeration values are defined as flags that can be combined into a single SgfcPropertyTraits value.

The SGF standard uses the term "property attribute" instead of "property trait".

See also
SgfcConstants::PropertyTraitsNone
SgfcConstants::PropertyTraitsAll
Enumerator
Inheritable 

The property is an inheritable property. Inheritable properties are properties that affect not only the node contining these properties but also ALL subsequent child nodes, until a new setting is encountered or the setting is cleared.

◆ SgfcPropertyType

SgfcPropertyType enumerates all property types defined by the SGF standard, plus a small number of non-standard property types that are specially handled by SGFC. The enum value SgfcPropertyType::Unknown is used for all other non-standard properties.

Enumerator

Execute black move. Property value type: Move.

This is a move property. 
KO 

Execute a black or white move within the same node even if it is illegal. The property is illegal if there isn't a black or white move within the same node. Property value type: None.

This is a move property.

MN 

Set the move number of a move specified in the same node as this property to the given value. Property value type: Number.

This is a move property.

Execute white move. Property value type: Move.

This is a move property. 
AB 

Add black stones to the board. Property value type: List of Stone.

This is a board setup property.

AE 

Clear the given points on the board. Property value type: List of Point.

This is a board setup property.

AW 

Add white stones to the board. Property value type: List of Stone.

This is a board setup property.

PL 

Set the player whose turn it is. Property value type: Color.

This is a board setup property. 

Provide a comment text for the node. Property value type: Text.

This is a node annotation property. 
DM 

Specify that the position is even. Property value type: Double.

The property must not be mixed with UC, GB or GW within a node.

This is a node annotation property. 
GB 

The node contains something that is good for black. Property value type: Double.

The property must not be mixed with GW, DM or UC within a node.

This is a node annotation property.

GW 

The node contains something that is good for white. Property value type: Double.

The property must not be mixed with GB, DM or UC within a node.

This is a node annotation property.

HO 

The node contains a "hotspot", i.e. something interesting such as a game-deciding move. Property value type: Double.

This is a node annotation property.

Provide a name text for the node. Property value type: SimpleText.

This is a node annotation property.

UC 

The node contains a position that is unclear. Property value type: Double.

The property must not be mixed with DM, GB or GW within a node.

This is a node annotation property.

Define a value for the node. Positive values are good for black, negative values are good for white. Property value type: Real.

The interpretation of particular values is game-specific. In Go, this is the estimated score.

This is a node annotation property.

BM 

The move played in this node is a bad move. Property value type: Double.

The property must not be mixed with TE, DO or IT within a node.

This is a move annotation property.

DO 

The move played in this node is doubtful. Property value type: None.

The property must not be mixed with BM, TE, or IT within a node.

This is a move annotation property.

IT 

The move played in this node is interesting. Property value type: None.

The property must not be mixed with BM, TE, or DO within a node.

This is a move annotation property.

TE 

The move played in this node is tesuji (good move). Property value type: Double.

The property must not be mixed with BM, TE, or IT within a node.

This is a move annotation property.

AR 

For each property value, draw an arrow from the first point to the second point. Property value type: List of composed Point/Point (i.e. "Point:Point").

No two property values must specify the same arrow twice. A property value must specify two different points.

This is a markup property.

CR 

Mark the given points with a circle. Property value type: List of Point.

Property values must be unique.

Within the same node the points specified must not also be specified by one of the other properties MA, SL, SQ or TR.

This is a markup property.

DD 

Dim (grey out) the given points. Property value type: Elist of Point.

Elist means that the property value can be either a list of Point, or None.

Property values must be unique (not specified in the SGF standard).

An "inherits" property. Specifying a None value clears any inherited values, i.e. "undims" everyting.

This is a markup property.

LB 

Write the given labels on the board, centered around the given points. Property value type: List of composed Point/SimpleText (i.e. "Point:SimpleText").

Property values must be unique.

This is a markup property.

LN 

For each property value, draw a line from the first point to the second point. Property value type: List of composed Point/Point (i.e. "Point:Point").

No two property values must specify the same arrow twice. A property value must specify two different points.

Within the same node the point pairs specified must not also be specified by the AR properties (restriction is not in the SGF standard).

This is a markup property.

MA 

Mark the given points with an "X". Property value type: List of Point.

Property values must be unique.

Within the same node the points specified must not also be specified by one of the other properties CR, SL, SQ or TR.

This is a markup property.

SL 

Draw the given points as "selected". Property value type: List of Point.

Property values must be unique.

Within the same node the points specified must not also be specified by one of the other properties CR, MA, SQ or TR.

This is a markup property.

SQ 

Mark the given points with a square. Property value type: List of Point.

Property values must be unique.

Within the same node the points specified must not also be specified by one of the other properties CR, MA, SL or TR.

This is a markup property.

TR 

Mark the given points with a triangle. Property value type: List of Point.

Property values must be unique.

Within the same node the points specified must not also be specified by one of the other properties CR, MA, SL or SQ.

This is a markup property.

AP 

Name and version number of the application used to create the game tree. Property value type: Composed SimpleText/SimpleText (i.e. "SimpleText:SimpleText").

This is a root property.

CA 

The encoding (aka "character set) used for SimpleText and Text type property values in the game tree. Property value type: SimpleText.

The default value is "ISO-8859-1" aka "Latin1". Only character set names (or their aliases) as specified in RFC 1345 (or updates thereof) are allowed.

This is a root property.

FF 

The file format used in the game tree. Property value type: Number.

Allowed values are 1, 3 and 4. The default value is 1.

This is a root property.

GM 

The type of game that is stored in the game tree. Property value type: Number.

Allowed values are 1-16. The default value is 1 (Go).

This is a root property.

See also
SgfcGameType.
ST 

Define how variations should be shown. Property value type: Number.

This is a root property.

SZ 

Define the board size. Property value type: Either a single Number, or a composed Number/Number (i.e. "Number:Number").

A single number means the board is square. Two numbers means the board is rectangular. If two numbers are specified they must be different. The first number specifies the number of columns, the second number specifies the number of rows.

Allowed values are numbers >= 1. For games of type Go the maximum value is 52. The default value for games of type Go is 19, for games of type Chess it is 8.

This is a root property.

HA 

Defines the number of handicap stones. This is a game-specific property for the game of Go. Property value type: Number.

Property value must be >= 2.

When this property appears, the handicap stones should be set up with an AB property within the same node.

This is a game info property.

KM 

Defines the komi value. This is a game-specific property for the game of Go. Property value type: Real.

This is a game info property.

Unknown 

The property type is unknown, i.e. the property is a custom property not defined by the SGF standard.

◆ SgfcPropertyValueType

SgfcPropertyValueType enumerates the basic SGF property value types.

Enumerator
None 

The property has no value.

Number 

The property value is a positive or negative integer.

Real 

The property value is a positive or negative decimal value.

Double 

The property value is a Double value. A Double value can have one of two integer values: Either 1 (which means "normal") or 2 (which means "emphasized").

Example: GB[1] means "good for black" (normal). GB[2] means "very good for black" (emphasized).

Color 

The property value is a Color value. A Color value can have one of two string values: Either "B" (which means "black") or "W" (which means "white").

SimpleText 

The property value is a simple string of arbitrary length. The only whitespace allowed for this string type are space characters. Specifically, a SimpleText property value does not contain line breaks.

Text 

The property value is a formatted string of arbitrary length. The only whitespace allowed for this string type are space characters and line break characters.

SGF uses the description "formatted string" to refer to the fact that an SGF processing application should retain line breaks when it displays the property value.

Point 

The property value describes a location on the game board. The value's string representation is game specific.

Move 

The property value describes a move according to the game rules. The value's string representation is game specific.

Stone 

The property value describes a game piece and its location on the game board. The value's string representation is game specific.

Unknown 

The property value has an unknown type. This is used for non-empty values of any property not defined in the SGF standard.