AAX SDK 2.6.1
Avid Audio Extensions Development Kit
Loading...
Searching...
No Matches
AAX_IDisplayDelegateDecorator.h
Go to the documentation of this file.
1/*================================================================================================*/
2/*
3 *
4 * Copyright 2014-2017, 2019, 2023 Avid Technology, Inc.
5 * All rights reserved.
6 *
7 * CONFIDENTIAL: this document contains confidential information of Avid. Do
8 * not disclose to any third party. Use of the information contained in this
9 * document is subject to an Avid SDK license.
10 *
11 */
12
19/*================================================================================================*/
20
21
22#ifndef AAX_IDISPLAYDELEGATEDECORATOR_H
23#define AAX_IDISPLAYDELEGATEDECORATOR_H
24
26
27
39template <typename T>
41{
42public:
56
70
77
96
111 bool ValueToString(T value, AAX_CString* valueString) const AAX_OVERRIDE;
112
129 bool ValueToString(T value, int32_t maxNumChars, AAX_CString* valueString) const AAX_OVERRIDE;
130
145 bool StringToValue(const AAX_CString& valueString, T* value) const AAX_OVERRIDE;
146
147private:
148 const AAX_IDisplayDelegate<T>* mWrappedDisplayDelegate;
149
152};
153
154template <typename T>
157 mWrappedDisplayDelegate(displayDelegate.Clone())
158{
159
160}
161
162template <typename T>
164 mWrappedDisplayDelegate(other.mWrappedDisplayDelegate->Clone())
165{
166
167}
168
169template <typename T>
171{
172 delete mWrappedDisplayDelegate;
173}
174
175template <typename T>
177{
178 return new AAX_IDisplayDelegateDecorator(*this);
179}
180
181template <typename T>
183{
184 return mWrappedDisplayDelegate->ValueToString(value, valueString);
185}
186
187template <typename T>
188bool AAX_IDisplayDelegateDecorator<T>::ValueToString(T value, int32_t maxNumChars, AAX_CString* valueString) const
189{
190 return mWrappedDisplayDelegate->ValueToString(value, maxNumChars, valueString);
191}
192
193template <typename T>
194bool AAX_IDisplayDelegateDecorator<T>::StringToValue(const AAX_CString& valueString, T* value) const
195{
196 return mWrappedDisplayDelegate->StringToValue(valueString, value);
197}
198
199
200
201
202#endif //AAX_IDISPLAYDELEGATEDECORATOR_H
203
204
205
Defines the display behavior for a parameter.
#define AAX_OVERRIDE
override keyword macro
Definition: AAX.h:151
A generic AAX string class with similar functionality to std::string
Definition: AAX_CString.h:44
Definition: AAX_IDisplayDelegate.h:66
The base class for all concrete display delegate decorators.
Definition: AAX_IDisplayDelegateDecorator.h:41
bool StringToValue(const AAX_CString &valueString, T *value) const AAX_OVERRIDE
Converts a string to a real parameter value.
Definition: AAX_IDisplayDelegateDecorator.h:194
~AAX_IDisplayDelegateDecorator() AAX_OVERRIDE
Virtual destructor.
Definition: AAX_IDisplayDelegateDecorator.h:170
AAX_IDisplayDelegateDecorator< T > * Clone() const AAX_OVERRIDE
Constructs and returns a copy of the display delegate decorator.
Definition: AAX_IDisplayDelegateDecorator.h:176
bool ValueToString(T value, AAX_CString *valueString) const AAX_OVERRIDE
Converts a string to a real parameter value.
Definition: AAX_IDisplayDelegateDecorator.h:182