libsgfc++ 2.0.1
A C++ library that uses SGFC to read and write SGF (Smart Game Format) data.
|
The SgfcArgument class provides an implementation of the ISgfcArgument interface. See the interface header file for documentation. More...
#include <SgfcArgument.h>
Public Member Functions | |
SgfcArgument (SgfcArgumentType argumentType) | |
Initializes a newly constructed SgfcArgument object with the type argumentType. | |
SgfcArgument (SgfcArgumentType argumentType, int parameter) | |
Initializes a newly constructed SgfcArgument object with the type argumentType and the integer type parameter parameter. | |
SgfcArgument (SgfcArgumentType argumentType, std::string parameter) | |
Initializes a newly constructed SgfcArgument object with the type argumentType and the string type parameter parameter. | |
SgfcArgument (SgfcArgumentType argumentType, SgfcPropertyType parameter) | |
Initializes a newly constructed SgfcArgument object with the type argumentType and the SgfcPropertyType parameter parameter. | |
SgfcArgument (SgfcArgumentType argumentType, SgfcMessageID parameter) | |
Initializes a newly constructed SgfcArgument object with the type argumentType and the SgfcMessageID parameter parameter. | |
virtual | ~SgfcArgument () |
Destroys and cleans up the SgfcArgument object. | |
virtual SgfcArgumentType | GetArgumentType () const override |
Returns the argument type. | |
virtual bool | HasIntegerTypeParameter () const override |
Returns true if the argument has an integer type parameter. | |
virtual int | GetIntegerTypeParameter () const override |
Returns the argument's integer type parameter value. The return value is undefined if HasIntegerTypeParameter() returns false. | |
virtual bool | HasStringTypeParameter () const override |
Returns true if the argument has a string type parameter. | |
virtual std::string | GetStringTypeParameter () const override |
Returns the argument's string type parameter value. The return value is undefined if HasStringTypeParameter() returns false. | |
virtual bool | HasPropertyTypeParameter () const override |
Returns true if the argument has an SgfcPropertyType parameter. | |
virtual SgfcPropertyType | GetPropertyTypeParameter () const override |
Returns the argument's SgfcPropertyType parameter value. The return value is undefined if HasPropertyTypeParameter() returns false. | |
virtual bool | HasMessageIDParameter () const override |
Returns true if the argument has an SgfcMessageID parameter. | |
virtual SgfcMessageID | GetMessageIDParameter () const override |
Returns the argument's SgfcMessageID parameter value. The return value is undefined if HasMessageIDParameter() returns false. | |
virtual std::string | ToString () const override |
Returns the argument as a string, exactly as it would be specified on the SGFC command line. Examples: -n, -b1, -yMA. | |
Public Member Functions inherited from LibSgfcPlusPlus::ISgfcArgument | |
ISgfcArgument () | |
Initializes a newly constructed ISgfcArgument object. | |
virtual | ~ISgfcArgument () |
Destroys and cleans up the ISgfcArgument object. | |
The SgfcArgument class provides an implementation of the ISgfcArgument interface. See the interface header file for documentation.
LibSgfcPlusPlus::SgfcArgument::SgfcArgument | ( | SgfcArgumentType | argumentType | ) |
Initializes a newly constructed SgfcArgument object with the type argumentType.
std::invalid_argument | is thrown if argumentType requires a parameter. |
LibSgfcPlusPlus::SgfcArgument::SgfcArgument | ( | SgfcArgumentType | argumentType, |
int | parameter ) |
Initializes a newly constructed SgfcArgument object with the type argumentType and the integer type parameter parameter.
std::invalid_argument | is thrown if argumentType does not require an integer type parameter. |
LibSgfcPlusPlus::SgfcArgument::SgfcArgument | ( | SgfcArgumentType | argumentType, |
std::string | parameter ) |
Initializes a newly constructed SgfcArgument object with the type argumentType and the string type parameter parameter.
std::invalid_argument | is thrown if argumentType does not require a string type parameter. |
LibSgfcPlusPlus::SgfcArgument::SgfcArgument | ( | SgfcArgumentType | argumentType, |
SgfcPropertyType | parameter ) |
Initializes a newly constructed SgfcArgument object with the type argumentType and the SgfcPropertyType parameter parameter.
std::invalid_argument | is thrown if argumentType does not require an SgfcPropertyType parameter. |
LibSgfcPlusPlus::SgfcArgument::SgfcArgument | ( | SgfcArgumentType | argumentType, |
SgfcMessageID | parameter ) |
Initializes a newly constructed SgfcArgument object with the type argumentType and the SgfcMessageID parameter parameter.
std::invalid_argument | is thrown if argumentType does not require an SgfcMessageID parameter, or if parameter is a message ID not known to SGFC (libsgfc++ message IDs with an underlying negative numeric value, or SgfcMessageID::UnknownSgfcMessageID). |
|
overridevirtual |
Returns the argument type.
Implements LibSgfcPlusPlus::ISgfcArgument.
|
overridevirtual |
Returns the argument's integer type parameter value. The return value is undefined if HasIntegerTypeParameter() returns false.
Implements LibSgfcPlusPlus::ISgfcArgument.
|
overridevirtual |
Returns the argument's SgfcMessageID parameter value. The return value is undefined if HasMessageIDParameter() returns false.
Implements LibSgfcPlusPlus::ISgfcArgument.
|
overridevirtual |
Returns the argument's SgfcPropertyType parameter value. The return value is undefined if HasPropertyTypeParameter() returns false.
Implements LibSgfcPlusPlus::ISgfcArgument.
|
overridevirtual |
Returns the argument's string type parameter value. The return value is undefined if HasStringTypeParameter() returns false.
Implements LibSgfcPlusPlus::ISgfcArgument.
|
overridevirtual |
Returns true if the argument has an integer type parameter.
Implements LibSgfcPlusPlus::ISgfcArgument.
|
overridevirtual |
Returns true if the argument has an SgfcMessageID parameter.
Implements LibSgfcPlusPlus::ISgfcArgument.
|
overridevirtual |
Returns true if the argument has an SgfcPropertyType parameter.
Implements LibSgfcPlusPlus::ISgfcArgument.
|
overridevirtual |
Returns true if the argument has a string type parameter.
Implements LibSgfcPlusPlus::ISgfcArgument.
|
overridevirtual |
Returns the argument as a string, exactly as it would be specified on the SGFC command line. Examples: -n, -b1, -yMA.
Implements LibSgfcPlusPlus::ISgfcArgument.