libsgfc++ 2.0.1
A C++ library that uses SGFC to read and write SGF (Smart Game Format) data.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
LibSgfcPlusPlus::SgfcDocumentWriteResult Class Reference

The SgfcDocumentWriteResult class provides an implementation of the ISgfcDocumentWriteResult interface. See the interface header file for documentation. More...

#include <SgfcDocumentWriteResult.h>

Inheritance diagram for LibSgfcPlusPlus::SgfcDocumentWriteResult:
LibSgfcPlusPlus::ISgfcDocumentWriteResult

Public Member Functions

 SgfcDocumentWriteResult ()
 Initializes a newly constructed SgfcDocumentWriteResult object that encapsulates a write operation result consisting of no messages, i.e. the write operation was successful.
 
 SgfcDocumentWriteResult (std::shared_ptr< ISgfcMessage > invalidCommandLineReason)
 Initializes a newly constructed SgfcDocumentWriteResult object that encapsulates a write operation result consisting of a single message invalidCommandLineReason.
 
 SgfcDocumentWriteResult (std::vector< std::shared_ptr< ISgfcMessage > > parseResult)
 Initializes a newly constructed SgfcDocumentWriteResult object that encapsulates a write operation result consisting of the collection of messages parseResult.
 
virtual ~SgfcDocumentWriteResult ()
 Destroys and cleans up the SgfcDocumentReadResult object.
 
virtual SgfcExitCode GetExitCode () const override
 Returns an SgfcExitCode value that best fits the result of the write operation. The numeric value of the SgfcExitCode corresponds to one of the exit codes of SGFC.
 
virtual std::vector< std::shared_ptr< ISgfcMessage > > GetParseResult () const override
 Returns a collection of ISgfcMessage objects which together form the parse result of the write operation. The messages appear in the order in which they were generated by SGFC. The collection is empty if write operation did not generate any messages.
 
virtual void DebugPrintToConsole () const override
 Prints the content of the ISgfcDocumentWriteResult to stdout for debugging purposes.
 
- Public Member Functions inherited from LibSgfcPlusPlus::ISgfcDocumentWriteResult
 ISgfcDocumentWriteResult ()
 Initializes a newly constructed ISgfcDocumentWriteResult object.
 
virtual ~ISgfcDocumentWriteResult ()
 Destroys and cleans up the ISgfcDocumentWriteResult object.
 

Detailed Description

The SgfcDocumentWriteResult class provides an implementation of the ISgfcDocumentWriteResult interface. See the interface header file for documentation.

Constructor & Destructor Documentation

◆ SgfcDocumentWriteResult() [1/2]

LibSgfcPlusPlus::SgfcDocumentWriteResult::SgfcDocumentWriteResult ( std::shared_ptr< ISgfcMessage > invalidCommandLineReason)

Initializes a newly constructed SgfcDocumentWriteResult object that encapsulates a write operation result consisting of a single message invalidCommandLineReason.

This constructor is intended to be used when the write operation failed due to invalid arguments passed to SGFC.

◆ SgfcDocumentWriteResult() [2/2]

LibSgfcPlusPlus::SgfcDocumentWriteResult::SgfcDocumentWriteResult ( std::vector< std::shared_ptr< ISgfcMessage > > parseResult)

Initializes a newly constructed SgfcDocumentWriteResult object that encapsulates a write operation result consisting of the collection of messages parseResult.

This constructor is intended to be used when the arguments passed to SGFC were valid. The write operation may still have failed due to other reasons.

Member Function Documentation

◆ DebugPrintToConsole()

void LibSgfcPlusPlus::SgfcDocumentWriteResult::DebugPrintToConsole ( ) const
overridevirtual

Prints the content of the ISgfcDocumentWriteResult to stdout for debugging purposes.

Implements LibSgfcPlusPlus::ISgfcDocumentWriteResult.

◆ GetExitCode()

SgfcExitCode LibSgfcPlusPlus::SgfcDocumentWriteResult::GetExitCode ( ) const
overridevirtual

Returns an SgfcExitCode value that best fits the result of the write operation. The numeric value of the SgfcExitCode corresponds to one of the exit codes of SGFC.

Implements LibSgfcPlusPlus::ISgfcDocumentWriteResult.

◆ GetParseResult()

std::vector< std::shared_ptr< ISgfcMessage > > LibSgfcPlusPlus::SgfcDocumentWriteResult::GetParseResult ( ) const
overridevirtual

Returns a collection of ISgfcMessage objects which together form the parse result of the write operation. The messages appear in the order in which they were generated by SGFC. The collection is empty if write operation did not generate any messages.

Implements LibSgfcPlusPlus::ISgfcDocumentWriteResult.


The documentation for this class was generated from the following files: