| AAX SDK 2.6.1 Avid Audio Extensions Development Kit

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

Loading...
Searching...
No Matches
List of all members | Public Member Functions | Protected Attributes
AAX_CStringDisplayDelegate< T > Class Template Reference

`#include <AAX_CStringDisplayDelegate.h>`

Inheritance diagram for AAX_CStringDisplayDelegate< T >:
[legend]
Collaboration diagram for AAX_CStringDisplayDelegate< T >:
[legend]

## Description

template<typename T>
class AAX_CStringDisplayDelegate< T >

A string, or list, display format conforming to AAX_IDisplayDelegate.

This display delegate uses a string map to associate parameter values with specific strings. This kind of display delegate is most often used for control string or list parameters, which would internally use an integer parameter type. The int value would then be used as a lookup into this delegate, which would return a string for each valid int value.

## Public Member Functions
| AAX_CStringDisplayDelegate (const std::map< T, AAX_CString > &stringMap)
| Constructor.
AAX_CStringDisplayDelegate< T > * | Clone () const AAX_OVERRIDE
| Constructs and returns a copy of the display delegate.
bool | ValueToString (T value, AAX_CString *valueString) const AAX_OVERRIDE
| Converts a real parameter value to a string representation.
bool | ValueToString (T value, int32_t maxNumChars, AAX_CString *valueString) const AAX_OVERRIDE
| Converts a real parameter value to a string representation using a size hint, useful for control surfaces and other character limited displays.
bool | StringToValue (const AAX_CString &valueString, T *value) const AAX_OVERRIDE
| Converts a string to a real parameter value.
virtual AAX_IDisplayDelegate * | Clone () const =0
| Constructs and returns a copy of the display delegate.
virtual bool | ValueToString (T value, AAX_CString *valueString) const =0
| Converts a real parameter value to a string representation.
virtual bool | ValueToString (T value, int32_t maxNumChars, AAX_CString *valueString) const =0
| Converts a real parameter value to a string representation using a size hint, useful for control surfaces and other character limited displays.
virtual bool | StringToValue (const AAX_CString &valueString, T *value) const =0
| Converts a string to a real parameter value.
Public Member Functions inherited from AAX_IDisplayDelegateBase
virtual | ~AAX_IDisplayDelegateBase ()
| Virtual destructor.

## Protected Attributes
std::map< T, AAX_CString > | mStringMap
std::map< AAX_CString, T > | mInverseStringMap

## Constructor & Destructor Documentation

## ◆ AAX_CStringDisplayDelegate()

template<typename T >

AAX_CStringDisplayDelegate< T >::AAX_CStringDisplayDelegate | ( | const std::map< T, AAX_CString > & | stringMap | ) |

Constructor.

Constructs a String Display Delegate with a provided string map.

Note
  The string map should already be populated with value-string pairs, as this constructor will copy the provided map into the delegate object's own memory.

Parameters

  [in] | stringMap | A populated map of value-string pairs

References AAX_CStringDisplayDelegate< T >::mInverseStringMap, and AAX_CStringDisplayDelegate< T >::mStringMap.

## Member Function Documentation

## ◆ Clone()

template<typename T >

AAX_CStringDisplayDelegate< T > * AAX_CStringDisplayDelegate< T >::Clone | ( |  | ) | const
| virtual

Constructs and returns a copy of the display delegate.

In general, this method's implementation can use a simple copy constructor:

template <typename T>
AAX_CSubclassDisplayDelegate<T>* AAX_CSubclassDisplayDelegate<T>::Clone() const
{
return new AAX_CSubclassDisplayDelegate(*this);
}

Implements AAX_IDisplayDelegate< T >.

## ◆ ValueToString() [1/2]

template<typename T >

bool AAX_CStringDisplayDelegate< T >::ValueToString | ( | T | value,
|  | AAX_CString * | valueString
| ) |  | const
| virtual

Converts a real parameter value to a string representation.

Parameters

  [in] | value | The real parameter value that will be converted
  [out] | valueString | A string corresponding to value

Return values

  true | The string conversion was successful
  false | The string conversion was unsuccessful

Implements AAX_IDisplayDelegate< T >.

## ◆ ValueToString() [2/2]

template<typename T >

bool AAX_CStringDisplayDelegate< T >::ValueToString | ( | T | value,
|  | int32_t | maxNumChars,
|  | AAX_CString * | valueString
| ) |  | const
| virtual

Converts a real parameter value to a string representation using a size hint, useful for control surfaces and other character limited displays.

Parameters

  [in] | value | The real parameter value that will be converted
  [in] | maxNumChars | Size hint for the desired maximum number of characters in the string (not including null termination)
  [out] | valueString | A string corresponding to value

Return values

  true | The string conversion was successful
  false | The string conversion was unsuccessful

Implements AAX_IDisplayDelegate< T >.

## ◆ StringToValue()

template<typename T >

bool AAX_CStringDisplayDelegate< T >::StringToValue | ( | const AAX_CString & | valueString,
|  | T * | value
| ) |  | const
| virtual

Converts a string to a real parameter value.

Parameters

  [in] | valueString | The string that will be converted
  [out] | value | The real parameter value corresponding to valueString

Return values

  true | The string conversion was successful
  false | The string conversion was unsuccessful

Implements AAX_IDisplayDelegate< T >.

## Member Data Documentation

## ◆ mStringMap

template<typename T >

std::map<T, AAX_CString> AAX_CStringDisplayDelegate< T >::mStringMap
| protected

Referenced by AAX_CStringDisplayDelegate< T >::AAX_CStringDisplayDelegate().

## ◆ mInverseStringMap

template<typename T >

std::map<AAX_CString, T> AAX_CStringDisplayDelegate< T >::mInverseStringMap
| protected

Referenced by AAX_CStringDisplayDelegate< T >::AAX_CStringDisplayDelegate().

The documentation for this class was generated from the following file:

- AAX_CStringDisplayDelegate.h