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::ISgfcArguments Class Referenceabstract

The ISgfcArguments interface represents a collection of arguments to be passed on to SGFC when it reads or writes SGF content. More...

#include <ISgfcArguments.h>

Inheritance diagram for LibSgfcPlusPlus::ISgfcArguments:
LibSgfcPlusPlus::SgfcArguments

Public Member Functions

 ISgfcArguments ()
 Initializes a newly constructed ISgfcArguments object.
 
virtual ~ISgfcArguments ()
 Destroys and cleans up the ISgfcArguments object.
 
virtual bool HasArguments () const =0
 Returns true if the ISgfcArguments object contains one or more arguments. Returns false if the ISgfcArguments object contains no arguments.
 
virtual std::vector< std::shared_ptr< ISgfcArgument > > GetArguments () const =0
 Returns a collection of arguments that make up the content of the ISgfcArguments object. The collection is ordered, beginning with the first argument that was added to the ISgfcArguments object. The collection is empty if the ISgfcArguments object contains no arguments.
 
virtual void AddArgument (SgfcArgumentType argumentType)=0
 Adds an argument to the end of the collection of arguments that make up the content of the ISgfcArguments object.
 
virtual void AddArgument (SgfcArgumentType argumentType, int parameter)=0
 Adds an argument to the end of the collection of arguments that make up the content of the ISgfcArguments object.
 
virtual void AddArgument (SgfcArgumentType argumentType, const std::string &parameter)=0
 Adds an argument to the end of the collection of arguments that make up the content of the ISgfcArguments object.
 
virtual void AddArgument (SgfcArgumentType argumentType, SgfcPropertyType parameter)=0
 Adds an argument to the end of the collection of arguments that make up the content of the ISgfcArguments object.
 
virtual void AddArgument (SgfcArgumentType argumentType, SgfcMessageID parameter)=0
 Adds an argument to the end of the collection of arguments that make up the content of the ISgfcArguments object.
 
virtual void ClearArguments ()=0
 Removes all arguments from the collection of arguments that make up the content of the ISgfcArguments object.
 

Detailed Description

The ISgfcArguments interface represents a collection of arguments to be passed on to SGFC when it reads or writes SGF content.

Member Function Documentation

◆ AddArgument() [1/5]

virtual void LibSgfcPlusPlus::ISgfcArguments::AddArgument ( SgfcArgumentType argumentType)
pure virtual

Adds an argument to the end of the collection of arguments that make up the content of the ISgfcArguments object.

Parameters
argumentTypeThe argument type.
Exceptions
std::invalid_argumentis thrown if argumentType requires a parameter, or if the collection already contains an argument with the same type as argumentType.

Implemented in LibSgfcPlusPlus::SgfcArguments.

◆ AddArgument() [2/5]

virtual void LibSgfcPlusPlus::ISgfcArguments::AddArgument ( SgfcArgumentType argumentType,
const std::string & parameter )
pure virtual

Adds an argument to the end of the collection of arguments that make up the content of the ISgfcArguments object.

Parameters
argumentTypeThe argument type.
parameterThe argument's string type parameter.
Exceptions
std::invalid_argumentis thrown if argumentType does not require a string type parameter, or if argumentType does not support multiple specifications but the collection already contains an argument with the same type as argumentType, or if argumentType supports multiple specifications but the collection already contains an argument with an argument type / parameter combination that is equal to argumentType and parameter.

Implemented in LibSgfcPlusPlus::SgfcArguments.

◆ AddArgument() [3/5]

virtual void LibSgfcPlusPlus::ISgfcArguments::AddArgument ( SgfcArgumentType argumentType,
int parameter )
pure virtual

Adds an argument to the end of the collection of arguments that make up the content of the ISgfcArguments object.

Parameters
argumentTypeThe argument type.
parameterThe argument's integer type parameter.
Exceptions
std::invalid_argumentis thrown if argumentType does not require an integer type parameter, or if argumentType does not support multiple specifications but the collection already contains an argument with the same type as argumentType, or if argumentType supports multiple specifications but the collection already contains an argument with an argument type / parameter combination that is equal to argumentType and parameter.

Implemented in LibSgfcPlusPlus::SgfcArguments.

◆ AddArgument() [4/5]

virtual void LibSgfcPlusPlus::ISgfcArguments::AddArgument ( SgfcArgumentType argumentType,
SgfcMessageID parameter )
pure virtual

Adds an argument to the end of the collection of arguments that make up the content of the ISgfcArguments object.

Parameters
argumentTypeThe argument type.
parameterThe argument's SgfcMessageID parameter.
Exceptions
std::invalid_argumentis thrown if argumentType does not require an SgfcMessageID parameter, or if argumentType does not support multiple specifications but the collection already contains an argument with the same type as argumentType, or if argumentType supports multiple specifications but the collection already contains an argument with an argument type / parameter combination that is equal to argumentType and parameter, or if parameter is a message ID not known to SGFC (libsgfc++ message IDs with an underlying negative numeric value, or SgfcMessageID::UnknownSgfcMessageID).

Implemented in LibSgfcPlusPlus::SgfcArguments.

◆ AddArgument() [5/5]

virtual void LibSgfcPlusPlus::ISgfcArguments::AddArgument ( SgfcArgumentType argumentType,
SgfcPropertyType parameter )
pure virtual

Adds an argument to the end of the collection of arguments that make up the content of the ISgfcArguments object.

Parameters
argumentTypeThe argument type.
parameterThe argument's SgfcPropertyType parameter.
Exceptions
std::invalid_argumentis thrown if argumentType does not require an SgfcPropertyType parameter, or if argumentType does not support multiple specifications but the collection already contains an argument with the same type as argumentType, or if argumentType supports multiple specifications but the collection already contains an argument with an argument type / parameter combination that is equal to argumentType and parameter.

Implemented in LibSgfcPlusPlus::SgfcArguments.

◆ ClearArguments()

virtual void LibSgfcPlusPlus::ISgfcArguments::ClearArguments ( )
pure virtual

Removes all arguments from the collection of arguments that make up the content of the ISgfcArguments object.

Implemented in LibSgfcPlusPlus::SgfcArguments.

◆ GetArguments()

virtual std::vector< std::shared_ptr< ISgfcArgument > > LibSgfcPlusPlus::ISgfcArguments::GetArguments ( ) const
pure virtual

Returns a collection of arguments that make up the content of the ISgfcArguments object. The collection is ordered, beginning with the first argument that was added to the ISgfcArguments object. The collection is empty if the ISgfcArguments object contains no arguments.

Implemented in LibSgfcPlusPlus::SgfcArguments.

◆ HasArguments()

virtual bool LibSgfcPlusPlus::ISgfcArguments::HasArguments ( ) const
pure virtual

Returns true if the ISgfcArguments object contains one or more arguments. Returns false if the ISgfcArguments object contains no arguments.

Implemented in LibSgfcPlusPlus::SgfcArguments.


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