AAX SDK  2.4.1
Avid Audio Extensions Development Kit
List of all members | Classes | Public Member Functions
AAX_CStateDisplayDelegate< T > Class Template Reference

#include <AAX_CStateDisplayDelegate.h>

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

Description

template<typename T>
class AAX_CStateDisplayDelegate< T >

A generic display format conforming to AAX_IDisplayDelegate.

This display delegate is similar to AAX_CNumberDisplayDelegate, but does not include precision or spacing templatizations.

Public Member Functions

 AAX_CStateDisplayDelegate (const char *iStateStrings[], T iMinState=0)
 Constructor taking a vector of C strings. More...
 
 AAX_CStateDisplayDelegate (int32_t inNumStates, const char *iStateStrings[], T iMinState=0)
 Constructor taking a vector of C strings. More...
 
 AAX_CStateDisplayDelegate (const std::vector< AAX_IString * > &iStateStrings, T iMinState=0)
 Constructor taking a vector of AAX_IString objects. More...
 
 AAX_CStateDisplayDelegate (const AAX_CStateDisplayDelegate &other)
 
AAX_IDisplayDelegate< T > * Clone () 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...
 
void AddShortenedStrings (const char *iStateStrings[], int iLength)
 
bool Compare (const AAX_CString &valueString, const AAX_CString &stateString) const
 
- Public Member Functions inherited from AAX_IDisplayDelegateBase
virtual ~AAX_IDisplayDelegateBase ()
 Virtual destructor. More...
 

Constructor & Destructor Documentation

◆ AAX_CStateDisplayDelegate() [1/4]

template<typename T >
AAX_CStateDisplayDelegate< T >::AAX_CStateDisplayDelegate ( const char *  iStateStrings[],
iMinState = 0 
)
explicit

Constructor taking a vector of C strings.

Each state name will be copied into the display delegate; the C strings may be disposed after construction.

Note
iStateStrings must be NULL-terminated

◆ AAX_CStateDisplayDelegate() [2/4]

template<typename T >
AAX_CStateDisplayDelegate< T >::AAX_CStateDisplayDelegate ( int32_t  inNumStates,
const char *  iStateStrings[],
iMinState = 0 
)
explicit

Constructor taking a vector of C strings.

Each state name will be copied into the display delegate; the C strings may be disposed after construction.

State strings will be copied into the display delegate until either a NULL pointer is encountered or inNumStates strings have been copied

◆ AAX_CStateDisplayDelegate() [3/4]

template<typename T >
AAX_CStateDisplayDelegate< T >::AAX_CStateDisplayDelegate ( const std::vector< AAX_IString * > &  iStateStrings,
iMinState = 0 
)
explicit

Constructor taking a vector of AAX_IString objects.

Each AAX_IString will be copied into the display delegate and may be disposed after construction. The AAX_IString will not be mutated.

◆ AAX_CStateDisplayDelegate() [4/4]

template<typename T >
AAX_CStateDisplayDelegate< T >::AAX_CStateDisplayDelegate ( const AAX_CStateDisplayDelegate< T > &  other)

Member Function Documentation

◆ Clone()

template<typename T >
AAX_IDisplayDelegate< T > * AAX_CStateDisplayDelegate< 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_CStateDisplayDelegate< T >::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 >.

◆ ValueToString() [2/2]

template<typename T >
bool AAX_CStateDisplayDelegate< T >::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 >.

◆ StringToValue()

template<typename T >
bool AAX_CStateDisplayDelegate< T >::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 >.

◆ AddShortenedStrings()

template<typename T >
void AAX_CStateDisplayDelegate< T >::AddShortenedStrings ( const char *  iStateStrings[],
int  iLength 
)

◆ Compare()

template<typename T >
bool AAX_CStateDisplayDelegate< T >::Compare ( const AAX_CString valueString,
const AAX_CString stateString 
) const

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