Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
IConsoleManager.h File Reference
#include "CoreTypes.h"
#include "Misc/AccessDetection.h"
#include "Misc/AssertionMacros.h"
#include "Templates/UnrealTemplate.h"
#include "Containers/UnrealString.h"
#include "Logging/LogMacros.h"
#include "Delegates/IDelegateInstance.h"
#include "Delegates/Delegate.h"
#include "Features/IModularFeature.h"
#include "Templates/EnableIf.h"
+ Include dependency graph for IConsoleManager.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  IConsoleObject
 
class  IConsoleVariable
 
struct  IConsoleCommand
 
struct  IConsoleThreadPropagation
 
class  FConsoleVariableSinkHandle
 
class  IConsoleCommandExecutor
 
struct  IConsoleManager
 
class  FAutoConsoleVariableSink
 
class  FAutoConsoleObject
 
class  FAutoConsoleVariable
 
class  FAutoConsoleVariableRef
 
class  TConsoleVariableData< T >
 
class  TAutoConsoleVariable< T >
 
class  FAutoConsoleCommand
 
class  FAutoConsoleCommandWithWorld
 
class  FAutoConsoleCommandWithWorldAndArgs
 
class  FAutoConsoleCommandWithArgsAndOutputDevice
 
class  FAutoConsoleCommandWithOutputDevice
 
class  FAutoConsoleCommandWithWorldArgsAndOutputDevice
 

Macros

#define TRACK_CONSOLE_FIND_COUNT   !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
 
#define cvarCheckCode(...)
 

Enumerations

enum  EConsoleVariableFlags {
  ECVF_FlagMask = 0xFFFFFFFF , ECVF_Default = 0x0 , ECVF_Cheat = 0x1 , ECVF_ReadOnly = 0x4 ,
  ECVF_Unregistered = 0x8 , ECVF_CreatedFromIni = 0x10 , ECVF_RenderThreadSafe = 0x20 , ECVF_Scalability = 0x40 ,
  ECVF_ScalabilityGroup = 0x80 , ECVF_Preview = 0x100 , ECVF_GeneralShaderChange = 0x200 , ECVF_MobileShaderChange = 0x400 ,
  ECVF_DesktopShaderChange = 0x800 , ECVF_ExcludeFromPreview = 0x1000 , ECVF_SetFlagMask = 0xFF0000 , ECVF_Set_NoSinkCall_Unsafe = 0x10000 ,
  ECVF_SetByMask = 0xFF000000 , ECVF_SetByConstructor = 0x0 , ECVF_SetByScalability = 0x1000000 , ECVF_SetByGameSetting = 0x2000000 ,
  ECVF_SetByProjectSetting = 0x3000000 , ECVF_SetBySystemSettingsIni = 0x4000000 , ECVF_SetByDeviceProfile = 0x5000000 , ECVF_SetByGameOverride = 0x6000000 ,
  ECVF_SetByConsoleVariablesIni = 0x7000000 , ECVF_SetByCommandline = 0x8000000 , ECVF_SetByCode = 0x9000000 , ECVF_SetByConsole = 0xA000000 ,
  ECVF_FlagMask = 0x0000ffff , ECVF_FlagMask = 0xFFFFFFFF , ECVF_Default = 0x0 , ECVF_Default = 0x0 ,
  ECVF_Cheat = 0x1 , ECVF_Cheat = 0x1 , ECVF_ReadOnly = 0x4 , ECVF_ReadOnly = 0x4 ,
  ECVF_Unregistered = 0x8 , ECVF_Unregistered = 0x8 , ECVF_CreatedFromIni = 0x10 , ECVF_CreatedFromIni = 0x10 ,
  ECVF_RenderThreadSafe = 0x20 , ECVF_RenderThreadSafe = 0x20 , ECVF_Scalability = 0x40 , ECVF_Scalability = 0x40 ,
  ECVF_ScalabilityGroup = 0x80 , ECVF_ScalabilityGroup = 0x80 , ECVF_Preview = 0x100 , ECVF_Preview = 0x100 ,
  ECVF_GeneralShaderChange = 0x200 , ECVF_GeneralShaderChange = 0x200 , ECVF_MobileShaderChange = 0x400 , ECVF_MobileShaderChange = 0x400 ,
  ECVF_DesktopShaderChange = 0x800 , ECVF_DesktopShaderChange = 0x800 , ECVF_ExcludeFromPreview = 0x1000 , ECVF_ExcludeFromPreview = 0x1000 ,
  ECVF_SetFlagMask = 0x00ff0000 , ECVF_SetFlagMask = 0xFF0000 , ECVF_Set_NoSinkCall_Unsafe = 0x00010000 , ECVF_Set_NoSinkCall_Unsafe = 0x10000 ,
  ECVF_SetByMask = 0xff000000 , ECVF_SetByMask = 0xFF000000 , ECVF_SetByConstructor = 0x00000000 , ECVF_SetByConstructor = 0x0 ,
  ECVF_SetByScalability = 0x01000000 , ECVF_SetByScalability = 0x1000000 , ECVF_SetByGameSetting = 0x02000000 , ECVF_SetByGameSetting = 0x2000000 ,
  ECVF_SetByProjectSetting = 0x03000000 , ECVF_SetByProjectSetting = 0x3000000 , ECVF_SetBySystemSettingsIni = 0x04000000 , ECVF_SetBySystemSettingsIni = 0x4000000 ,
  ECVF_SetByDeviceProfile = 0x05000000 , ECVF_SetByDeviceProfile = 0x5000000 , ECVF_SetByGameOverride = 0x06000000 , ECVF_SetByGameOverride = 0x6000000 ,
  ECVF_SetByConsoleVariablesIni = 0x07000000 , ECVF_SetByConsoleVariablesIni = 0x7000000 , ECVF_SetByCommandline = 0x08000000 , ECVF_SetByCommandline = 0x8000000 ,
  ECVF_SetByCode = 0x09000000 , ECVF_SetByCode = 0x9000000 , ECVF_SetByConsole = 0x0A000000 , ECVF_SetByConsole = 0xA000000
}
 

