AAX SDK  2.4.1
Avid Audio Extensions Development Kit
List of all members | Public Member Functions
AAX_CNumberDisplayDelegate< T, Precision, SpaceAfter > Class Template Reference

#include <AAX_CNumberDisplayDelegate.h>

Inheritance diagram for AAX_CNumberDisplayDelegate< T, Precision, SpaceAfter >:
[legend]
Collaboration diagram for AAX_CNumberDisplayDelegate< T, Precision, SpaceAfter >:
[legend]

Description

template<typename T, uint32_t Precision = 2, uint32_t SpaceAfter = 0>
class AAX_CNumberDisplayDelegate< T, Precision, SpaceAfter >

A numeric display format conforming to AAX_IDisplayDelegate.

This display delegate converts a parameter value to a numeric string using a specified precision.

Public Member Functions

AAX_CNumberDisplayDelegateClone () const AAX_OVERRIDE
 Constructs and returns a copy of the display delegate. More...
 
bool ValueToString (T value, AAX_CString *valueString) const AAX_OVERRIDE
 Converts a real parameter value to a string representation. More...
 
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. More...
 
bool StringToValue (const AAX_CString &valueString, T *value) const AAX_OVERRIDE
 Converts a string to a real parameter value. More...
 
- Public Member Functions inherited from AAX_IDisplayDelegateBase
virtual ~AAX_IDisplayDelegateBase ()
 Virtual destructor. More...
 

Member Function Documentation

◆ Clone()

template<typename T , uint32_t Precision, uint32_t SpaceAfter>
AAX_CNumberDisplayDelegate< T, Precision, SpaceAfter > * AAX_CNumberDisplayDelegate< T, Precision, SpaceAfter >::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 , uint32_t Precision, uint32_t SpaceAfter>
bool AAX_CNumberDisplayDelegate< T, Precision, SpaceAfter >::ValueToString ( value,
AAX_CString valueString 
) const
virtual

Converts a real parameter value to a string representation.

Parameters
[in]valueThe real parameter value that will be converted
[out]valueStringA string corresponding to value
Return values
trueThe string conversion was successful
falseThe string conversion was unsuccessful

Implements AAX_IDisplayDelegate< T >.

References AAX_CString::Append(), AAX_CString::AppendNumber(), and AAX_CString::Clear().

Here is the call graph for this function:

◆ ValueToString() [2/2]

template<typename T , uint32_t Precision, uint32_t SpaceAfter>
bool AAX_CNumberDisplayDelegate< T, Precision, SpaceAfter >::ValueToString ( 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]valueThe real parameter value that will be converted
[in]maxNumCharsSize hint for the desired maximum number of characters in the string (not including null termination)
[out]valueStringA string corresponding to value
Return values
trueThe string conversion was successful
falseThe string conversion was unsuccessful

Implements AAX_IDisplayDelegate< T >.

References AAX_CString::Append(), AAX_CString::AppendNumber(), AAX_CString::Clear(), AAX_CString::Erase(), and AAX_CString::Length().

Here is the call graph for this function:

◆ StringToValue()

template<typename T , uint32_t Precision, uint32_t SpaceAfter>
bool AAX_CNumberDisplayDelegate< T, Precision, SpaceAfter >::StringToValue ( const AAX_CString valueString,
T *  value 
) const
virtual

Converts a string to a real parameter value.

Parameters
[in]valueStringThe string that will be converted
[out]valueThe real parameter value corresponding to valueString
Return values
trueThe string conversion was successful
falseThe string conversion was unsuccessful

Implements AAX_IDisplayDelegate< T >.

References AAX_CString::ToDouble().

Here is the call graph for this function:

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