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

The SgfcComposedPropertyValue class provides an implementation of the ISgfcComposedPropertyValue interface. See the interface header file for documentation. More...

#include <SgfcComposedPropertyValue.h>

Inheritance diagram for LibSgfcPlusPlus::SgfcComposedPropertyValue:
LibSgfcPlusPlus::ISgfcComposedPropertyValue LibSgfcPlusPlus::ISgfcPropertyValue

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 ISgfcComposedPropertyValueToComposedValue () 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< ISgfcSinglePropertyValueGetValue1 () const override
 Returns the first property value.
 
virtual std::shared_ptr< ISgfcSinglePropertyValueGetValue2 () 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 ISgfcSinglePropertyValueToSingleValue () 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.
 

Detailed Description

The SgfcComposedPropertyValue class provides an implementation of the ISgfcComposedPropertyValue interface. See the interface header file for documentation.

Constructor & Destructor Documentation

◆ SgfcComposedPropertyValue()

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.

Exceptions
std::invalid_argumentIs thrown if value1 is nullptr or if value2 is nullptr.

Member Function Documentation

◆ GetValue1()

std::shared_ptr< ISgfcSinglePropertyValue > LibSgfcPlusPlus::SgfcComposedPropertyValue::GetValue1 ( ) const
overridevirtual

Returns the first property value.

Implements LibSgfcPlusPlus::ISgfcComposedPropertyValue.

◆ GetValue2()

std::shared_ptr< ISgfcSinglePropertyValue > LibSgfcPlusPlus::SgfcComposedPropertyValue::GetValue2 ( ) const
overridevirtual

Returns the second property value.

Implements LibSgfcPlusPlus::ISgfcComposedPropertyValue.

◆ IsComposedValue()

bool LibSgfcPlusPlus::SgfcComposedPropertyValue::IsComposedValue ( ) const
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.

◆ ToComposedValue()

const ISgfcComposedPropertyValue * LibSgfcPlusPlus::SgfcComposedPropertyValue::ToComposedValue ( ) const
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.


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