AAX SDK 2.8.0
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-2024 Avid Technology, Inc.
5 * All rights reserved.
6 *
7 * This file is part of the Avid AAX SDK.
8 *
9 * The AAX SDK is subject to commercial or open-source licensing.
10 *
11 * By using the AAX SDK, you agree to the terms of both the Avid AAX SDK License
12 * Agreement and Avid Privacy Policy.
13 *
14 * AAX SDK License: https://developer.avid.com/aax
15 * Privacy Policy: https://www.avid.com/legal/privacy-policy-statement
16 *
17 * Or: You may also use this code under the terms of the GPL v3 (see
18 * www.gnu.org/licenses).
19 *
20 * THE AAX SDK IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
21 * EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
22 * DISCLAIMED.
23 *
24 */
25
32/*================================================================================================*/
33
34
35#ifndef AAX_IDISPLAYDELEGATEDECORATOR_H
36#define AAX_IDISPLAYDELEGATEDECORATOR_H
37
39
40
52template <typename T>
54{
55public:
69
83
90
109
124 bool ValueToString(T value, AAX_CString* valueString) const AAX_OVERRIDE;
125
142 bool ValueToString(T value, int32_t maxNumChars, AAX_CString* valueString) const AAX_OVERRIDE;
143
158 bool StringToValue(const AAX_CString& valueString, T* value) const AAX_OVERRIDE;
159
160private:
161 const AAX_IDisplayDelegate<T>* mWrappedDisplayDelegate;
162
165};
166
167template <typename T>
170 mWrappedDisplayDelegate(displayDelegate.Clone())
171{
172
173}
174
175template <typename T>
177 mWrappedDisplayDelegate(other.mWrappedDisplayDelegate->Clone())
178{
179
180}
181
182template <typename T>
184{
185 delete mWrappedDisplayDelegate;
186}
187
188template <typename T>
190{
191 return new AAX_IDisplayDelegateDecorator(*this);
192}
193
194template <typename T>
196{
197 return mWrappedDisplayDelegate->ValueToString(value, valueString);
198}
199
200template <typename T>
201bool AAX_IDisplayDelegateDecorator<T>::ValueToString(T value, int32_t maxNumChars, AAX_CString* valueString) const
202{
203 return mWrappedDisplayDelegate->ValueToString(value, maxNumChars, valueString);
204}
205
206template <typename T>
207bool AAX_IDisplayDelegateDecorator<T>::StringToValue(const AAX_CString& valueString, T* value) const
208{
209 return mWrappedDisplayDelegate->StringToValue(valueString, value);
210}
211
212
213
214
215#endif //AAX_IDISPLAYDELEGATEDECORATOR_H
216
217
218
Defines the display behavior for a parameter.
#define AAX_OVERRIDE
override keyword macro
Definition: AAX.h:164
A generic AAX string class with similar functionality to std::string
Definition: AAX_CString.h:57
Definition: AAX_IDisplayDelegate.h:79
The base class for all concrete display delegate decorators.
Definition: AAX_IDisplayDelegateDecorator.h:54
bool StringToValue(const AAX_CString &valueString, T *value) const AAX_OVERRIDE
Converts a string to a real parameter value.
Definition: AAX_IDisplayDelegateDecorator.h:207
~AAX_IDisplayDelegateDecorator() AAX_OVERRIDE
Virtual destructor.
Definition: AAX_IDisplayDelegateDecorator.h:183
AAX_IDisplayDelegateDecorator< T > * Clone() const AAX_OVERRIDE
Constructs and returns a copy of the display delegate decorator.
Definition: AAX_IDisplayDelegateDecorator.h:189
bool ValueToString(T value, AAX_CString *valueString) const AAX_OVERRIDE
Converts a string to a real parameter value.
Definition: AAX_IDisplayDelegateDecorator.h:195