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::ISgfcGoPoint Class Referenceabstract

The ISgfcGoPoint interface represents a point on a Go board. More...

#include <ISgfcGoPoint.h>

Inheritance diagram for LibSgfcPlusPlus::ISgfcGoPoint:
LibSgfcPlusPlus::SgfcGoPoint

Public Member Functions

 ISgfcGoPoint ()
 Initializes a newly constructed ISgfcGoPoint object.
 
virtual ~ISgfcGoPoint ()
 Destroys and cleans up the ISgfcGoPoint object.
 
virtual unsigned int GetXPosition (SgfcCoordinateSystem coordinateSystem) const =0
 Returns the 1-based numeric x-axis position of the point in the desired coordinate system coordinateSystem.
 
virtual unsigned int GetYPosition (SgfcCoordinateSystem coordinateSystem) const =0
 Returns the 1-based numeric y-axis position of the point in the desired coordinate system coordinateSystem.
 
virtual bool HasPosition (SgfcGoPointNotation goPointNotation) const =0
 Returns true if GetPosition(), GetXPosition() and GetYPosition() return a non-empty string for the desired notation goPointNotation. Returns false if these methods return an empty string.
 
virtual std::string GetPosition (SgfcGoPointNotation goPointNotation) const =0
 Returns the position of the point as a single string value in the desired notation goPointNotation. Returns an empty string if HasPosition() returns false for goPointNotation.
 
virtual std::string GetXPosition (SgfcGoPointNotation goPointNotation) const =0
 Returns the x-axis compound of the point's position in the desired notation goPointNotation. Returns an empty string if HasPosition() returns false for goPointNotation.
 
virtual std::string GetYPosition (SgfcGoPointNotation goPointNotation) const =0
 Returns the y-axis compound of the point's position in the desired notation goPointNotation. Returns an empty string if HasPosition() returns false for goPointNotation.
 

Detailed Description

The ISgfcGoPoint interface represents a point on a Go board.

A point on a Go board is an intersection of two lines. A point's location is identified by a position in a two-dimensional coordinate system. The horizontal axis is the x-axis, sometimes also called column. The vertical axis is the y-axis, sometimes also called row.

ISgfcGoPoint has getter methods that make the point location available as numeric values in several coordinate systems (enumerated in SgfcCoordinateSystem). There are two getter methods: One for the x-axis position and one for the y-axis position. Both provide 1-based values.

In addition ISgfcGoPoint has getter methods that make the point location available as string values in several notations (enumerated in SgfcGoPointNotation). There are three getter methods:

Member Function Documentation

◆ GetPosition()

virtual std::string LibSgfcPlusPlus::ISgfcGoPoint::GetPosition ( SgfcGoPointNotation goPointNotation) const
pure virtual

Returns the position of the point as a single string value in the desired notation goPointNotation. Returns an empty string if HasPosition() returns false for goPointNotation.

Implemented in LibSgfcPlusPlus::SgfcGoPoint.

◆ GetXPosition() [1/2]

virtual unsigned int LibSgfcPlusPlus::ISgfcGoPoint::GetXPosition ( SgfcCoordinateSystem coordinateSystem) const
pure virtual

Returns the 1-based numeric x-axis position of the point in the desired coordinate system coordinateSystem.

Implemented in LibSgfcPlusPlus::SgfcGoPoint.

◆ GetXPosition() [2/2]

virtual std::string LibSgfcPlusPlus::ISgfcGoPoint::GetXPosition ( SgfcGoPointNotation goPointNotation) const
pure virtual

Returns the x-axis compound of the point's position in the desired notation goPointNotation. Returns an empty string if HasPosition() returns false for goPointNotation.

Implemented in LibSgfcPlusPlus::SgfcGoPoint.

◆ GetYPosition() [1/2]

virtual unsigned int LibSgfcPlusPlus::ISgfcGoPoint::GetYPosition ( SgfcCoordinateSystem coordinateSystem) const
pure virtual

Returns the 1-based numeric y-axis position of the point in the desired coordinate system coordinateSystem.

Implemented in LibSgfcPlusPlus::SgfcGoPoint.

◆ GetYPosition() [2/2]

virtual std::string LibSgfcPlusPlus::ISgfcGoPoint::GetYPosition ( SgfcGoPointNotation goPointNotation) const
pure virtual

Returns the y-axis compound of the point's position in the desired notation goPointNotation. Returns an empty string if HasPosition() returns false for goPointNotation.

Implemented in LibSgfcPlusPlus::SgfcGoPoint.

◆ HasPosition()

virtual bool LibSgfcPlusPlus::ISgfcGoPoint::HasPosition ( SgfcGoPointNotation goPointNotation) const
pure virtual

Returns true if GetPosition(), GetXPosition() and GetYPosition() return a non-empty string for the desired notation goPointNotation. Returns false if these methods return an empty string.

The methods may return an empty string if the desired notation cannot represent the point location. See the documentation of each SgfcGoPointNotation enum value for a definition of the notation and its limitations. Notably, the "A1" hybrid notation cannot represent point locations with an x- or y-axis position greater than 25.

Implemented in LibSgfcPlusPlus::SgfcGoPoint.


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