libsgfc++ 2.0.1
A C++ library that uses SGFC to read and write SGF (Smart Game Format) data.
|
The SgfcPropertyListValueTypeDescriptor class provides an implementation of the ISgfcPropertyValueTypeDescriptor interface. See the interface header file for documentation. More...
#include <SgfcPropertyListValueTypeDescriptor.h>
Public Member Functions | |
SgfcPropertyListValueTypeDescriptor (std::shared_ptr< ISgfcPropertyValueTypeDescriptor > descriptorElementValueType) | |
Initializes a newly constructed SgfcPropertyListValueTypeDescriptor object. | |
virtual | ~SgfcPropertyListValueTypeDescriptor () |
Destroys and cleans up the SgfcPropertyListValueTypeDescriptor 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 SgfcPropertyListValueTypeDescriptor * | ToListValueTypeDescriptor () const override |
Returns an SgfcPropertyElistValueTypeDescriptor object if GetDescriptorType() returns SgfcPropertyValueTypeDescriptorType::ListValueType. Returns nullptr otherwise. The caller is not the owner of the returned object. | |
virtual std::shared_ptr< ISgfcPropertyValueTypeDescriptor > | GetDescriptorElementValueType () const |
Returns an ISgfcPropertyValueTypeDescriptor object that describes 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 SgfcPropertyElistValueTypeDescriptor * | ToElistValueTypeDescriptor () const |
Returns an SgfcPropertyListValueTypeDescriptor object if GetDescriptorType() returns SgfcPropertyValueTypeDescriptorType::ElistValueType. 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 SgfcPropertyListValueTypeDescriptor class provides an implementation of the ISgfcPropertyValueTypeDescriptor interface. See the interface header file for documentation.
SgfcPropertyListValueTypeDescriptor expresses the fact that some SGF properties can have more than one value. GetDescriptorElementValueType() returns a descriptor for the list element value type.
Example: The "LB" property value is a list of composed Point/SimpleText elements. GetDescriptorElementValueType() in this case returns an SgfcPropertyComposedValueTypeDescriptor object, which in turn is composed of two descriptors of type SgfcPropertyBasicValueTypeDescriptor, the first having the basic value type SgfcPropertyValueType::Point and the second. having the basic value type SgfcPropertyValueType::SimpleText.
LibSgfcPlusPlus::SgfcPropertyListValueTypeDescriptor::SgfcPropertyListValueTypeDescriptor | ( | std::shared_ptr< ISgfcPropertyValueTypeDescriptor > | descriptorElementValueType | ) |
Initializes a newly constructed SgfcPropertyListValueTypeDescriptor object.
std::logic_error | Is thrown if the descriptor object is neither an SgfcPropertyBasicValueTypeDescriptor nor an SgfcPropertyComposedValueTypeDescriptor object, or if the basic value type is SgfcPropertyValueType::None. |
|
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 SgfcPropertyElistValueTypeDescriptor object if GetDescriptorType() returns SgfcPropertyValueTypeDescriptorType::ListValueType. Returns nullptr otherwise. The caller is not the owner of the returned object.
Reimplemented from LibSgfcPlusPlus::ISgfcPropertyValueTypeDescriptor.