libsgfc++ 3.0.0
A C++ library that uses SGFC to read and write SGF (Smart Game Format) data.
Loading...
Searching...
No Matches
LibSgfcPlusPlus::ISgfcPointPropertyValue Class Referenceabstract

The ISgfcPointPropertyValue interface provides access to one of the values of a property of an SGF node. The value type is SgfcPropertyValueType::Point. More...

#include <ISgfcPointPropertyValue.h>

Inheritance diagram for LibSgfcPlusPlus::ISgfcPointPropertyValue:
Collaboration diagram for LibSgfcPlusPlus::ISgfcPointPropertyValue:

Public Member Functions

 ISgfcPointPropertyValue ()
 Initializes a newly constructed ISgfcPointPropertyValue object.
virtual ~ISgfcPointPropertyValue ()
 Destroys and cleans up the ISgfcPointPropertyValue object.
virtual SgfcPoint GetPointValue () const =0
 Returns the property value interpreted as an SgfcPoint value.
virtual const ISgfcGoPointPropertyValue * ToGoPointValue () const =0
 Returns an ISgfcGoPointPropertyValue object if the property value object was created specifically for SgfcGameType::Go. Returns nullptr otherwise. The caller is not the owner of the returned object.
Public Member Functions inherited from LibSgfcPlusPlus::ISgfcSinglePropertyValue
 ISgfcSinglePropertyValue ()
 Initializes a newly constructed ISgfcSinglePropertyValue object.
virtual ~ISgfcSinglePropertyValue ()
 Destroys and cleans up the ISgfcSinglePropertyValue object.
virtual SgfcPropertyValueType GetValueType () const =0
 Returns the concrete type of the property value object. Depending on the value returned, a caller then knows which one of the convenience casting methods to use.
virtual bool HasTypedValue () const =0
 Returns true if the raw string value returned by GetRawValue() is available as a typed value. Otherwise returns false.
virtual std::string GetTypeConversionErrorMessage () const =0
 Returns an error message that describes why the raw string value returned by GetRawValue() could not be converted to the typed value returned by GetValueType().
virtual std::string GetRawValue () const =0
 Returns the property value as a raw string, i.e. as close as possible as it appears in the original SGF content.
virtual const ISgfcNumberPropertyValue * ToNumberValue () const =0
 Returns an ISgfcNumberPropertyValue object if GetValueType() returns SgfcPropertyValueType::Number. Returns nullptr otherwise. The caller is not the owner of the returned object.
virtual const ISgfcRealPropertyValue * ToRealValue () const =0
 Returns an ISgfcRealPropertyValue object if GetValueType() returns SgfcPropertyValueType::Real. Returns nullptr otherwise. The caller is not the owner of the returned object.
virtual const ISgfcDoublePropertyValue * ToDoubleValue () const =0
 Returns an ISgfcDoublePropertyValue object if GetValueType() returns SgfcPropertyValueType::Double. Returns nullptr otherwise. The caller is not the owner of the returned object.
virtual const ISgfcColorPropertyValue * ToColorValue () const =0
 Returns an ISgfcColorPropertyValue object if GetValueType() returns SgfcPropertyValueType::Color. Returns nullptr otherwise. The caller is not the owner of the returned object.
virtual const ISgfcSimpleTextPropertyValue * ToSimpleTextValue () const =0
 Returns an ISgfcSimpleTextPropertyValue object if GetValueType() returns SgfcPropertyValueType::SimpleText. Returns nullptr otherwise. The caller is not the owner of the returned object.
virtual const ISgfcTextPropertyValue * ToTextValue () const =0
 Returns an ISgfcTextPropertyValue object if GetValueType() returns SgfcPropertyValueType::Text. Returns nullptr otherwise. The caller is not the owner of the returned object.
virtual const ISgfcPointPropertyValue * ToPointValue () const =0
 Returns an ISgfcPointPropertyValue object if GetValueType() returns SgfcPropertyValueType::Point. Returns nullptr otherwise. The caller is not the owner of the returned object.
virtual const ISgfcMovePropertyValue * ToMoveValue () const =0
 Returns an ISgfcMovePropertyValue object if GetValueType() returns SgfcPropertyValueType::Move. Returns nullptr otherwise. The caller is not the owner of the returned object.
virtual const ISgfcStonePropertyValue * ToStoneValue () const =0
 Returns an ISgfcStonePropertyValue object if GetValueType() returns SgfcPropertyValueType::Stone. Returns nullptr otherwise. The caller is not the owner of the returned 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 bool IsComposedValue () const =0
 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 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.
virtual const ISgfcComposedPropertyValue * ToComposedValue () const
 Returns an ISgfcComposedPropertyValue object if IsComposedValue() returns true. Returns nullptr if IsComposedValue() returns false. The caller is not the owner of the ISgfcComposedPropertyValue object.

Detailed Description

The ISgfcPointPropertyValue interface provides access to one of the values of a property of an SGF node. The value type is SgfcPropertyValueType::Point.

ISgfcPointPropertyValue is immutable, i.e. once the ISgfcPointPropertyValue object is constructed it cannot be changed.

Member Function Documentation

◆ GetPointValue()

virtual SgfcPoint LibSgfcPlusPlus::ISgfcPointPropertyValue::GetPointValue ( ) const
pure virtual

Returns the property value interpreted as an SgfcPoint value.

Implemented in LibSgfcPlusPlus::SgfcPointPropertyValue.

◆ ToGoPointValue()

virtual const ISgfcGoPointPropertyValue * LibSgfcPlusPlus::ISgfcPointPropertyValue::ToGoPointValue ( ) const
pure virtual

Returns an ISgfcGoPointPropertyValue object if the property value object was created specifically for SgfcGameType::Go. Returns nullptr otherwise. The caller is not the owner of the returned object.

Implemented in LibSgfcPlusPlus::SgfcGoPointPropertyValue, and LibSgfcPlusPlus::SgfcPointPropertyValue.


The documentation for this class was generated from the following files:
  • /Users/dev/Documents/libsgfcplusplus/include/ISgfcPointPropertyValue.h
  • /Users/dev/Documents/libsgfcplusplus/src/interface/public/ISgfcPointPropertyValue.cpp