| AAX SDK 2.6.1 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 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
25#include "AAX_IDisplayDelegate.h"
26
27
39 template <typename T>
40 class AAX_IDisplayDelegateDecorator : public AAX_IDisplayDelegate<T>
41{
42 public:
55 AAX_IDisplayDelegateDecorator(const AAX_IDisplayDelegate<T>& displayDelegate);
56
69 AAX_IDisplayDelegateDecorator(const AAX_IDisplayDelegateDecorator& other);
70
76 ~AAX_IDisplayDelegateDecorator() AAX_OVERRIDE;
77
95 AAX_IDisplayDelegateDecorator<T>* Clone() const AAX_OVERRIDE;
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
147 private:
148 const AAX_IDisplayDelegate<T>* mWrappedDisplayDelegate;
149
151 AAX_IDisplayDelegateDecorator() { }
152};
153
154 template <typename T>
155 AAX_IDisplayDelegateDecorator<T>::AAX_IDisplayDelegateDecorator(const AAX_IDisplayDelegate<T>& displayDelegate) :
156 AAX_IDisplayDelegate<T>(),
157 mWrappedDisplayDelegate(displayDelegate.Clone())
158{
159
160}
161
162 template <typename T>
163 AAX_IDisplayDelegateDecorator<T>::AAX_IDisplayDelegateDecorator(const AAX_IDisplayDelegateDecorator& other) :
164 mWrappedDisplayDelegate(other.mWrappedDisplayDelegate->Clone())
165{
166
167}
168
169 template <typename T>
170 AAX_IDisplayDelegateDecorator<T>::~AAX_IDisplayDelegateDecorator()
171{
172 delete mWrappedDisplayDelegate;
173}
174
175 template <typename T>
176 AAX_IDisplayDelegateDecorator<T>* AAX_IDisplayDelegateDecorator<T>::Clone() const
177{
178 return new AAX_IDisplayDelegateDecorator(*this);
179}
180
181 template <typename T>
182 bool AAX_IDisplayDelegateDecorator<T>::ValueToString(T value, AAX_CString* valueString) const
183{
184 return mWrappedDisplayDelegate->ValueToString(value, valueString);
185}
186
187 template <typename T>
188 bool AAX_IDisplayDelegateDecorator<T>::ValueToString(T value, int32_t maxNumChars, AAX_CString* valueString) const
189{
190 return mWrappedDisplayDelegate->ValueToString(value, maxNumChars, valueString);
191}
192
193 template <typename T>
194 bool 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
AAX_IDisplayDelegate.h
Defines the display behavior for a parameter.
AAX_OVERRIDE
#define AAX_OVERRIDE
override keyword macro
Definition: AAX.h:151
AAX_CString
A generic AAX string class with similar functionality to std::string
Definition: AAX_CString.h:44
AAX_IDisplayDelegate
Definition: AAX_IDisplayDelegate.h:66
AAX_IDisplayDelegateDecorator
The base class for all concrete display delegate decorators.
Definition: AAX_IDisplayDelegateDecorator.h:41
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:194
AAX_IDisplayDelegateDecorator::~AAX_IDisplayDelegateDecorator
~AAX_IDisplayDelegateDecorator() AAX_OVERRIDE
Virtual destructor.
Definition: AAX_IDisplayDelegateDecorator.h:170
AAX_IDisplayDelegateDecorator::Clone
AAX_IDisplayDelegateDecorator< T > * Clone() const AAX_OVERRIDE
Constructs and returns a copy of the display delegate decorator.
Definition: AAX_IDisplayDelegateDecorator.h:176
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:182