25 #ifndef AAX_CUNITDISPLAYDELEGATEDECORATOR_H
26 #define AAX_CUNITDISPLAYDELEGATEDECORATOR_H
75 mUnitString(unitString)
90 *valueString += mUnitString;
98 uint32_t strlen = valueString->
Length();
99 const uint32_t maxNumCharsUnsigned = (0 <= maxNumChars) ?
static_cast<uint32_t
>(maxNumChars) : 0;
100 if (maxNumCharsUnsigned > strlen && (maxNumCharsUnsigned-strlen >= mUnitString.Length()))
101 *valueString += mUnitString;
106 template <
typename T>
110 if (valueString.
Length() <= mUnitString.Length())
115 valueString.
SubString(valueString.
Length() - mUnitString.Length(), mUnitString.Length(), &unitSubString);
116 if (unitSubString != mUnitString)
121 valueString.
SubString(0, valueString.
Length() - mUnitString.Length(), &valueSubString);
#define AAX_OVERRIDE
override keyword macro
Definition: AAX.h:141
The base class for all concrete display delegate decorators.
A generic AAX string class with similar functionality to std::string
Definition: AAX_CString.h:46
uint32_t Length() const AAX_OVERRIDE
void SubString(uint32_t pos, uint32_t n, AAX_IString *outputStr) const
A unit type decorator conforming to AAX_IDisplayDelegateDecorator.
Definition: AAX_CUnitDisplayDelegateDecorator.h:47
bool StringToValue(const AAX_CString &valueString, T *value) const AAX_OVERRIDE
Converts a string to a real parameter value.
Definition: AAX_CUnitDisplayDelegateDecorator.h:107
const AAX_CString mUnitString
Definition: AAX_CUnitDisplayDelegateDecorator.h:66
bool ValueToString(T value, AAX_CString *valueString) const AAX_OVERRIDE
Converts a real parameter value to a string representation.
Definition: AAX_CUnitDisplayDelegateDecorator.h:87
AAX_CUnitDisplayDelegateDecorator(const AAX_IDisplayDelegate< T > &displayDelegate, const AAX_CString &unitString)
Constructor.
Definition: AAX_CUnitDisplayDelegateDecorator.h:73
AAX_CUnitDisplayDelegateDecorator< T > * Clone() const AAX_OVERRIDE
Constructs and returns a copy of the display delegate.
Definition: AAX_CUnitDisplayDelegateDecorator.h:81
Classes for parameter value string conversion.
Definition: AAX_IDisplayDelegate.h:69
The base class for all concrete display delegate decorators.
Definition: AAX_IDisplayDelegateDecorator.h:44
bool StringToValue(const AAX_CString &valueString, T *value) const AAX_OVERRIDE
Converts a string to a real parameter value.
Definition: AAX_IDisplayDelegateDecorator.h:197
bool ValueToString(T value, AAX_CString *valueString) const AAX_OVERRIDE
Converts a string to a real parameter value.
Definition: AAX_IDisplayDelegateDecorator.h:185