![]() |
AAX SDK
2.4.1
Avid Audio Extensions Development Kit
|
#include <AAX_IDisplayDelegateDecorator.h>
The base class for all concrete display delegate decorators.
The AAX parameter display strategy uses a decorator pattern for parameter value formatting. This approach allows developers to maximize code re-use across display delegates with many different kinds of varying formatting, all without creating interdependencies between the different display delegates themselves.
For more information, see Display delegate decorators. For even more information, about the Decorator design pattern, please consult the GOF design patterns book.
Public Member Functions | |
AAX_IDisplayDelegateDecorator (const AAX_IDisplayDelegate< T > &displayDelegate) | |
Constructor. More... | |
AAX_IDisplayDelegateDecorator (const AAX_IDisplayDelegateDecorator &other) | |
Copy constructor. More... | |
~AAX_IDisplayDelegateDecorator () AAX_OVERRIDE | |
Virtual destructor. More... | |
AAX_IDisplayDelegateDecorator< T > * | Clone () const AAX_OVERRIDE |
Constructs and returns a copy of the display delegate decorator. More... | |
bool | ValueToString (T value, AAX_CString *valueString) const AAX_OVERRIDE |
Converts a string to a real parameter value. More... | |
bool | ValueToString (T value, int32_t maxNumChars, AAX_CString *valueString) const AAX_OVERRIDE |
Converts a string to a real parameter value with a size constraint. More... | |
bool | StringToValue (const AAX_CString &valueString, T *value) const AAX_OVERRIDE |
Converts a string to a real parameter value. More... | |
![]() | |
virtual | ~AAX_IDisplayDelegateBase () |
Virtual destructor. More... | |
AAX_IDisplayDelegateDecorator< T >::AAX_IDisplayDelegateDecorator | ( | const AAX_IDisplayDelegate< T > & | displayDelegate | ) |
Constructor.
This class implements the decorator pattern, which is a sort of wrapper. The object that is being wrapped is passed into this constructor. This object is passed by reference because it must be copied to prevent any potential memory ambigities.
This constructor sets the local mWrappedDisplayDelegate member to a clone of the provided AAX_IDisplayDelegate.
[in] | displayDelegate | The decorated display delegate. |
AAX_IDisplayDelegateDecorator< T >::AAX_IDisplayDelegateDecorator | ( | const AAX_IDisplayDelegateDecorator< T > & | other | ) |
Copy constructor.
This class implements the decorator pattern, which is a sort of wrapper. The object that is being wrapped is passed into this constructor. This object is passed by reference because it must be copied to prevent any potential memory ambigities.
This constructor sets the local mWrappedDisplayDelegate member to a clone of the provided AAX_IDisplayDelegateDecorator, allowing multiply-decorated display delegates.
[in] | other | The display delegate decorator that will be set as the wrapped delegate of this object |
AAX_IDisplayDelegateDecorator< T >::~AAX_IDisplayDelegateDecorator |
Virtual destructor.
|
virtual |
Constructs and returns a copy of the display delegate decorator.
In general, this method's implementation can use a simple copy constructor:
Implements AAX_IDisplayDelegate< T >.
|
virtual |
Converts a string to a real parameter value.
Override of the AAX_IDisplayDelegate implementation to call into the wrapped object. Display delegate decorators should call into this implementation to pass ValueToString() calls on to the wrapped object after applying their own value-to-string decoration.
[in] | valueString | The string that will be converted |
[out] | value | The real parameter value corresponding to valueString |
true | The string conversion was successful |
false | The string conversion was unsuccessful |
Implements AAX_IDisplayDelegate< T >.
Referenced by AAX_CDecibelDisplayDelegateDecorator< T >::ValueToString(), AAX_CPercentDisplayDelegateDecorator< T >::ValueToString(), AAX_CUnitDisplayDelegateDecorator< T >::ValueToString(), and AAX_CUnitPrefixDisplayDelegateDecorator< T >::ValueToString().
|
virtual |
Converts a string to a real parameter value with a size constraint.
Override of the AAX_IDisplayDelegate implementation to call into the wrapped object. Display delegate decorators should call into this implementation to pass ValueToString() calls on to the wrapped object after applying their own value-to-string decoration.
[in] | valueString | The string that will be converted |
[in] | maxNumChars | Size hint for the desired maximum number of characters in the string (not including null termination) |
[out] | value | The real parameter value corresponding to valueString |
true | The string conversion was successful |
false | The string conversion was unsuccessful |
Implements AAX_IDisplayDelegate< T >.
|
virtual |
Converts a string to a real parameter value.
Override of the DisplayDecorator implementation to call into the wrapped object. Display delegate decorators should call into this implementation to pass StringToValue() calls on to the wrapped object after applying their own string-to-value decoding.
[in] | valueString | The string that will be converted |
[out] | value | The real parameter value corresponding to valueString |
true | The string conversion was successful |
false | The string conversion was unsuccessful |
Implements AAX_IDisplayDelegate< T >.
Referenced by AAX_CDecibelDisplayDelegateDecorator< T >::StringToValue(), AAX_CPercentDisplayDelegateDecorator< T >::StringToValue(), AAX_CUnitDisplayDelegateDecorator< T >::StringToValue(), and AAX_CUnitPrefixDisplayDelegateDecorator< T >::StringToValue().