6#include "Misc/AccessDetection.h"
7#include "Misc/AssertionMacros.h"
8#include "Templates/UnrealTemplate.h"
9#include "Containers/UnrealString.h"
10#include "Logging/LogMacros.h"
11#include "Delegates/IDelegateInstance.h"
12#include "Delegates/Delegate.h"
13#include "Features/IModularFeature.h"
14#include "Templates/EnableIf.h"
19 #define cvarCheckCode( Code ) checkCode( Code )
21 #define cvarCheckCode(...)
24template <
class T>
class TConsoleVariableData;
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
48
49
56
57
60
61
62
65
66
67
70
71
72
75
76
77
80
81
82
83
84
88
89
185template <
typename DerivedType,
typename... ParamTypes>
186struct FNullConsoleVariableDelegate
189
190
191 template <
typename... VarTypes>
192 inline static DerivedType CreateStatic(
typename TIdentity<
void (*)(ParamTypes..., VarTypes...)>::Type, VarTypes...)
197 template<
typename FunctorType,
typename... VarTypes>
198 inline static DerivedType CreateLambda(FunctorType&&, VarTypes...)
203 template<
typename UserClass,
typename FunctorType,
typename... VarTypes>
204 inline static DerivedType CreateWeakLambda(UserClass*, FunctorType&&, VarTypes...)
209 template <
typename UserClass,
typename... VarTypes>
210 inline static DerivedType CreateRaw(UserClass*,
typename TMemFunPtrType<
false, UserClass,
void (ParamTypes..., VarTypes...)>::Type, VarTypes...)
214 template <
typename UserClass,
typename... VarTypes>
215 inline static DerivedType CreateRaw(UserClass*,
typename TMemFunPtrType<
true, UserClass,
void (ParamTypes..., VarTypes...)>::Type, VarTypes...)
220 template <
typename UserClass,
typename... VarTypes>
221 inline static DerivedType CreateSP(
const TSharedRef<UserClass>&,
typename TMemFunPtrType<
false, UserClass,
void (ParamTypes..., VarTypes...)>::Type, VarTypes...)
225 template <
typename UserClass,
typename... VarTypes>
226 inline static DerivedType CreateSP(
const TSharedRef<UserClass>&,
typename TMemFunPtrType<
true, UserClass,
void (ParamTypes..., VarTypes...)>::Type, VarTypes...)
231 template <
typename UserClass,
typename... VarTypes>
232 inline static DerivedType CreateSP(UserClass*,
typename TMemFunPtrType<
false, UserClass,
void (ParamTypes..., VarTypes...)>::Type, VarTypes...)
236 template <
typename UserClass,
typename... VarTypes>
237 inline static DerivedType CreateSP(UserClass*,
typename TMemFunPtrType<
true, UserClass,
void (ParamTypes..., VarTypes...)>::Type, VarTypes...)
242 template <
typename UserClass,
typename... VarTypes>
243 inline static DerivedType CreateThreadSafeSP(
const TSharedRef<UserClass, ESPMode::ThreadSafe>&,
typename TMemFunPtrType<
false, UserClass,
void (ParamTypes..., VarTypes...)>::Type, VarTypes...)
247 template <
typename UserClass,
typename... VarTypes>
248 inline static DerivedType CreateThreadSafeSP(
const TSharedRef<UserClass, ESPMode::ThreadSafe>&,
typename TMemFunPtrType<
true, UserClass,
void (ParamTypes..., VarTypes...)>::Type, VarTypes...)
253 template <
typename UserClass,
typename... VarTypes>
254 inline static DerivedType CreateThreadSafeSP(UserClass*,
typename TMemFunPtrType<
false, UserClass,
void (ParamTypes..., VarTypes...)>::Type, VarTypes...)
258 template <
typename UserClass,
typename... VarTypes>
259 inline static DerivedType CreateThreadSafeSP(UserClass*,
typename TMemFunPtrType<
true, UserClass,
void (ParamTypes..., VarTypes...)>::Type, VarTypes...)
264 template <
typename UObjectTemplate,
typename... VarTypes>
265 inline static DerivedType CreateUFunction(UObjectTemplate*,
const FName&, VarTypes...)
270 template <
typename UserClass,
typename... VarTypes>
271 inline static DerivedType CreateUObject(UserClass*,
typename TMemFunPtrType<
false, UserClass,
void (ParamTypes..., VarTypes...)>::Type, VarTypes...)
275 template <
typename UserClass,
typename... VarTypes>
276 inline static DerivedType CreateUObject(UserClass*,
typename TMemFunPtrType<
true, UserClass,
void (ParamTypes..., VarTypes...)>::Type, VarTypes...)
281 FDelegateHandle GetHandle()
const
286 bool ExecuteIfBound(ParamTypes...)
292struct FConsoleVariableDelegate : FNullConsoleVariableDelegate<FConsoleVariableDelegate, IConsoleVariable*> {};
293struct FConsoleCommandDelegate : FNullConsoleVariableDelegate<FConsoleCommandDelegate> {};
294struct FConsoleCommandWithArgsDelegate : FNullConsoleVariableDelegate<FConsoleCommandWithArgsDelegate,
const TArray<FString>&> {};
295struct FConsoleCommandWithWorldDelegate : FNullConsoleVariableDelegate<FConsoleCommandWithWorldDelegate, UWorld*> {};
296struct FConsoleCommandWithWorldAndArgsDelegate : FNullConsoleVariableDelegate<FConsoleCommandWithWorldAndArgsDelegate,
const TArray<FString>&, UWorld*> {};
297struct FConsoleCommandWithArgsAndOutputDeviceDelegate : FNullConsoleVariableDelegate<FConsoleCommandWithArgsAndOutputDeviceDelegate,
const TArray<FString>&, FOutputDevice&> {};
298struct FConsoleCommandWithWorldArgsAndOutputDeviceDelegate : FNullConsoleVariableDelegate<FConsoleCommandWithWorldArgsAndOutputDeviceDelegate,
const TArray<FString>&, UWorld*, FOutputDevice&> {};
299struct FConsoleCommandWithOutputDeviceDelegate : FNullConsoleVariableDelegate<FConsoleCommandWithOutputDeviceDelegate, FOutputDevice&> {};
303template <
class T>
class TConsoleVariableData;
306
307
322
323
326
327
330
331
334
335
341
342
345 uint32 New = (uint32)
GetFlags() & ~(uint32)Value;
350
351
354 return ((uint32)
GetFlags() & (uint32)Value) != 0;
358
359
372 ensureMsgf(
false, TEXT(
"Attempted to access variable data of a console variable type that doesn't support it. For example FindTConsoleVariableData* on a FAutoConsoleVariableRef."));
378 ensureMsgf(
false, TEXT(
"Attempted to access variable data of a console variable type that doesn't support it. For example FindTConsoleVariableData* on a FAutoConsoleVariableRef."));
384 ensureMsgf(
false, TEXT(
"Attempted to access variable data of a console variable type that doesn't support it. For example FindTConsoleVariableData* on a FAutoConsoleVariableRef."));
390 ensureMsgf(
false, TEXT(
"Attempted to access variable data of a console variable type that doesn't support it. For example FindTConsoleVariableData* on a FAutoConsoleVariableRef."));
395
396
411
412
419
420
426
427
428
432
433
436
437
438
464
465
466
467
468
469
470
471
472
478
479
488
489
498
499
500
555
556
560
561
562
563
564
565
570
571
581
582
583
584
585
586
591
592
605 template <
typename MulticastDelegateType>
611 template <
typename DelegateType>
623
624
631
632
635 static const FName Name =
TEXT(
"ConsoleCommandExecutor");
640
641
645
646
650
651
655
656
660
661
665
666
670
671
672
673 virtual bool Exec(
const TCHAR* Input) = 0;
676
677
678
682
683
687
688
691
692
693
699
700
704
705
706
707
708
711
712
713
714
715
718
719
720
721
722
725
726
727
728
729
732
733
734
735
736
739
740
741
742
743
746
747
748
749
750
753
754
755
756
757
760
761
762
763
764
767
768
769
770
771
772
773
774
775
781
782
783
784
785
786
787
791
792
793
797
798
799
805
806
807
808
809
810
811
815
816
817
818
819
820
821
825
826
827
828
829
830
831
835
836
837
838
839
840
841
845
846
847
848
849
850
851
855
856
857
858
859
860
861
865
866
867
868
869
870
871
875
876
877
878
879
880
884
885
886
887
888
892
893
894
895
896
900
901
902
903
907
908
909
910
914
915
916
917
921
922
923
924
933
934
935
936
945
946
947
948
958
959
960
961
965
966
967
968
972
973
974
975
976
977
978
979
980
981
985
986
990
994
995
996
1009 check(Singleton !=
nullptr);
1016
1017
1018
1019
1020
1021
1022
1023
1024
1043
1044
1066
1067
1078 AccessGeneralShaderChangeCvars().Add(
this);
1082 AccessMobileShaderChangeCvars().Add(
this);
1086 AccessDesktopShaderChangeCvars().Add(
this);
1120
1121
1126
1127
1128
1129
1130
1136
1137
1138
1139
1140
1146
1147
1148
1149
1150
1156
1157
1158
1159
1160
1167
1168
1169
1170
1171
1172
1180
1181
1182
1183
1184
1185
1193
1194
1195
1196
1197
1198
1206
1207
1208
1209
1210
1211
1238class FAutoConsoleVariable
1241 FAutoConsoleVariable(
const TCHAR* Name, int32 DefaultValue,
const TCHAR* Help, uint32 Flags = ECVF_Default)
1245 FAutoConsoleVariable(
const TCHAR* Name,
float DefaultValue,
const TCHAR* Help, uint32 Flags = ECVF_Default)
1249 FAutoConsoleVariable(
const TCHAR* Name,
const TCHAR* DefaultValue,
const TCHAR* Help, uint32 Flags = ECVF_Default)
1257
1258
1263
1264
1265
1266
1267
1273
1274
1275
1276
1277
1283
1284
1285
1286
1287
1293
1294
1295
1296
1297
1304
1305
1306
1307
1308
1309
1317
1318
1319
1320
1321
1322
1330
1331
1332
1333
1334
1335
1343
1344
1345
1346
1347
1348
1378class FAutoConsoleVariableRef
1381 FAutoConsoleVariableRef(
const TCHAR* Name, int32& RefValue,
const TCHAR* Help, uint32 Flags = ECVF_Default)
1385 FAutoConsoleVariableRef(
const TCHAR* Name,
float& RefValue,
const TCHAR* Help, uint32 Flags = ECVF_Default)
1389 FAutoConsoleVariableRef(
const TCHAR* Name,
bool& RefValue,
const TCHAR* Help, uint32 Flags = ECVF_Default)
1393 FAutoConsoleVariableRef(
const TCHAR* Name, FString& RefValue,
const TCHAR* Help, uint32 Flags = ECVF_Default)
1397 FAutoConsoleVariableRef(
const TCHAR* Name, int32& RefValue,
const TCHAR* Help,
const FConsoleVariableDelegate& Callback, uint32 Flags = ECVF_Default)
1401 FAutoConsoleVariableRef(
const TCHAR* Name,
float& RefValue,
const TCHAR* Help,
const FConsoleVariableDelegate& Callback, uint32 Flags = ECVF_Default)
1405 FAutoConsoleVariableRef(
const TCHAR* Name,
bool& RefValue,
const TCHAR* Help,
const FConsoleVariableDelegate& Callback, uint32 Flags = ECVF_Default)
1409 FAutoConsoleVariableRef(
const TCHAR* Name, FString& RefValue,
const TCHAR* Help,
const FConsoleVariableDelegate& Callback, uint32 Flags = ECVF_Default)
1420class TConsoleVariableData
1428 ShadowedValue[i] = DefaultValue;
1435 UE::AccessDetection::ReportAccess(UE::AccessDetection::EType::CVar);
1438 return ShadowedValue[0];
1444 UE::AccessDetection::ReportAccess(UE::AccessDetection::EType::CVar);
1445#if !defined(__clang__
)
1447 cvarCheckCode(ensure(IsInParallelRenderingThread()));
1449 return ShadowedValue[1];
1455 UE::AccessDetection::ReportAccess(UE::AccessDetection::EType::CVar);
1456 return ShadowedValue[GetShadowIndex(bForceGameThread)];
1467 if (bForceGameThread)
1472 return IsInParallelGameThread() || IsInGameThread() ? 0 : 1;
1478 UE::AccessDetection::ReportAccess(UE::AccessDetection::EType::CVar);
1479 return ShadowedValue[GetShadowIndex(bForceGameThread)];
1488
1489
1495
1496
1497
1498
1499
1503
1504
1505
1506
1507
1508
1553inline TAutoConsoleVariable<
bool>::TAutoConsoleVariable(
const TCHAR* Name,
const bool& DefaultValue,
const TCHAR* Help, uint32 Flags)
1554 : FAutoConsoleObject(IConsoleManager::Get().RegisterConsoleVariable(Name, DefaultValue, Help, Flags))
1556 Ref = AsVariable()->AsVariableBool();
1560inline TAutoConsoleVariable<int32>::TAutoConsoleVariable(
const TCHAR* Name,
const int32& DefaultValue,
const TCHAR* Help, uint32 Flags)
1561 : FAutoConsoleObject(IConsoleManager::Get().RegisterConsoleVariable(Name, DefaultValue, Help, Flags))
1563 Ref = AsVariable()->AsVariableInt();
1567inline TAutoConsoleVariable<
float>::TAutoConsoleVariable(
const TCHAR* Name,
const float& DefaultValue,
const TCHAR* Help, uint32 Flags)
1568 : FAutoConsoleObject(IConsoleManager::Get().RegisterConsoleVariable(Name, DefaultValue, Help, Flags))
1570 Ref = AsVariable()->AsVariableFloat();
1574inline TAutoConsoleVariable<FString>::TAutoConsoleVariable(
const TCHAR* Name,
const FString& DefaultValue,
const TCHAR* Help, uint32 Flags)
1575 : FAutoConsoleObject(IConsoleManager::Get().RegisterConsoleVariable(Name, DefaultValue, Help, Flags))
1577 Ref = AsVariable()->AsVariableString();
1581class TAutoConsoleVariable :
public IConsoleVariable
1584 TAutoConsoleVariable(
const TCHAR* Name,
const T& DefaultValue,
const TCHAR* InHelp, uint32 InFlags = ECVF_Default)
1585 : Value(DefaultValue), Flags((EConsoleVariableFlags)InFlags)
1589 T GetValueOnGameThread()
const
1591 return Value.GetValueOnGameThread();
1594 T GetValueOnRenderThread()
const
1596 return Value.GetValueOnRenderThread();
1599 T GetValueOnAnyThread(
bool bForceGameThread =
false)
const
1601 return Value.GetValueOnAnyThread(bForceGameThread);
1604 IConsoleVariable& operator*()
1606 return *AsVariable();
1609 const IConsoleVariable& operator*()
const
1611 return *AsVariable();
1614 IConsoleVariable* operator->()
1616 return AsVariable();
1619 const IConsoleVariable* operator->()
const
1621 return AsVariable();
1624 IConsoleVariable* AsVariable() {
return this; }
1625 const IConsoleVariable* AsVariable()
const {
return this; }
1627 virtual class TConsoleVariableData<int32>* AsVariableInt() override {
return AsImpl<int32>(); }
1628 virtual class TConsoleVariableData<
float>* AsVariableFloat() override {
return AsImpl<
float>(); }
1629 virtual class TConsoleVariableData<FString>* AsVariableString() override {
return AsImpl<FString>(); }
1631 virtual bool IsVariableInt()
const override {
return std::is_same_v<int32, T>; }
1632 virtual int32 GetInt()
const override {
return GetImpl<int32>(); }
1633 virtual float GetFloat()
const override {
return GetImpl<
float>(); }
1634 virtual FString GetString()
const override {
return GetImpl<FString>(); }
1635 virtual bool GetBool()
const override {
return GetImpl<
bool>(); }
1637 virtual const TCHAR* GetHelp()
const override
1639 return TEXT(
"NO_CVARS, no help");
1642 virtual void SetHelp(
const TCHAR* InHelp) override
1647 virtual void Release() override
1652 virtual void SetOnChangedCallback(
const FConsoleVariableDelegate &) override
1657 virtual FConsoleVariableMulticastDelegate& OnChangedDelegate()override
1659 static FConsoleVariableMulticastDelegate Dummy;
1664 virtual EConsoleVariableFlags GetFlags()
const override
1669 virtual void SetFlags(
const EConsoleVariableFlags InFlags) override
1674 virtual void Set(
const TCHAR* InValue, EConsoleVariableFlags SetBy) override
1676 LexFromString(Value.ShadowedValue[0], InValue);
1680 TConsoleVariableData<T> Value;
1682 EConsoleVariableFlags Flags = EConsoleVariableFlags::ECVF_Default;
1685 typename TEnableIf<!std::is_same_v<T, Y>, Y>::Type GetImpl()
const
1692 typename TEnableIf<std::is_same_v<T, Y>, Y>::Type GetImpl()
const
1694 return GetValueOnAnyThread();
1698 typename TEnableIf<!std::is_same_v<T, Y>, TConsoleVariableData<Y>*>::Type AsImpl()
1705 typename TEnableIf<std::is_same_v<T, Y>, TConsoleVariableData<T>*>::Type AsImpl()
1714
1715
1716class FAutoConsoleCommand :
private FAutoConsoleObject
1720
1721
1722
1723
1724
1725
1726
1727 FAutoConsoleCommand(
const TCHAR* Name,
const TCHAR* Help,
const FConsoleCommandDelegate& Command, uint32 Flags = ECVF_Default)
1728 : FAutoConsoleObject(IConsoleManager::Get().RegisterConsoleCommand(Name, Help, Command, Flags))
1733
1734
1735
1736
1737
1738
1739
1740 FAutoConsoleCommand(
const TCHAR* Name,
const TCHAR* Help,
const FConsoleCommandWithArgsDelegate& Command, uint32 Flags = ECVF_Default)
1741 : FAutoConsoleObject(IConsoleManager::Get().RegisterConsoleCommand(Name, Help, Command, Flags))
1746
1747
1748
1749
1750
1751
1752
1753 FAutoConsoleCommand(
const TCHAR* Name,
const TCHAR* Help,
const FConsoleCommandWithWorldArgsAndOutputDeviceDelegate& Command, uint32 Flags = ECVF_Default)
1754 : FAutoConsoleObject(IConsoleManager::Get().RegisterConsoleCommand(Name, Help, Command, Flags))
1759class FAutoConsoleCommand
1762 FAutoConsoleCommand(
const TCHAR* Name,
const TCHAR* Help,
const FConsoleCommandDelegate& Command, uint32 Flags = ECVF_Default)
1766 FAutoConsoleCommand(
const TCHAR* Name,
const TCHAR* Help,
const FConsoleCommandWithArgsDelegate& Command, uint32 Flags = ECVF_Default)
1770 FAutoConsoleCommand(
const TCHAR* Name,
const TCHAR* Help,
const FConsoleCommandWithWorldArgsAndOutputDeviceDelegate& Command, uint32 Flags = ECVF_Default)
1779
1780
1785
1786
1787
1788
1789
1790
1791
1801
1802
1807
1808
1809
1810
1811
1812
1813
1821
1822
1834
1835
1840
1841
1842
1843
1844
1845
1846
1854
1855
1860
1861
1862
1863
1864
1865
1866
1875class FAutoConsoleCommandWithWorld
1878 template<
class... Args> FAutoConsoleCommandWithWorld(
const Args&...) {}
1881class FAutoConsoleCommandWithWorldAndArgs
1884 template<
class... Args> FAutoConsoleCommandWithWorldAndArgs(
const Args&...) {}
1887class FAutoConsoleCommandWithOutputDevice
1890 template<
class... Args> FAutoConsoleCommandWithOutputDevice(
const Args&...) {}
1893class FAutoConsoleCommandWithWorldArgsAndOutputDevice
1896 template<
class... Args> FAutoConsoleCommandWithWorldArgsAndOutputDevice(
const Args&...) {}
#define ensureMsgf( InExpression, InFormat,...)
#define UE_BUILD_SHIPPING
#define ALLOW_OTHER_PLATFORM_CONFIG
#define DECLARE_DELEGATE(DelegateName)
#define DECLARE_DELEGATE_TwoParams(DelegateName, Param1Type, Param2Type)
#define DECLARE_DELEGATE_OneParam(DelegateName, Param1Type)
#define DECLARE_DELEGATE_ThreeParams(DelegateName, Param1Type, Param2Type, Param3Type)
#define DECLARE_MULTICAST_DELEGATE_OneParam(DelegateName, Param1Type)
#define TRACK_CONSOLE_FIND_COUNT
@ ECVF_DesktopShaderChange
@ ECVF_SetByDeviceProfile
@ ECVF_ExcludeFromPreview
@ ECVF_SetBySystemSettingsIni
@ ECVF_GeneralShaderChange
@ ECVF_MobileShaderChange
@ ECVF_SetByConsoleVariablesIni
@ ECVF_SetByProjectSetting
@ ECVF_Set_NoSinkCall_Unsafe
#define cvarCheckCode(...)
#define UE_ARRAY_COUNT(array)
FAutoConsoleCommandWithArgsAndOutputDevice(const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithArgsAndOutputDeviceDelegate &Command, uint32 Flags=ECVF_Default)
FAutoConsoleCommandWithOutputDevice(const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithOutputDeviceDelegate &Command, uint32 Flags=ECVF_Default)
FAutoConsoleCommandWithWorldAndArgs(const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithWorldAndArgsDelegate &Command, uint32 Flags=ECVF_Default)
FAutoConsoleCommandWithWorldArgsAndOutputDevice(const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithWorldArgsAndOutputDeviceDelegate &Command, uint32 Flags=ECVF_Default)
FAutoConsoleCommandWithWorld(const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithWorldDelegate &Command, uint32 Flags=ECVF_Default)
FAutoConsoleObject(IConsoleObject *InTarget)
virtual ~FAutoConsoleObject()
FORCEINLINE IConsoleVariable * AsVariable()
static TArray< const FAutoConsoleObject * > & AccessGeneralShaderChangeCvars()
static TArray< const FAutoConsoleObject * > & AccessMobileShaderChangeCvars()
FORCEINLINE const IConsoleVariable * AsVariable() const
static TArray< const FAutoConsoleObject * > & AccessDesktopShaderChangeCvars()
FORCEINLINE IConsoleVariable & operator*()
FAutoConsoleVariable(const TCHAR *Name, bool DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)
FAutoConsoleVariable(const TCHAR *Name, const TCHAR *DefaultValue, const TCHAR *Help, const FConsoleVariableDelegate &Callback, uint32 Flags=ECVF_Default)
FAutoConsoleVariable(const TCHAR *Name, float DefaultValue, const TCHAR *Help, const FConsoleVariableDelegate &Callback, uint32 Flags=ECVF_Default)
FORCEINLINE IConsoleVariable * operator->()
FORCEINLINE const IConsoleVariable & operator*() const
FORCEINLINE const IConsoleVariable * operator->() const
FAutoConsoleVariable(const TCHAR *Name, bool DefaultValue, const TCHAR *Help, const FConsoleVariableDelegate &Callback, uint32 Flags=ECVF_Default)
FAutoConsoleVariable(const TCHAR *Name, float DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)
FAutoConsoleVariable(const TCHAR *Name, int32 DefaultValue, const TCHAR *Help, const FConsoleVariableDelegate &Callback, uint32 Flags=ECVF_Default)
FAutoConsoleVariable(const TCHAR *Name, int32 DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)
FAutoConsoleVariable(const TCHAR *Name, const TCHAR *DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)
FORCEINLINE const IConsoleVariable * operator->() const
FAutoConsoleVariableRef(const TCHAR *Name, bool &RefValue, const TCHAR *Help, const FConsoleVariableDelegate &Callback, uint32 Flags=ECVF_Default)
virtual ~FAutoConsoleVariableRef()
FAutoConsoleVariableRef(const TCHAR *Name, int32 &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)
FAutoConsoleVariableRef(const TCHAR *Name, float &RefValue, const TCHAR *Help, const FConsoleVariableDelegate &Callback, uint32 Flags=ECVF_Default)
FAutoConsoleVariableRef(const TCHAR *Name, int32 &RefValue, const TCHAR *Help, const FConsoleVariableDelegate &Callback, uint32 Flags=ECVF_Default)
FAutoConsoleVariableRef(const TCHAR *Name, FString &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)
FORCEINLINE IConsoleVariable & operator*()
FAutoConsoleVariableRef(const TCHAR *Name, float &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)
FORCEINLINE const IConsoleVariable & operator*() const
FORCEINLINE IConsoleVariable * operator->()
FAutoConsoleVariableRef(const TCHAR *Name, FString &RefValue, const TCHAR *Help, const FConsoleVariableDelegate &Callback, uint32 Flags=ECVF_Default)
FAutoConsoleVariableRef(const TCHAR *Name, bool &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)
virtual ~FAutoConsoleVariableSink()
FConsoleVariableSinkHandle Handle
const FConsoleCommandDelegate & Command
FAutoConsoleVariableSink(const FConsoleCommandDelegate &InCommand)
FConsoleVariableSinkHandle(FDelegateHandle InHandle)
bool HasSameHandle(const DelegateType &Delegate) const
FConsoleVariableSinkHandle()
void RemoveFromDelegate(MulticastDelegateType &MulticastDelegate)
FString & operator=(FString &&)=default
UE_NODISCARD FORCEINLINE const TCHAR * operator*() const UE_LIFETIMEBOUND
virtual ~IConsoleCommandExecutor()=default
virtual FText GetDescription() const =0
virtual bool AllowHotKeyClose() const =0
static FName ModularFeatureName()
virtual struct FInputChord GetHotKey() const =0
virtual bool AllowMultiLine() const =0
virtual void GetAutoCompleteSuggestions(const TCHAR *Input, TArray< FString > &Out)=0
virtual FName GetName() const =0
virtual FText GetHintText() const =0
virtual void GetExecHistory(TArray< FString > &Out)=0
virtual FText GetDisplayName() const =0
virtual bool Exec(const TCHAR *Input)=0
virtual bool IsVariableBool() const
virtual void SetHelp(const TCHAR *Value)=0
virtual bool IsVariableFloat() const
virtual void SetFlags(const EConsoleVariableFlags Value)=0
virtual class TConsoleVariableData< bool > * AsVariableBool()
virtual class IConsoleVariable * AsVariable()
bool TestFlags(const EConsoleVariableFlags Value) const
virtual const TCHAR * GetHelp() const =0
virtual class TConsoleVariableData< FString > * AsVariableString()
void ClearFlags(const EConsoleVariableFlags Value)
virtual ~IConsoleObject()
virtual bool IsVariableString() const
virtual bool IsVariableInt() const
virtual class TConsoleVariableData< int32 > * AsVariableInt()
virtual EConsoleVariableFlags GetFlags() const =0
virtual class TConsoleVariableData< float > * AsVariableFloat()
virtual struct IConsoleCommand * AsCommand()
void GetValue(FString &OutStringValue)
void SetWithCurrentPriority(bool InValue)
virtual bool GetBool() const =0
void GetValue(float &OutFloatValue)
virtual FConsoleVariableMulticastDelegate & OnChangedDelegate()=0
void GetValue(bool &OutBoolValue)
virtual FString GetString() const =0
void GetValue(int32 &OutIntValue)
virtual IConsoleVariable * GetDefaultValueVariable()
virtual float GetFloat() const =0
void Set(int32 InValue, EConsoleVariableFlags SetBy=ECVF_SetByCode)
void SetWithCurrentPriority(const TCHAR *InValue)
void SetWithCurrentPriority(float InValue)
void Set(bool InValue, EConsoleVariableFlags SetBy=ECVF_SetByCode)
void SetWithCurrentPriority(int32 InValue)
void Set(float InValue, EConsoleVariableFlags SetBy=ECVF_SetByCode)
virtual void Set(const TCHAR *InValue, EConsoleVariableFlags SetBy=ECVF_SetByCode)=0
virtual void SetOnChangedCallback(const FConsoleVariableDelegate &Callback)=0
virtual int32 GetInt() const =0
FORCEINLINE const IConsoleVariable * operator->() const
T GetValueOnAnyThread(bool bForceGameThread=false) const
TAutoConsoleVariable(const TCHAR *Name, const T &DefaultValue, const TCHAR *Help, const FConsoleVariableDelegate &Callback, uint32 Flags=ECVF_Default)
T GetValueOnRenderThread() const
FORCEINLINE IConsoleVariable * operator->()
TAutoConsoleVariable(const TCHAR *Name, const T &DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)
TConsoleVariableData< T > * Ref
FORCEINLINE const IConsoleVariable & operator*() const
T GetValueOnGameThread() const
FORCEINLINE IConsoleVariable & operator*()
T & GetReferenceOnAnyThread(bool bForceGameThread=false)
friend class FConsoleVariable
TConsoleVariableData(const T DefaultValue)
T GetValueOnAnyThread(bool bForceGameThread=false) const
T GetValueOnGameThread() const
static uint32 GetShadowIndex(bool bForceGameThread=false)
T GetValueOnRenderThread() const
virtual bool Execute(const TArray< FString > &Args, UWorld *InWorld, class FOutputDevice &OutputDevice)=0
virtual IConsoleVariable * RegisterConsoleVariableRef(const TCHAR *Name, FString &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
virtual IConsoleCommand * RegisterConsoleCommand(const TCHAR *Name, const TCHAR *Help, uint32 Flags=(uint32) ECVF_Default)=0
virtual IConsoleVariable * RegisterConsoleVariable(const TCHAR *Name, bool DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
virtual FConsoleVariableMulticastDelegate & OnCVarUnregistered()=0
virtual void UnregisterConsoleVariableSink_Handle(FConsoleVariableSinkHandle Handle)=0
virtual IConsoleVariable * FindConsoleVariable(const TCHAR *Name, bool bTrackFrequentCalls=true) const =0
virtual bool ProcessUserConsoleInput(const TCHAR *Input, FOutputDevice &Ar, UWorld *InWorld)=0
virtual bool IsNameRegistered(const TCHAR *Name) const =0
static IConsoleManager * Singleton
TConsoleVariableData< bool > * FindTConsoleVariableDataBool(const TCHAR *Name) const
TConsoleVariableData< int32 > * FindTConsoleVariableDataInt(const TCHAR *Name) const
TConsoleVariableData< float > * FindTConsoleVariableDataFloat(const TCHAR *Name) const
virtual IConsoleVariable * RegisterConsoleVariableRef(const TCHAR *Name, bool &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
virtual void UnregisterConsoleObject(const TCHAR *Name, bool bKeepState=true)=0
virtual IConsoleVariable * RegisterConsoleVariableRef(const TCHAR *Name, float &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
virtual void GetConsoleHistory(const TCHAR *Key, TArray< FString > &Out)=0
virtual IConsoleObject * FindConsoleObject(const TCHAR *Name, bool bTrackFrequentCalls=true) const =0
virtual void CallAllConsoleVariableSinks()=0
virtual FString FindConsoleObjectName(const IConsoleObject *Obj) const =0
virtual IConsoleVariable * RegisterConsoleVariable(const TCHAR *Name, int32 DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
virtual IConsoleVariable * RegisterConsoleVariable(const TCHAR *Name, float DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
static FORCEINLINE IConsoleManager & Get()
static void SetupSingleton()
virtual IConsoleCommand * RegisterConsoleCommand(const TCHAR *Name, const TCHAR *Help, const FConsoleCommandDelegate &Command, uint32 Flags=ECVF_Default)=0
virtual void ForEachConsoleObjectThatStartsWith(const FConsoleObjectVisitor &Visitor, const TCHAR *ThatStartsWith=TEXT("")) const =0
virtual void ForEachConsoleObjectThatContains(const FConsoleObjectVisitor &Visitor, const TCHAR *ThatContains) const =0
virtual IConsoleVariable * RegisterConsoleVariableRef(const TCHAR *Name, int32 &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
virtual void RegisterThreadPropagation(uint32 ThreadId=0, IConsoleThreadPropagation *InCallback=0)=0
virtual void AddConsoleHistoryEntry(const TCHAR *Key, const TCHAR *Input)=0
virtual IConsoleVariable * RegisterConsoleVariableBitRef(const TCHAR *CVarName, const TCHAR *FlagName, uint32 BitNumber, uint8 *Force0MaskPtr, uint8 *Force1MaskPtr, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
virtual IConsoleVariable * RegisterConsoleVariable(const TCHAR *Name, const TCHAR *DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
virtual void UnregisterConsoleObject(IConsoleObject *ConsoleObject, bool bKeepState=true)=0
virtual ~IConsoleManager()
virtual IConsoleVariable * RegisterConsoleVariable(const TCHAR *Name, const FString &DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
virtual FConsoleVariableSinkHandle RegisterConsoleVariableSink_Handle(const FConsoleCommandDelegate &Command)=0
virtual void OnCVarChange(FString &Dest, const FString &NewValue)=0
virtual void OnCVarChange(float &Dest, float NewValue)=0
virtual void OnCVarChange(int32 &Dest, int32 NewValue)=0
virtual void OnCVarChange(bool &Dest, bool NewValue)=0