Functions

 DECLARE_DELEGATE_OneParam (FConsoleVariableDelegate, IConsoleVariable *)
 
 DECLARE_MULTICAST_DELEGATE_OneParam (FConsoleVariableMulticastDelegate, IConsoleVariable *)
 
 DECLARE_DELEGATE (FConsoleCommandDelegate)
 
 DECLARE_DELEGATE_OneParam (FConsoleCommandWithArgsDelegate, const TArray< FString > &)
 
 DECLARE_DELEGATE_OneParam (FConsoleCommandWithWorldDelegate, UWorld *)
 
 DECLARE_DELEGATE_TwoParams (FConsoleCommandWithWorldAndArgsDelegate, const TArray< FString > &, UWorld *)
 
 DECLARE_DELEGATE_TwoParams (FConsoleCommandWithArgsAndOutputDeviceDelegate, const TArray< FString > &, FOutputDevice &)
 
 DECLARE_DELEGATE_ThreeParams (FConsoleCommandWithWorldArgsAndOutputDeviceDelegate, const TArray< FString > &, UWorld *, FOutputDevice &)
 
 DECLARE_DELEGATE_OneParam (FConsoleCommandWithOutputDeviceDelegate, FOutputDevice &)
 
 DECLARE_DELEGATE_TwoParams (FConsoleObjectVisitor, const TCHAR *, IConsoleObject *)
 
 DECLARE_LOG_CATEGORY_EXTERN (LogConsoleResponse, Log, All)
 

Macro Definition Documentation

◆ cvarCheckCode

#define cvarCheckCode ( ...)

Definition at line 21 of file IConsoleManager.h.

◆ TRACK_CONSOLE_FIND_COUNT

#define TRACK_CONSOLE_FIND_COUNT   !(UE_BUILD_SHIPPING || UE_BUILD_TEST)

Definition at line 16 of file IConsoleManager.h.

Enumeration Type Documentation

◆ EConsoleVariableFlags

Console variable usage guide:

The variable should be creates early in the initialization but not before (not in global variable construction). Choose the right variable type, consider using a console command if more functionality is needed (see Exec()). Available types: bool, int, float, bool&, int&, float&, string Always provide a good help text, other should be able to understand the function of the console variable by reading this help. The help length should be limited to a reasonable width in order to work well for low res screen resolutions.

Usage in the game console: <COMMAND> ? print the HELP <COMMAND> print the current state of the console variable <COMMAND> x set and print the new state of the console variable

All variables support auto completion. The single line help that can show up there is currently not connected to the help as the help text is expected to be multi line. The former Exec() system can be used to access the console variables. Use console variables only in main thread. The state of console variables is not network synchronized or serialized (load/save). The plan is to allow to set the state in external files (game/platform/engine/local). Bitmask 0x1, 0x2, 0x4, ..

Enumerator
ECVF_FlagMask 
ECVF_Default 
ECVF_Cheat 
ECVF_ReadOnly 
ECVF_Unregistered 
ECVF_CreatedFromIni 
ECVF_RenderThreadSafe 
ECVF_Scalability 
ECVF_ScalabilityGroup 
ECVF_Preview 
ECVF_GeneralShaderChange 
ECVF_MobileShaderChange 
ECVF_DesktopShaderChange 
ECVF_ExcludeFromPreview 
ECVF_SetFlagMask 
ECVF_Set_NoSinkCall_Unsafe 
ECVF_SetByMask 
ECVF_SetByConstructor 
ECVF_SetByScalability 
ECVF_SetByGameSetting 
ECVF_SetByProjectSetting 
ECVF_SetBySystemSettingsIni 
ECVF_SetByDeviceProfile 
ECVF_SetByGameOverride 
ECVF_SetByConsoleVariablesIni 
ECVF_SetByCommandline 
ECVF_SetByCode 
ECVF_SetByConsole 
ECVF_FlagMask 
ECVF_FlagMask 
ECVF_Default 

Default, no flags are set, the value is set by the constructor

ECVF_Default 
ECVF_Cheat 

Console variables marked with this flag behave differently in a final release build. Then they are are hidden in the console and cannot be changed by the user.

ECVF_Cheat 
ECVF_ReadOnly 

