| AAX SDK 2.8.0 Avid Audio Extensions Development Kit

- Welcome
- Manual
- Classes
- Files
- Lists
- Support

- File List
- File Members

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
38#include "AAX_IDisplayDelegate.h"
39
40
52 template <typename T>
53 class AAX_IDisplayDelegateDecorator : public AAX_IDisplayDelegate<T>
54{
55 public:
68 AAX_IDisplayDelegateDecorator(const AAX_IDisplayDelegate<T>& displayDelegate);
69
82 AAX_IDisplayDelegateDecorator(const AAX_IDisplayDelegateDecorator& other);
83
89 ~AAX_IDisplayDelegateDecorator() AAX_OVERRIDE;
90
108 AAX_IDisplayDelegateDecorator<T>* Clone() const AAX_OVERRIDE;
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
160 private:
161 const AAX_IDisplayDelegate<T>* mWrappedDisplayDelegate;
162
164 AAX_IDisplayDelegateDecorator() { }
165};
166
167 template <typename T>
168 AAX_IDisplayDelegateDecorator<T>::AAX_IDisplayDelegateDecorator(const AAX_IDisplayDelegate<T>& displayDelegate) :
169 AAX_IDisplayDelegate<T>(),
170 mWrappedDisplayDelegate(displayDelegate.Clone())
171{
172
173}
174
175 template <typename T>
176 AAX_IDisplayDelegateDecorator<T>::AAX_IDisplayDelegateDecorator(const AAX_IDisplayDelegateDecorator& other) :
177 mWrappedDisplayDelegate(other.mWrappedDisplayDelegate->Clone())
178{
179
180}
181
182 template <typename T>
183 AAX_IDisplayDelegateDecorator<T>::~AAX_IDisplayDelegateDecorator()
184{
185 delete mWrappedDisplayDelegate;
186}
187
188 template <typename T>
189 AAX_IDisplayDelegateDecorator<T>* AAX_IDisplayDelegateDecorator<T>::Clone() const
190{
191 return new AAX_IDisplayDelegateDecorator(*this);
192}
193
194 template <typename T>
195 bool AAX_IDisplayDelegateDecorator<T>::ValueToString(T value, AAX_CString* valueString) const
196{
197 return mWrappedDisplayDelegate->ValueToString(value, valueString);
198}
199
200 template <typename T>
201 bool AAX_IDisplayDelegateDecorator<T>::ValueToString(T value, int32_t maxNumChars, AAX_CString* valueString) const
202{
203 return mWrappedDisplayDelegate->ValueToString(value, maxNumChars, valueString);
204}
205
206 template <typename T>
207 bool 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
AAX_IDisplayDelegate.h
Defines the display behavior for a parameter.
AAX_OVERRIDE
#define AAX_OVERRIDE
override keyword macro
Definition: AAX.h:164
AAX_CString
A generic AAX string class with similar functionality to std::string
Definition: AAX_CString.h:57
AAX_IDisplayDelegate
Definition: AAX_IDisplayDelegate.h:79
AAX_IDisplayDelegateDecorator
The base class for all concrete display delegate decorators.
Definition: AAX_IDisplayDelegateDecorator.h:54
AAX_IDisplayDelegateDecorator::StringToValue
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_IDisplayDelegateDecorator
~AAX_IDisplayDelegateDecorator() AAX_OVERRIDE
Virtual destructor.
Definition: AAX_IDisplayDelegateDecorator.h:183
AAX_IDisplayDelegateDecorator::Clone
AAX_IDisplayDelegateDecorator< T > * Clone() const AAX_OVERRIDE
Constructs and returns a copy of the display delegate decorator.
Definition: AAX_IDisplayDelegateDecorator.h:189
AAX_IDisplayDelegateDecorator::ValueToString
bool ValueToString(T value, AAX_CString *valueString) const AAX_OVERRIDE
Converts a string to a real parameter value.
Definition: AAX_IDisplayDelegateDecorator.h:195