engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | 所有成员列表
IConsoleManager结构体 参考abstract

handles console commands and variables, registered console variables are released on destruction 更多...

#include <IConsoleManager.h>

被 FConsoleManager 继承.

Public 成员函数

virtual void AddConsoleHistoryEntry (const TCHAR *Key, const TCHAR *Input)=0
 
virtual void CallAllConsoleVariableSinks ()=0
 The sinks are only called if a change has been done since the last time Should be called in very few points: 更多...
 
virtual IConsoleObject * FindConsoleObject (const TCHAR *Name, bool bTrackFrequentCalls=true) const =0
 Find a console variable or command 更多...
 
virtual IConsoleVariable * FindConsoleVariable (const TCHAR *Name, bool bTrackFrequentCalls=true) const =0
 Find a console variable 更多...
 
TConsoleVariableData< float > * FindTConsoleVariableDataFloat (const TCHAR *Name) const
 Find a typed console variable (faster access to the value, no virtual function call) 更多...
 
TConsoleVariableData< int32 > * FindTConsoleVariableDataInt (const TCHAR *Name) const
 Find a typed console variable (faster access to the value, no virtual function call) 更多...
 
virtual void ForEachConsoleObjectThatContains (const FConsoleObjectVisitor &Visitor, const TCHAR *ThatContains) const =0
 Not case sensitive, does not guarantee that UnregisterConsoleObject() will work in the loop 更多...
 
virtual void ForEachConsoleObjectThatStartsWith (const FConsoleObjectVisitor &Visitor, const TCHAR *ThatStartsWith=TEXT("")) const =0
 Iterate in O(n), not case sensitive, does not guarantee that UnregisterConsoleObject() will work in the loop 更多...
 
virtual bool IsNameRegistered (const TCHAR *Name) const =0
 Check if a name (command or variable) has been registered with the console manager 更多...
 
virtual bool ProcessUserConsoleInput (const TCHAR *Input, FOutputDevice &Ar, UWorld *InWorld)=0
 Process user input e.g. 更多...
 
virtual IConsoleCommand * RegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandDelegate &Command, uint32 Flags=ECVF_Default)=0
 Register a console command that takes no arguments 更多...
 
virtual IConsoleCommand * RegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithArgsDelegate &Command, uint32 Flags=ECVF_Default)=0
 Register a console command that takes arguments 更多...
 
virtual IConsoleCommand * RegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithOutputDeviceDelegate &Command, uint32 Flags=ECVF_Default)=0
 Register a console command that takes arguments 更多...
 
virtual IConsoleCommand * RegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithWorldAndArgsDelegate &Command, uint32 Flags=ECVF_Default)=0
 Register a console command that takes arguments 更多...
 
virtual IConsoleCommand * RegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithWorldArgsAndOutputDeviceDelegate &Command, uint32 Flags=ECVF_Default)=0
 Register a console command that takes arguments 更多...
 
virtual IConsoleCommand * RegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithWorldDelegate &Command, uint32 Flags=ECVF_Default)=0
 Register a console command that takes arguments 更多...
 
virtual IConsoleCommand * RegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, uint32 Flags=(uint32) ECVF_Default)=0
 Register a console command that is handles by an Exec functions (for auto completion) 更多...
 
virtual IConsoleVariable * RegisterConsoleVariable (const TCHAR *Name, bool DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 Create a bool console variable 更多...
 
virtual IConsoleVariable * RegisterConsoleVariable (const TCHAR *Name, const FString &DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 Create a string console variable 更多...
 
virtual IConsoleVariable * RegisterConsoleVariable (const TCHAR *Name, const TCHAR *DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 Create a string console variable 更多...
 
virtual IConsoleVariable * RegisterConsoleVariable (const TCHAR *Name, float DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 Create a float console variable 更多...
 
virtual IConsoleVariable * RegisterConsoleVariable (const TCHAR *Name, int32 DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 Create a int console variable 更多...
 
virtual IConsoleVariable * RegisterConsoleVariableBitRef (const TCHAR *CVarName, const TCHAR *FlagName, uint32 BitNumber, uint8 *Force0MaskPtr, uint8 *Force1MaskPtr, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 Create a reference to a show flag variable 更多...
 
virtual IConsoleVariable * RegisterConsoleVariableRef (const TCHAR *Name, bool &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 Create a reference to a bool console variable 更多...
 
virtual IConsoleVariable * RegisterConsoleVariableRef (const TCHAR *Name, float &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 Create a reference to a float console variable 更多...
 
virtual IConsoleVariable * RegisterConsoleVariableRef (const TCHAR *Name, FString &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 Create a reference to a string console variable 更多...
 
virtual IConsoleVariable * RegisterConsoleVariableRef (const TCHAR *Name, int32 &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 Create a reference to a int console variable 更多...
 
virtual FConsoleVariableSinkHandle RegisterConsoleVariableSink_Handle (const FConsoleCommandDelegate &Command)=0
 The registered command is executed at few defined points (see CallAllConsoleVariableSinks) 更多...
 
virtual void UnregisterConsoleObject (const TCHAR *Name, bool bKeepState=true)=0
 Unregisters a console variable or command by name, if an object of that name was registered. 更多...
 
virtual void UnregisterConsoleObject (IConsoleObject *ConsoleObject, bool bKeepState=true)=0
 Unregisters a console object, if that object was registered. 更多...
 
virtual void UnregisterConsoleVariableSink_Handle (FConsoleVariableSinkHandle Handle)=0
 The registered command is executed at few defined points (see CallAllConsoleVariableSinks) 更多...
 

静态 Public 成员函数

static FORCEINLINE IConsoleManager & Get ()
 Returns the singleton for the console manager
 

详细描述

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

成员函数说明

◆ AddConsoleHistoryEntry()

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

◆ 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)

◆ FindConsoleObject()

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

Find a console variable or command

参数
Namemust not be 0
返回
0 if the object wasn't found

◆ FindConsoleVariable()

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

Find a console variable

参数
Namemust not be 0
返回
0 if the object wasn't found

◆ FindTConsoleVariableDataFloat()

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

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

参数
Namemust not be 0
返回
0 if the object wasn't found

◆ FindTConsoleVariableDataInt()

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

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

参数
Namemust not be 0
返回
0 if the object wasn't found

◆ 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

参数
Visitormust not be 0
ThatContainsmust not be 0

◆ 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

参数
Visitormust not be 0
ThatStartsWithmust not be 0

◆ 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

参数
Name- Name to check. Must not be 0

◆ 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

参数
Inputmust not be 0
Ararchive
InWorldworld context
返回
true if the command was recognized

◆ RegisterConsoleCommand() [1/7]

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

参数
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

◆ RegisterConsoleCommand() [2/7]

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

参数
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

◆ RegisterConsoleCommand() [3/7]

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

参数
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

◆ RegisterConsoleCommand() [4/7]

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

参数
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

◆ RegisterConsoleCommand() [5/7]

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

参数
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

◆ RegisterConsoleCommand() [6/7]

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

参数
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

◆ RegisterConsoleCommand() [7/7]

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

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

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

◆ 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

参数
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

◆ 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

参数
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

◆ 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

参数
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

◆ 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

参数
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

◆ 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

参数
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

◆ 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

参数
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

◆ 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

参数
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

◆ 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

参数
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

◆ 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

参数
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

◆ 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

参数
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

◆ RegisterConsoleVariableSink_Handle()

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

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

参数
Command

◆ 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.

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

◆ 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

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

◆ UnregisterConsoleVariableSink_Handle()

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

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

参数
Command

该结构体的文档由以下文件生成: