engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
IConsoleVariable类 参考abstract

Interface for console variables 更多...

#include <IConsoleManager.h>

+ 类 IConsoleVariable 继承关系图:

Public 成员函数

virtual bool GetBool () const =0
 Get the internal value as a bool, works on bools, ints and floats.
 
virtual float GetFloat () const =0
 Get the internal value as float (works on all types).
 
virtual int32 GetInt () const =0
 Get the internal value as int (should not be used on strings). 更多...
 
virtual FString GetString () const =0
 Get the internal value as string (works on all types).
 
void Set (bool InValue, EConsoleVariableFlags SetBy=ECVF_SetByCode)
 Set the internal value from the specified bool.
 
virtual void Set (const TCHAR *InValue, EConsoleVariableFlags SetBy=ECVF_SetByCode)=0
 Set the internal value from the specified string. 更多...
 
void Set (float InValue, EConsoleVariableFlags SetBy=ECVF_SetByCode)
 Set the internal value from the specified float.
 
void Set (int32 InValue, EConsoleVariableFlags SetBy=ECVF_SetByCode)
 Set the internal value from the specified int.
 
virtual void SetOnChangedCallback (const FConsoleVariableDelegate &Callback)=0
 Allows to specify a callback function that is called when the console variable value changes. 更多...
 
- Public 成员函数 继承自 IConsoleObject
virtual struct IConsoleCommand * AsCommand ()
 Casts this object to an IConsoleCommand, verifying first that it is safe to do so
 
virtual class IConsoleVariable * AsVariable ()
 Casts this object to an IConsoleVariable, returns 0 if it's not
 
void ClearFlags (const EConsoleVariableFlags Value)
 Removes the specified flags in the internal state.
 
virtual EConsoleVariableFlags GetFlags () const =0
 Get the internal state of the flags.
 
virtual const TCHAR * GetHelp () const =0
 
virtual void SetFlags (const EConsoleVariableFlags Value)=0
 Sets the internal flag state to the specified value.
 
virtual void SetHelp (const TCHAR *Value)=0
 
bool TestFlags (const EConsoleVariableFlags Value) const
 Test is any of the specified flags is set in the internal state.
 

详细描述

Interface for console variables

成员函数说明

◆ GetInt()

virtual int32 IConsoleVariable::GetInt ( ) const
pure virtual

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

返回
value is not rounded (simple cast)

◆ Set()

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

Set the internal value from the specified string.

参数
SetByanything in ECVF_LastSetMask e.g. ECVF_SetByScalability

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

该类的文档由以下文件生成: