Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
IConsoleManager Struct Referenceabstract

#include <IConsoleManager.h>

+ Inheritance diagram for IConsoleManager:
+ Collaboration diagram for IConsoleManager:

Public Member Functions

virtual IConsoleVariableRegisterConsoleVariable (const TCHAR *Name, bool DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleVariableRegisterConsoleVariable (const TCHAR *Name, int32 DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleVariableRegisterConsoleVariable (const TCHAR *Name, float DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleVariableRegisterConsoleVariable (const TCHAR *Name, const TCHAR *DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleVariableRegisterConsoleVariable (const TCHAR *Name, const FString &DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleVariableRegisterConsoleVariableRef (const TCHAR *Name, bool &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleVariableRegisterConsoleVariableRef (const TCHAR *Name, int32 &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleVariableRegisterConsoleVariableRef (const TCHAR *Name, float &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleVariableRegisterConsoleVariableRef (const TCHAR *Name, FString &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleVariableRegisterConsoleVariableBitRef (const TCHAR *CVarName, const TCHAR *FlagName, uint32 BitNumber, uint8 *Force0MaskPtr, uint8 *Force1MaskPtr, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual void CallAllConsoleVariableSinks ()=0
 
virtual FConsoleVariableSinkHandle RegisterConsoleVariableSink_Handle (const FConsoleCommandDelegate &Command)=0
 
virtual void UnregisterConsoleVariableSink_Handle (FConsoleVariableSinkHandle Handle)=0
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandDelegate &Command, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithArgsDelegate &Command, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithWorldDelegate &Command, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithWorldAndArgsDelegate &Command, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithArgsAndOutputDeviceDelegate &Command, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithWorldArgsAndOutputDeviceDelegate &Command, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithOutputDeviceDelegate &Command, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, uint32 Flags=(uint32) ECVF_Default)=0
 
virtual void UnregisterConsoleObject (IConsoleObject *ConsoleObject, bool bKeepState=true)=0
 
virtual void UnregisterConsoleObject (const TCHAR *Name, bool bKeepState=true)=0
 
virtual IConsoleVariableFindConsoleVariable (const TCHAR *Name, bool bTrackFrequentCalls=true) const =0
 
virtual IConsoleObjectFindConsoleObject (const TCHAR *Name, bool bTrackFrequentCalls=true) const =0
 
virtual FString FindConsoleObjectName (const IConsoleObject *Obj) const =0
 
TConsoleVariableData< bool > * FindTConsoleVariableDataBool (const TCHAR *Name) const
 
TConsoleVariableData< int32 > * FindTConsoleVariableDataInt (const TCHAR *Name) const
 
TConsoleVariableData< float > * FindTConsoleVariableDataFloat (const TCHAR *Name) const
 
virtual void ForEachConsoleObjectThatStartsWith (const FConsoleObjectVisitor &Visitor, const TCHAR *ThatStartsWith=TEXT("")) const =0
 
virtual void ForEachConsoleObjectThatContains (const FConsoleObjectVisitor &Visitor, const TCHAR *ThatContains) const =0
 
virtual bool ProcessUserConsoleInput (const TCHAR *Input, FOutputDevice &Ar, UWorld *InWorld)=0
 
virtual void AddConsoleHistoryEntry (const TCHAR *Key, const TCHAR *Input)=0
 
virtual void GetConsoleHistory (const TCHAR *Key, TArray< FString > &Out)=0
 
virtual bool IsNameRegistered (const TCHAR *Name) const =0
 
virtual void RegisterThreadPropagation (uint32 ThreadId=0, IConsoleThreadPropagation *InCallback=0)=0
 
virtual FConsoleVariableMulticastDelegateOnCVarUnregistered ()=0
 

Static Public Member Functions

static FORCEINLINE IConsoleManagerGet ()
 

Protected Member Functions

virtual ~IConsoleManager ()
 

Static Private Member Functions

static void SetupSingleton ()
 

Static Private Attributes

static IConsoleManagerSingleton
 

Detailed Description

handles console commands and variables, registered console variables are released on destruction

Definition at line 701 of file IConsoleManager.h.

Constructor & Destructor Documentation

◆ ~IConsoleManager()

virtual IConsoleManager::~IConsoleManager ( )
inlineprotectedvirtual

Definition at line 1031 of file IConsoleManager.h.

Member Function Documentation

◆ AddConsoleHistoryEntry()

virtual void IConsoleManager::AddConsoleHistoryEntry ( const TCHAR * Key,
const TCHAR * Input )
pure virtual
Parameters
Input- must not be 0

Implemented in FConsoleManager.

◆ CallAllConsoleVariableSinks()

virtual void IConsoleManager::CallAllConsoleVariableSinks ( )
pure virtual

The sinks are only called if a change has been done since the last time Should be called in very few points:

  • after ini file loading
  • after user console input
  • user initiated a console variable change (it needs to be clear to user that a cvar can change e.g. game options menu)
  • beginning of Tick (to catch stray Set() calls, which are usually bad)

Implemented in FConsoleManager.

◆ FindConsoleObject()

virtual IConsoleObject * IConsoleManager::FindConsoleObject ( const TCHAR * Name,
bool bTrackFrequentCalls = true ) const
pure virtual

Find a console variable or command

Parameters
Namemust not be 0
Returns
0 if the object wasn't found

Implemented in FConsoleManager.

◆ FindConsoleObjectName()

virtual FString IConsoleManager::FindConsoleObjectName ( const IConsoleObject * Obj) const
pure virtual

Lookup the name of a console object by its pointer

Parameters
Objectto lookup
Returns
Name of the object, or an empty string if the object can't be found

Implemented in FConsoleManager.

◆ FindConsoleVariable()

virtual IConsoleVariable * IConsoleManager::FindConsoleVariable ( const TCHAR * Name,
bool bTrackFrequentCalls = true ) const
pure virtual

Find a console variable

Parameters
Namemust not be 0
Returns
0 if the object wasn't found

Implemented in FConsoleManager.

+ Here is the caller graph for this function:

◆ FindTConsoleVariableDataBool()

TConsoleVariableData< bool > * IConsoleManager::FindTConsoleVariableDataBool ( const TCHAR * Name) const
inline

Find a typed console variable (faster access to the value, no virtual function call)

Parameters
Namemust not be 0
Returns
0 if the object wasn't found

Definition at line 925 of file IConsoleManager.h.

+ Here is the call graph for this function:

◆ FindTConsoleVariableDataFloat()

TConsoleVariableData< float > * IConsoleManager::FindTConsoleVariableDataFloat ( const TCHAR * Name) const
inline

Find a typed console variable (faster access to the value, no virtual function call)

Parameters
Namemust not be 0
Returns
0 if the object wasn't found

Definition at line 949 of file IConsoleManager.h.

+ Here is the call graph for this function:

◆ FindTConsoleVariableDataInt()

TConsoleVariableData< int32 > * IConsoleManager::FindTConsoleVariableDataInt ( const TCHAR * Name) const
inline

Find a typed console variable (faster access to the value, no virtual function call)

Parameters
Namemust not be 0
Returns
0 if the object wasn't found

Definition at line 937 of file IConsoleManager.h.

+ Here is the call graph for this function:

◆ ForEachConsoleObjectThatContains()

virtual void IConsoleManager::ForEachConsoleObjectThatContains ( const FConsoleObjectVisitor & Visitor,
const TCHAR * ThatContains ) const
pure virtual

Not case sensitive, does not guarantee that UnregisterConsoleObject() will work in the loop

Parameters
Visitormust not be 0
ThatContainsmust not be 0

Implemented in FConsoleManager.

◆ ForEachConsoleObjectThatStartsWith()

virtual void IConsoleManager::ForEachConsoleObjectThatStartsWith ( const FConsoleObjectVisitor & Visitor,
const TCHAR * ThatStartsWith = TEXT("") ) const
pure virtual

Iterate in O(n), not case sensitive, does not guarantee that UnregisterConsoleObject() will work in the loop

Parameters
Visitormust not be 0
ThatStartsWithmust not be 0

Implemented in FConsoleManager.

◆ Get()

static FORCEINLINE IConsoleManager & IConsoleManager::Get ( )
inlinestatic

Returns the singleton for the console manager

Definition at line 1004 of file IConsoleManager.h.

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

◆ GetConsoleHistory()

virtual void IConsoleManager::GetConsoleHistory ( const TCHAR * Key,
TArray< FString > & Out )
pure virtual

Implemented in FConsoleManager.

◆ IsNameRegistered()

virtual bool IConsoleManager::IsNameRegistered ( const TCHAR * Name) const
pure virtual

Check if a name (command or variable) has been registered with the console manager

Parameters
Name- Name to check. Must not be 0

Implemented in FConsoleManager.

◆ OnCVarUnregistered()

virtual FConsoleVariableMulticastDelegate & IConsoleManager::OnCVarUnregistered ( )
pure virtual

Implemented in FConsoleManager.

◆ ProcessUserConsoleInput()

virtual bool IConsoleManager::ProcessUserConsoleInput ( const TCHAR * Input,
FOutputDevice & Ar,
UWorld * InWorld )
pure virtual

Process user input e.g. "MyCVar" to get the current value of the console variable "MyCVar -5.2" to set the value to -5.2 "MyCVar ?" to get the help text

Parameters
Inputmust not be 0
Ararchive
InWorldworld context
Returns
true if the command was recognized

Implemented in FConsoleManager.

◆ RegisterConsoleCommand() [1/8]

virtual IConsoleCommand * IConsoleManager::RegisterConsoleCommand ( const TCHAR * Name,
const TCHAR * Help,
const FConsoleCommandDelegate & Command,
uint32 Flags = ECVF_Default )
pure virtual

Register a console command that takes no arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implemented in FConsoleManager.

+ Here is the caller graph for this function:

◆ RegisterConsoleCommand() [2/8]

virtual IConsoleCommand * IConsoleManager::RegisterConsoleCommand ( const TCHAR * Name,
const TCHAR * Help,
const FConsoleCommandWithArgsAndOutputDeviceDelegate & Command,
uint32 Flags = ECVF_Default )
pure virtual

Register a console command that takes arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implemented in FConsoleManager.

◆ RegisterConsoleCommand() [3/8]

virtual IConsoleCommand * IConsoleManager::RegisterConsoleCommand ( const TCHAR * Name,
const TCHAR * Help,
const FConsoleCommandWithArgsDelegate & Command,
uint32 Flags = ECVF_Default )
pure virtual

Register a console command that takes arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implemented in FConsoleManager.

◆ RegisterConsoleCommand() [4/8]

virtual IConsoleCommand * IConsoleManager::RegisterConsoleCommand ( const TCHAR * Name,
const TCHAR * Help,
const FConsoleCommandWithOutputDeviceDelegate & Command,
uint32 Flags = ECVF_Default )
pure virtual

Register a console command that takes arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implemented in FConsoleManager.

◆ RegisterConsoleCommand() [5/8]

virtual IConsoleCommand * IConsoleManager::RegisterConsoleCommand ( const TCHAR * Name,
const TCHAR * Help,
const FConsoleCommandWithWorldAndArgsDelegate & Command,
uint32 Flags = ECVF_Default )
pure virtual

Register a console command that takes arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implemented in FConsoleManager.

◆ RegisterConsoleCommand() [6/8]

virtual IConsoleCommand * IConsoleManager::RegisterConsoleCommand ( const TCHAR * Name,
const TCHAR * Help,
const FConsoleCommandWithWorldArgsAndOutputDeviceDelegate & Command,
uint32 Flags = ECVF_Default )
pure virtual

Register a console command that takes arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implemented in FConsoleManager.

◆ RegisterConsoleCommand() [7/8]

virtual IConsoleCommand * IConsoleManager::RegisterConsoleCommand ( const TCHAR * Name,
const TCHAR * Help,
const FConsoleCommandWithWorldDelegate & Command,
uint32 Flags = ECVF_Default )
pure virtual

Register a console command that takes arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implemented in FConsoleManager.

◆ RegisterConsoleCommand() [8/8]

virtual IConsoleCommand * IConsoleManager::RegisterConsoleCommand ( const TCHAR * Name,
const TCHAR * Help,
uint32 Flags = (uint32ECVF_Default )
pure virtual

Register a console command that is handles by an Exec functions (for auto completion)

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
FlagsOptional flags bitmask

Implemented in FConsoleManager.

◆ RegisterConsoleVariable() [1/5]

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariable ( const TCHAR * Name,
bool DefaultValue,
const TCHAR * Help,
uint32 Flags = ECVF_Default )
pure virtual

Create a bool console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

+ Here is the caller graph for this function:

◆ RegisterConsoleVariable() [2/5]

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariable ( const TCHAR * Name,
const FString & DefaultValue,
const TCHAR * Help,
uint32 Flags = ECVF_Default )
pure virtual

Create a string console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

◆ RegisterConsoleVariable() [3/5]

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariable ( const TCHAR * Name,
const TCHAR * DefaultValue,
const TCHAR * Help,
uint32 Flags = ECVF_Default )
pure virtual

Create a string console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

+ Here is the caller graph for this function:

◆ RegisterConsoleVariable() [4/5]

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariable ( const TCHAR * Name,
float DefaultValue,
const TCHAR * Help,
uint32 Flags = ECVF_Default )
pure virtual

Create a float console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

+ Here is the caller graph for this function:

◆ RegisterConsoleVariable() [5/5]

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariable ( const TCHAR * Name,
int32 DefaultValue,
const TCHAR * Help,
uint32 Flags = ECVF_Default )
pure virtual

Create a int console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

+ Here is the caller graph for this function:

◆ RegisterConsoleVariableBitRef()

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariableBitRef ( const TCHAR * CVarName,
const TCHAR * FlagName,
uint32 BitNumber,
uint8 * Force0MaskPtr,
uint8 * Force1MaskPtr,
const TCHAR * Help,
uint32 Flags = ECVF_Default )
pure virtual

Create a reference to a show flag variable

Parameters
CVarNamemust not be 0, e.g. "Show.PostProcessing"
FlagNamemust not be 0, e.g. "PostProcessing"
BitNumberin the memory defined by Force0MaskPtr and Force1MaskPtr
Force0MaskPtrmemory that contains the bits that should be forced to 0
Force1MaskPtrmemory that contains the bits that should be forced to 1
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

◆ RegisterConsoleVariableRef() [1/4]

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariableRef ( const TCHAR * Name,
bool & RefValue,
const TCHAR * Help,
uint32 Flags = ECVF_Default )
pure virtual

Create a reference to a bool console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

+ Here is the caller graph for this function:

◆ RegisterConsoleVariableRef() [2/4]

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariableRef ( const TCHAR * Name,
float & RefValue,
const TCHAR * Help,
uint32 Flags = ECVF_Default )
pure virtual

Create a reference to a float console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

+ Here is the caller graph for this function:

◆ RegisterConsoleVariableRef() [3/4]

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariableRef ( const TCHAR * Name,
FString & RefValue,
const TCHAR * Help,
uint32 Flags = ECVF_Default )
pure virtual

Create a reference to a string console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

+ Here is the caller graph for this function:

◆ RegisterConsoleVariableRef() [4/4]

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariableRef ( const TCHAR * Name,
int32 & RefValue,
const TCHAR * Help,
uint32 Flags = ECVF_Default )
pure virtual

Create a reference to a int console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

+ Here is the caller graph for this function:

◆ RegisterConsoleVariableSink_Handle()

virtual FConsoleVariableSinkHandle IConsoleManager::RegisterConsoleVariableSink_Handle ( const FConsoleCommandDelegate & Command)
pure virtual

The registered command is executed at few defined points (see CallAllConsoleVariableSinks)

Parameters
Command

Implemented in FConsoleManager.

+ Here is the caller graph for this function:

◆ RegisterThreadPropagation()

virtual void IConsoleManager::RegisterThreadPropagation ( uint32 ThreadId = 0,
IConsoleThreadPropagation * InCallback = 0 )
pure virtual

Implemented in FConsoleManager.

◆ SetupSingleton()

static void IConsoleManager::SetupSingleton ( )
staticprivate

Function to create the singleton

+ Here is the caller graph for this function:

◆ UnregisterConsoleObject() [1/2]

virtual void IConsoleManager::UnregisterConsoleObject ( const TCHAR * Name,
bool bKeepState = true )
pure virtual

Unregisters a console variable or command by name, if an object of that name was registered.

Parameters
Name- name of object to remove
bKeepStateif the current state is kept in memory until a cvar with the same name is registered

Implemented in FConsoleManager.

◆ UnregisterConsoleObject() [2/2]

virtual void IConsoleManager::UnregisterConsoleObject ( IConsoleObject * ConsoleObject,
bool bKeepState = true )
pure virtual

Unregisters a console object, if that object was registered. O(n), n is the console object count

Parameters
ConsoleObject- object to remove
bKeepStateif the current state is kept in memory until a cvar with the same name is registered

Implemented in FConsoleManager.

+ Here is the caller graph for this function:

◆ UnregisterConsoleVariableSink_Handle()

virtual void IConsoleManager::UnregisterConsoleVariableSink_Handle ( FConsoleVariableSinkHandle Handle)
pure virtual

The registered command is executed at few defined points (see CallAllConsoleVariableSinks)

Parameters
Command

Implemented in FConsoleManager.

Member Data Documentation

◆ Singleton

IConsoleManager* IConsoleManager::Singleton
staticprivate

Singleton for the console manager

Definition at line 1035 of file IConsoleManager.h.


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