libsgfc++ 2.0.1
A C++ library that uses SGFC to read and write SGF (Smart Game Format) data.
|
The SgfcPropertyComposedValueTypeDescriptor class provides an implementation of the ISgfcPropertyValueTypeDescriptor interface. See the interface header file for documentation. More...
#include <SgfcPropertyComposedValueTypeDescriptor.h>
Public Member Functions | |
SgfcPropertyComposedValueTypeDescriptor (std::shared_ptr< ISgfcPropertyValueTypeDescriptor > descriptorValueType1, std::shared_ptr< ISgfcPropertyValueTypeDescriptor > descriptorValueType2) | |
Initializes a newly constructed SgfcPropertyComposedValueTypeDescriptor object. | |
virtual | ~SgfcPropertyComposedValueTypeDescriptor () |
Destroys and cleans up the SgfcPropertyComposedValueTypeDescriptor 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 SgfcPropertyComposedValueTypeDescriptor * | ToComposedValueTypeDescriptor () const override |
Returns an SgfcPropertyComposedValueTypeDescriptor object if GetDescriptorType() returns SgfcPropertyValueTypeDescriptorType::ComposedValueType. Returns nullptr otherwise. The caller is not the owner of the returned object. | |
virtual std::shared_ptr< ISgfcPropertyValueTypeDescriptor > | GetDescriptorValueType1 () const |
Returns an ISgfcPropertyValueTypeDescriptor object that describes the value type of the first value. | |
virtual std::shared_ptr< ISgfcPropertyValueTypeDescriptor > | GetDescriptorValueType2 () const |
Returns an ISgfcPropertyValueTypeDescriptor object that describes the value type of the second value. | |
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 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 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 SgfcPropertyComposedValueTypeDescriptor class provides an implementation of the ISgfcPropertyValueTypeDescriptor interface. See the interface header file for documentation.
SgfcPropertyComposedValueTypeDescriptor expresses the fact that for some properties the raw SGF property value is composed of two values, separated by a colon (":") character. GetDescriptorValueType1() returns a descriptor for the value type of the first value, GetDescriptorValueType2() returns a descriptor for the value type of the second value.
Example: The "AP" property value is composed of two SimpleText values separated by a ":" character. Both GetDescriptorValueType1() and GetDescriptorValueType2() in this case return SgfcPropertyBasicValueTypeDescriptor objects which both have the basic value type SgfcPropertyValueType::SimpleText.
LibSgfcPlusPlus::SgfcPropertyComposedValueTypeDescriptor::SgfcPropertyComposedValueTypeDescriptor | ( | std::shared_ptr< ISgfcPropertyValueTypeDescriptor > | descriptorValueType1, |
std::shared_ptr< ISgfcPropertyValueTypeDescriptor > | descriptorValueType2 ) |
Initializes a newly constructed SgfcPropertyComposedValueTypeDescriptor object.
std::logic_error | Is thrown if one or both of the two descriptor objects are not SgfcPropertyBasicValueTypeDescriptor objects, 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 SgfcPropertyComposedValueTypeDescriptor object if GetDescriptorType() returns SgfcPropertyValueTypeDescriptorType::ComposedValueType. Returns nullptr otherwise. The caller is not the owner of the returned object.
Reimplemented from LibSgfcPlusPlus::ISgfcPropertyValueTypeDescriptor.