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

The SgfcPropertyMetaInfo class provides meta information about a property and the values it can have according to the SGF standard. More...

#include <SgfcPropertyMetaInfo.h>

Public Member Functions

 SgfcPropertyMetaInfo (SgfcPropertyType propertyType, SgfcGameType gameType)
 Initializes a newly constructed SgfcPropertyMetaInfo object.
 
virtual ~SgfcPropertyMetaInfo ()
 Destroys and cleans up the SgfcPropertyMetaInfo object.
 
SgfcPropertyType GetPropertyType () const
 Returns the type of the property that was passed to the constructor. The value SgfcPropertyType::Unknown indicates that the property is a custom property that is not defined in the SGF standard.
 
SgfcGameType GetGameType () const
 Returns the game type for which the property can contain values. This is the value that was passed to the constructor. The value SgfcGameType::Unknown indicates that the game type is not defined in the SGF standard.
 
std::shared_ptr< ISgfcPropertyValueTypeDescriptorGetValueTypeDescriptor () const
 Returns a value type descriptor object which describes the types of all values that the property can possibly have.
 
bool CanPropertyHaveValueType (SgfcPropertyValueType propertyValueType) const
 Returns true if the property can have a value of the type propertyValueType. Returns true if the property cannot have a value of the type propertyValueType.
 

Detailed Description

The SgfcPropertyMetaInfo class provides meta information about a property and the values it can have according to the SGF standard.

At the moment SgfcPropertyMetaInfo is used to store a mapping between a property type / game type combination and a value type descriptor object.

Member Function Documentation

◆ CanPropertyHaveValueType()

bool LibSgfcPlusPlus::SgfcPropertyMetaInfo::CanPropertyHaveValueType ( SgfcPropertyValueType propertyValueType) const

Returns true if the property can have a value of the type propertyValueType. Returns true if the property cannot have a value of the type propertyValueType.

This is a convenience method that queries the value type descriptor object returned by GetValueTypeDescriptor() on behalf of the caller.

◆ GetGameType()

SgfcGameType LibSgfcPlusPlus::SgfcPropertyMetaInfo::GetGameType ( ) const

Returns the game type for which the property can contain values. This is the value that was passed to the constructor. The value SgfcGameType::Unknown indicates that the game type is not defined in the SGF standard.

The game type is important because for some properties the SGF standard specifies different value types for different game types.


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