NvTweakEnum< T > Struct Template Reference

Template for objects that pair human-readable strings with their application-value counterparts. More...

#include <NvTweakBar.h>

List of all members.

Public Member Functions

 operator T & ()
 We override the type-reference operator to access the value.
 operator const T & () const
 We override the const type-reference operator to access the value.
 operator char * ()
 We override char* operator to access the name field.
 operator const char * () const
 We override const char* operator to access the name field.

Public Attributes

const char * m_name
 The human-readable name of this enumerator.
m_value
 The specific value denoted by this enumerator.


Detailed Description

template<class T>
struct NvTweakEnum< T >

Template for objects that pair human-readable strings with their application-value counterparts.

When placed in an array initializer, NvTweakEnum allows for quick abstract definition of name:value pairs like C enums, and the array can then be passed into other functions to define a set of assignable named values for a specific variable.


Member Function Documentation

template<class T>
NvTweakEnum< T >::operator char * (  )  [inline]

We override char* operator to access the name field.

template<class T>
NvTweakEnum< T >::operator const char * (  )  const [inline]

We override const char* operator to access the name field.

template<class T>
NvTweakEnum< T >::operator const T & (  )  const [inline]

We override the const type-reference operator to access the value.

template<class T>
NvTweakEnum< T >::operator T & (  )  [inline]

We override the type-reference operator to access the value.


Member Data Documentation

template<class T>
const char* NvTweakEnum< T >::m_name

The human-readable name of this enumerator.

template<class T>
T NvTweakEnum< T >::m_value

The specific value denoted by this enumerator.


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