Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::ConsoleDataWrapper< BASE_TYPE, THREAD_SAFETY > Class Template Reference

Inherits AZ::ConsoleDataContainer< BASE_TYPE, THREAD_SAFETY >.

Public Types

using BaseType = BASE_TYPE
 
using SelfType = ConsoleDataWrapper< BASE_TYPE, THREAD_SAFETY >
 
using CallbackFunc = void(*)(const BaseType &value)
 

Public Member Functions

 ConsoleDataWrapper (const BASE_TYPE &value, CallbackFunc callback, const char *name, const char *desc, ConsoleFunctorFlags flags)
 
void operator= (const BASE_TYPE &rhs)
 
 operator BASE_TYPE () const
 
bool operator== (const BASE_TYPE &rhs) const
 
bool operator!= (const BASE_TYPE &rhs) const
 
bool operator< (const BASE_TYPE &rhs) const
 
bool operator<= (const BASE_TYPE &rhs) const
 
bool operator> (const BASE_TYPE &rhs) const
 
bool operator>= (const BASE_TYPE &rhs) const
 
bool StringToValue (const ConsoleCommandContainer &arguments)
 
void ValueToString (CVarFixedString &outString) const
 
void InvokeCallback () const
 Invokes bound callback on the wrapped BaseType value.
 
void CvarFunctor (const ConsoleCommandContainer &arguments)
 

Constructor & Destructor Documentation

◆ ConsoleDataWrapper()

template<typename BASE_TYPE , ThreadSafety THREAD_SAFETY>
AZ::ConsoleDataWrapper< BASE_TYPE, THREAD_SAFETY >::ConsoleDataWrapper ( const BASE_TYPE &  value,
CallbackFunc  callback,
const char *  name,
const char *  desc,
ConsoleFunctorFlags  flags 
)
inline

Constructor.

Parameters
valuethe initial value to initialize the wrapped data to
callbackan optional callback that will be invoked upon any change in value to this variable
namethe string name of the variable
desca string help description of the variable
flagsa set of optional flags that mutate the behaviour of the variable

Member Function Documentation

◆ CvarFunctor()

template<typename BASE_TYPE , ThreadSafety THREAD_SAFETY>
void AZ::ConsoleDataWrapper< BASE_TYPE, THREAD_SAFETY >::CvarFunctor ( const ConsoleCommandContainer arguments)
inline

Cvar functor, reads data contained in arguments to set the console variable value.

Parameters
argumentsStringSet instance to read new values from

◆ operator BASE_TYPE()

template<typename BASE_TYPE , ThreadSafety THREAD_SAFETY>
AZ::ConsoleDataWrapper< BASE_TYPE, THREAD_SAFETY >::operator BASE_TYPE
inline

Const base type operator

Returns
value in const base type form.

◆ operator!=()

template<typename BASE_TYPE , ThreadSafety THREAD_SAFETY>
bool AZ::ConsoleDataWrapper< BASE_TYPE, THREAD_SAFETY >::operator!= ( const BASE_TYPE &  rhs) const
inline

Inequality operator, provided for convenience. The contained value could have changed after the comparison is made and before the result is returned

Parameters
rhsbase type value to compare against
Returns
boolean true if this != rhs

◆ operator<()

template<typename BASE_TYPE , ThreadSafety THREAD_SAFETY>
bool AZ::ConsoleDataWrapper< BASE_TYPE, THREAD_SAFETY >::operator< ( const BASE_TYPE &  rhs) const
inline

Strictly less than operator, provided for convenience. The contained value could have changed after the comparison is made and before the result is returned

Parameters
rhsbase type value to compare against
Returns
boolean true if this < rhs

◆ operator<=()

template<typename BASE_TYPE , ThreadSafety THREAD_SAFETY>
bool AZ::ConsoleDataWrapper< BASE_TYPE, THREAD_SAFETY >::operator<= ( const BASE_TYPE &  rhs) const
inline

Less than equal to operator, provided for convenience. The contained value could have changed after the comparison is made and before the result is returned

Parameters
rhsbase type value to compare against
Returns
boolean true if this <= rhs

◆ operator=()

template<typename BASE_TYPE , ThreadSafety THREAD_SAFETY>
void AZ::ConsoleDataWrapper< BASE_TYPE, THREAD_SAFETY >::operator= ( const BASE_TYPE &  rhs)
inline

Assignment from underlying base type.

Parameters
rhsbase type value to assign from

◆ operator==()

template<typename BASE_TYPE , ThreadSafety THREAD_SAFETY>
bool AZ::ConsoleDataWrapper< BASE_TYPE, THREAD_SAFETY >::operator== ( const BASE_TYPE &  rhs) const
inline

Equality operator, provided for convenience. The contained value could have changed after the comparison is made and before the result is returned.

Parameters
rhsbase type value to compare against
Returns
boolean true if this == rhs

◆ operator>()

template<typename BASE_TYPE , ThreadSafety THREAD_SAFETY>
bool AZ::ConsoleDataWrapper< BASE_TYPE, THREAD_SAFETY >::operator> ( const BASE_TYPE &  rhs) const
inline

Strictly greater than operator, provided for convenience. The contained value could have changed after the comparison is made and before the result is returned

Parameters
rhsbase type value to compare against
Returns
boolean true if this > rhs

◆ operator>=()

template<typename BASE_TYPE , ThreadSafety THREAD_SAFETY>
bool AZ::ConsoleDataWrapper< BASE_TYPE, THREAD_SAFETY >::operator>= ( const BASE_TYPE &  rhs) const
inline

Greater than equal to operator, provided for convenience. The contained value could have changed after the comparison is made and before the result is returned

Parameters
rhsbase type value to compare against
Returns
boolean true if this >= rhs

◆ StringToValue()

template<typename BASE_TYPE , ThreadSafety THREAD_SAFETY>
bool AZ::ConsoleDataWrapper< BASE_TYPE, THREAD_SAFETY >::StringToValue ( const ConsoleCommandContainer arguments)

Reads data contained in arguments to set the console variable value.

Parameters
argumentsStringSet instance to read new values from
Returns
boolean true on success, false if an error occurred

◆ ValueToString()

template<typename BASE_TYPE , ThreadSafety THREAD_SAFETY>
void AZ::ConsoleDataWrapper< BASE_TYPE, THREAD_SAFETY >::ValueToString ( CVarFixedString outString) const

Stringifies the contained variables value and write the result to outString.

Parameters
outStringoutput string instance to write the stringified value to

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