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::SgfcArguments Class Reference

The SgfcArguments class provides an implementation of the ISgfcArguments interface. See the interface header file for documentation. More...

#include <SgfcArguments.h>

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

Public Member Functions

 SgfcArguments ()
 Initializes a newly constructed SgfcArguments object that contains no arguments.
 
virtual ~SgfcArguments ()
 Destroys and cleans up the SgfcArguments object.
 
virtual bool HasArguments () const override
 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 override
 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) override
 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) override
 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) override
 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) override
 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) override
 Adds an argument to the end of the collection of arguments that make up the content of the ISgfcArguments object.
 
virtual void ClearArguments () override
 Removes all arguments from the collection of arguments that make up the content of the ISgfcArguments object.
 
- Public Member Functions inherited from LibSgfcPlusPlus::ISgfcArguments
 ISgfcArguments ()
 Initializes a newly constructed ISgfcArguments object.
 
virtual ~ISgfcArguments ()
 Destroys and cleans up the ISgfcArguments object.
 

Detailed Description

The SgfcArguments class provides an implementation of the ISgfcArguments interface. See the interface header file for documentation.

Member Function Documentation

◆ AddArgument() [1/5]

void LibSgfcPlusPlus::SgfcArguments::AddArgument ( SgfcArgumentType argumentType)
overridevirtual

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.

Implements LibSgfcPlusPlus::ISgfcArguments.

◆ AddArgument() [2/5]

void LibSgfcPlusPlus::SgfcArguments::AddArgument ( SgfcArgumentType argumentType,
const std::string & parameter )
overridevirtual

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.

Implements LibSgfcPlusPlus::ISgfcArguments.

◆ AddArgument() [3/5]

void LibSgfcPlusPlus::SgfcArguments::AddArgument ( SgfcArgumentType argumentType,
int parameter )
overridevirtual

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.

Implements LibSgfcPlusPlus::ISgfcArguments.

◆ AddArgument() [4/5]

void LibSgfcPlusPlus::SgfcArguments::AddArgument ( SgfcArgumentType argumentType,
SgfcMessageID parameter )
overridevirtual

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).

Implements LibSgfcPlusPlus::ISgfcArguments.

◆ AddArgument() [5/5]

void LibSgfcPlusPlus::SgfcArguments::AddArgument ( SgfcArgumentType argumentType,
SgfcPropertyType parameter )
overridevirtual

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.

Implements LibSgfcPlusPlus::ISgfcArguments.

◆ ClearArguments()

void LibSgfcPlusPlus::SgfcArguments::ClearArguments ( )
overridevirtual

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

Implements LibSgfcPlusPlus::ISgfcArguments.

◆ GetArguments()

std::vector< std::shared_ptr< ISgfcArgument > > LibSgfcPlusPlus::SgfcArguments::GetArguments ( ) const
overridevirtual

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.

Implements LibSgfcPlusPlus::ISgfcArguments.

◆ HasArguments()

bool LibSgfcPlusPlus::SgfcArguments::HasArguments ( ) const
overridevirtual

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

Implements LibSgfcPlusPlus::ISgfcArguments.


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