libsgfc++ 2.0.1
A C++ library that uses SGFC to read and write SGF (Smart Game Format) data.
|
The SgfcComposedPropertyValue class provides an implementation of the ISgfcComposedPropertyValue interface. See the interface header file for documentation. More...
#include <SgfcComposedPropertyValue.h>
Public Member Functions | |
SgfcComposedPropertyValue (std::shared_ptr< ISgfcSinglePropertyValue > value1, std::shared_ptr< ISgfcSinglePropertyValue > value2) | |
Initializes a newly constructed SgfcComposedPropertyValue object that consists of the two values value1 and value2. | |
virtual | ~SgfcComposedPropertyValue () |
Destroys and cleans up the SgfcSinglePropertyValue object. | |
virtual bool | IsComposedValue () const override |
Returns true if the ISgfcPropertyValue object holds a "composed" value, i.e. a value that consists of a composite of two single values. Returns false if the ISgfcPropertyValue holds only a single value. | |
virtual const ISgfcComposedPropertyValue * | ToComposedValue () const override |
Returns an ISgfcComposedPropertyValue object if IsComposedValue() returns true. Returns nullptr if IsComposedValue() returns false. The caller is not the owner of the ISgfcComposedPropertyValue object. | |
virtual std::shared_ptr< ISgfcSinglePropertyValue > | GetValue1 () const override |
Returns the first property value. | |
virtual std::shared_ptr< ISgfcSinglePropertyValue > | GetValue2 () const override |
Returns the second property value. | |
Public Member Functions inherited from LibSgfcPlusPlus::ISgfcComposedPropertyValue | |
ISgfcComposedPropertyValue () | |
Initializes a newly constructed ISgfcComposedPropertyValue object. | |
virtual | ~ISgfcComposedPropertyValue () |
Destroys and cleans up the ISgfcComposedPropertyValue object. | |
Public Member Functions inherited from LibSgfcPlusPlus::ISgfcPropertyValue | |
ISgfcPropertyValue () | |
Initializes a newly constructed ISgfcPropertyValue object. | |
virtual | ~ISgfcPropertyValue () |
Destroys and cleans up the ISgfcPropertyValue object. | |
virtual const ISgfcSinglePropertyValue * | ToSingleValue () const |
Returns nullptr if IsComposedValue() returns true. Returns an ISgfcSinglePropertyValue object if IsComposedValue() returns false. The caller is not the owner of the ISgfcSinglePropertyValue object. | |
The SgfcComposedPropertyValue class provides an implementation of the ISgfcComposedPropertyValue interface. See the interface header file for documentation.
LibSgfcPlusPlus::SgfcComposedPropertyValue::SgfcComposedPropertyValue | ( | std::shared_ptr< ISgfcSinglePropertyValue > | value1, |
std::shared_ptr< ISgfcSinglePropertyValue > | value2 ) |
Initializes a newly constructed SgfcComposedPropertyValue object that consists of the two values value1 and value2.
std::invalid_argument | Is thrown if value1 is nullptr or if value2 is nullptr. |
|
overridevirtual |
Returns the first property value.
Implements LibSgfcPlusPlus::ISgfcComposedPropertyValue.
|
overridevirtual |
Returns the second property value.
Implements LibSgfcPlusPlus::ISgfcComposedPropertyValue.
|
overridevirtual |
Returns true if the ISgfcPropertyValue object holds a "composed" value, i.e. a value that consists of a composite of two single values. Returns false if the ISgfcPropertyValue holds only a single value.
Implements LibSgfcPlusPlus::ISgfcPropertyValue.
|
overridevirtual |
Returns an ISgfcComposedPropertyValue object if IsComposedValue() returns true. Returns nullptr if IsComposedValue() returns false. The caller is not the owner of the ISgfcComposedPropertyValue object.
Reimplemented from LibSgfcPlusPlus::ISgfcPropertyValue.