libsgfc++ 2.0.1
A C++ library that uses SGFC to read and write SGF (Smart Game Format) data.
|
The SgfcPropertyElistValueTypeDescriptor class provides an implementation of the ISgfcPropertyValueTypeDescriptor interface. See the interface header file for documentation. More...
#include <SgfcPropertyElistValueTypeDescriptor.h>
Public Member Functions | |
SgfcPropertyElistValueTypeDescriptor (std::shared_ptr< SgfcPropertyListValueTypeDescriptor > descriptorListValueType) | |
Initializes a newly constructed SgfcPropertyElistValueTypeDescriptor object. | |
virtual | ~SgfcPropertyElistValueTypeDescriptor () |
Destroys and cleans up the SgfcPropertyElistValueTypeDescriptor object. | |
virtual SgfcPropertyValueTypeDescriptorType | GetDescriptorType () const override |
Returns the concrete type of the descriptor object. Depending on the value returned, a caller then knows which one of the convenience casting methods to use. | |
virtual const SgfcPropertyElistValueTypeDescriptor * | ToElistValueTypeDescriptor () const override |
Returns an SgfcPropertyListValueTypeDescriptor object if GetDescriptorType() returns SgfcPropertyValueTypeDescriptorType::ElistValueType. Returns nullptr otherwise. The caller is not the owner of the returned object. | |
virtual std::shared_ptr< SgfcPropertyListValueTypeDescriptor > | GetDescriptorListValueType () const |
Returns an SgfcPropertyListValueTypeDescriptor object that is composed of another descriptor that defines the value type of the list elements. | |
Public Member Functions inherited from LibSgfcPlusPlus::ISgfcPropertyValueTypeDescriptor | |
ISgfcPropertyValueTypeDescriptor () | |
Initializes a newly constructed ISgfcPropertyValueTypeDescriptor object. | |
virtual | ~ISgfcPropertyValueTypeDescriptor () |
Destroys and cleans up the ISgfcPropertyValueTypeDescriptor object. | |
virtual const SgfcPropertyDualValueTypeDescriptor * | ToDualValueTypeDescriptor () const |
Returns an SgfcPropertyDualValueTypeDescriptor object if GetDescriptorType() returns SgfcPropertyValueTypeDescriptorType::DualValueType. Returns nullptr otherwise. The caller is not the owner of the returned object. | |
virtual const SgfcPropertyListValueTypeDescriptor * | ToListValueTypeDescriptor () const |
Returns an SgfcPropertyElistValueTypeDescriptor object if GetDescriptorType() returns SgfcPropertyValueTypeDescriptorType::ListValueType. Returns nullptr otherwise. The caller is not the owner of the returned object. | |
virtual const SgfcPropertyComposedValueTypeDescriptor * | ToComposedValueTypeDescriptor () const |
Returns an SgfcPropertyComposedValueTypeDescriptor object if GetDescriptorType() returns SgfcPropertyValueTypeDescriptorType::ComposedValueType. Returns nullptr otherwise. The caller is not the owner of the returned object. | |
virtual const SgfcPropertyBasicValueTypeDescriptor * | ToBasicValueTypeDescriptor () const |
Returns an SgfcPropertyBasicValueTypeDescriptor object if GetDescriptorType() returns SgfcPropertyValueTypeDescriptorType::BasicValueType. Returns nullptr otherwise. The caller is not the owner of the returned object. | |
The SgfcPropertyElistValueTypeDescriptor class provides an implementation of the ISgfcPropertyValueTypeDescriptor interface. See the interface header file for documentation.
SgfcPropertyElistValueTypeDescriptor expresses the fact that for some properties the raw SGF property value can be either SgfcPropertyValueType::None or some other type. Which one needs to be determined by probing, i.e. by parsing the raw property value. GetDescriptorListValueType() always returns an SgfcPropertyListValueTypeDescriptor, which in turn is composed of another descriptor that defines the value type of the list elements.
SgfcPropertyElistValueTypeDescriptor could also be expressed with an SgfcPropertyDualValueTypeDescriptor. SgfcPropertyElistValueTypeDescriptor exists as a dedicated type only because the SGF standard explicitly names and describes "elist" in its EBNF definition section.
Example: The "DD" property value either is None, or it is a list of Point. GetDescriptorListValueType() in this case returns an SgfcPropertyListValueTypeDescriptor object, which in turn is composed of a descriptor of type SgfcPropertyBasicValueTypeDescriptor which has the basic value type SgfcPropertyValueType::Point.
|
overridevirtual |
Returns the concrete type of the descriptor object. Depending on the value returned, a caller then knows which one of the convenience casting methods to use.
Implements LibSgfcPlusPlus::ISgfcPropertyValueTypeDescriptor.
|
overridevirtual |
Returns an SgfcPropertyListValueTypeDescriptor object if GetDescriptorType() returns SgfcPropertyValueTypeDescriptorType::ElistValueType. Returns nullptr otherwise. The caller is not the owner of the returned object.
Reimplemented from LibSgfcPlusPlus::ISgfcPropertyValueTypeDescriptor.