Console variables cannot be changed by the user (from console). Changing from C++ or ini is still possible.

ECVF_ReadOnly 
ECVF_Unregistered 

UnregisterConsoleObject() was called on this one. If the variable is registered again with the same type this object is reactivated. This is good for DLL unloading.

ECVF_Unregistered 
ECVF_CreatedFromIni 

This flag is set by the ini loading code when the variable wasn't registered yet. Once the variable is registered later the value is copied over and the variable is destructed.

ECVF_CreatedFromIni 
ECVF_RenderThreadSafe 

Maintains another shadow copy and updates the copy with render thread commands to maintain proper ordering. Could be extended for more/other thread. Note: On console variable references it assumes the reference is accessed on the render thread only (Don't use in any other thread or better don't use references to avoid the potential pitfall).

ECVF_RenderThreadSafe 
ECVF_Scalability 
ECVF_Scalability 
ECVF_ScalabilityGroup 
ECVF_ScalabilityGroup 
ECVF_Preview 
ECVF_Preview 
ECVF_GeneralShaderChange 
ECVF_GeneralShaderChange 
ECVF_MobileShaderChange 
ECVF_MobileShaderChange 
ECVF_DesktopShaderChange 
ECVF_DesktopShaderChange 
ECVF_ExcludeFromPreview 
ECVF_ExcludeFromPreview 
ECVF_SetFlagMask 
ECVF_SetFlagMask 
ECVF_Set_NoSinkCall_Unsafe 
ECVF_Set_NoSinkCall_Unsafe 
ECVF_SetByMask 
ECVF_SetByMask 
ECVF_SetByConstructor 
ECVF_SetByConstructor 
ECVF_SetByScalability 
ECVF_SetByScalability 
ECVF_SetByGameSetting 
ECVF_SetByGameSetting 
ECVF_SetByProjectSetting 
ECVF_SetByProjectSetting 
ECVF_SetBySystemSettingsIni 
ECVF_SetBySystemSettingsIni 
ECVF_SetByDeviceProfile 
ECVF_SetByDeviceProfile 
ECVF_SetByGameOverride 
ECVF_SetByGameOverride 
ECVF_SetByConsoleVariablesIni 
ECVF_SetByConsoleVariablesIni 
ECVF_SetByCommandline 
ECVF_SetByCommandline 
ECVF_SetByCode 
ECVF_SetByCode 
ECVF_SetByConsole 
ECVF_SetByConsole 

Definition at line 50 of file IConsoleManager.h.

Function Documentation

◆ DECLARE_DELEGATE()

DECLARE_DELEGATE ( FConsoleCommandDelegate )

Console command delegate type (takes no arguments.) This is a void callback function.

◆ DECLARE_DELEGATE_OneParam() [1/4]

DECLARE_DELEGATE_OneParam ( FConsoleCommandWithArgsDelegate ,
const TArray< FString > &  )

Console command delegate type (with arguments.) This is a void callback function that always takes a list of arguments.

◆ DECLARE_DELEGATE_OneParam() [2/4]

DECLARE_DELEGATE_OneParam ( FConsoleCommandWithOutputDeviceDelegate ,
FOutputDevice &  )

Console command delegate type with the output device passed through.

◆ DECLARE_DELEGATE_OneParam() [3/4]

DECLARE_DELEGATE_OneParam ( FConsoleCommandWithWorldDelegate ,
UWorld *  )

Console command delegate type with a world argument. This is a void callback function that always takes a world.

◆ DECLARE_DELEGATE_OneParam() [4/4]

DECLARE_DELEGATE_OneParam ( FConsoleVariableDelegate ,
IConsoleVariable *  )

Console variable delegate type This is a void callback function.

◆ DECLARE_DELEGATE_ThreeParams()

Console command delegate type (with a world arguments and output device.) This is a void callback function that always takes a list of arguments, a world and output device.

◆ DECLARE_DELEGATE_TwoParams() [1/3]

Console command delegate type (with arguments and output device.) This is a void callback function that always takes a list of arguments and output device.

◆ DECLARE_DELEGATE_TwoParams() [2/3]

DECLARE_DELEGATE_TwoParams ( FConsoleCommandWithWorldAndArgsDelegate ,
const TArray< FString > & ,
UWorld *  )

Console command delegate type (with a world and arguments.) This is a void callback function that always takes a list of arguments and a world.

◆ DECLARE_DELEGATE_TwoParams() [3/3]

DECLARE_DELEGATE_TwoParams ( FConsoleObjectVisitor ,
const TCHAR * ,
IConsoleObject *  )

Declares a delegate type that's used by the console manager to call back into a user function for each known console object.

First parameter is the Name string for the current console object Second parameter is the current console object

◆ DECLARE_LOG_CATEGORY_EXTERN()

DECLARE_LOG_CATEGORY_EXTERN ( LogConsoleResponse ,
Log ,
All  )

◆ DECLARE_MULTICAST_DELEGATE_OneParam()

DECLARE_MULTICAST_DELEGATE_OneParam ( FConsoleVariableMulticastDelegate ,
IConsoleVariable *  )

Console variable multicast delegate type.