Enables override/virtual warnings
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -25,9 +25,9 @@ public:
|
||||
CLevelInfo() = default;
|
||||
|
||||
// ILevelInfo
|
||||
virtual const char* GetName() const { return m_levelName.c_str(); }
|
||||
virtual const char* GetPath() const { return m_levelPath.c_str(); }
|
||||
virtual const char* GetAssetName() const { return m_levelAssetName.c_str(); }
|
||||
const char* GetName() const override { return m_levelName.c_str(); }
|
||||
const char* GetPath() const override { return m_levelPath.c_str(); }
|
||||
const char* GetAssetName() const override { return m_levelAssetName.c_str(); }
|
||||
// ~ILevelInfo
|
||||
|
||||
|
||||
@@ -62,9 +62,9 @@ public:
|
||||
CLevel() {}
|
||||
virtual ~CLevel() = default;
|
||||
|
||||
virtual void Release() { delete this; }
|
||||
void Release() override { delete this; }
|
||||
|
||||
virtual ILevelInfo* GetLevelInfo() { return &m_levelInfo; }
|
||||
ILevelInfo* GetLevelInfo() override { return &m_levelInfo; }
|
||||
|
||||
private:
|
||||
CLevelInfo m_levelInfo;
|
||||
@@ -77,38 +77,35 @@ public:
|
||||
CLevelSystem(ISystem* pSystem, const char* levelsFolder);
|
||||
virtual ~CLevelSystem();
|
||||
|
||||
void Release() { delete this; };
|
||||
void Release() override { delete this; };
|
||||
|
||||
// ILevelSystem
|
||||
virtual void Rescan(const char* levelsFolder);
|
||||
virtual int GetLevelCount();
|
||||
virtual ILevelInfo* GetLevelInfo(int level);
|
||||
virtual ILevelInfo* GetLevelInfo(const char* levelName);
|
||||
void Rescan(const char* levelsFolder) override;
|
||||
int GetLevelCount() override;
|
||||
ILevelInfo* GetLevelInfo(int level) override;
|
||||
ILevelInfo* GetLevelInfo(const char* levelName) override;
|
||||
|
||||
virtual void AddListener(ILevelSystemListener* pListener);
|
||||
virtual void RemoveListener(ILevelSystemListener* pListener);
|
||||
void AddListener(ILevelSystemListener* pListener) override;
|
||||
void RemoveListener(ILevelSystemListener* pListener) override;
|
||||
|
||||
virtual bool LoadLevel(const char* levelName);
|
||||
virtual void UnloadLevel();
|
||||
virtual bool IsLevelLoaded() { return m_bLevelLoaded; }
|
||||
bool LoadLevel(const char* levelName) override;
|
||||
void UnloadLevel() override;
|
||||
bool IsLevelLoaded() override { return m_bLevelLoaded; }
|
||||
const char* GetCurrentLevelName() const override
|
||||
{
|
||||
if (m_pCurrentLevel && m_pCurrentLevel->GetLevelInfo())
|
||||
{
|
||||
return m_pCurrentLevel->GetLevelInfo()->GetName();
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
// If the level load failed then we need to have a different shutdown procedure vs when a level is naturally unloaded
|
||||
virtual void SetLevelLoadFailed(bool loadFailed) { m_levelLoadFailed = loadFailed; }
|
||||
virtual bool GetLevelLoadFailed() { return m_levelLoadFailed; }
|
||||
void SetLevelLoadFailed(bool loadFailed) override { m_levelLoadFailed = loadFailed; }
|
||||
bool GetLevelLoadFailed() override { return m_levelLoadFailed; }
|
||||
|
||||
// Unsupported by legacy level system.
|
||||
virtual AZ::Data::AssetType GetLevelAssetType() const { return {}; }
|
||||
AZ::Data::AssetType GetLevelAssetType() const override { return {}; }
|
||||
|
||||
// ~ILevelSystem
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class CLocalizedStringsManager
|
||||
, public ISystemEventListener
|
||||
{
|
||||
public:
|
||||
typedef std::vector<AZStd::string> TLocalizationTagVec;
|
||||
using TLocalizationTagVec = std::vector<AZStd::string>;
|
||||
|
||||
constexpr const static size_t LOADING_FIXED_STRING_LENGTH = 2048;
|
||||
constexpr const static size_t COMPRESSION_FIXED_BUFFER_LENGTH = 6144;
|
||||
@@ -36,45 +36,45 @@ public:
|
||||
virtual ~CLocalizedStringsManager();
|
||||
|
||||
// ILocalizationManager
|
||||
const char* LangNameFromPILID(const ILocalizationManager::EPlatformIndependentLanguageID id);
|
||||
const char* LangNameFromPILID(const ILocalizationManager::EPlatformIndependentLanguageID id) override;
|
||||
ILocalizationManager::EPlatformIndependentLanguageID PILIDFromLangName(AZStd::string langName) override;
|
||||
ILocalizationManager::EPlatformIndependentLanguageID GetSystemLanguage() override;
|
||||
ILocalizationManager::TLocalizationBitfield MaskSystemLanguagesFromSupportedLocalizations(const ILocalizationManager::TLocalizationBitfield systemLanguages);
|
||||
ILocalizationManager::TLocalizationBitfield IsLanguageSupported(const ILocalizationManager::EPlatformIndependentLanguageID id);
|
||||
ILocalizationManager::TLocalizationBitfield MaskSystemLanguagesFromSupportedLocalizations(const ILocalizationManager::TLocalizationBitfield systemLanguages) override;
|
||||
ILocalizationManager::TLocalizationBitfield IsLanguageSupported(const ILocalizationManager::EPlatformIndependentLanguageID id) override;
|
||||
|
||||
const char* GetLanguage() override;
|
||||
bool SetLanguage(const char* sLanguage) override;
|
||||
|
||||
int GetLocalizationFormat() const override;
|
||||
virtual AZStd::string GetLocalizedSubtitleFilePath(const AZStd::string& localVideoPath, const AZStd::string& subtitleFileExtension) const override;
|
||||
virtual AZStd::string GetLocalizedLocXMLFilePath(const AZStd::string& localXmlPath) const override;
|
||||
bool InitLocalizationData(const char* sFileName, bool bReload = false);
|
||||
bool RequestLoadLocalizationDataByTag(const char* sTag);
|
||||
bool LoadLocalizationDataByTag(const char* sTag, bool bReload = false);
|
||||
bool ReleaseLocalizationDataByTag(const char* sTag);
|
||||
AZStd::string GetLocalizedSubtitleFilePath(const AZStd::string& localVideoPath, const AZStd::string& subtitleFileExtension) const override;
|
||||
AZStd::string GetLocalizedLocXMLFilePath(const AZStd::string& localXmlPath) const override;
|
||||
bool InitLocalizationData(const char* sFileName, bool bReload = false) override;
|
||||
bool RequestLoadLocalizationDataByTag(const char* sTag) override;
|
||||
bool LoadLocalizationDataByTag(const char* sTag, bool bReload = false) override;
|
||||
bool ReleaseLocalizationDataByTag(const char* sTag) override;
|
||||
|
||||
bool LoadAllLocalizationData(bool bReload = false) override;
|
||||
bool LoadExcelXmlSpreadsheet(const char* sFileName, bool bReload = false) override;
|
||||
void ReloadData() override;
|
||||
void FreeData();
|
||||
void FreeData() override;
|
||||
|
||||
bool LocalizeString_s(const AZStd::string& sString, AZStd::string& outLocalizedString, bool bEnglish = false) override;
|
||||
bool LocalizeString_ch(const char* sString, AZStd::string& outLocalizedString, bool bEnglish = false) override;
|
||||
|
||||
void LocalizeAndSubstituteInternal(AZStd::string& locString, const AZStd::vector<AZStd::string>& keys, const AZStd::vector<AZStd::string>& values) override;
|
||||
bool LocalizeLabel(const char* sLabel, AZStd::string& outLocalizedString, bool bEnglish = false) override;
|
||||
bool IsLocalizedInfoFound(const char* sKey);
|
||||
bool GetLocalizedInfoByKey(const char* sKey, SLocalizedInfoGame& outGameInfo);
|
||||
bool GetLocalizedInfoByKey(const char* sKey, SLocalizedSoundInfoGame* pOutSoundInfoGame);
|
||||
int GetLocalizedStringCount();
|
||||
bool GetLocalizedInfoByIndex(int nIndex, SLocalizedInfoGame& outGameInfo);
|
||||
bool GetLocalizedInfoByIndex(int nIndex, SLocalizedInfoEditor& outEditorInfo);
|
||||
bool IsLocalizedInfoFound(const char* sKey) override;
|
||||
bool GetLocalizedInfoByKey(const char* sKey, SLocalizedInfoGame& outGameInfo) override;
|
||||
bool GetLocalizedInfoByKey(const char* sKey, SLocalizedSoundInfoGame* pOutSoundInfoGame) override;
|
||||
int GetLocalizedStringCount() override;
|
||||
bool GetLocalizedInfoByIndex(int nIndex, SLocalizedInfoGame& outGameInfo) override;
|
||||
bool GetLocalizedInfoByIndex(int nIndex, SLocalizedInfoEditor& outEditorInfo) override;
|
||||
|
||||
bool GetEnglishString(const char* sKey, AZStd::string& sLocalizedString) override;
|
||||
bool GetSubtitle(const char* sKeyOrLabel, AZStd::string& outSubtitle, bool bForceSubtitle = false) override;
|
||||
|
||||
void FormatStringMessage_List(AZStd::string& outString, const AZStd::string& sString, const char** sParams, int nParams) override;
|
||||
void FormatStringMessage(AZStd::string& outString, const AZStd::string& sString, const char* param1, const char* param2 = 0, const char* param3 = 0, const char* param4 = 0) override;
|
||||
void FormatStringMessage(AZStd::string& outString, const AZStd::string& sString, const char* param1, const char* param2 = nullptr, const char* param3 = nullptr, const char* param4 = nullptr) override;
|
||||
|
||||
void LocalizeTime(time_t t, bool bMakeLocalTime, bool bShowSeconds, AZStd::string& outTimeString) override;
|
||||
void LocalizeDate(time_t t, bool bMakeLocalTime, bool bShort, bool bIncludeWeekday, AZStd::string& outDateString) override;
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
// ~ILocalizationManager
|
||||
|
||||
// ISystemEventManager
|
||||
void OnSystemEvent(ESystemEvent event, UINT_PTR wparam, UINT_PTR lparam);
|
||||
void OnSystemEvent(ESystemEvent event, UINT_PTR wparam, UINT_PTR lparam) override;
|
||||
// ~ISystemEventManager
|
||||
|
||||
void GetLoadedTags(TLocalizationTagVec& tagVec);
|
||||
@@ -98,7 +98,7 @@ private:
|
||||
bool LocalizeStringInternal(const char* pStr, size_t len, AZStd::string& outLocalizedString, bool bEnglish);
|
||||
|
||||
bool DoLoadExcelXmlSpreadsheet(const char* sFileName, uint8 tagID, bool bReload);
|
||||
typedef bool(CLocalizedStringsManager::*LoadFunc)(const char*, uint8, bool);
|
||||
using LoadFunc = bool(CLocalizedStringsManager::*)(const char*, uint8, bool);
|
||||
bool DoLoadAGSXmlDocument(const char* sFileName, uint8 tagID, bool bReload);
|
||||
LoadFunc GetLoadFunction() const;
|
||||
|
||||
@@ -163,9 +163,9 @@ private:
|
||||
SLocalizedStringEntry()
|
||||
: flags(0)
|
||||
, huffmanTreeIndex(-1)
|
||||
, pEditorExtension(NULL)
|
||||
, pEditorExtension(nullptr)
|
||||
{
|
||||
TranslatedText.psUtf8Uncompressed = NULL;
|
||||
TranslatedText.psUtf8Uncompressed = nullptr;
|
||||
};
|
||||
~SLocalizedStringEntry()
|
||||
{
|
||||
@@ -184,12 +184,12 @@ private:
|
||||
};
|
||||
|
||||
//Keys as CRC32. Strings previously, but these proved too large
|
||||
typedef VectorMap<uint32, SLocalizedStringEntry*> StringsKeyMap;
|
||||
using StringsKeyMap = VectorMap<uint32, SLocalizedStringEntry*>;
|
||||
|
||||
struct SLanguage
|
||||
{
|
||||
typedef std::vector<SLocalizedStringEntry*> TLocalizedStringEntries;
|
||||
typedef std::vector<HuffmanCoder*> THuffmanCoders;
|
||||
using TLocalizedStringEntries = std::vector<SLocalizedStringEntry*>;
|
||||
using THuffmanCoders = std::vector<HuffmanCoder*>;
|
||||
|
||||
AZStd::string sLanguage;
|
||||
StringsKeyMap m_keysMap;
|
||||
@@ -224,27 +224,27 @@ private:
|
||||
SLanguage* m_pLanguage;
|
||||
|
||||
// all loaded Localization Files
|
||||
typedef std::pair<AZStd::string, SFileInfo> pairFileName;
|
||||
typedef std::map<AZStd::string, SFileInfo> tmapFilenames;
|
||||
using pairFileName = std::pair<AZStd::string, SFileInfo>;
|
||||
using tmapFilenames = std::map<AZStd::string, SFileInfo>;
|
||||
tmapFilenames m_loadedTables;
|
||||
|
||||
|
||||
// filenames per tag
|
||||
typedef std::vector<AZStd::string> TStringVec;
|
||||
using TStringVec = std::vector<AZStd::string>;
|
||||
struct STag
|
||||
{
|
||||
TStringVec filenames;
|
||||
uint8 id;
|
||||
bool loaded;
|
||||
};
|
||||
typedef std::map<AZStd::string, STag> TTagFileNames;
|
||||
using TTagFileNames = std::map<AZStd::string, STag>;
|
||||
TTagFileNames m_tagFileNames;
|
||||
TStringVec m_tagLoadRequests;
|
||||
|
||||
// Array of loaded languages.
|
||||
std::vector<SLanguage*> m_languages;
|
||||
|
||||
typedef std::set<AZStd::string> PrototypeSoundEvents;
|
||||
using PrototypeSoundEvents = std::set<AZStd::string>;
|
||||
PrototypeSoundEvents m_prototypeEvents; // this set is purely used for clever string/string assigning to save memory
|
||||
|
||||
struct less_strcmp
|
||||
@@ -255,7 +255,7 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
typedef std::set<AZStd::string, less_strcmp> CharacterNameSet;
|
||||
using CharacterNameSet = std::set<AZStd::string, less_strcmp>;
|
||||
CharacterNameSet m_characterNameSet; // this set is purely used for clever string/string assigning to save memory
|
||||
|
||||
// CVARs
|
||||
@@ -268,5 +268,5 @@ private:
|
||||
|
||||
//Lock for
|
||||
mutable AZStd::mutex m_cs;
|
||||
typedef AZStd::lock_guard<AZStd::mutex> AutoLock;
|
||||
using AutoLock = AZStd::lock_guard<AZStd::mutex>;
|
||||
};
|
||||
|
||||
@@ -90,7 +90,7 @@ class CWatchdogThread;
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
typedef void* WIN_HMODULE;
|
||||
using WIN_HMODULE = void*;
|
||||
#else
|
||||
typedef void* WIN_HMODULE;
|
||||
#endif
|
||||
@@ -105,7 +105,7 @@ struct IDataProbe;
|
||||
|
||||
#define PHSYICS_OBJECT_ENTITY 0
|
||||
|
||||
typedef void (__cdecl * VTuneFunction)(void);
|
||||
using VTuneFunction = void (__cdecl *)(void);
|
||||
extern VTuneFunction VTResume;
|
||||
extern VTuneFunction VTPause;
|
||||
|
||||
@@ -177,10 +177,10 @@ struct CProfilingSystem
|
||||
|
||||
// Summary:
|
||||
// Resumes vtune data collection.
|
||||
virtual void VTuneResume();
|
||||
void VTuneResume() override;
|
||||
// Summary:
|
||||
// Pauses vtune data collection.
|
||||
virtual void VTunePause();
|
||||
void VTunePause() override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
};
|
||||
|
||||
@@ -216,105 +216,105 @@ public:
|
||||
|
||||
// interface ILoadConfigurationEntrySink ----------------------------------
|
||||
|
||||
virtual void OnLoadConfigurationEntry(const char* szKey, const char* szValue, const char* szGroup);
|
||||
void OnLoadConfigurationEntry(const char* szKey, const char* szValue, const char* szGroup) override;
|
||||
|
||||
// ISystemEventListener
|
||||
virtual void OnSystemEvent(ESystemEvent event, UINT_PTR wparam, UINT_PTR lparam);
|
||||
void OnSystemEvent(ESystemEvent event, UINT_PTR wparam, UINT_PTR lparam) override;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//! @name ISystem implementation
|
||||
//@{
|
||||
virtual bool Init(const SSystemInitParams& startupParams);
|
||||
virtual void Release();
|
||||
void Release() override;
|
||||
|
||||
virtual SSystemGlobalEnvironment* GetGlobalEnvironment() { return &m_env; }
|
||||
SSystemGlobalEnvironment* GetGlobalEnvironment() override { return &m_env; }
|
||||
|
||||
virtual bool UpdatePreTickBus(int updateFlags = 0, int nPauseMode = 0);
|
||||
virtual bool UpdatePostTickBus(int updateFlags = 0, int nPauseMode = 0);
|
||||
virtual bool UpdateLoadtime();
|
||||
bool UpdatePreTickBus(int updateFlags = 0, int nPauseMode = 0) override;
|
||||
bool UpdatePostTickBus(int updateFlags = 0, int nPauseMode = 0) override;
|
||||
bool UpdateLoadtime() override;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CrySystemRequestBus interface implementation
|
||||
ISystem* GetCrySystem() override;
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Relaunch(bool bRelaunch);
|
||||
bool IsRelaunch() const { return m_bRelaunch; };
|
||||
void Relaunch(bool bRelaunch) override;
|
||||
bool IsRelaunch() const override { return m_bRelaunch; };
|
||||
|
||||
void SerializingFile(int mode) { m_iLoadingMode = mode; }
|
||||
int IsSerializingFile() const { return m_iLoadingMode; }
|
||||
void Quit();
|
||||
bool IsQuitting() const;
|
||||
void SerializingFile(int mode) override { m_iLoadingMode = mode; }
|
||||
int IsSerializingFile() const override { return m_iLoadingMode; }
|
||||
void Quit() override;
|
||||
bool IsQuitting() const override;
|
||||
void ShutdownFileSystem(); // used to cleanup any file resources, such as cache handle.
|
||||
void SetAffinity();
|
||||
virtual const char* GetUserName();
|
||||
virtual int GetApplicationInstance();
|
||||
const char* GetUserName() override;
|
||||
int GetApplicationInstance() override;
|
||||
int GetApplicationLogInstance(const char* logFilePath) override;
|
||||
|
||||
ITimer* GetITimer(){ return m_env.pTimer; }
|
||||
AZ::IO::IArchive* GetIPak() { return m_env.pCryPak; };
|
||||
IConsole* GetIConsole() { return m_env.pConsole; };
|
||||
IRemoteConsole* GetIRemoteConsole();
|
||||
IMovieSystem* GetIMovieSystem() { return m_env.pMovieSystem; };
|
||||
ICryFont* GetICryFont(){ return m_env.pCryFont; }
|
||||
ILog* GetILog(){ return m_env.pLog; }
|
||||
ICmdLine* GetICmdLine(){ return m_pCmdLine; }
|
||||
IViewSystem* GetIViewSystem();
|
||||
ILevelSystem* GetILevelSystem();
|
||||
ISystemEventDispatcher* GetISystemEventDispatcher() { return m_pSystemEventDispatcher; }
|
||||
IProfilingSystem* GetIProfilingSystem() { return &m_ProfilingSystem; }
|
||||
ITimer* GetITimer() override{ return m_env.pTimer; }
|
||||
AZ::IO::IArchive* GetIPak() override { return m_env.pCryPak; };
|
||||
IConsole* GetIConsole() override { return m_env.pConsole; };
|
||||
IRemoteConsole* GetIRemoteConsole() override;
|
||||
IMovieSystem* GetIMovieSystem() override { return m_env.pMovieSystem; };
|
||||
ICryFont* GetICryFont() override{ return m_env.pCryFont; }
|
||||
ILog* GetILog() override{ return m_env.pLog; }
|
||||
ICmdLine* GetICmdLine() override{ return m_pCmdLine; }
|
||||
IViewSystem* GetIViewSystem() override;
|
||||
ILevelSystem* GetILevelSystem() override;
|
||||
ISystemEventDispatcher* GetISystemEventDispatcher() override { return m_pSystemEventDispatcher; }
|
||||
IProfilingSystem* GetIProfilingSystem() override { return &m_ProfilingSystem; }
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// retrieves the perlin noise singleton instance
|
||||
CPNoise3* GetNoiseGen();
|
||||
virtual uint64 GetUpdateCounter() { return m_nUpdateCounter; };
|
||||
CPNoise3* GetNoiseGen() override;
|
||||
uint64 GetUpdateCounter() override { return m_nUpdateCounter; };
|
||||
|
||||
void DetectGameFolderAccessRights();
|
||||
|
||||
virtual void ExecuteCommandLine(bool deferred=true);
|
||||
void ExecuteCommandLine(bool deferred=true) override;
|
||||
|
||||
virtual void GetUpdateStats(SSystemUpdateStats& stats);
|
||||
void GetUpdateStats(SSystemUpdateStats& stats) override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual XmlNodeRef CreateXmlNode(const char* sNodeName = "", bool bReuseStrings = false, bool bIsProcessingInstruction = false);
|
||||
virtual XmlNodeRef LoadXmlFromFile(const char* sFilename, bool bReuseStrings = false);
|
||||
virtual XmlNodeRef LoadXmlFromBuffer(const char* buffer, size_t size, bool bReuseStrings = false, bool bSuppressWarnings = false);
|
||||
virtual IXmlUtils* GetXmlUtils();
|
||||
XmlNodeRef CreateXmlNode(const char* sNodeName = "", bool bReuseStrings = false, bool bIsProcessingInstruction = false) override;
|
||||
XmlNodeRef LoadXmlFromFile(const char* sFilename, bool bReuseStrings = false) override;
|
||||
XmlNodeRef LoadXmlFromBuffer(const char* buffer, size_t size, bool bReuseStrings = false, bool bSuppressWarnings = false) override;
|
||||
IXmlUtils* GetXmlUtils() override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void IgnoreUpdates(bool bIgnore) { m_bIgnoreUpdates = bIgnore; };
|
||||
void IgnoreUpdates(bool bIgnore) override { m_bIgnoreUpdates = bIgnore; };
|
||||
|
||||
void SetIProcess(IProcess* process);
|
||||
IProcess* GetIProcess(){ return m_pProcess; }
|
||||
void SetIProcess(IProcess* process) override;
|
||||
IProcess* GetIProcess() override{ return m_pProcess; }
|
||||
|
||||
bool IsTestMode() const { return m_bTestMode; }
|
||||
bool IsTestMode() const override { return m_bTestMode; }
|
||||
//@}
|
||||
|
||||
void SleepIfNeeded();
|
||||
|
||||
virtual void FatalError(const char* format, ...) PRINTF_PARAMS(2, 3);
|
||||
virtual void ReportBug(const char* format, ...) PRINTF_PARAMS(2, 3);
|
||||
void FatalError(const char* format, ...) override PRINTF_PARAMS(2, 3);
|
||||
void ReportBug(const char* format, ...) override PRINTF_PARAMS(2, 3);
|
||||
// Validator Warning.
|
||||
void WarningV(EValidatorModule module, EValidatorSeverity severity, int flags, const char* file, const char* format, va_list args);
|
||||
void Warning(EValidatorModule module, EValidatorSeverity severity, int flags, const char* file, const char* format, ...);
|
||||
virtual int ShowMessage(const char* text, const char* caption, unsigned int uType);
|
||||
bool CheckLogVerbosity(int verbosity);
|
||||
void WarningV(EValidatorModule module, EValidatorSeverity severity, int flags, const char* file, const char* format, va_list args) override;
|
||||
void Warning(EValidatorModule module, EValidatorSeverity severity, int flags, const char* file, const char* format, ...) override;
|
||||
int ShowMessage(const char* text, const char* caption, unsigned int uType) override;
|
||||
bool CheckLogVerbosity(int verbosity) override;
|
||||
|
||||
//! Return pointer to user defined callback.
|
||||
ISystemUserCallback* GetUserCallback() const { return m_pUserCallback; };
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual void SaveConfiguration();
|
||||
virtual void LoadConfiguration(const char* sFilename, ILoadConfigurationEntrySink* pSink = 0, bool warnIfMissing = true);
|
||||
virtual ESystemConfigSpec GetMaxConfigSpec() const;
|
||||
virtual ESystemConfigPlatform GetConfigPlatform() const;
|
||||
virtual void SetConfigPlatform(ESystemConfigPlatform platform);
|
||||
void SaveConfiguration() override;
|
||||
void LoadConfiguration(const char* sFilename, ILoadConfigurationEntrySink* pSink = nullptr, bool warnIfMissing = true) override;
|
||||
ESystemConfigSpec GetMaxConfigSpec() const override;
|
||||
ESystemConfigPlatform GetConfigPlatform() const override;
|
||||
void SetConfigPlatform(ESystemConfigPlatform platform) override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
virtual bool IsPaused() const { return m_bPaused; };
|
||||
bool IsPaused() const override { return m_bPaused; };
|
||||
|
||||
virtual ILocalizationManager* GetLocalizationManager();
|
||||
virtual void debug_GetCallStack(const char** pFunctions, int& nCount);
|
||||
virtual void debug_LogCallStack(int nMaxFuncs = 32, int nFlags = 0);
|
||||
ILocalizationManager* GetLocalizationManager() override;
|
||||
void debug_GetCallStack(const char** pFunctions, int& nCount) override;
|
||||
void debug_LogCallStack(int nMaxFuncs = 32, int nFlags = 0) override;
|
||||
// Get the current callstack in raw address form (more lightweight than the above functions)
|
||||
// static as memReplay needs it before CSystem has been setup - expose a ISystem interface to this function if you need it outside CrySystem
|
||||
static void debug_GetCallStackRaw(void** callstack, uint32& callstackLength);
|
||||
@@ -329,13 +329,13 @@ public:
|
||||
#if defined(WIN32)
|
||||
friend LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
#endif
|
||||
virtual void* GetRootWindowMessageHandler();
|
||||
virtual void RegisterWindowMessageHandler(IWindowMessageHandler* pHandler);
|
||||
virtual void UnregisterWindowMessageHandler(IWindowMessageHandler* pHandler);
|
||||
void* GetRootWindowMessageHandler() override;
|
||||
void RegisterWindowMessageHandler(IWindowMessageHandler* pHandler) override;
|
||||
void UnregisterWindowMessageHandler(IWindowMessageHandler* pHandler) override;
|
||||
|
||||
// IWindowMessageHandler
|
||||
#if defined(WIN32)
|
||||
virtual bool HandleMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT* pResult);
|
||||
bool HandleMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT* pResult) override;
|
||||
#endif
|
||||
// ~IWindowMessageHandler
|
||||
|
||||
@@ -378,7 +378,7 @@ private:
|
||||
bool ReLaunchMediaCenter();
|
||||
void UpdateAudioSystems();
|
||||
|
||||
void AddCVarGroupDirectory(const AZStd::string& sPath);
|
||||
void AddCVarGroupDirectory(const AZStd::string& sPath) override;
|
||||
|
||||
AZStd::unique_ptr<AZ::DynamicModuleHandle> LoadDynamiclibrary(const char* dllName) const;
|
||||
|
||||
@@ -394,13 +394,13 @@ public:
|
||||
|
||||
// interface ISystem -------------------------------------------
|
||||
virtual IDataProbe* GetIDataProbe() { return m_pDataProbe; };
|
||||
virtual void SetForceNonDevMode(bool bValue);
|
||||
virtual bool GetForceNonDevMode() const;
|
||||
virtual bool WasInDevMode() const { return m_bWasInDevMode; };
|
||||
virtual bool IsDevMode() const { return m_bInDevMode && !GetForceNonDevMode(); }
|
||||
void SetForceNonDevMode(bool bValue) override;
|
||||
bool GetForceNonDevMode() const override;
|
||||
bool WasInDevMode() const override { return m_bWasInDevMode; };
|
||||
bool IsDevMode() const override { return m_bInDevMode && !GetForceNonDevMode(); }
|
||||
|
||||
virtual void SetConsoleDrawEnabled(bool enabled) { m_bDrawConsole = enabled; }
|
||||
virtual void SetUIDrawEnabled(bool enabled) { m_bDrawUI = enabled; }
|
||||
void SetConsoleDrawEnabled(bool enabled) override { m_bDrawConsole = enabled; }
|
||||
void SetUIDrawEnabled(bool enabled) override { m_bDrawUI = enabled; }
|
||||
|
||||
// -------------------------------------------------------------
|
||||
|
||||
@@ -408,10 +408,10 @@ public:
|
||||
//! recreates the variable if necessary
|
||||
ICVar* attachVariable (const char* szVarName, int* pContainer, const char* szComment, int dwFlags = 0);
|
||||
|
||||
const CTimeValue& GetLastTickTime(void) const { return m_lastTickTime; }
|
||||
const ICVar* GetDedicatedMaxRate(void) const { return m_svDedicatedMaxRate; }
|
||||
const CTimeValue& GetLastTickTime() const { return m_lastTickTime; }
|
||||
const ICVar* GetDedicatedMaxRate() const { return m_svDedicatedMaxRate; }
|
||||
|
||||
std::shared_ptr<AZ::IO::FileIOBase> CreateLocalFileIO();
|
||||
std::shared_ptr<AZ::IO::FileIOBase> CreateLocalFileIO() override;
|
||||
|
||||
private: // ------------------------------------------------------
|
||||
|
||||
@@ -584,9 +584,9 @@ public:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// File version.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual const SFileVersion& GetFileVersion();
|
||||
virtual const SFileVersion& GetProductVersion();
|
||||
virtual const SFileVersion& GetBuildVersion();
|
||||
const SFileVersion& GetFileVersion() override;
|
||||
const SFileVersion& GetProductVersion() override;
|
||||
const SFileVersion& GetBuildVersion() override;
|
||||
|
||||
bool InitVTuneProfiler();
|
||||
|
||||
@@ -601,16 +601,16 @@ public:
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// CryAssert and error related.
|
||||
virtual bool RegisterErrorObserver(IErrorObserver* errorObserver);
|
||||
bool UnregisterErrorObserver(IErrorObserver* errorObserver);
|
||||
virtual void OnAssert(const char* condition, const char* message, const char* fileName, unsigned int fileLineNumber);
|
||||
bool RegisterErrorObserver(IErrorObserver* errorObserver) override;
|
||||
bool UnregisterErrorObserver(IErrorObserver* errorObserver) override;
|
||||
void OnAssert(const char* condition, const char* message, const char* fileName, unsigned int fileLineNumber) override;
|
||||
void OnFatalError(const char* message);
|
||||
|
||||
bool IsAssertDialogVisible() const;
|
||||
void SetAssertVisible(bool bAssertVisble);
|
||||
bool IsAssertDialogVisible() const override;
|
||||
void SetAssertVisible(bool bAssertVisble) override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
virtual void ClearErrorMessages()
|
||||
void ClearErrorMessages() override
|
||||
{
|
||||
m_ErrorMessages.clear();
|
||||
}
|
||||
@@ -620,11 +620,11 @@ public:
|
||||
return m_eRuntimeState == ESYSTEM_EVENT_LEVEL_LOAD_START_LOADINGSCREEN;
|
||||
}
|
||||
|
||||
virtual ESystemGlobalState GetSystemGlobalState(void);
|
||||
virtual void SetSystemGlobalState(ESystemGlobalState systemGlobalState);
|
||||
ESystemGlobalState GetSystemGlobalState() override;
|
||||
void SetSystemGlobalState(ESystemGlobalState systemGlobalState) override;
|
||||
|
||||
#if !defined(_RELEASE)
|
||||
virtual bool IsSavingResourceList() const { return (g_cvars.archiveVars.nSaveLevelResourceList != 0); }
|
||||
bool IsSavingResourceList() const override { return (g_cvars.archiveVars.nSaveLevelResourceList != 0); }
|
||||
#endif
|
||||
|
||||
private:
|
||||
@@ -651,7 +651,7 @@ protected: // -------------------------------------------------------------
|
||||
float m_Color[4];
|
||||
bool m_HardFailure;
|
||||
};
|
||||
typedef std::list<SErrorMessage> TErrorMessages;
|
||||
using TErrorMessages = std::list<SErrorMessage>;
|
||||
TErrorMessages m_ErrorMessages;
|
||||
bool m_bHasRenderedErrorMessage;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
// constructor
|
||||
CTimer();
|
||||
// destructor
|
||||
~CTimer() {};
|
||||
~CTimer() = default;
|
||||
|
||||
bool Init();
|
||||
|
||||
@@ -30,57 +30,57 @@ public:
|
||||
// TODO: Review m_time usage in System.cpp
|
||||
// if it wants Game Time / UI Time or a new Render Time?
|
||||
|
||||
virtual void ResetTimer();
|
||||
virtual void UpdateOnFrameStart();
|
||||
virtual float GetCurrTime(ETimer which = ETIMER_GAME) const;
|
||||
virtual CTimeValue GetAsyncTime() const;
|
||||
virtual float GetAsyncCurTime(); // retrieve the actual wall clock time passed since the game started, in seconds
|
||||
virtual float GetFrameTime(ETimer which = ETIMER_GAME) const;
|
||||
virtual float GetRealFrameTime() const;
|
||||
virtual float GetTimeScale() const;
|
||||
virtual float GetTimeScale(uint32 channel) const;
|
||||
virtual void SetTimeScale(float scale, uint32 channel = 0);
|
||||
virtual void ClearTimeScales();
|
||||
virtual void EnableTimer(bool bEnable);
|
||||
virtual float GetFrameRate();
|
||||
virtual float GetProfileFrameBlending(float* pfBlendTime = 0, int* piBlendMode = 0);
|
||||
virtual void Serialize(TSerialize ser);
|
||||
virtual bool IsTimerEnabled() const;
|
||||
void ResetTimer() override;
|
||||
void UpdateOnFrameStart() override;
|
||||
float GetCurrTime(ETimer which = ETIMER_GAME) const override;
|
||||
CTimeValue GetAsyncTime() const override;
|
||||
float GetAsyncCurTime() override; // retrieve the actual wall clock time passed since the game started, in seconds
|
||||
float GetFrameTime(ETimer which = ETIMER_GAME) const override;
|
||||
float GetRealFrameTime() const override;
|
||||
float GetTimeScale() const override;
|
||||
float GetTimeScale(uint32 channel) const override;
|
||||
void SetTimeScale(float scale, uint32 channel = 0) override;
|
||||
void ClearTimeScales() override;
|
||||
void EnableTimer(bool bEnable) override;
|
||||
float GetFrameRate() override;
|
||||
float GetProfileFrameBlending(float* pfBlendTime = nullptr, int* piBlendMode = nullptr) override;
|
||||
void Serialize(TSerialize ser) override;
|
||||
bool IsTimerEnabled() const override;
|
||||
|
||||
//! try to pause/unpause a timer
|
||||
// returns true if successfully paused/unpaused, false otherwise
|
||||
virtual bool PauseTimer(ETimer which, bool bPause);
|
||||
bool PauseTimer(ETimer which, bool bPause) override;
|
||||
|
||||
//! determine if a timer is paused
|
||||
// returns true if paused, false otherwise
|
||||
virtual bool IsTimerPaused(ETimer which);
|
||||
bool IsTimerPaused(ETimer which) override;
|
||||
|
||||
//! try to set a timer
|
||||
// return true if successful, false otherwise
|
||||
virtual bool SetTimer(ETimer which, float timeInSeconds);
|
||||
bool SetTimer(ETimer which, float timeInSeconds) override;
|
||||
|
||||
//! make a tm struct from a time_t in UTC (like gmtime)
|
||||
virtual void SecondsToDateUTC(time_t time, struct tm& outDateUTC);
|
||||
void SecondsToDateUTC(time_t time, struct tm& outDateUTC) override;
|
||||
|
||||
//! make a UTC time from a tm (like timegm, but not available on all platforms)
|
||||
virtual time_t DateToSecondsUTC(struct tm& timePtr);
|
||||
time_t DateToSecondsUTC(struct tm& timePtr) override;
|
||||
|
||||
//! Convert from Tics to Seconds
|
||||
virtual float TicksToSeconds(int64 ticks)
|
||||
float TicksToSeconds(int64 ticks) override
|
||||
{
|
||||
return float((double)ticks * m_fSecsPerTick);
|
||||
}
|
||||
|
||||
//! Get number of ticks per second
|
||||
virtual int64 GetTicksPerSecond()
|
||||
int64 GetTicksPerSecond() override
|
||||
{
|
||||
return m_lTicksPerSec;
|
||||
}
|
||||
|
||||
virtual const CTimeValue& GetFrameStartTime(ETimer which = ETIMER_GAME) const { return m_CurrTime[(int)which]; }
|
||||
virtual ITimer* CreateNewTimer();
|
||||
const CTimeValue& GetFrameStartTime(ETimer which = ETIMER_GAME) const override { return m_CurrTime[(int)which]; }
|
||||
ITimer* CreateNewTimer() override;
|
||||
|
||||
virtual void EnableFixedTimeMode(bool enable, float timeStep) override;
|
||||
void EnableFixedTimeMode(bool enable, float timeStep) override;
|
||||
|
||||
private: // ---------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class CView
|
||||
public:
|
||||
|
||||
CView(ISystem* pSystem);
|
||||
virtual ~CView();
|
||||
~CView() override;
|
||||
|
||||
//shaking
|
||||
struct SShake
|
||||
@@ -85,24 +85,24 @@ public:
|
||||
|
||||
|
||||
// IView
|
||||
virtual void Release();
|
||||
virtual void Update(float frameTime, bool isActive);
|
||||
void Release() override;
|
||||
void Update(float frameTime, bool isActive) override;
|
||||
virtual void ProcessShaking(float frameTime);
|
||||
virtual void ProcessShake(SShake* pShake, float frameTime);
|
||||
virtual void ResetShaking();
|
||||
virtual void ResetBlending() { m_viewParams.ResetBlending(); }
|
||||
virtual void LinkTo(AZ::Entity* follow);
|
||||
virtual void Unlink();
|
||||
virtual AZ::EntityId GetLinkedId() {return m_linkedTo; };
|
||||
virtual void SetCurrentParams(SViewParams& params) { m_viewParams = params; };
|
||||
virtual const SViewParams* GetCurrentParams() {return &m_viewParams; }
|
||||
virtual void SetViewShake(Ang3 shakeAngle, Vec3 shakeShift, float duration, float frequency, float randomness, int shakeID, bool bFlipVec = true, bool bUpdateOnly = false, bool bGroundOnly = false);
|
||||
virtual void SetViewShakeEx(const SShakeParams& params);
|
||||
virtual void StopShake(int shakeID);
|
||||
virtual void SetFrameAdditiveCameraAngles(const Ang3& addFrameAngles);
|
||||
virtual void SetScale(const float scale);
|
||||
virtual void SetZoomedScale(const float scale);
|
||||
virtual void SetActive(const bool bActive);
|
||||
void ResetShaking() override;
|
||||
void ResetBlending() override { m_viewParams.ResetBlending(); }
|
||||
void LinkTo(AZ::Entity* follow) override;
|
||||
void Unlink() override;
|
||||
AZ::EntityId GetLinkedId() override {return m_linkedTo; };
|
||||
void SetCurrentParams(SViewParams& params) override { m_viewParams = params; };
|
||||
const SViewParams* GetCurrentParams() override {return &m_viewParams; }
|
||||
void SetViewShake(Ang3 shakeAngle, Vec3 shakeShift, float duration, float frequency, float randomness, int shakeID, bool bFlipVec = true, bool bUpdateOnly = false, bool bGroundOnly = false) override;
|
||||
void SetViewShakeEx(const SShakeParams& params) override;
|
||||
void StopShake(int shakeID) override;
|
||||
void SetFrameAdditiveCameraAngles(const Ang3& addFrameAngles) override;
|
||||
void SetScale(const float scale) override;
|
||||
void SetZoomedScale(const float scale) override;
|
||||
void SetActive(const bool bActive) override;
|
||||
// ~IView
|
||||
|
||||
void PostSerialize() override;
|
||||
|
||||
@@ -29,60 +29,60 @@ class CViewSystem
|
||||
{
|
||||
private:
|
||||
|
||||
typedef std::map<unsigned int, IView*> TViewMap;
|
||||
typedef std::vector<unsigned int> TViewIdVector;
|
||||
using TViewMap = std::map<unsigned int, IView*>;
|
||||
using TViewIdVector = std::vector<unsigned int>;
|
||||
|
||||
public:
|
||||
|
||||
//IViewSystem
|
||||
virtual IView* CreateView();
|
||||
virtual unsigned int AddView(IView* pView) override;
|
||||
virtual void RemoveView(IView* pView);
|
||||
virtual void RemoveView(unsigned int viewId);
|
||||
IView* CreateView() override;
|
||||
unsigned int AddView(IView* pView) override;
|
||||
void RemoveView(IView* pView) override;
|
||||
void RemoveView(unsigned int viewId) override;
|
||||
|
||||
virtual void SetActiveView(IView* pView);
|
||||
virtual void SetActiveView(unsigned int viewId);
|
||||
void SetActiveView(IView* pView) override;
|
||||
void SetActiveView(unsigned int viewId) override;
|
||||
|
||||
//CameraSystemRequestBus
|
||||
AZ::EntityId GetActiveCamera() override { return m_activeViewId ? GetActiveView()->GetLinkedId() : AZ::EntityId(); }
|
||||
|
||||
//utility functions
|
||||
virtual IView* GetView(unsigned int viewId);
|
||||
virtual IView* GetActiveView();
|
||||
IView* GetView(unsigned int viewId) override;
|
||||
IView* GetActiveView() override;
|
||||
|
||||
virtual unsigned int GetViewId(IView* pView);
|
||||
virtual unsigned int GetActiveViewId();
|
||||
unsigned int GetViewId(IView* pView) override;
|
||||
unsigned int GetActiveViewId() override;
|
||||
|
||||
virtual void PostSerialize();
|
||||
void PostSerialize() override;
|
||||
|
||||
virtual IView* GetViewByEntityId(const AZ::EntityId& id, bool forceCreate);
|
||||
IView* GetViewByEntityId(const AZ::EntityId& id, bool forceCreate) override;
|
||||
|
||||
virtual float GetDefaultZNear() { return m_fDefaultCameraNearZ; };
|
||||
virtual void SetBlendParams(float fBlendPosSpeed, float fBlendRotSpeed, bool performBlendOut) { m_fBlendInPosSpeed = fBlendPosSpeed; m_fBlendInRotSpeed = fBlendRotSpeed; m_bPerformBlendOut = performBlendOut; };
|
||||
virtual void SetOverrideCameraRotation(bool bOverride, Quat rotation);
|
||||
virtual bool IsPlayingCutScene() const
|
||||
float GetDefaultZNear() override { return m_fDefaultCameraNearZ; };
|
||||
void SetBlendParams(float fBlendPosSpeed, float fBlendRotSpeed, bool performBlendOut) override { m_fBlendInPosSpeed = fBlendPosSpeed; m_fBlendInRotSpeed = fBlendRotSpeed; m_bPerformBlendOut = performBlendOut; };
|
||||
void SetOverrideCameraRotation(bool bOverride, Quat rotation) override;
|
||||
bool IsPlayingCutScene() const override
|
||||
{
|
||||
return m_cutsceneCount > 0;
|
||||
}
|
||||
virtual void SetDeferredViewSystemUpdate(bool const bDeferred){ m_useDeferredViewSystemUpdate = bDeferred; }
|
||||
virtual bool UseDeferredViewSystemUpdate() const { return m_useDeferredViewSystemUpdate; }
|
||||
virtual void SetControlAudioListeners(bool const bActive);
|
||||
void SetDeferredViewSystemUpdate(bool const bDeferred) override{ m_useDeferredViewSystemUpdate = bDeferred; }
|
||||
bool UseDeferredViewSystemUpdate() const override { return m_useDeferredViewSystemUpdate; }
|
||||
void SetControlAudioListeners(bool const bActive) override;
|
||||
//~IViewSystem
|
||||
|
||||
//IMovieUser
|
||||
virtual void SetActiveCamera(const SCameraParams& Params);
|
||||
virtual void BeginCutScene(IAnimSequence* pSeq, unsigned long dwFlags, bool bResetFX);
|
||||
virtual void EndCutScene(IAnimSequence* pSeq, unsigned long dwFlags);
|
||||
virtual void SendGlobalEvent(const char* pszEvent);
|
||||
void SetActiveCamera(const SCameraParams& Params) override;
|
||||
void BeginCutScene(IAnimSequence* pSeq, unsigned long dwFlags, bool bResetFX) override;
|
||||
void EndCutScene(IAnimSequence* pSeq, unsigned long dwFlags) override;
|
||||
void SendGlobalEvent(const char* pszEvent) override;
|
||||
//~IMovieUser
|
||||
|
||||
// ILevelSystemListener
|
||||
virtual void OnLevelNotFound([[maybe_unused]] const char* levelName) {};
|
||||
virtual void OnLoadingStart([[maybe_unused]] const char* levelName);
|
||||
virtual void OnLoadingComplete([[maybe_unused]] const char* levelName){};
|
||||
virtual void OnLoadingError([[maybe_unused]] const char* levelName, [[maybe_unused]] const char* error){};
|
||||
virtual void OnLoadingProgress([[maybe_unused]] const char* levelName, [[maybe_unused]] int progressAmount){};
|
||||
virtual void OnUnloadComplete([[maybe_unused]] const char* levelName);
|
||||
void OnLevelNotFound([[maybe_unused]] const char* levelName) override {};
|
||||
void OnLoadingStart([[maybe_unused]] const char* levelName) override;
|
||||
void OnLoadingComplete([[maybe_unused]] const char* levelName) override{};
|
||||
void OnLoadingError([[maybe_unused]] const char* levelName, [[maybe_unused]] const char* error) override{};
|
||||
void OnLoadingProgress([[maybe_unused]] const char* levelName, [[maybe_unused]] int progressAmount) override{};
|
||||
void OnUnloadComplete([[maybe_unused]] const char* levelName) override;
|
||||
//~ILevelSystemListener
|
||||
|
||||
CViewSystem(ISystem* pSystem);
|
||||
@@ -91,16 +91,16 @@ public:
|
||||
void Release() override { delete this; };
|
||||
void Update(float frameTime) override;
|
||||
|
||||
virtual void ForceUpdate(float elapsed) { Update(elapsed); }
|
||||
void ForceUpdate(float elapsed) override { Update(elapsed); }
|
||||
|
||||
//void RegisterViewClass(const char *name, IView *(*func)());
|
||||
|
||||
bool AddListener(IViewSystemListener* pListener)
|
||||
bool AddListener(IViewSystemListener* pListener) override
|
||||
{
|
||||
return stl::push_back_unique(m_listeners, pListener);
|
||||
}
|
||||
|
||||
bool RemoveListener(IViewSystemListener* pListener)
|
||||
bool RemoveListener(IViewSystemListener* pListener) override
|
||||
{
|
||||
return stl::find_and_erase(m_listeners, pListener);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ struct CConsoleCommand
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CConsoleCommand()
|
||||
: m_func(0)
|
||||
: m_func(nullptr)
|
||||
, m_nFlags(0) {}
|
||||
size_t sizeofThis () const {return sizeof(*this) + m_sName.capacity() + 1 + m_sCommand.capacity() + 1; }
|
||||
};
|
||||
@@ -66,18 +66,18 @@ struct CConsoleCommandArgs
|
||||
CConsoleCommandArgs(AZStd::string& line, std::vector<AZStd::string>& args)
|
||||
: m_line(line)
|
||||
, m_args(args) {};
|
||||
virtual int GetArgCount() const { return static_cast<int>(m_args.size()); };
|
||||
int GetArgCount() const override { return static_cast<int>(m_args.size()); };
|
||||
// Get argument by index, nIndex must be in 0 <= nIndex < GetArgCount()
|
||||
virtual const char* GetArg(int nIndex) const
|
||||
const char* GetArg(int nIndex) const override
|
||||
{
|
||||
assert(nIndex >= 0 && nIndex < GetArgCount());
|
||||
if (!(nIndex >= 0 && nIndex < GetArgCount()))
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return m_args[nIndex].c_str();
|
||||
}
|
||||
virtual const char* GetCommandLine() const
|
||||
const char* GetCommandLine() const override
|
||||
{
|
||||
return m_line.c_str();
|
||||
}
|
||||
@@ -114,9 +114,9 @@ class CXConsole
|
||||
, public AzFramework::CommandRegistrationBus::Handler
|
||||
{
|
||||
public:
|
||||
typedef std::deque<AZStd::string> ConsoleBuffer;
|
||||
typedef ConsoleBuffer::iterator ConsoleBufferItor;
|
||||
typedef ConsoleBuffer::reverse_iterator ConsoleBufferRItor;
|
||||
using ConsoleBuffer = std::deque<AZStd::string>;
|
||||
using ConsoleBufferItor = ConsoleBuffer::iterator;
|
||||
using ConsoleBufferRItor = ConsoleBuffer::reverse_iterator;
|
||||
|
||||
// constructor
|
||||
CXConsole();
|
||||
@@ -216,12 +216,12 @@ public:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void SetProcessingGroup(bool isGroup) { m_bIsProcessingGroup = isGroup; }
|
||||
bool GetIsProcessingGroup(void) const { return m_bIsProcessingGroup; }
|
||||
bool GetIsProcessingGroup() const { return m_bIsProcessingGroup; }
|
||||
|
||||
protected: // ----------------------------------------------------------------------------------------
|
||||
void DrawBuffer(int nScrollPos, const char* szEffect);
|
||||
|
||||
void RegisterVar(ICVar* pCVar, ConsoleVarFunc pChangeFunc = 0);
|
||||
void RegisterVar(ICVar* pCVar, ConsoleVarFunc pChangeFunc = nullptr);
|
||||
|
||||
bool ProcessInput(const AzFramework::InputChannel& inputChannel);
|
||||
void AddLine(const char* inputStr);
|
||||
@@ -272,7 +272,7 @@ private: // ----------------------------------------------------------
|
||||
typedef std::map<const char*, ICVar*, string_nocase_lt> ConsoleVariablesMap; // key points into string stored in ICVar or in .exe/.dll
|
||||
typedef ConsoleVariablesMap::iterator ConsoleVariablesMapItor;
|
||||
|
||||
typedef std::vector<std::pair<const char*, ICVar*> > ConsoleVariablesVector;
|
||||
using ConsoleVariablesVector = std::vector<std::pair<const char*, ICVar*> >;
|
||||
|
||||
void LogChangeMessage(const char* name, const bool isConst, const bool isCheat, const bool isReadOnly, const bool isDeprecated,
|
||||
const char* oldValue, const char* newValue, const bool isProcessingGroup, const bool allowChange);
|
||||
@@ -308,9 +308,9 @@ private: // ----------------------------------------------------------
|
||||
, silentMode(_silentMode)
|
||||
{}
|
||||
};
|
||||
typedef std::list<SDeferredCommand> TDeferredCommandList;
|
||||
using TDeferredCommandList = std::list<SDeferredCommand>;
|
||||
|
||||
typedef std::list<IConsoleVarSink*> ConsoleVarSinks;
|
||||
using ConsoleVarSinks = std::list<IConsoleVarSink*>;
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -26,19 +26,19 @@ public:
|
||||
|
||||
// interface ICVar --------------------------------------------------------------------------------------
|
||||
|
||||
virtual void ClearFlags(int flags);
|
||||
virtual int GetFlags() const;
|
||||
virtual int SetFlags(int flags);
|
||||
virtual const char* GetName() const;
|
||||
virtual const char* GetHelp();
|
||||
virtual void Release();
|
||||
virtual void ForceSet(const char* s);
|
||||
virtual void SetOnChangeCallback(ConsoleVarFunc pChangeFunc);
|
||||
virtual uint64 AddOnChangeFunctor(const AZStd::function<void()>& pChangeFunctor) override;
|
||||
virtual ConsoleVarFunc GetOnChangeCallback() const;
|
||||
void ClearFlags(int flags) override;
|
||||
int GetFlags() const override;
|
||||
int SetFlags(int flags) override;
|
||||
const char* GetName() const override;
|
||||
const char* GetHelp() override;
|
||||
void Release() override;
|
||||
void ForceSet(const char* s) override;
|
||||
void SetOnChangeCallback(ConsoleVarFunc pChangeFunc) override;
|
||||
uint64 AddOnChangeFunctor(const AZStd::function<void()>& pChangeFunctor) override;
|
||||
ConsoleVarFunc GetOnChangeCallback() const override;
|
||||
|
||||
virtual bool ShouldReset() const { return (m_nFlags & VF_RESETTABLE) != 0; }
|
||||
virtual void Reset() override
|
||||
bool ShouldReset() const { return (m_nFlags & VF_RESETTABLE) != 0; }
|
||||
void Reset() override
|
||||
{
|
||||
if (ShouldReset())
|
||||
{
|
||||
@@ -48,19 +48,19 @@ public:
|
||||
|
||||
virtual void ResetImpl() = 0;
|
||||
|
||||
virtual void SetLimits(float min, float max) override;
|
||||
virtual void GetLimits(float& min, float& max) override;
|
||||
virtual bool HasCustomLimits() override;
|
||||
void SetLimits(float min, float max) override;
|
||||
void GetLimits(float& min, float& max) override;
|
||||
bool HasCustomLimits() override;
|
||||
|
||||
virtual int GetRealIVal() const { return GetIVal(); }
|
||||
virtual bool IsConstCVar() const {return (m_nFlags & VF_CONST_CVAR) != 0; }
|
||||
virtual void SetDataProbeString(const char* pDataProbeString)
|
||||
int GetRealIVal() const override { return GetIVal(); }
|
||||
bool IsConstCVar() const override {return (m_nFlags & VF_CONST_CVAR) != 0; }
|
||||
void SetDataProbeString(const char* pDataProbeString) override
|
||||
{
|
||||
CRY_ASSERT(m_pDataProbeString == NULL);
|
||||
m_pDataProbeString = new char[ strlen(pDataProbeString) + 1 ];
|
||||
azstrcpy(m_pDataProbeString, strlen(pDataProbeString) + 1, pDataProbeString);
|
||||
}
|
||||
virtual const char* GetDataProbeString() const;
|
||||
const char* GetDataProbeString() const override;
|
||||
|
||||
protected: // ------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -77,7 +77,7 @@ protected: // ------------------------------------------------------------------
|
||||
char* m_pDataProbeString; // value client is required to have for data probes
|
||||
int m_nFlags; // e.g. VF_CHEAT, ...
|
||||
|
||||
typedef std::vector<std::pair<int, AZStd::function<void ()>> > ChangeFunctorContainer;
|
||||
using ChangeFunctorContainer = std::vector<std::pair<int, AZStd::function<void ()>> >;
|
||||
ChangeFunctorContainer m_changeFunctors;
|
||||
ConsoleVarFunc m_pChangeFunc; // Callback function that is called when this variable changes.
|
||||
CXConsole* m_pConsole; // used for the callback OnBeforeVarChange()
|
||||
@@ -169,19 +169,19 @@ public:
|
||||
|
||||
// interface ICVar --------------------------------------------------------------------------------------
|
||||
|
||||
virtual int GetIVal() const { return (int)m_fValue; }
|
||||
virtual int64 GetI64Val() const { return (int64)m_fValue; }
|
||||
virtual float GetFVal() const { return m_fValue; }
|
||||
virtual const char* GetString() const;
|
||||
virtual void ResetImpl() { Set(m_fDefault); }
|
||||
virtual void Set(const char* s);
|
||||
virtual void Set(float f);
|
||||
virtual void Set(int i);
|
||||
virtual int GetType() { return CVAR_FLOAT; }
|
||||
int GetIVal() const override { return (int)m_fValue; }
|
||||
int64 GetI64Val() const override { return (int64)m_fValue; }
|
||||
float GetFVal() const override { return m_fValue; }
|
||||
const char* GetString() const override;
|
||||
void ResetImpl() override { Set(m_fDefault); }
|
||||
void Set(const char* s) override;
|
||||
void Set(float f) override;
|
||||
void Set(int i) override;
|
||||
int GetType() override { return CVAR_FLOAT; }
|
||||
|
||||
protected:
|
||||
|
||||
virtual const char* GetOwnDataProbeString() const
|
||||
const char* GetOwnDataProbeString() const override
|
||||
{
|
||||
static char szReturnString[8];
|
||||
|
||||
@@ -212,15 +212,15 @@ public:
|
||||
|
||||
// interface ICVar --------------------------------------------------------------------------------------
|
||||
|
||||
virtual int GetIVal() const { return m_iValue; }
|
||||
virtual int64 GetI64Val() const { return m_iValue; }
|
||||
virtual float GetFVal() const { return (float)m_iValue; }
|
||||
virtual const char* GetString() const;
|
||||
virtual void ResetImpl() { Set(m_iDefault); }
|
||||
virtual void Set(const char* s);
|
||||
virtual void Set(float f);
|
||||
virtual void Set(int i);
|
||||
virtual int GetType() { return CVAR_INT; }
|
||||
int GetIVal() const override { return m_iValue; }
|
||||
int64 GetI64Val() const override { return m_iValue; }
|
||||
float GetFVal() const override { return (float)m_iValue; }
|
||||
const char* GetString() const override;
|
||||
void ResetImpl() override { Set(m_iDefault); }
|
||||
void Set(const char* s) override;
|
||||
void Set(float f) override;
|
||||
void Set(int i) override;
|
||||
int GetType() override { return CVAR_INT; }
|
||||
|
||||
private: // --------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -246,26 +246,26 @@ public:
|
||||
|
||||
// interface ICVar --------------------------------------------------------------------------------------
|
||||
|
||||
virtual int GetIVal() const { return atoi(m_sValue.c_str()); }
|
||||
virtual int64 GetI64Val() const { return _atoi64(m_sValue.c_str()); }
|
||||
virtual float GetFVal() const { return (float)atof(m_sValue.c_str()); }
|
||||
virtual const char* GetString() const
|
||||
int GetIVal() const override { return atoi(m_sValue.c_str()); }
|
||||
int64 GetI64Val() const override { return _atoi64(m_sValue.c_str()); }
|
||||
float GetFVal() const override { return (float)atof(m_sValue.c_str()); }
|
||||
const char* GetString() const override
|
||||
{
|
||||
return m_sValue.c_str();
|
||||
}
|
||||
virtual void ResetImpl() { Set(m_sDefault.c_str()); }
|
||||
virtual void Set(const char* s);
|
||||
virtual void Set(float f)
|
||||
void ResetImpl() override { Set(m_sDefault.c_str()); }
|
||||
void Set(const char* s) override;
|
||||
void Set(float f) override
|
||||
{
|
||||
stack_string s = stack_string::format("%g", f);
|
||||
Set(s.c_str());
|
||||
}
|
||||
virtual void Set(int i)
|
||||
void Set(int i) override
|
||||
{
|
||||
stack_string s = stack_string::format("%d", i);
|
||||
Set(s.c_str());
|
||||
}
|
||||
virtual int GetType() { return CVAR_STRING; }
|
||||
int GetType() override { return CVAR_STRING; }
|
||||
|
||||
private: // --------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -290,19 +290,19 @@ public:
|
||||
|
||||
// interface ICVar --------------------------------------------------------------------------------------
|
||||
|
||||
virtual int GetIVal() const { return (int)m_fValue; }
|
||||
virtual int64 GetI64Val() const { return (int64)m_fValue; }
|
||||
virtual float GetFVal() const { return m_fValue; }
|
||||
virtual const char* GetString() const;
|
||||
virtual void ResetImpl() { Set(m_fDefault); }
|
||||
virtual void Set(const char* s);
|
||||
virtual void Set(float f);
|
||||
virtual void Set(int i);
|
||||
virtual int GetType() { return CVAR_FLOAT; }
|
||||
int GetIVal() const override { return (int)m_fValue; }
|
||||
int64 GetI64Val() const override { return (int64)m_fValue; }
|
||||
float GetFVal() const override { return m_fValue; }
|
||||
const char* GetString() const override;
|
||||
void ResetImpl() override { Set(m_fDefault); }
|
||||
void Set(const char* s) override;
|
||||
void Set(float f) override;
|
||||
void Set(int i) override;
|
||||
int GetType() override { return CVAR_FLOAT; }
|
||||
|
||||
protected:
|
||||
|
||||
virtual const char *GetOwnDataProbeString() const
|
||||
const char *GetOwnDataProbeString() const override
|
||||
{
|
||||
static char szReturnString[8];
|
||||
|
||||
|
||||
@@ -63,17 +63,17 @@ public:
|
||||
//void* operator new( size_t nSize );
|
||||
//void operator delete( void *ptr );
|
||||
|
||||
virtual void DeleteThis() { }
|
||||
void DeleteThis() override { }
|
||||
|
||||
//! Create new XML node.
|
||||
XmlNodeRef createNode(const char* tag);
|
||||
XmlNodeRef createNode(const char* tag) override;
|
||||
|
||||
// Summary:
|
||||
// Reference counting.
|
||||
virtual void AddRef() { ++m_pData->nRefCount; };
|
||||
void AddRef() override { ++m_pData->nRefCount; };
|
||||
// Notes:
|
||||
// When ref count reach zero XML node dies.
|
||||
virtual void Release()
|
||||
void Release() override
|
||||
{
|
||||
if (--m_pData->nRefCount <= 0)
|
||||
{
|
||||
@@ -82,104 +82,105 @@ public:
|
||||
};
|
||||
|
||||
//! Get XML node tag.
|
||||
const char* getTag() const { return _string(_node()->nTagStringOffset); };
|
||||
void setTag([[maybe_unused]] const char* tag) { assert(0); };
|
||||
const char* getTag() const override { return _string(_node()->nTagStringOffset); };
|
||||
void setTag([[maybe_unused]] const char* tag) override { assert(0); };
|
||||
|
||||
//! Return true if given tag is equal to node tag.
|
||||
bool isTag(const char* tag) const;
|
||||
bool isTag(const char* tag) const override;
|
||||
|
||||
//! Get XML Node attributes.
|
||||
virtual int getNumAttributes() const { return (int)_node()->nAttributeCount; };
|
||||
int getNumAttributes() const override { return (int)_node()->nAttributeCount; };
|
||||
//! Return attribute key and value by attribute index.
|
||||
virtual bool getAttributeByIndex(int index, const char** key, const char** value);
|
||||
bool getAttributeByIndex(int index, const char** key, const char** value) override;
|
||||
//! Return attribute key and value by attribute index, string version.
|
||||
virtual bool getAttributeByIndex(int index, XmlString& key, XmlString& value);
|
||||
|
||||
|
||||
virtual void shareChildren([[maybe_unused]] const XmlNodeRef& fromNode) { assert(0); };
|
||||
virtual void copyAttributes(XmlNodeRef fromNode) { assert(0); };
|
||||
void shareChildren([[maybe_unused]] const XmlNodeRef& fromNode) override { assert(0); };
|
||||
void copyAttributes(XmlNodeRef fromNode) override { assert(0); };
|
||||
|
||||
//! Get XML Node attribute for specified key.
|
||||
const char* getAttr(const char* key) const;
|
||||
const char* getAttr(const char* key) const override;
|
||||
|
||||
//! Get XML Node attribute for specified key.
|
||||
// Returns true if the attribute exists, false otherwise.
|
||||
bool getAttr(const char* key, const char** value) const;
|
||||
bool getAttr(const char* key, const char** value) const override;
|
||||
|
||||
//! Check if attributes with specified key exist.
|
||||
bool haveAttr(const char* key) const;
|
||||
bool haveAttr(const char* key) const override;
|
||||
|
||||
XmlNodeRef newChild([[maybe_unused]] const char* tagName) { assert(0); return 0; };
|
||||
void replaceChild([[maybe_unused]] int inChild, [[maybe_unused]] const XmlNodeRef& node) { assert(0); };
|
||||
void insertChild([[maybe_unused]] int inChild, [[maybe_unused]] const XmlNodeRef& node) { assert(0); };
|
||||
void addChild([[maybe_unused]] const XmlNodeRef& node) { assert(0); };
|
||||
void removeChild([[maybe_unused]] const XmlNodeRef& node) { assert(0); };
|
||||
XmlNodeRef newChild([[maybe_unused]] const char* tagName) override { assert(0); return 0; };
|
||||
void replaceChild([[maybe_unused]] int inChild, [[maybe_unused]] const XmlNodeRef& node) override { assert(0); };
|
||||
void insertChild([[maybe_unused]] int inChild, [[maybe_unused]] const XmlNodeRef& node) override { assert(0); };
|
||||
void addChild([[maybe_unused]] const XmlNodeRef& node) override { assert(0); };
|
||||
void removeChild([[maybe_unused]] const XmlNodeRef& node) override { assert(0); };
|
||||
|
||||
//! Remove all child nodes.
|
||||
void removeAllChilds() { assert(0); };
|
||||
void removeAllChilds() override { assert(0); };
|
||||
|
||||
//! Get number of child XML nodes.
|
||||
int getChildCount() const { return (int)_node()->nChildCount; };
|
||||
int getChildCount() const override { return (int)_node()->nChildCount; };
|
||||
|
||||
//! Get XML Node child nodes.
|
||||
XmlNodeRef getChild(int i) const;
|
||||
XmlNodeRef getChild(int i) const override;
|
||||
|
||||
//! Find node with specified tag.
|
||||
XmlNodeRef findChild(const char* tag) const;
|
||||
XmlNodeRef findChild(const char* tag) const override;
|
||||
void deleteChild([[maybe_unused]] const char* tag) { assert(0); };
|
||||
void deleteChildAt([[maybe_unused]] int nIndex) { assert(0); };
|
||||
void deleteChildAt([[maybe_unused]] int nIndex) override { assert(0); };
|
||||
|
||||
//! Get parent XML node.
|
||||
XmlNodeRef getParent() const;
|
||||
XmlNodeRef getParent() const override;
|
||||
|
||||
//! Returns content of this node.
|
||||
const char* getContent() const { return _string(_node()->nContentStringOffset); };
|
||||
void setContent([[maybe_unused]] const char* str) { assert(0); };
|
||||
const char* getContent() const override { return _string(_node()->nContentStringOffset); };
|
||||
void setContent([[maybe_unused]] const char* str) override { assert(0); };
|
||||
|
||||
XmlNodeRef clone() { assert(0); return 0; };
|
||||
XmlNodeRef clone() override { assert(0); return 0; };
|
||||
|
||||
//! Returns line number for XML tag.
|
||||
int getLine() const { return 0; };
|
||||
int getLine() const override { return 0; };
|
||||
//! Set line number in xml.
|
||||
void setLine([[maybe_unused]] int line) { assert(0); };
|
||||
void setLine([[maybe_unused]] int line) override { assert(0); };
|
||||
|
||||
//! Returns XML of this node and sub nodes.
|
||||
virtual IXmlStringData* getXMLData([[maybe_unused]] int nReserveMem = 0) const { assert(0); return 0; };
|
||||
XmlString getXML([[maybe_unused]] int level = 0) const { assert(0); return ""; };
|
||||
bool saveToFile([[maybe_unused]] const char* fileName) { assert(0); return false; }; // saves in one huge chunk
|
||||
bool saveToFile([[maybe_unused]] const char* fileName, [[maybe_unused]] size_t chunkSizeBytes, [[maybe_unused]] AZ::IO::HandleType fileHandle = AZ::IO::InvalidHandle) { assert(0); return false; }; // save in small memory chunks
|
||||
IXmlStringData* getXMLData([[maybe_unused]] int nReserveMem = 0) const override { assert(0); return 0; };
|
||||
XmlString getXML([[maybe_unused]] int level = 0) const override { assert(0); return ""; };
|
||||
bool saveToFile([[maybe_unused]] const char* fileName) override { assert(0); return false; }; // saves in one huge chunk
|
||||
bool saveToFile([[maybe_unused]] const char* fileName, [[maybe_unused]] size_t chunkSizeBytes, [[maybe_unused]] AZ::IO::HandleType fileHandle = AZ::IO::InvalidHandle) override { assert(0); return false; }; // save in small memory chunks
|
||||
|
||||
//! Set new XML Node attribute (or override attribute with same key).
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const char* value) { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] int value) { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] unsigned int value) { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] int64 value) { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] uint64 value, [[maybe_unused]] bool useHexFormat = true /* ignored */) { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] float value) { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] f64 value) { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Vec2& value) { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Ang3& value) { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Vec3& value) { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Vec4& value) { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Quat& value) { assert(0); };
|
||||
void delAttr([[maybe_unused]] const char* key) { assert(0); };
|
||||
void removeAllAttributes() { assert(0); };
|
||||
using IXmlNode::setAttr;
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const char* value) override { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] int value) override { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] unsigned int value) override { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] int64 value) override { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] uint64 value, [[maybe_unused]] bool useHexFormat = true /* ignored */) override { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] float value) override { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] f64 value) override { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Vec2& value) override { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Ang3& value) override { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Vec3& value) override { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Vec4& value) override { assert(0); };
|
||||
void setAttr([[maybe_unused]] const char* key, [[maybe_unused]] const Quat& value) override { assert(0); };
|
||||
void delAttr([[maybe_unused]] const char* key) override { assert(0); };
|
||||
void removeAllAttributes() override { assert(0); };
|
||||
|
||||
//! Get attribute value of node.
|
||||
bool getAttr(const char* key, int& value) const;
|
||||
bool getAttr(const char* key, unsigned int& value) const;
|
||||
bool getAttr(const char* key, int64& value) const;
|
||||
bool getAttr(const char* key, uint64& value, bool useHexFormat = true /* ignored */) const;
|
||||
bool getAttr(const char* key, float& value) const;
|
||||
bool getAttr(const char* key, f64& value) const;
|
||||
bool getAttr(const char* key, bool& value) const;
|
||||
bool getAttr(const char* key, XmlString& value) const {const char* v(NULL); bool boHasAttribute(getAttr(key, &v)); value = v; return boHasAttribute; }
|
||||
bool getAttr(const char* key, Vec2& value) const;
|
||||
bool getAttr(const char* key, Ang3& value) const;
|
||||
bool getAttr(const char* key, Vec3& value) const;
|
||||
bool getAttr(const char* key, Vec4& value) const;
|
||||
bool getAttr(const char* key, Quat& value) const;
|
||||
bool getAttr(const char* key, ColorB& value) const;
|
||||
bool getAttr(const char* key, int& value) const override;
|
||||
bool getAttr(const char* key, unsigned int& value) const override;
|
||||
bool getAttr(const char* key, int64& value) const override;
|
||||
bool getAttr(const char* key, uint64& value, bool useHexFormat = true /* ignored */) const override;
|
||||
bool getAttr(const char* key, float& value) const override;
|
||||
bool getAttr(const char* key, f64& value) const override;
|
||||
bool getAttr(const char* key, bool& value) const override;
|
||||
bool getAttr(const char* key, XmlString& value) const override {const char* v(NULL); bool boHasAttribute(getAttr(key, &v)); value = v; return boHasAttribute; }
|
||||
bool getAttr(const char* key, Vec2& value) const override;
|
||||
bool getAttr(const char* key, Ang3& value) const override;
|
||||
bool getAttr(const char* key, Vec3& value) const override;
|
||||
bool getAttr(const char* key, Vec4& value) const override;
|
||||
bool getAttr(const char* key, Quat& value) const override;
|
||||
bool getAttr(const char* key, ColorB& value) const override;
|
||||
|
||||
private:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -216,7 +217,7 @@ private:
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void setParent([[maybe_unused]] const XmlNodeRef& inRef) { assert(0); }
|
||||
void setParent([[maybe_unused]] const XmlNodeRef& inRef) override { assert(0); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
private:
|
||||
|
||||
@@ -85,10 +85,10 @@ class CXmlSerializer
|
||||
public:
|
||||
CXmlSerializer()
|
||||
: m_nRefCount(0)
|
||||
, m_pReaderImpl(NULL)
|
||||
, m_pReaderSer(NULL)
|
||||
, m_pWriterSer(NULL)
|
||||
, m_pWriterImpl(NULL)
|
||||
, m_pReaderImpl(nullptr)
|
||||
, m_pReaderSer(nullptr)
|
||||
, m_pWriterSer(nullptr)
|
||||
, m_pWriterImpl(nullptr)
|
||||
{
|
||||
}
|
||||
~CXmlSerializer()
|
||||
@@ -104,8 +104,8 @@ public:
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual void AddRef() { ++m_nRefCount; }
|
||||
virtual void Release()
|
||||
void AddRef() override { ++m_nRefCount; }
|
||||
void Release() override
|
||||
{
|
||||
if (--m_nRefCount <= 0)
|
||||
{
|
||||
@@ -113,14 +113,14 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual ISerialize* GetWriter(XmlNodeRef& node)
|
||||
ISerialize* GetWriter(XmlNodeRef& node) override
|
||||
{
|
||||
ClearAll();
|
||||
m_pWriterImpl = new CSerializeXMLWriterImpl(node);
|
||||
m_pWriterSer = new CSimpleSerializeWithDefaults<CSerializeXMLWriterImpl>(*m_pWriterImpl);
|
||||
return m_pWriterSer;
|
||||
}
|
||||
virtual ISerialize* GetReader(XmlNodeRef& node)
|
||||
ISerialize* GetReader(XmlNodeRef& node) override
|
||||
{
|
||||
ClearAll();
|
||||
m_pReaderImpl = new CSerializeXMLReaderImpl(node);
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
return m_fileHandle != AZ::IO::InvalidHandle;
|
||||
}
|
||||
;
|
||||
virtual void Write(const void* pData, size_t size)
|
||||
void Write(const void* pData, size_t size) override
|
||||
{
|
||||
if (m_fileHandle != AZ::IO::InvalidHandle)
|
||||
{
|
||||
@@ -184,12 +184,12 @@ public:
|
||||
CXmlTableReader();
|
||||
~CXmlTableReader() override;
|
||||
|
||||
virtual void Release();
|
||||
void Release() override;
|
||||
|
||||
virtual bool Begin(XmlNodeRef rootNode);
|
||||
virtual int GetEstimatedRowCount();
|
||||
virtual bool ReadRow(int& rowIndex);
|
||||
virtual bool ReadCell(int& columnIndex, const char*& pContent, size_t& contentSize);
|
||||
bool Begin(XmlNodeRef rootNode) override;
|
||||
int GetEstimatedRowCount() override;
|
||||
bool ReadRow(int& rowIndex) override;
|
||||
bool ReadCell(int& columnIndex, const char*& pContent, size_t& contentSize) override;
|
||||
|
||||
private:
|
||||
bool m_bExcel;
|
||||
@@ -228,7 +228,7 @@ void CXmlTableReader::Release()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CXmlTableReader::Begin(XmlNodeRef rootNode)
|
||||
{
|
||||
m_tableNode = 0;
|
||||
m_tableNode = nullptr;
|
||||
|
||||
if (!rootNode)
|
||||
{
|
||||
@@ -247,11 +247,11 @@ bool CXmlTableReader::Begin(XmlNodeRef rootNode)
|
||||
m_tableNode = rootNode->findChild("Table");
|
||||
}
|
||||
|
||||
m_rowNode = 0;
|
||||
m_rowNode = nullptr;
|
||||
m_rowNodeIndex = -1;
|
||||
m_row = -1;
|
||||
|
||||
return (m_tableNode != 0);
|
||||
return (m_tableNode != nullptr);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -296,7 +296,7 @@ bool CXmlTableReader::ReadRow(int& rowIndex)
|
||||
|
||||
if (!m_rowNode->isTag("Row"))
|
||||
{
|
||||
m_rowNode = 0;
|
||||
m_rowNode = nullptr;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ bool CXmlTableReader::ReadRow(int& rowIndex)
|
||||
if (index < m_row)
|
||||
{
|
||||
m_rowNodeIndex = rowNodeCount;
|
||||
m_rowNode = 0;
|
||||
m_rowNode = nullptr;
|
||||
return false;
|
||||
}
|
||||
m_row = index;
|
||||
@@ -351,7 +351,7 @@ bool CXmlTableReader::ReadRow(int& rowIndex)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CXmlTableReader::ReadCell(int& columnIndex, const char*& pContent, size_t& contentSize)
|
||||
{
|
||||
pContent = 0;
|
||||
pContent = nullptr;
|
||||
contentSize = 0;
|
||||
|
||||
if (!m_tableNode)
|
||||
|
||||
@@ -203,6 +203,7 @@ public:
|
||||
bool saveToFile(const char* fileName, size_t chunkSizeBytes, AZ::IO::HandleType fileHandle = AZ::IO::InvalidHandle); // save in small memory chunks
|
||||
|
||||
//! Set new XML Node attribute (or override attribute with same key).
|
||||
using IXmlNode::setAttr;
|
||||
void setAttr(const char* key, const char* value);
|
||||
void setAttr(const char* key, int value);
|
||||
void setAttr(const char* key, unsigned int value);
|
||||
|
||||
Reference in New Issue
Block a user