libsgfc++ 2.0.1
A C++ library that uses SGFC to read and write SGF (Smart Game Format) data.
|
The ISgfcDocumentReadResult interface provides access to the result of a read operation performed by ISgfcDocumentReader. More...
#include <ISgfcDocumentReadResult.h>
Public Member Functions | |
ISgfcDocumentReadResult () | |
Initializes a newly constructed ISgfcDocumentReadResult object. | |
virtual | ~ISgfcDocumentReadResult () |
Destroys and cleans up the ISgfcDocumentReadResult object. | |
virtual SgfcExitCode | GetExitCode () const =0 |
Returns an SgfcExitCode value that best fits the result of the read operation. The numeric value of the SgfcExitCode corresponds to one of the exit codes of SGFC. | |
virtual bool | IsSgfDataValid () const =0 |
Returns true if the SGF data that was loaded and parsed by the read operation is valid. Returns false if the SGF data is not valid. | |
virtual std::vector< std::shared_ptr< ISgfcMessage > > | GetParseResult () const =0 |
Returns a collection of ISgfcMessage objects which together form the parse result of the read operation. The messages appear in the order in which they were generated by SGFC. The collection is empty if the read operation did not generate any messages. | |
virtual std::shared_ptr< ISgfcDocument > | GetDocument () const =0 |
Returns the document object that provides access to the SGF data in structured form. If IsSgfDataValid() returns false the document object that is returned contains no data. | |
virtual void | DebugPrintToConsole () const =0 |
Prints the content of the ISgfcDocumentReadResult to stdout for debugging purposes. | |
The ISgfcDocumentReadResult interface provides access to the result of a read operation performed by ISgfcDocumentReader.
ISgfcDocumentReadResult is immutable, i.e. once the ISgfcDocumentReadResult object is constructed it cannot be changed.
|
pure virtual |
Prints the content of the ISgfcDocumentReadResult to stdout for debugging purposes.
Implemented in LibSgfcPlusPlus::SgfcDocumentReadResult.
|
pure virtual |
Returns the document object that provides access to the SGF data in structured form. If IsSgfDataValid() returns false the document object that is returned contains no data.
Implemented in LibSgfcPlusPlus::SgfcDocumentReadResult.
|
pure virtual |
Returns an SgfcExitCode value that best fits the result of the read operation. The numeric value of the SgfcExitCode corresponds to one of the exit codes of SGFC.
Implemented in LibSgfcPlusPlus::SgfcDocumentReadResult.
|
pure virtual |
Returns a collection of ISgfcMessage objects which together form the parse result of the read operation. The messages appear in the order in which they were generated by SGFC. The collection is empty if the read operation did not generate any messages.
Implemented in LibSgfcPlusPlus::SgfcDocumentReadResult.
|
pure virtual |
Returns true if the SGF data that was loaded and parsed by the read operation is valid. Returns false if the SGF data is not valid.
The SGF data is considered valid if the read operation did not generate a fatal error. A fatal error shows up in the collection of ISgfcMessage objects that GetParseResult() returns, as an ISgfcMessage object with message type SgfcMessageType::FatalError.
Typical fatal errors are invalid arguments, or the SGF data could not be read e.g. because the specified SGF file does not exist.
Implemented in LibSgfcPlusPlus::SgfcDocumentReadResult.