Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
IConsoleVariable Class Referenceabstract

#include <IConsoleManager.h>

+ Inheritance diagram for IConsoleVariable:
+ Collaboration diagram for IConsoleVariable:

Public Member Functions

virtual void Set (const TCHAR *InValue, EConsoleVariableFlags SetBy=ECVF_SetByCode)=0
 
virtual bool GetBool () const =0
 
virtual int32 GetInt () const =0
 
virtual float GetFloat () const =0
 
virtual FString GetString () const =0
 
void GetValue (int32 &OutIntValue)
 
void GetValue (bool &OutBoolValue)
 
void GetValue (float &OutFloatValue)
 
void GetValue (FString &OutStringValue)
 
virtual void SetOnChangedCallback (const FConsoleVariableDelegate &Callback)=0
 
virtual FConsoleVariableMulticastDelegateOnChangedDelegate ()=0
 
virtual IConsoleVariableGetDefaultValueVariable ()
 
void Set (bool InValue, EConsoleVariableFlags SetBy=ECVF_SetByCode)
 
void Set (int32 InValue, EConsoleVariableFlags SetBy=ECVF_SetByCode)
 
void Set (float InValue, EConsoleVariableFlags SetBy=ECVF_SetByCode)
 
void SetWithCurrentPriority (bool InValue)
 
void SetWithCurrentPriority (int32 InValue)
 
void SetWithCurrentPriority (float InValue)
 
void SetWithCurrentPriority (const TCHAR *InValue)
 
- Public Member Functions inherited from IConsoleObject
 IConsoleObject ()
 
virtual ~IConsoleObject ()
 
virtual const TCHAR * GetHelp () const =0
 
virtual void SetHelp (const TCHAR *Value)=0
 
virtual EConsoleVariableFlags GetFlags () const =0
 
virtual void SetFlags (const EConsoleVariableFlags Value)=0
 
void ClearFlags (const EConsoleVariableFlags Value)
 
bool TestFlags (const EConsoleVariableFlags Value) const
 
virtual class IConsoleVariableAsVariable ()
 
virtual bool IsVariableBool () const
 
virtual bool IsVariableInt () const
 
virtual bool IsVariableFloat () const
 
virtual bool IsVariableString () const
 
virtual class TConsoleVariableData< bool > * AsVariableBool ()
 
virtual class TConsoleVariableData< int32 > * AsVariableInt ()
 
virtual class TConsoleVariableData< float > * AsVariableFloat ()
 
virtual class TConsoleVariableData< FString > * AsVariableString ()
 
virtual struct IConsoleCommandAsCommand ()
 

Detailed Description

Interface for console variables

Definition at line 421 of file IConsoleManager.h.

Member Function Documentation

◆ GetBool()

virtual bool IConsoleVariable::GetBool ( ) const
pure virtual

Get the internal value as a bool, works on bools, ints and floats.

+ Here is the caller graph for this function:

◆ GetDefaultValueVariable()

virtual IConsoleVariable * IConsoleVariable::GetDefaultValueVariable ( )
inlinevirtual

Get the saved off default value, in a cvar variable, if one was created

Definition at line 480 of file IConsoleManager.h.

◆ GetFloat()

virtual float IConsoleVariable::GetFloat ( ) const
pure virtual

Get the internal value as float (works on all types).

+ Here is the caller graph for this function:

◆ GetInt()

virtual int32 IConsoleVariable::GetInt ( ) const
pure virtual

Get the internal value as int (should not be used on strings).

Returns
value is not rounded (simple cast)
+ Here is the caller graph for this function:

◆ GetString()

virtual FString IConsoleVariable::GetString ( ) const
pure virtual

Get the internal value as string (works on all types).

+ Here is the caller graph for this function:

◆ GetValue() [1/4]

void IConsoleVariable::GetValue ( bool & OutBoolValue)
inline

Definition at line 450 of file IConsoleManager.h.

+ Here is the call graph for this function:

◆ GetValue() [2/4]

void IConsoleVariable::GetValue ( float & OutFloatValue)
inline

Definition at line 454 of file IConsoleManager.h.

+ Here is the call graph for this function:

◆ GetValue() [3/4]

void IConsoleVariable::GetValue ( FString & OutStringValue)
inline

Definition at line 458 of file IConsoleManager.h.

+ Here is the call graph for this function:

◆ GetValue() [4/4]

void IConsoleVariable::GetValue ( int32 & OutIntValue)
inline

Generic versions for templated code

Definition at line 446 of file IConsoleManager.h.

+ Here is the call graph for this function:

◆ OnChangedDelegate()

virtual FConsoleVariableMulticastDelegate & IConsoleVariable::OnChangedDelegate ( )
pure virtual

◆ Set() [1/4]

void IConsoleVariable::Set ( bool InValue,
EConsoleVariableFlags SetBy = ECVF_SetByCode )
inline

Set the internal value from the specified bool.

Definition at line 509 of file IConsoleManager.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Set() [2/4]

virtual void IConsoleVariable::Set ( const TCHAR * InValue,
EConsoleVariableFlags SetBy = ECVF_SetByCode )
pure virtual

Set the internal value from the specified string.

Parameters
SetByanything in ECVF_LastSetMask e.g. ECVF_SetByScalability
+ Here is the caller graph for this function:

◆ Set() [3/4]

void IConsoleVariable::Set ( float InValue,
EConsoleVariableFlags SetBy = ECVF_SetByCode )
inline

Set the internal value from the specified float.

Definition at line 524 of file IConsoleManager.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Set() [4/4]

void IConsoleVariable::Set ( int32 InValue,
EConsoleVariableFlags SetBy = ECVF_SetByCode )
inline

Set the internal value from the specified int.

Definition at line 518 of file IConsoleManager.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetOnChangedCallback()

virtual void IConsoleVariable::SetOnChangedCallback ( const FConsoleVariableDelegate & Callback)
pure virtual

Allows to specify a callback function that is called when the console variable value changes. Is even called if the value is the same as the value before. Will always be on the game thread. This can be dangerous (instead try to use RegisterConsoleVariableSink())

  • Setting other console variables in the delegate can cause infinite loops
  • Setting many console variables could result in wasteful cycles (e.g. if multiple console variables require to reattach all objects it would happen for each one)
  • The call can be at any time during initialization. As this cannot be specified during constructions you are not called on creation. We also don't call for the SetOnChangedCallback() call as this is up to the caller.
+ Here is the caller graph for this function:

◆ SetWithCurrentPriority() [1/4]

void IConsoleVariable::SetWithCurrentPriority ( bool InValue)
inline

Definition at line 530 of file IConsoleManager.h.

+ Here is the call graph for this function:

◆ SetWithCurrentPriority() [2/4]

void IConsoleVariable::SetWithCurrentPriority ( const TCHAR * InValue)
inline

Definition at line 545 of file IConsoleManager.h.

+ Here is the call graph for this function:

◆ SetWithCurrentPriority() [3/4]

void IConsoleVariable::SetWithCurrentPriority ( float InValue)
inline

Definition at line 540 of file IConsoleManager.h.

+ Here is the call graph for this function:

◆ SetWithCurrentPriority() [4/4]

void IConsoleVariable::SetWithCurrentPriority ( int32 InValue)
inline

Definition at line 535 of file IConsoleManager.h.

+ Here is the call graph for this function:

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