Merge branch 'development' of https://github.com/o3de/o3de into daimini/dpiIssues/floatingWidgetFlickerBetweenScreens
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
3. Open a new Command Prompt window at the engine root and set the following environment variables:
|
||||
Set O3DE_AWS_PROJECT_NAME=AWSAUTO
|
||||
Set O3DE_AWS_DEPLOY_REGION=us-east-1
|
||||
Set ASSUME_ROLE_ARN="arn:aws:iam::{your_aws_account_id}:role/o3de-automation-tests"
|
||||
Set ASSUME_ROLE_ARN=arn:aws:iam::{your_aws_account_id}:role/o3de-automation-tests
|
||||
Set COMMIT_ID=HEAD
|
||||
4. In the same Command Prompt window, Deploy the CDK applications for AWS gems by running deploy_cdk_applications.cmd.
|
||||
|
||||
|
||||
+12
-5
@@ -139,7 +139,6 @@ def update_kinesis_analytics_application_status(aws_metrics_utils: pytest.fixtur
|
||||
@pytest.mark.usefixtures('resource_mappings')
|
||||
@pytest.mark.parametrize('assume_role_arn', [constants.ASSUME_ROLE_ARN])
|
||||
@pytest.mark.parametrize('feature_name', [AWS_METRICS_FEATURE_NAME])
|
||||
@pytest.mark.parametrize('level', ['AWS/Metrics'])
|
||||
@pytest.mark.parametrize('profile_name', ['AWSAutomationTest'])
|
||||
@pytest.mark.parametrize('project', ['AutomatedTesting'])
|
||||
@pytest.mark.parametrize('region_name', [constants.AWS_REGION])
|
||||
@@ -150,6 +149,7 @@ class TestAWSMetricsWindows(object):
|
||||
"""
|
||||
Test class to verify the real-time and batch analytics for metrics.
|
||||
"""
|
||||
@pytest.mark.parametrize('level', ['AWS/Metrics'])
|
||||
def test_realtime_and_batch_analytics(self,
|
||||
level: str,
|
||||
launcher: pytest.fixture,
|
||||
@@ -201,10 +201,7 @@ class TestAWSMetricsWindows(object):
|
||||
for thread in operational_threads:
|
||||
thread.join()
|
||||
|
||||
# Clear the analytics bucket objects so that the S3 bucket can be destroyed during tear down.
|
||||
aws_metrics_utils.empty_bucket(
|
||||
resource_mappings.get_resource_name_id('AWSMetrics.AnalyticsBucketName'))
|
||||
|
||||
@pytest.mark.parametrize('level', ['AWS/Metrics'])
|
||||
def test_unauthorized_user_request_rejected(self,
|
||||
level: str,
|
||||
launcher: pytest.fixture,
|
||||
@@ -227,3 +224,13 @@ class TestAWSMetricsWindows(object):
|
||||
halt_on_unexpected=True)
|
||||
assert result, 'Metrics events are sent successfully by unauthorized user'
|
||||
logger.info('Unauthorized user is rejected to send metrics.')
|
||||
|
||||
def test_clean_up_s3_bucket(self,
|
||||
aws_utils: pytest.fixture,
|
||||
resource_mappings: pytest.fixture,
|
||||
aws_metrics_utils: pytest.fixture):
|
||||
"""
|
||||
Clear the analytics bucket objects so that the S3 bucket can be destroyed during tear down.
|
||||
"""
|
||||
aws_metrics_utils.empty_bucket(
|
||||
resource_mappings.get_resource_name_id('AWSMetrics.AnalyticsBucketName'))
|
||||
|
||||
+20
-2
@@ -3,8 +3,6 @@ Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
|
||||
SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
|
||||
Hydra script that creates an entity and attaches Atom components to it for test verification.
|
||||
"""
|
||||
|
||||
import os
|
||||
@@ -17,6 +15,7 @@ import azlmbr.asset as asset
|
||||
import azlmbr.entity as entity
|
||||
import azlmbr.legacy.general as general
|
||||
import azlmbr.editor as editor
|
||||
import azlmbr.render as render
|
||||
|
||||
sys.path.append(os.path.join(azlmbr.paths.devroot, "AutomatedTesting", "Gem", "PythonTests"))
|
||||
|
||||
@@ -125,6 +124,19 @@ def run():
|
||||
def verify_set_property(entity_obj, path, value):
|
||||
entity_obj.get_set_test(0, path, value)
|
||||
|
||||
# Verify cubemap generation
|
||||
def verify_cubemap_generation(component_name, entity_obj):
|
||||
# Initially Check if the component has Reflection Probe component
|
||||
if not hydra.has_components(entity_obj.id, ["Reflection Probe"]):
|
||||
raise ValueError(f"Given entity {entity_obj.name} has no Reflection Probe component")
|
||||
render.EditorReflectionProbeBus(azlmbr.bus.Event, "BakeReflectionProbe", entity_obj.id)
|
||||
|
||||
def get_value():
|
||||
hydra.get_component_property_value(entity_obj.components[0], "Cubemap|Baked Cubemap Path")
|
||||
|
||||
TestHelper.wait_for_condition(lambda: get_value() != "", 20.0)
|
||||
general.log(f"{component_name}_test: Cubemap is generated: {get_value() != ''}")
|
||||
|
||||
# Wait for Editor idle loop before executing Python hydra scripts.
|
||||
TestHelper.init_idle()
|
||||
|
||||
@@ -215,6 +227,12 @@ def run():
|
||||
# Display Mapper Component
|
||||
ComponentTests("Display Mapper")
|
||||
|
||||
# Reflection Probe Component
|
||||
reflection_probe = "Reflection Probe"
|
||||
ComponentTests(
|
||||
reflection_probe,
|
||||
lambda entity_obj: verify_required_component_addition(entity_obj, ["Box Shape"], reflection_probe),
|
||||
lambda entity_obj: verify_cubemap_generation(reflection_probe, entity_obj),)
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
|
||||
@@ -161,6 +161,21 @@ class TestAtomEditorComponentsMain(object):
|
||||
"Display Mapper_test: Entity deleted: True",
|
||||
"Display Mapper_test: UNDO entity deletion works: True",
|
||||
"Display Mapper_test: REDO entity deletion works: True",
|
||||
# Reflection Probe Component
|
||||
"Reflection Probe Entity successfully created",
|
||||
"Reflection Probe_test: Component added to the entity: True",
|
||||
"Reflection Probe_test: Component removed after UNDO: True",
|
||||
"Reflection Probe_test: Component added after REDO: True",
|
||||
"Reflection Probe_test: Entered game mode: True",
|
||||
"Reflection Probe_test: Exit game mode: True",
|
||||
"Reflection Probe_test: Entity disabled initially: True",
|
||||
"Reflection Probe_test: Entity enabled after adding required components: True",
|
||||
"Reflection Probe_test: Cubemap is generated: True",
|
||||
"Reflection Probe_test: Entity is hidden: True",
|
||||
"Reflection Probe_test: Entity is shown: True",
|
||||
"Reflection Probe_test: Entity deleted: True",
|
||||
"Reflection Probe_test: UNDO entity deletion works: True",
|
||||
"Reflection Probe_test: REDO entity deletion works: True",
|
||||
]
|
||||
|
||||
unexpected_lines = [
|
||||
|
||||
+17
-17
@@ -35,32 +35,32 @@ public:
|
||||
Q2DViewport(QWidget* parent = nullptr);
|
||||
virtual ~Q2DViewport();
|
||||
|
||||
virtual void SetType(EViewportType type);
|
||||
virtual EViewportType GetType() const { return m_viewType; }
|
||||
virtual float GetAspectRatio() const { return 1.0f; };
|
||||
void SetType(EViewportType type) override;
|
||||
EViewportType GetType() const override { return m_viewType; }
|
||||
float GetAspectRatio() const override { return 1.0f; };
|
||||
|
||||
virtual void ResetContent();
|
||||
virtual void UpdateContent(int flags);
|
||||
void ResetContent() override;
|
||||
void UpdateContent(int flags) override;
|
||||
|
||||
public slots:
|
||||
// Called every frame to update viewport.
|
||||
virtual void Update();
|
||||
void Update() override;
|
||||
|
||||
public:
|
||||
//! Map world space position to viewport position.
|
||||
virtual QPoint WorldToView(const Vec3& wp) const;
|
||||
QPoint WorldToView(const Vec3& wp) const override;
|
||||
|
||||
virtual QPoint WorldToViewParticleEditor(const Vec3& wp, int width, int height) const; //Eric@conffx
|
||||
QPoint WorldToViewParticleEditor(const Vec3& wp, int width, int height) const override; //Eric@conffx
|
||||
|
||||
//! Map viewport position to world space position.
|
||||
virtual Vec3 ViewToWorld(const QPoint& vp, bool* collideWithTerrain = nullptr, bool onlyTerrain = false, bool bSkipVegetation = false, bool bTestRenderMesh = false, bool* collideWithObject = nullptr) const override;
|
||||
Vec3 ViewToWorld(const QPoint& vp, bool* collideWithTerrain = nullptr, bool onlyTerrain = false, bool bSkipVegetation = false, bool bTestRenderMesh = false, bool* collideWithObject = nullptr) const override;
|
||||
//! Map viewport position to world space ray from camera.
|
||||
virtual void ViewToWorldRay(const QPoint& vp, Vec3& raySrc, Vec3& rayDir) const;
|
||||
void ViewToWorldRay(const QPoint& vp, Vec3& raySrc, Vec3& rayDir) const override;
|
||||
|
||||
void OnTitleMenu(QMenu* menu) override;
|
||||
|
||||
virtual bool HitTest(const QPoint& point, HitContext& hitInfo) override;
|
||||
virtual bool IsBoundsVisible(const AABB& box) const;
|
||||
bool HitTest(const QPoint& point, HitContext& hitInfo) override;
|
||||
bool IsBoundsVisible(const AABB& box) const override;
|
||||
|
||||
// ovverided from CViewport.
|
||||
float GetScreenScaleFactor(const Vec3& worldPoint) const override;
|
||||
@@ -111,8 +111,8 @@ protected:
|
||||
virtual void SetZoom(float fZoomFactor, const QPoint& center);
|
||||
|
||||
// overrides from CViewport.
|
||||
virtual void MakeConstructionPlane(int axis);
|
||||
virtual const Matrix34& GetConstructionMatrix(RefCoordSys coordSys);
|
||||
void MakeConstructionPlane(int axis) override;
|
||||
const Matrix34& GetConstructionMatrix(RefCoordSys coordSys) override;
|
||||
|
||||
//! Calculate view transformation matrix.
|
||||
virtual void CalculateViewTM();
|
||||
@@ -146,9 +146,9 @@ protected:
|
||||
void showEvent(QShowEvent* event) override;
|
||||
void paintEvent(QPaintEvent* event) override;
|
||||
int OnCreate();
|
||||
void OnRButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point);
|
||||
void OnRButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point);
|
||||
void OnMouseWheel(Qt::KeyboardModifiers modifiers, short zDelta, const QPoint& pt);
|
||||
void OnRButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point) override;
|
||||
void OnRButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point) override;
|
||||
void OnMouseWheel(Qt::KeyboardModifiers modifiers, short zDelta, const QPoint& pt) override;
|
||||
void OnDestroy();
|
||||
|
||||
protected:
|
||||
|
||||
@@ -353,7 +353,7 @@ public:
|
||||
m_actionHandlers[id] = std::bind(method, object, id);
|
||||
}
|
||||
|
||||
bool eventFilter(QObject* watched, QEvent* event);
|
||||
bool eventFilter(QObject* watched, QEvent* event) override;
|
||||
|
||||
// returns false if the action was already inserted, indicating that the action should not be processed again
|
||||
bool InsertActionExecuting(int id);
|
||||
|
||||
@@ -197,7 +197,7 @@ private:
|
||||
|
||||
virtual void OnSequenceRemoved(CTrackViewSequence* pSequence) override;
|
||||
|
||||
virtual void OnEditorNotifyEvent(EEditorNotifyEvent event);
|
||||
virtual void OnEditorNotifyEvent(EEditorNotifyEvent event) override;
|
||||
|
||||
void AnimateActiveSequence();
|
||||
|
||||
|
||||
+17
-17
@@ -40,57 +40,57 @@ public:
|
||||
//! Set library name.
|
||||
virtual void SetName(const QString& name);
|
||||
//! Get library name.
|
||||
const QString& GetName() const;
|
||||
const QString& GetName() const override;
|
||||
|
||||
//! Set new filename for this library.
|
||||
virtual bool SetFilename(const QString& filename, [[maybe_unused]] bool checkForUnique = true) { m_filename = filename.toLower(); return true; };
|
||||
const QString& GetFilename() const { return m_filename; };
|
||||
const QString& GetFilename() const override { return m_filename; };
|
||||
|
||||
virtual bool Save() = 0;
|
||||
virtual bool Load(const QString& filename) = 0;
|
||||
virtual void Serialize(XmlNodeRef& node, bool bLoading) = 0;
|
||||
bool Save() override = 0;
|
||||
bool Load(const QString& filename) override = 0;
|
||||
void Serialize(XmlNodeRef& node, bool bLoading) override = 0;
|
||||
|
||||
//! Mark library as modified.
|
||||
void SetModified(bool bModified = true);
|
||||
void SetModified(bool bModified = true) override;
|
||||
//! Check if library was modified.
|
||||
bool IsModified() const { return m_bModified; };
|
||||
bool IsModified() const override { return m_bModified; };
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Working with items.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Add a new prototype to library.
|
||||
void AddItem(IDataBaseItem* item, bool bRegister = true);
|
||||
void AddItem(IDataBaseItem* item, bool bRegister = true) override;
|
||||
//! Get number of known prototypes.
|
||||
int GetItemCount() const { return static_cast<int>(m_items.size()); }
|
||||
int GetItemCount() const override { return static_cast<int>(m_items.size()); }
|
||||
//! Get prototype by index.
|
||||
IDataBaseItem* GetItem(int index);
|
||||
IDataBaseItem* GetItem(int index) override;
|
||||
|
||||
//! Delete item by pointer of item.
|
||||
void RemoveItem(IDataBaseItem* item);
|
||||
void RemoveItem(IDataBaseItem* item) override;
|
||||
|
||||
//! Delete all items from library.
|
||||
void RemoveAllItems();
|
||||
void RemoveAllItems() override;
|
||||
|
||||
//! Find library item by name.
|
||||
//! Using linear search.
|
||||
IDataBaseItem* FindItem(const QString& name);
|
||||
IDataBaseItem* FindItem(const QString& name) override;
|
||||
|
||||
//! Check if this library is local level library.
|
||||
bool IsLevelLibrary() const { return m_bLevelLib; };
|
||||
bool IsLevelLibrary() const override { return m_bLevelLib; };
|
||||
|
||||
//! Set library to be level library.
|
||||
void SetLevelLibrary(bool bEnable) { m_bLevelLib = bEnable; };
|
||||
void SetLevelLibrary(bool bEnable) override { m_bLevelLib = bEnable; };
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Return manager for this library.
|
||||
IBaseLibraryManager* GetManager();
|
||||
IBaseLibraryManager* GetManager() override;
|
||||
|
||||
// Saves the library with the main tag defined by the parameter name
|
||||
bool SaveLibrary(const char* name, bool saveEmptyLibrary = false);
|
||||
|
||||
//CONFETTI BEGIN
|
||||
// Used to change the library item order
|
||||
virtual void ChangeItemOrder(CBaseLibraryItem* item, unsigned int newLocation) override;
|
||||
void ChangeItemOrder(CBaseLibraryItem* item, unsigned int newLocation) override;
|
||||
//CONFETTI END
|
||||
|
||||
signals:
|
||||
|
||||
@@ -35,112 +35,112 @@ public:
|
||||
~CBaseLibraryManager();
|
||||
|
||||
//! Clear all libraries.
|
||||
virtual void ClearAll() override;
|
||||
void ClearAll() override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// IDocListener implementation.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual void OnEditorNotifyEvent(EEditorNotifyEvent event) override;
|
||||
void OnEditorNotifyEvent(EEditorNotifyEvent event) override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Library items.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Make a new item in specified library.
|
||||
virtual IDataBaseItem* CreateItem(IDataBaseLibrary* pLibrary) override;
|
||||
IDataBaseItem* CreateItem(IDataBaseLibrary* pLibrary) override;
|
||||
//! Delete item from library and manager.
|
||||
virtual void DeleteItem(IDataBaseItem* pItem) override;
|
||||
void DeleteItem(IDataBaseItem* pItem) override;
|
||||
|
||||
//! Find Item by its GUID.
|
||||
virtual IDataBaseItem* FindItem(REFGUID guid) const;
|
||||
virtual IDataBaseItem* FindItemByName(const QString& fullItemName);
|
||||
virtual IDataBaseItem* LoadItemByName(const QString& fullItemName);
|
||||
IDataBaseItem* FindItem(REFGUID guid) const override;
|
||||
IDataBaseItem* FindItemByName(const QString& fullItemName) override;
|
||||
IDataBaseItem* LoadItemByName(const QString& fullItemName) override;
|
||||
virtual IDataBaseItem* FindItemByName(const char* fullItemName);
|
||||
virtual IDataBaseItem* LoadItemByName(const char* fullItemName);
|
||||
|
||||
virtual IDataBaseItemEnumerator* GetItemEnumerator() override;
|
||||
IDataBaseItemEnumerator* GetItemEnumerator() override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Set item currently selected.
|
||||
virtual void SetSelectedItem(IDataBaseItem* pItem) override;
|
||||
void SetSelectedItem(IDataBaseItem* pItem) override;
|
||||
// Get currently selected item.
|
||||
virtual IDataBaseItem* GetSelectedItem() const override;
|
||||
virtual IDataBaseItem* GetSelectedParentItem() const override;
|
||||
IDataBaseItem* GetSelectedItem() const override;
|
||||
IDataBaseItem* GetSelectedParentItem() const override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Libraries.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Add Item library.
|
||||
virtual IDataBaseLibrary* AddLibrary(const QString& library, bool bIsLevelLibrary = false, bool bIsLoading = true) override;
|
||||
virtual void DeleteLibrary(const QString& library, bool forceDeleteLevel = false) override;
|
||||
IDataBaseLibrary* AddLibrary(const QString& library, bool bIsLevelLibrary = false, bool bIsLoading = true) override;
|
||||
void DeleteLibrary(const QString& library, bool forceDeleteLevel = false) override;
|
||||
//! Get number of libraries.
|
||||
virtual int GetLibraryCount() const override { return static_cast<int>(m_libs.size()); };
|
||||
int GetLibraryCount() const override { return static_cast<int>(m_libs.size()); };
|
||||
//! Get number of modified libraries.
|
||||
virtual int GetModifiedLibraryCount() const override;
|
||||
int GetModifiedLibraryCount() const override;
|
||||
|
||||
//! Get Item library by index.
|
||||
virtual IDataBaseLibrary* GetLibrary(int index) const override;
|
||||
IDataBaseLibrary* GetLibrary(int index) const override;
|
||||
|
||||
//! Get Level Item library.
|
||||
virtual IDataBaseLibrary* GetLevelLibrary() const override;
|
||||
IDataBaseLibrary* GetLevelLibrary() const override;
|
||||
|
||||
//! Find Items Library by name.
|
||||
virtual IDataBaseLibrary* FindLibrary(const QString& library) override;
|
||||
IDataBaseLibrary* FindLibrary(const QString& library) override;
|
||||
|
||||
//! Find Items Library's index by name.
|
||||
int FindLibraryIndex(const QString& library) override;
|
||||
|
||||
//! Load Items library.
|
||||
virtual IDataBaseLibrary* LoadLibrary(const QString& filename, bool bReload = false) override;
|
||||
IDataBaseLibrary* LoadLibrary(const QString& filename, bool bReload = false) override;
|
||||
|
||||
//! Save all modified libraries.
|
||||
virtual void SaveAllLibs() override;
|
||||
void SaveAllLibs() override;
|
||||
|
||||
//! Serialize property manager.
|
||||
virtual void Serialize(XmlNodeRef& node, bool bLoading) override;
|
||||
void Serialize(XmlNodeRef& node, bool bLoading) override;
|
||||
|
||||
//! Export items to game.
|
||||
virtual void Export([[maybe_unused]] XmlNodeRef& node) override {};
|
||||
void Export([[maybe_unused]] XmlNodeRef& node) override {};
|
||||
|
||||
//! Returns unique name base on input name.
|
||||
virtual QString MakeUniqueItemName(const QString& name, const QString& libName = "") override;
|
||||
virtual QString MakeFullItemName(IDataBaseLibrary* pLibrary, const QString& group, const QString& itemName) override;
|
||||
QString MakeUniqueItemName(const QString& name, const QString& libName = "") override;
|
||||
QString MakeFullItemName(IDataBaseLibrary* pLibrary, const QString& group, const QString& itemName) override;
|
||||
|
||||
//! Root node where this library will be saved.
|
||||
virtual QString GetRootNodeName() override = 0;
|
||||
QString GetRootNodeName() override = 0;
|
||||
//! Path to libraries in this manager.
|
||||
virtual QString GetLibsPath() override = 0;
|
||||
QString GetLibsPath() override = 0;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Validate library items for errors.
|
||||
virtual void Validate() override;
|
||||
void Validate() override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual void GatherUsedResources(CUsedResources& resources) override;
|
||||
void GatherUsedResources(CUsedResources& resources) override;
|
||||
|
||||
virtual void AddListener(IDataBaseManagerListener* pListener) override;
|
||||
virtual void RemoveListener(IDataBaseManagerListener* pListener) override;
|
||||
void AddListener(IDataBaseManagerListener* pListener) override;
|
||||
void RemoveListener(IDataBaseManagerListener* pListener) override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual void RegisterItem(CBaseLibraryItem* pItem, REFGUID newGuid) override;
|
||||
virtual void RegisterItem(CBaseLibraryItem* pItem) override;
|
||||
virtual void UnregisterItem(CBaseLibraryItem* pItem) override;
|
||||
void RegisterItem(CBaseLibraryItem* pItem, REFGUID newGuid) override;
|
||||
void RegisterItem(CBaseLibraryItem* pItem) override;
|
||||
void UnregisterItem(CBaseLibraryItem* pItem) override;
|
||||
|
||||
// Only Used internally.
|
||||
virtual void OnRenameItem(CBaseLibraryItem* pItem, const QString& oldName) override;
|
||||
void OnRenameItem(CBaseLibraryItem* pItem, const QString& oldName) override;
|
||||
|
||||
// Called by items to indicated that they have been modified.
|
||||
// Sends item changed event to listeners.
|
||||
virtual void OnItemChanged(IDataBaseItem* pItem) override;
|
||||
virtual void OnUpdateProperties(IDataBaseItem* pItem, bool bRefresh) override;
|
||||
void OnItemChanged(IDataBaseItem* pItem) override;
|
||||
void OnUpdateProperties(IDataBaseItem* pItem, bool bRefresh) override;
|
||||
|
||||
QString MakeFilename(const QString& library);
|
||||
virtual bool IsUniqueFilename(const QString& library) override;
|
||||
bool IsUniqueFilename(const QString& library) override;
|
||||
|
||||
//CONFETTI BEGIN
|
||||
// Used to change the library item order
|
||||
virtual void ChangeLibraryOrder(IDataBaseLibrary* lib, unsigned int newLocation) override;
|
||||
void ChangeLibraryOrder(IDataBaseLibrary* lib, unsigned int newLocation) override;
|
||||
|
||||
virtual bool SetLibraryName(CBaseLibrary* lib, const QString& name) override;
|
||||
bool SetLibraryName(CBaseLibrary* lib, const QString& name) override;
|
||||
|
||||
protected:
|
||||
void SplitFullItemName(const QString& fullItemName, QString& libraryName, QString& itemName);
|
||||
@@ -199,8 +199,8 @@ public:
|
||||
m_pMap = pMap;
|
||||
m_iterator = m_pMap->begin();
|
||||
}
|
||||
virtual void Release() { delete this; };
|
||||
virtual IDataBaseItem* GetFirst()
|
||||
void Release() override { delete this; };
|
||||
IDataBaseItem* GetFirst() override
|
||||
{
|
||||
m_iterator = m_pMap->begin();
|
||||
if (m_iterator == m_pMap->end())
|
||||
@@ -209,7 +209,7 @@ public:
|
||||
}
|
||||
return m_iterator->second;
|
||||
}
|
||||
virtual IDataBaseItem* GetNext()
|
||||
IDataBaseItem* GetNext() override
|
||||
{
|
||||
if (m_iterator != m_pMap->end())
|
||||
{
|
||||
|
||||
@@ -81,7 +81,7 @@ protected:
|
||||
HIT_SPLINE,
|
||||
};
|
||||
|
||||
void paintEvent(QPaintEvent* e);
|
||||
void paintEvent(QPaintEvent* e) override;
|
||||
void resizeEvent(QResizeEvent* event) override;
|
||||
void mousePressEvent(QMouseEvent* event) override;
|
||||
void mouseReleaseEvent(QMouseEvent* event) override;
|
||||
|
||||
@@ -83,7 +83,7 @@ protected Q_SLOTS:
|
||||
void OnIndexDoubleClicked(const QModelIndex& index);
|
||||
|
||||
protected:
|
||||
virtual void OnFileMonitorChange(const SFileChangeInfo& rChange);
|
||||
void OnFileMonitorChange(const SFileChangeInfo& rChange) override;
|
||||
void contextMenuEvent(QContextMenuEvent* e) override;
|
||||
|
||||
void InitTree();
|
||||
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
void SetVariable(IVariable* pVariable) override;
|
||||
void SyncReflectedVarToIVar(IVariable* pVariable) override;
|
||||
void SyncIVarToReflectedVar(IVariable* pVariable) override;
|
||||
virtual void OnVariableChange(IVariable* var);
|
||||
void OnVariableChange(IVariable* var) override;
|
||||
CReflectedVar* GetReflectedVar() override { return m_reflectedVar.data(); }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -159,15 +159,15 @@ public:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// IKeyTimeSet Implementation
|
||||
virtual int GetKeyTimeCount() const;
|
||||
virtual float GetKeyTime(int index) const;
|
||||
virtual void MoveKeyTimes(int numChanges, int* indices, float scale, float offset, bool copyKeys);
|
||||
virtual bool GetKeyTimeSelected(int index) const;
|
||||
virtual void SetKeyTimeSelected(int index, bool selected);
|
||||
virtual int GetKeyCount(int index) const;
|
||||
virtual int GetKeyCountBound() const;
|
||||
virtual void BeginEdittingKeyTimes();
|
||||
virtual void EndEdittingKeyTimes();
|
||||
int GetKeyTimeCount() const override;
|
||||
float GetKeyTime(int index) const override;
|
||||
void MoveKeyTimes(int numChanges, int* indices, float scale, float offset, bool copyKeys) override;
|
||||
bool GetKeyTimeSelected(int index) const override;
|
||||
void SetKeyTimeSelected(int index, bool selected) override;
|
||||
int GetKeyCount(int index) const override;
|
||||
int GetKeyCountBound() const override;
|
||||
void BeginEdittingKeyTimes() override;
|
||||
void EndEdittingKeyTimes() override;
|
||||
|
||||
void SetEditLock(bool bLock) { m_bEditLock = bLock; }
|
||||
|
||||
@@ -361,8 +361,8 @@ public:
|
||||
SplineWidget(QWidget* parent);
|
||||
virtual ~SplineWidget();
|
||||
|
||||
void update() { QWidget::update(); }
|
||||
void update(const QRect& rect) { QWidget::update(rect); }
|
||||
void update() override { QWidget::update(); }
|
||||
void update(const QRect& rect) override { QWidget::update(rect); }
|
||||
|
||||
QPoint mapFromGlobal(const QPoint& point) const override { return QWidget::mapFromGlobal(point); }
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
void setGeometry(const QRect& r) override { QWidget::setGeometry(r); }
|
||||
|
||||
void SetTimeRange(const Range& r) { m_timeRange = r; }
|
||||
void SetTimeMarker(float fTime);
|
||||
void SetTimeMarker(float fTime) override;
|
||||
float GetTimeMarker() const { return m_fTimeMarker; }
|
||||
|
||||
void SetZoom(float fZoom);
|
||||
@@ -113,7 +113,7 @@ protected:
|
||||
void OnLButtonUp(const QPoint& point, Qt::KeyboardModifiers modifiers);
|
||||
void OnRButtonDown(const QPoint& point, Qt::KeyboardModifiers modifiers);
|
||||
void OnRButtonUp(const QPoint& point, Qt::KeyboardModifiers modifiers);
|
||||
void keyPressEvent(QKeyEvent* event);
|
||||
void keyPressEvent(QKeyEvent* event) override;
|
||||
|
||||
// Drawing functions
|
||||
float ClientToTime(int x);
|
||||
|
||||
@@ -462,6 +462,7 @@ class CCryDocManager
|
||||
CCrySingleDocTemplate* m_pDefTemplate = nullptr;
|
||||
public:
|
||||
CCryDocManager();
|
||||
virtual ~CCryDocManager() = default;
|
||||
CCrySingleDocTemplate* SetDefaultTemplate(CCrySingleDocTemplate* pNew);
|
||||
// Copied from MFC to get rid of the silly ugly unoverridable doc-type pick dialog
|
||||
virtual void OnFileNew();
|
||||
|
||||
@@ -79,6 +79,8 @@ CPythonScriptsDialog::CPythonScriptsDialog(QWidget* parent)
|
||||
GetGemSourcePathsVisitor(AZ::SettingsRegistryInterface& settingsRegistry)
|
||||
: m_settingsRegistry(settingsRegistry)
|
||||
{}
|
||||
|
||||
using AZ::SettingsRegistryInterface::Visitor::Visit;
|
||||
void Visit(AZStd::string_view path, AZStd::string_view, AZ::SettingsRegistryInterface::Type,
|
||||
AZStd::string_view value) override
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace EditorInternal
|
||||
|
||||
void RegisterCoreComponents() override;
|
||||
|
||||
AZ::ComponentTypeList GetRequiredSystemComponents() const;
|
||||
AZ::ComponentTypeList GetRequiredSystemComponents() const override;
|
||||
|
||||
void StartCommon(AZ::Entity* systemEntity) override;
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@ namespace Export
|
||||
public:
|
||||
CMesh();
|
||||
|
||||
virtual int GetFaceCount() const { return static_cast<int>(m_faces.size()); }
|
||||
virtual const Face* GetFaceBuffer() const { return m_faces.size() ? &m_faces[0] : 0; }
|
||||
int GetFaceCount() const override { return static_cast<int>(m_faces.size()); }
|
||||
const Face* GetFaceBuffer() const override { return !m_faces.empty() ? &m_faces[0] : nullptr; }
|
||||
|
||||
private:
|
||||
std::vector<Face> m_faces;
|
||||
@@ -54,13 +54,13 @@ namespace Export
|
||||
CObject(const char* pName);
|
||||
|
||||
int GetVertexCount() const override { return static_cast<int>(m_vertices.size()); }
|
||||
const Vector3D* GetVertexBuffer() const override { return m_vertices.size() ? &m_vertices[0] : nullptr; }
|
||||
const Vector3D* GetVertexBuffer() const override { return !m_vertices.empty() ? &m_vertices[0] : nullptr; }
|
||||
|
||||
int GetNormalCount() const override { return static_cast<int>(m_normals.size()); }
|
||||
const Vector3D* GetNormalBuffer() const override { return m_normals.size() ? &m_normals[0] : nullptr; }
|
||||
const Vector3D* GetNormalBuffer() const override { return !m_normals.empty() ? &m_normals[0] : nullptr; }
|
||||
|
||||
int GetTexCoordCount() const override { return static_cast<int>(m_texCoords.size()); }
|
||||
const UV* GetTexCoordBuffer() const override { return m_texCoords.size() ? &m_texCoords[0] : nullptr; }
|
||||
const UV* GetTexCoordBuffer() const override { return !m_texCoords.empty() ? &m_texCoords[0] : nullptr; }
|
||||
|
||||
int GetMeshCount() const override { return static_cast<int>(m_meshes.size()); }
|
||||
Mesh* GetMesh(int index) const override { return m_meshes[index]; }
|
||||
@@ -68,9 +68,9 @@ namespace Export
|
||||
size_t MeshHash() const override{return m_MeshHash; }
|
||||
|
||||
void SetMaterialName(const char* pName);
|
||||
virtual int GetEntityAnimationDataCount() const {return static_cast<int>(m_entityAnimData.size()); }
|
||||
virtual const EntityAnimData* GetEntityAnimationData(int index) const {return &m_entityAnimData[index]; }
|
||||
virtual void SetEntityAnimationData(EntityAnimData entityData){ m_entityAnimData.push_back(entityData); };
|
||||
int GetEntityAnimationDataCount() const override {return static_cast<int>(m_entityAnimData.size()); }
|
||||
const EntityAnimData* GetEntityAnimationData(int index) const override {return &m_entityAnimData[index]; }
|
||||
void SetEntityAnimationData(EntityAnimData entityData) override{ m_entityAnimData.push_back(entityData); };
|
||||
void SetLastPtr(CBaseObject* pObject){m_pLastObject = pObject; };
|
||||
CBaseObject* GetLastObjectPtr(){return m_pLastObject; };
|
||||
|
||||
@@ -92,9 +92,11 @@ namespace Export
|
||||
: public IData
|
||||
{
|
||||
public:
|
||||
virtual int GetObjectCount() const { return static_cast<int>(m_objects.size()); }
|
||||
virtual Object* GetObject(int index) const { return m_objects[index]; }
|
||||
virtual Object* AddObject(const char* objectName);
|
||||
virtual ~CData() = default;
|
||||
|
||||
int GetObjectCount() const override { return static_cast<int>(m_objects.size()); }
|
||||
Object* GetObject(int index) const override { return m_objects[index]; }
|
||||
Object* AddObject(const char* objectName) override;
|
||||
void Clear();
|
||||
|
||||
private:
|
||||
@@ -117,7 +119,7 @@ public:
|
||||
|
||||
//! Register exporter
|
||||
//! return true if succeed, otherwise false
|
||||
virtual bool RegisterExporter(IExporter* pExporter);
|
||||
bool RegisterExporter(IExporter* pExporter) override;
|
||||
|
||||
//! Export specified geometry
|
||||
//! return true if succeed, otherwise false
|
||||
@@ -139,15 +141,15 @@ public:
|
||||
|
||||
//! Exports the stat obj to the obj file specified
|
||||
//! returns true if succeeded, otherwise false
|
||||
virtual bool ExportSingleStatObj(IStatObj* pStatObj, const char* filename);
|
||||
bool ExportSingleStatObj(IStatObj* pStatObj, const char* filename) override;
|
||||
|
||||
void SetBakedKeysSequenceExport(bool bBaked){m_bBakedKeysSequenceExport = bBaked; };
|
||||
|
||||
void SaveNodeKeysTimeToXML();
|
||||
|
||||
private:
|
||||
void AddMesh(Export::CObject* pObj, const IIndexedMesh* pIndMesh, Matrix34A* pTm = 0);
|
||||
bool AddStatObj(Export::CObject* pObj, IStatObj* pStatObj, Matrix34A* pTm = 0);
|
||||
void AddMesh(Export::CObject* pObj, const IIndexedMesh* pIndMesh, Matrix34A* pTm = nullptr);
|
||||
bool AddStatObj(Export::CObject* pObj, IStatObj* pStatObj, Matrix34A* pTm = nullptr);
|
||||
bool AddMeshes(Export::CObject* pObj);
|
||||
bool AddObject(CBaseObject* pBaseObj);
|
||||
void SolveHierarchy();
|
||||
|
||||
+141
-141
@@ -79,70 +79,70 @@ public:
|
||||
|
||||
|
||||
void SetGameEngine(CGameEngine* ge);
|
||||
void DeleteThis() { delete this; };
|
||||
IEditorClassFactory* GetClassFactory();
|
||||
CEditorCommandManager* GetCommandManager() { return m_pCommandManager; };
|
||||
ICommandManager* GetICommandManager() { return m_pCommandManager; }
|
||||
void ExecuteCommand(const char* sCommand, ...);
|
||||
void ExecuteCommand(const QString& command);
|
||||
void SetDocument(CCryEditDoc* pDoc);
|
||||
CCryEditDoc* GetDocument() const;
|
||||
void DeleteThis() override { delete this; };
|
||||
IEditorClassFactory* GetClassFactory() override;
|
||||
CEditorCommandManager* GetCommandManager() override { return m_pCommandManager; };
|
||||
ICommandManager* GetICommandManager() override { return m_pCommandManager; }
|
||||
void ExecuteCommand(const char* sCommand, ...) override;
|
||||
void ExecuteCommand(const QString& command) override;
|
||||
void SetDocument(CCryEditDoc* pDoc) override;
|
||||
CCryEditDoc* GetDocument() const override;
|
||||
bool IsLevelLoaded() const override;
|
||||
void SetModifiedFlag(bool modified = true);
|
||||
void SetModifiedModule(EModifiedModule eModifiedModule, bool boSet = true);
|
||||
bool IsLevelExported() const;
|
||||
bool SetLevelExported(bool boExported = true);
|
||||
void SetModifiedFlag(bool modified = true) override;
|
||||
void SetModifiedModule(EModifiedModule eModifiedModule, bool boSet = true) override;
|
||||
bool IsLevelExported() const override;
|
||||
bool SetLevelExported(bool boExported = true) override;
|
||||
void InitFinished();
|
||||
bool IsModified();
|
||||
bool IsInitialized() const{ return m_bInitialized; }
|
||||
bool SaveDocument();
|
||||
ISystem* GetSystem();
|
||||
void WriteToConsole(const char* string) { CLogFile::WriteLine(string); };
|
||||
void WriteToConsole(const QString& string) { CLogFile::WriteLine(string); };
|
||||
bool IsModified() override;
|
||||
bool IsInitialized() const override{ return m_bInitialized; }
|
||||
bool SaveDocument() override;
|
||||
ISystem* GetSystem() override;
|
||||
void WriteToConsole(const char* string) override { CLogFile::WriteLine(string); };
|
||||
void WriteToConsole(const QString& string) override { CLogFile::WriteLine(string); };
|
||||
// Change the message in the status bar
|
||||
void SetStatusText(const QString& pszString);
|
||||
virtual IMainStatusBar* GetMainStatusBar() override;
|
||||
bool ShowConsole([[maybe_unused]] bool show)
|
||||
void SetStatusText(const QString& pszString) override;
|
||||
IMainStatusBar* GetMainStatusBar() override;
|
||||
bool ShowConsole([[maybe_unused]] bool show) override
|
||||
{
|
||||
//if (AfxGetMainWnd())return ((CMainFrame *) (AfxGetMainWnd()))->ShowConsole(show);
|
||||
return false;
|
||||
}
|
||||
|
||||
void SetConsoleVar(const char* var, float value);
|
||||
float GetConsoleVar(const char* var);
|
||||
void SetConsoleVar(const char* var, float value) override;
|
||||
float GetConsoleVar(const char* var) override;
|
||||
//! Query main window of the editor
|
||||
QMainWindow* GetEditorMainWindow() const override
|
||||
{
|
||||
return MainWindow::instance();
|
||||
};
|
||||
|
||||
QString GetPrimaryCDFolder();
|
||||
QString GetPrimaryCDFolder() override;
|
||||
QString GetLevelName() override;
|
||||
QString GetLevelFolder();
|
||||
QString GetLevelDataFolder();
|
||||
QString GetSearchPath(EEditorPathName path);
|
||||
QString GetResolvedUserFolder();
|
||||
bool ExecuteConsoleApp(const QString& CommandLine, QString& OutputText, bool bNoTimeOut = false, bool bShowWindow = false);
|
||||
virtual bool IsInGameMode() override;
|
||||
virtual void SetInGameMode(bool inGame) override;
|
||||
virtual bool IsInSimulationMode() override;
|
||||
virtual bool IsInTestMode() override;
|
||||
virtual bool IsInPreviewMode() override;
|
||||
virtual bool IsInConsolewMode() override;
|
||||
virtual bool IsInLevelLoadTestMode() override;
|
||||
virtual bool IsInMatEditMode() override { return m_bMatEditMode; }
|
||||
QString GetLevelFolder() override;
|
||||
QString GetLevelDataFolder() override;
|
||||
QString GetSearchPath(EEditorPathName path) override;
|
||||
QString GetResolvedUserFolder() override;
|
||||
bool ExecuteConsoleApp(const QString& CommandLine, QString& OutputText, bool bNoTimeOut = false, bool bShowWindow = false) override;
|
||||
bool IsInGameMode() override;
|
||||
void SetInGameMode(bool inGame) override;
|
||||
bool IsInSimulationMode() override;
|
||||
bool IsInTestMode() override;
|
||||
bool IsInPreviewMode() override;
|
||||
bool IsInConsolewMode() override;
|
||||
bool IsInLevelLoadTestMode() override;
|
||||
bool IsInMatEditMode() override { return m_bMatEditMode; }
|
||||
|
||||
//! Enables/Disable updates of editor.
|
||||
void EnableUpdate(bool enable) { m_bUpdates = enable; };
|
||||
void EnableUpdate(bool enable) override { m_bUpdates = enable; };
|
||||
//! Enable/Disable accelerator table, (Enabled by default).
|
||||
void EnableAcceleratos(bool bEnable);
|
||||
CGameEngine* GetGameEngine() { return m_pGameEngine; };
|
||||
CDisplaySettings* GetDisplaySettings() { return m_pDisplaySettings; };
|
||||
const SGizmoParameters& GetGlobalGizmoParameters();
|
||||
CBaseObject* NewObject(const char* typeName, const char* fileName = "", const char* name = "", float x = 0.0f, float y = 0.0f, float z = 0.0f, bool modifyDoc = true);
|
||||
void DeleteObject(CBaseObject* obj);
|
||||
CBaseObject* CloneObject(CBaseObject* obj);
|
||||
IObjectManager* GetObjectManager();
|
||||
void EnableAcceleratos(bool bEnable) override;
|
||||
CGameEngine* GetGameEngine() override { return m_pGameEngine; };
|
||||
CDisplaySettings* GetDisplaySettings() override { return m_pDisplaySettings; };
|
||||
const SGizmoParameters& GetGlobalGizmoParameters() override;
|
||||
CBaseObject* NewObject(const char* typeName, const char* fileName = "", const char* name = "", float x = 0.0f, float y = 0.0f, float z = 0.0f, bool modifyDoc = true) override;
|
||||
void DeleteObject(CBaseObject* obj) override;
|
||||
CBaseObject* CloneObject(CBaseObject* obj) override;
|
||||
IObjectManager* GetObjectManager() override;
|
||||
// This will return a null pointer if CrySystem is not loaded before
|
||||
// Global Sandbox Settings are loaded from the registry before CrySystem
|
||||
// At that stage GetSettingsManager will return null and xml node in
|
||||
@@ -150,27 +150,27 @@ public:
|
||||
// After m_IEditor is created and CrySystem loaded, it is possible
|
||||
// to feed memory node with all necessary data needed for export
|
||||
// (gSettings.Load() and CXTPDockingPaneManager/CXTPDockingPaneLayout Sandbox layout management)
|
||||
CSettingsManager* GetSettingsManager();
|
||||
CSelectionGroup* GetSelection();
|
||||
int ClearSelection();
|
||||
CBaseObject* GetSelectedObject();
|
||||
void SelectObject(CBaseObject* obj);
|
||||
void LockSelection(bool bLock);
|
||||
bool IsSelectionLocked();
|
||||
CSettingsManager* GetSettingsManager() override;
|
||||
CSelectionGroup* GetSelection() override;
|
||||
int ClearSelection() override;
|
||||
CBaseObject* GetSelectedObject() override;
|
||||
void SelectObject(CBaseObject* obj) override;
|
||||
void LockSelection(bool bLock) override;
|
||||
bool IsSelectionLocked() override;
|
||||
|
||||
IDataBaseManager* GetDBItemManager(EDataBaseItemType itemType);
|
||||
CMusicManager* GetMusicManager() { return m_pMusicManager; };
|
||||
IDataBaseManager* GetDBItemManager(EDataBaseItemType itemType) override;
|
||||
CMusicManager* GetMusicManager() override { return m_pMusicManager; };
|
||||
|
||||
IEditorFileMonitor* GetFileMonitor() override;
|
||||
void RegisterEventLoopHook(IEventLoopHook* pHook) override;
|
||||
void UnregisterEventLoopHook(IEventLoopHook* pHook) override;
|
||||
IIconManager* GetIconManager();
|
||||
float GetTerrainElevation(float x, float y);
|
||||
Editor::EditorQtApplication* GetEditorQtApplication() { return m_QtApplication; }
|
||||
IIconManager* GetIconManager() override;
|
||||
float GetTerrainElevation(float x, float y) override;
|
||||
Editor::EditorQtApplication* GetEditorQtApplication() override { return m_QtApplication; }
|
||||
const QColor& GetColorByName(const QString& name) override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
IMovieSystem* GetMovieSystem()
|
||||
IMovieSystem* GetMovieSystem() override
|
||||
{
|
||||
if (m_pSystem)
|
||||
{
|
||||
@@ -179,37 +179,37 @@ public:
|
||||
return nullptr;
|
||||
};
|
||||
|
||||
CPluginManager* GetPluginManager() { return m_pPluginManager; }
|
||||
CViewManager* GetViewManager();
|
||||
CViewport* GetActiveView();
|
||||
void SetActiveView(CViewport* viewport);
|
||||
CPluginManager* GetPluginManager() override { return m_pPluginManager; }
|
||||
CViewManager* GetViewManager() override;
|
||||
CViewport* GetActiveView() override;
|
||||
void SetActiveView(CViewport* viewport) override;
|
||||
|
||||
CLevelIndependentFileMan* GetLevelIndependentFileMan() { return m_pLevelIndependentFileMan; }
|
||||
CLevelIndependentFileMan* GetLevelIndependentFileMan() override { return m_pLevelIndependentFileMan; }
|
||||
|
||||
void UpdateViews(int flags, const AABB* updateRegion);
|
||||
void ResetViews();
|
||||
void ReloadTrackView();
|
||||
Vec3 GetMarkerPosition() { return m_marker; };
|
||||
void SetMarkerPosition(const Vec3& pos) { m_marker = pos; };
|
||||
void SetSelectedRegion(const AABB& box);
|
||||
void GetSelectedRegion(AABB& box);
|
||||
void UpdateViews(int flags, const AABB* updateRegion) override;
|
||||
void ResetViews() override;
|
||||
void ReloadTrackView() override;
|
||||
Vec3 GetMarkerPosition() override { return m_marker; };
|
||||
void SetMarkerPosition(const Vec3& pos) override { m_marker = pos; };
|
||||
void SetSelectedRegion(const AABB& box) override;
|
||||
void GetSelectedRegion(AABB& box) override;
|
||||
bool AddToolbarItem(uint8 iId, IUIEvent* pIHandler);
|
||||
void SetDataModified();
|
||||
void SetOperationMode(EOperationMode mode);
|
||||
EOperationMode GetOperationMode();
|
||||
void SetDataModified() override;
|
||||
void SetOperationMode(EOperationMode mode) override;
|
||||
EOperationMode GetOperationMode() override;
|
||||
|
||||
ITransformManipulator* ShowTransformManipulator(bool bShow);
|
||||
ITransformManipulator* GetTransformManipulator();
|
||||
void SetAxisConstraints(AxisConstrains axis);
|
||||
AxisConstrains GetAxisConstrains();
|
||||
void SetAxisVectorLock(bool bAxisVectorLock) { m_bAxisVectorLock = bAxisVectorLock; }
|
||||
bool IsAxisVectorLocked() { return m_bAxisVectorLock; }
|
||||
void SetTerrainAxisIgnoreObjects(bool bIgnore);
|
||||
bool IsTerrainAxisIgnoreObjects();
|
||||
void SetReferenceCoordSys(RefCoordSys refCoords);
|
||||
RefCoordSys GetReferenceCoordSys();
|
||||
XmlNodeRef FindTemplate(const QString& templateName);
|
||||
void AddTemplate(const QString& templateName, XmlNodeRef& tmpl);
|
||||
ITransformManipulator* ShowTransformManipulator(bool bShow) override;
|
||||
ITransformManipulator* GetTransformManipulator() override;
|
||||
void SetAxisConstraints(AxisConstrains axis) override;
|
||||
AxisConstrains GetAxisConstrains() override;
|
||||
void SetAxisVectorLock(bool bAxisVectorLock) override { m_bAxisVectorLock = bAxisVectorLock; }
|
||||
bool IsAxisVectorLocked() override { return m_bAxisVectorLock; }
|
||||
void SetTerrainAxisIgnoreObjects(bool bIgnore) override;
|
||||
bool IsTerrainAxisIgnoreObjects() override;
|
||||
void SetReferenceCoordSys(RefCoordSys refCoords) override;
|
||||
RefCoordSys GetReferenceCoordSys() override;
|
||||
XmlNodeRef FindTemplate(const QString& templateName) override;
|
||||
void AddTemplate(const QString& templateName, XmlNodeRef& tmpl) override;
|
||||
|
||||
const QtViewPane* OpenView(QString sViewClassName, bool reuseOpened = true) override;
|
||||
|
||||
@@ -220,87 +220,87 @@ public:
|
||||
*/
|
||||
QWidget* FindView(QString viewClassName) override;
|
||||
|
||||
bool CloseView(const char* sViewClassName);
|
||||
bool SetViewFocus(const char* sViewClassName);
|
||||
bool CloseView(const char* sViewClassName) override;
|
||||
bool SetViewFocus(const char* sViewClassName) override;
|
||||
|
||||
virtual QWidget* OpenWinWidget(WinWidgetId openId) override;
|
||||
virtual WinWidget::WinWidgetManager* GetWinWidgetManager() const override;
|
||||
QWidget* OpenWinWidget(WinWidgetId openId) override;
|
||||
WinWidget::WinWidgetManager* GetWinWidgetManager() const override;
|
||||
|
||||
// close ALL panels related to classId, used when unloading plugins.
|
||||
void CloseView(const GUID& classId);
|
||||
void CloseView(const GUID& classId) override;
|
||||
bool SelectColor(QColor &color, QWidget *parent = 0) override;
|
||||
void Update();
|
||||
SFileVersion GetFileVersion() { return m_fileVersion; };
|
||||
SFileVersion GetProductVersion() { return m_productVersion; };
|
||||
SFileVersion GetFileVersion() override { return m_fileVersion; };
|
||||
SFileVersion GetProductVersion() override { return m_productVersion; };
|
||||
//! Get shader enumerator.
|
||||
CUndoManager* GetUndoManager() { return m_pUndoManager; };
|
||||
void BeginUndo();
|
||||
void RestoreUndo(bool undo);
|
||||
void AcceptUndo(const QString& name);
|
||||
void CancelUndo();
|
||||
void SuperBeginUndo();
|
||||
void SuperAcceptUndo(const QString& name);
|
||||
void SuperCancelUndo();
|
||||
void SuspendUndo();
|
||||
void ResumeUndo();
|
||||
void Undo();
|
||||
void Redo();
|
||||
bool IsUndoRecording();
|
||||
bool IsUndoSuspended();
|
||||
void RecordUndo(IUndoObject* obj);
|
||||
bool FlushUndo(bool isShowMessage = false);
|
||||
bool ClearLastUndoSteps(int steps);
|
||||
bool ClearRedoStack();
|
||||
CUndoManager* GetUndoManager() override { return m_pUndoManager; };
|
||||
void BeginUndo() override;
|
||||
void RestoreUndo(bool undo) override;
|
||||
void AcceptUndo(const QString& name) override;
|
||||
void CancelUndo() override;
|
||||
void SuperBeginUndo() override;
|
||||
void SuperAcceptUndo(const QString& name) override;
|
||||
void SuperCancelUndo() override;
|
||||
void SuspendUndo() override;
|
||||
void ResumeUndo() override;
|
||||
void Undo() override;
|
||||
void Redo() override;
|
||||
bool IsUndoRecording() override;
|
||||
bool IsUndoSuspended() override;
|
||||
void RecordUndo(IUndoObject* obj) override;
|
||||
bool FlushUndo(bool isShowMessage = false) override;
|
||||
bool ClearLastUndoSteps(int steps) override;
|
||||
bool ClearRedoStack() override;
|
||||
//! Retrieve current animation context.
|
||||
CAnimationContext* GetAnimation();
|
||||
CAnimationContext* GetAnimation() override;
|
||||
CTrackViewSequenceManager* GetSequenceManager() override;
|
||||
ITrackViewSequenceManager* GetSequenceManagerInterface() override;
|
||||
|
||||
CToolBoxManager* GetToolBoxManager() { return m_pToolBoxManager; };
|
||||
IErrorReport* GetErrorReport() { return m_pErrorReport; }
|
||||
IErrorReport* GetLastLoadedLevelErrorReport() { return m_pLasLoadedLevelErrorReport; }
|
||||
CToolBoxManager* GetToolBoxManager() override { return m_pToolBoxManager; };
|
||||
IErrorReport* GetErrorReport() override { return m_pErrorReport; }
|
||||
IErrorReport* GetLastLoadedLevelErrorReport() override { return m_pLasLoadedLevelErrorReport; }
|
||||
void StartLevelErrorReportRecording() override;
|
||||
void CommitLevelErrorReport() {SAFE_DELETE(m_pLasLoadedLevelErrorReport); m_pLasLoadedLevelErrorReport = new CErrorReport(*m_pErrorReport); }
|
||||
virtual IFileUtil* GetFileUtil() override { return m_pFileUtil; }
|
||||
void Notify(EEditorNotifyEvent event);
|
||||
void NotifyExcept(EEditorNotifyEvent event, IEditorNotifyListener* listener);
|
||||
void RegisterNotifyListener(IEditorNotifyListener* listener);
|
||||
void UnregisterNotifyListener(IEditorNotifyListener* listener);
|
||||
void CommitLevelErrorReport() override {SAFE_DELETE(m_pLasLoadedLevelErrorReport); m_pLasLoadedLevelErrorReport = new CErrorReport(*m_pErrorReport); }
|
||||
IFileUtil* GetFileUtil() override { return m_pFileUtil; }
|
||||
void Notify(EEditorNotifyEvent event) override;
|
||||
void NotifyExcept(EEditorNotifyEvent event, IEditorNotifyListener* listener) override;
|
||||
void RegisterNotifyListener(IEditorNotifyListener* listener) override;
|
||||
void UnregisterNotifyListener(IEditorNotifyListener* listener) override;
|
||||
//! Register document notifications listener.
|
||||
void RegisterDocListener(IDocListener* listener);
|
||||
void RegisterDocListener(IDocListener* listener) override;
|
||||
//! Unregister document notifications listener.
|
||||
void UnregisterDocListener(IDocListener* listener);
|
||||
void UnregisterDocListener(IDocListener* listener) override;
|
||||
//! Retrieve interface to the source control.
|
||||
ISourceControl* GetSourceControl();
|
||||
ISourceControl* GetSourceControl() override;
|
||||
//! Retrieve true if source control is provided and enabled in settings
|
||||
bool IsSourceControlAvailable() override;
|
||||
//! Only returns true if source control is both available AND currently connected and functioning
|
||||
bool IsSourceControlConnected() override;
|
||||
//! Setup Material Editor mode
|
||||
void SetMatEditMode(bool bIsMatEditMode);
|
||||
CUIEnumsDatabase* GetUIEnumsDatabase() { return m_pUIEnumsDatabase; };
|
||||
void AddUIEnums();
|
||||
void ReduceMemory();
|
||||
CUIEnumsDatabase* GetUIEnumsDatabase() override { return m_pUIEnumsDatabase; };
|
||||
void AddUIEnums() override;
|
||||
void ReduceMemory() override;
|
||||
// Get Export manager
|
||||
IExportManager* GetExportManager();
|
||||
IExportManager* GetExportManager() override;
|
||||
// Set current configuration spec of the editor.
|
||||
void SetEditorConfigSpec(ESystemConfigSpec spec, ESystemConfigPlatform platform);
|
||||
ESystemConfigSpec GetEditorConfigSpec() const;
|
||||
ESystemConfigPlatform GetEditorConfigPlatform() const;
|
||||
void ReloadTemplates();
|
||||
void SetEditorConfigSpec(ESystemConfigSpec spec, ESystemConfigPlatform platform) override;
|
||||
ESystemConfigSpec GetEditorConfigSpec() const override;
|
||||
ESystemConfigPlatform GetEditorConfigPlatform() const override;
|
||||
void ReloadTemplates() override;
|
||||
void AddErrorMessage(const QString& text, const QString& caption);
|
||||
virtual void ShowStatusText(bool bEnable);
|
||||
void ShowStatusText(bool bEnable) override;
|
||||
|
||||
void OnObjectContextMenuOpened(QMenu* pMenu, const CBaseObject* pObject);
|
||||
virtual void RegisterObjectContextMenuExtension(TContextMenuExtensionFunc func) override;
|
||||
void RegisterObjectContextMenuExtension(TContextMenuExtensionFunc func) override;
|
||||
|
||||
virtual SSystemGlobalEnvironment* GetEnv() override;
|
||||
virtual IBaseLibraryManager* GetMaterialManagerLibrary() override; // Vladimir@Conffx
|
||||
virtual IEditorMaterialManager* GetIEditorMaterialManager() override; // Vladimir@Conffx
|
||||
virtual IImageUtil* GetImageUtil() override; // Vladimir@conffx
|
||||
virtual SEditorSettings* GetEditorSettings() override;
|
||||
virtual IEditorPanelUtils* GetEditorPanelUtils() override;
|
||||
virtual ILogFile* GetLogFile() override { return m_pLogFile; }
|
||||
SSystemGlobalEnvironment* GetEnv() override;
|
||||
IBaseLibraryManager* GetMaterialManagerLibrary() override; // Vladimir@Conffx
|
||||
IEditorMaterialManager* GetIEditorMaterialManager() override; // Vladimir@Conffx
|
||||
IImageUtil* GetImageUtil() override; // Vladimir@conffx
|
||||
SEditorSettings* GetEditorSettings() override;
|
||||
IEditorPanelUtils* GetEditorPanelUtils() override;
|
||||
ILogFile* GetLogFile() override { return m_pLogFile; }
|
||||
|
||||
void UnloadPlugins() override;
|
||||
void LoadPlugins() override;
|
||||
|
||||
@@ -23,7 +23,7 @@ class LevelTreeModelFilter
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit LevelTreeModelFilter(QObject* parent = nullptr);
|
||||
bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const;
|
||||
bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override;
|
||||
void setFilterText(const QString&);
|
||||
QVariant data(const QModelIndex& index, int role) const override;
|
||||
private:
|
||||
|
||||
@@ -25,6 +25,8 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
virtual ~CEditorMock() = default;
|
||||
|
||||
MOCK_METHOD0(DeleteThis, void());
|
||||
MOCK_METHOD0(GetSystem, ISystem*());
|
||||
MOCK_METHOD0(GetClassFactory, IEditorClassFactory* ());
|
||||
|
||||
@@ -35,21 +35,21 @@ public:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Ovverides from CGizmo
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual void GetWorldBounds(AABB& bbox);
|
||||
virtual void Display(DisplayContext& dc);
|
||||
virtual bool HitTest(HitContext& hc);
|
||||
virtual const Matrix34& GetMatrix() const;
|
||||
void GetWorldBounds(AABB& bbox) override;
|
||||
void Display(DisplayContext& dc) override;
|
||||
bool HitTest(HitContext& hc) override;
|
||||
const Matrix34& GetMatrix() const override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// ITransformManipulator implementation.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual Matrix34 GetTransformation(RefCoordSys coordSys, IDisplayViewport* view = nullptr) const;
|
||||
virtual void SetTransformation(RefCoordSys coordSys, const Matrix34& tm);
|
||||
virtual bool HitTestManipulator(HitContext& hc);
|
||||
virtual bool MouseCallback(CViewport* view, EMouseEvent event, QPoint& point, int nFlags);
|
||||
virtual void SetAlwaysUseLocal(bool on)
|
||||
Matrix34 GetTransformation(RefCoordSys coordSys, IDisplayViewport* view = nullptr) const override;
|
||||
void SetTransformation(RefCoordSys coordSys, const Matrix34& tm) override;
|
||||
bool HitTestManipulator(HitContext& hc) override;
|
||||
bool MouseCallback(CViewport* view, EMouseEvent event, QPoint& point, int nFlags) override;
|
||||
void SetAlwaysUseLocal(bool on) override
|
||||
{ m_bAlwaysUseLocal = on; }
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -712,7 +712,7 @@ protected:
|
||||
// May be overridden in derived classes to handle helpers scaling.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual void SetHelperScale([[maybe_unused]] float scale) {};
|
||||
virtual float GetHelperScale() { return 1; };
|
||||
virtual float GetHelperScale() { return 1.0f; };
|
||||
|
||||
void SetNameInternal(const QString& name) { m_name = name; }
|
||||
|
||||
@@ -743,9 +743,6 @@ private:
|
||||
//! Only called once after creation by ObjectManager.
|
||||
void SetClassDesc(CObjectClassDesc* classDesc);
|
||||
|
||||
// From CObject, (not implemented)
|
||||
virtual void Serialize([[maybe_unused]] CArchive& ar) {};
|
||||
|
||||
EScaleWarningLevel GetScaleWarningLevel() const;
|
||||
ERotationWarningLevel GetRotationWarningLevel() const;
|
||||
|
||||
|
||||
@@ -82,14 +82,14 @@ public:
|
||||
// Overrides from CBaseObject.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Return type name of Entity.
|
||||
QString GetTypeDescription() const { return GetEntityClass(); };
|
||||
QString GetTypeDescription() const override { return GetEntityClass(); };
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool IsSameClass(CBaseObject* obj);
|
||||
bool IsSameClass(CBaseObject* obj) override;
|
||||
|
||||
virtual bool Init(IEditor* ie, CBaseObject* prev, const QString& file);
|
||||
virtual void InitVariables();
|
||||
virtual void Done();
|
||||
bool Init(IEditor* ie, CBaseObject* prev, const QString& file) override;
|
||||
void InitVariables() override;
|
||||
void Done() override;
|
||||
|
||||
void DrawExtraLightInfo (DisplayContext& disp);
|
||||
|
||||
@@ -102,29 +102,30 @@ public:
|
||||
void SetEntityPropertyFloat(const char* name, float value);
|
||||
void SetEntityPropertyString(const char* name, const QString& value);
|
||||
|
||||
virtual int MouseCreateCallback(CViewport* view, EMouseEvent event, QPoint& point, int flags);
|
||||
virtual void OnContextMenu(QMenu* menu);
|
||||
int MouseCreateCallback(CViewport* view, EMouseEvent event, QPoint& point, int flags) override;
|
||||
void OnContextMenu(QMenu* menu) override;
|
||||
|
||||
void SetName(const QString& name);
|
||||
void SetSelected(bool bSelect);
|
||||
void SetName(const QString& name) override;
|
||||
void SetSelected(bool bSelect) override;
|
||||
|
||||
virtual void GetLocalBounds(AABB& box);
|
||||
void GetLocalBounds(AABB& box) override;
|
||||
|
||||
virtual bool HitTest(HitContext& hc);
|
||||
virtual bool HitHelperTest(HitContext& hc);
|
||||
virtual bool HitTestRect(HitContext& hc);
|
||||
void UpdateVisibility(bool bVisible);
|
||||
bool ConvertFromObject(CBaseObject* object);
|
||||
bool HitTest(HitContext& hc) override;
|
||||
bool HitHelperTest(HitContext& hc) override;
|
||||
bool HitTestRect(HitContext& hc) override;
|
||||
void UpdateVisibility(bool bVisible) override;
|
||||
bool ConvertFromObject(CBaseObject* object) override;
|
||||
|
||||
virtual void Serialize(CObjectArchive& ar);
|
||||
virtual void PostLoad(CObjectArchive& ar);
|
||||
using CBaseObject::Serialize;
|
||||
void Serialize(CObjectArchive& ar) override;
|
||||
void PostLoad(CObjectArchive& ar) override;
|
||||
|
||||
XmlNodeRef Export(const QString& levelPath, XmlNodeRef& xmlNode);
|
||||
XmlNodeRef Export(const QString& levelPath, XmlNodeRef& xmlNode) override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void OnEvent(ObjectEvent event);
|
||||
void OnEvent(ObjectEvent event) override;
|
||||
|
||||
virtual void SetTransformDelegate(ITransformDelegate* pTransformDelegate) override;
|
||||
void SetTransformDelegate(ITransformDelegate* pTransformDelegate) override;
|
||||
|
||||
// Set attach flags and target
|
||||
enum EAttachmentType
|
||||
@@ -139,15 +140,15 @@ public:
|
||||
EAttachmentType GetAttachType() const { return m_attachmentType; }
|
||||
QString GetAttachTarget() const { return m_attachmentTarget; }
|
||||
|
||||
virtual void SetHelperScale(float scale);
|
||||
virtual float GetHelperScale();
|
||||
void SetHelperScale(float scale) override;
|
||||
float GetHelperScale() override;
|
||||
|
||||
virtual void GatherUsedResources(CUsedResources& resources);
|
||||
virtual bool IsSimilarObject(CBaseObject* pObject);
|
||||
void GatherUsedResources(CUsedResources& resources) override;
|
||||
bool IsSimilarObject(CBaseObject* pObject) override;
|
||||
|
||||
virtual bool HasMeasurementAxis() const { return false; }
|
||||
bool HasMeasurementAxis() const override { return false; }
|
||||
|
||||
virtual bool IsIsolated() const { return false; }
|
||||
bool IsIsolated() const override { return false; }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// END CBaseObject
|
||||
@@ -232,7 +233,7 @@ protected:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Must be called after cloning the object on clone of object.
|
||||
//! This will make sure object references are cloned correctly.
|
||||
virtual void PostClone(CBaseObject* pFromObject, CObjectCloneContext& ctx);
|
||||
void PostClone(CBaseObject* pFromObject, CObjectCloneContext& ctx) override;
|
||||
|
||||
//! Draw default object items.
|
||||
void DrawProjectorPyramid(DisplayContext& dc, float dist);
|
||||
@@ -264,7 +265,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
void DeleteThis() { delete this; };
|
||||
void DeleteThis() override { delete this; };
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Radius callbacks.
|
||||
|
||||
@@ -23,14 +23,14 @@ class CGizmoManager
|
||||
: public IGizmoManager
|
||||
{
|
||||
public:
|
||||
void AddGizmo(CGizmo* gizmo);
|
||||
void RemoveGizmo(CGizmo* gizmo);
|
||||
void AddGizmo(CGizmo* gizmo) override;
|
||||
void RemoveGizmo(CGizmo* gizmo) override;
|
||||
|
||||
int GetGizmoCount() const override;
|
||||
CGizmo* GetGizmoByIndex(int nIndex) const override;
|
||||
|
||||
void Display(DisplayContext& dc);
|
||||
bool HitTest(HitContext& hc);
|
||||
void Display(DisplayContext& dc) override;
|
||||
bool HitTest(HitContext& hc) override;
|
||||
|
||||
void DeleteAllTransformManipulators();
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ public:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Ovverides from CGizmo
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual void SetName(const char* sName);
|
||||
virtual void GetWorldBounds(AABB& bbox);
|
||||
virtual void Display(DisplayContext& dc);
|
||||
virtual bool HitTest(HitContext& hc);
|
||||
void SetName(const char* sName) override;
|
||||
void GetWorldBounds(AABB& bbox) override;
|
||||
void Display(DisplayContext& dc) override;
|
||||
bool HitTest(HitContext& hc) override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void SetObjects(CBaseObject* pObject1, CBaseObject* pObject2, const QString& boneName = "");
|
||||
|
||||
@@ -52,6 +52,7 @@ public:
|
||||
GUID guid;
|
||||
|
||||
public:
|
||||
virtual ~CXMLObjectClassDesc() = default;
|
||||
REFGUID ClassID() override
|
||||
{
|
||||
return guid;
|
||||
|
||||
@@ -103,142 +103,142 @@ public:
|
||||
|
||||
void RegisterObjectClasses();
|
||||
|
||||
CBaseObject* NewObject(CObjectClassDesc* cls, CBaseObject* prev = 0, const QString& file = "", const char* newObjectName = nullptr);
|
||||
CBaseObject* NewObject(const QString& typeName, CBaseObject* prev = 0, const QString& file = "", const char* newEntityName = nullptr);
|
||||
CBaseObject* NewObject(CObjectClassDesc* cls, CBaseObject* prev = 0, const QString& file = "", const char* newObjectName = nullptr) override;
|
||||
CBaseObject* NewObject(const QString& typeName, CBaseObject* prev = 0, const QString& file = "", const char* newEntityName = nullptr) override;
|
||||
|
||||
void DeleteObject(CBaseObject* obj);
|
||||
void DeleteSelection(CSelectionGroup* pSelection);
|
||||
void DeleteAllObjects();
|
||||
CBaseObject* CloneObject(CBaseObject* obj);
|
||||
void DeleteObject(CBaseObject* obj) override;
|
||||
void DeleteSelection(CSelectionGroup* pSelection) override;
|
||||
void DeleteAllObjects() override;
|
||||
CBaseObject* CloneObject(CBaseObject* obj) override;
|
||||
|
||||
void BeginEditParams(CBaseObject* obj, int flags);
|
||||
void EndEditParams(int flags = 0);
|
||||
void BeginEditParams(CBaseObject* obj, int flags) override;
|
||||
void EndEditParams(int flags = 0) override;
|
||||
// Hides all transform manipulators.
|
||||
void HideTransformManipulators();
|
||||
|
||||
//! Get number of objects manager by ObjectManager (not contain sub objects of groups).
|
||||
int GetObjectCount() const;
|
||||
int GetObjectCount() const override;
|
||||
|
||||
//! Get array of objects, managed by manager (not contain sub objects of groups).
|
||||
//! @param layer if 0 get objects for all layers, or layer to get objects from.
|
||||
void GetObjects(CBaseObjectsArray& objects) const;
|
||||
void GetObjects(CBaseObjectsArray& objects) const override;
|
||||
|
||||
//! Get array of objects that pass the filter.
|
||||
//! @param filter The filter functor, return true if you want to get the certain obj, return false if want to skip it.
|
||||
void GetObjects(CBaseObjectsArray& objects, BaseObjectFilterFunctor const& filter) const;
|
||||
void GetObjects(CBaseObjectsArray& objects, BaseObjectFilterFunctor const& filter) const override;
|
||||
|
||||
//! Update objects.
|
||||
void Update();
|
||||
|
||||
//! Display objects on display context.
|
||||
void Display(DisplayContext& dc);
|
||||
void Display(DisplayContext& dc) override;
|
||||
|
||||
//! Called when selecting without selection helpers - this is needed since
|
||||
//! the visible object cache is normally not updated when not displaying helpers.
|
||||
void ForceUpdateVisibleObjectCache(DisplayContext& dc);
|
||||
void ForceUpdateVisibleObjectCache(DisplayContext& dc) override;
|
||||
|
||||
//! Check intersection with objects.
|
||||
//! Find intersection with nearest to ray origin object hit by ray.
|
||||
//! If distance tollerance is specified certain relaxation applied on collision test.
|
||||
//! @return true if hit any object, and fills hitInfo structure.
|
||||
bool HitTest(HitContext& hitInfo);
|
||||
bool HitTest(HitContext& hitInfo) override;
|
||||
|
||||
//! Check intersection with an object.
|
||||
//! @return true if hit, and fills hitInfo structure.
|
||||
bool HitTestObject(CBaseObject* obj, HitContext& hc);
|
||||
bool HitTestObject(CBaseObject* obj, HitContext& hc) override;
|
||||
|
||||
//! Send event to all objects.
|
||||
//! Will cause OnEvent handler to be called on all objects.
|
||||
void SendEvent(ObjectEvent event);
|
||||
void SendEvent(ObjectEvent event) override;
|
||||
|
||||
//! Send event to all objects within given bounding box.
|
||||
//! Will cause OnEvent handler to be called on objects within bounding box.
|
||||
void SendEvent(ObjectEvent event, const AABB& bounds);
|
||||
void SendEvent(ObjectEvent event, const AABB& bounds) override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Find object by ID.
|
||||
CBaseObject* FindObject(REFGUID guid) const;
|
||||
CBaseObject* FindObject(REFGUID guid) const override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Find object by name.
|
||||
CBaseObject* FindObject(const QString& sName) const;
|
||||
CBaseObject* FindObject(const QString& sName) const override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Find objects of given type.
|
||||
void FindObjectsOfType(const QMetaObject* pClass, std::vector<CBaseObject*>& result) override;
|
||||
void FindObjectsOfType(ObjectType type, std::vector<CBaseObject*>& result) override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Find objects which intersect with a given AABB.
|
||||
virtual void FindObjectsInAABB(const AABB& aabb, std::vector<CBaseObject*>& result) const;
|
||||
void FindObjectsInAABB(const AABB& aabb, std::vector<CBaseObject*>& result) const override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Operations on objects.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Makes object visible or invisible.
|
||||
void HideObject(CBaseObject* obj, bool hide);
|
||||
void HideObject(CBaseObject* obj, bool hide) override;
|
||||
//! Shows the last hidden object based on hidden ID
|
||||
void ShowLastHiddenObject();
|
||||
void ShowLastHiddenObject() override;
|
||||
//! Freeze object, making it unselectable.
|
||||
void FreezeObject(CBaseObject* obj, bool freeze);
|
||||
void FreezeObject(CBaseObject* obj, bool freeze) override;
|
||||
//! Unhide all hidden objects.
|
||||
void UnhideAll();
|
||||
void UnhideAll() override;
|
||||
//! Unfreeze all frozen objects.
|
||||
void UnfreezeAll();
|
||||
void UnfreezeAll() override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Object Selection.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool SelectObject(CBaseObject* obj, bool bUseMask = true);
|
||||
void UnselectObject(CBaseObject* obj);
|
||||
bool SelectObject(CBaseObject* obj, bool bUseMask = true) override;
|
||||
void UnselectObject(CBaseObject* obj) override;
|
||||
|
||||
//! Select objects within specified distance from given position.
|
||||
//! Return number of selected objects.
|
||||
int SelectObjects(const AABB& box, bool bUnselect = false);
|
||||
int SelectObjects(const AABB& box, bool bUnselect = false) override;
|
||||
|
||||
virtual void SelectEntities(std::set<CEntityObject*>& s);
|
||||
void SelectEntities(std::set<CEntityObject*>& s) override;
|
||||
|
||||
int MoveObjects(const AABB& box, const Vec3& offset, ImageRotationDegrees rotation, bool bIsCopy = false);
|
||||
int MoveObjects(const AABB& box, const Vec3& offset, ImageRotationDegrees rotation, bool bIsCopy = false) override;
|
||||
|
||||
//! Selects/Unselects all objects within 2d rectangle in given viewport.
|
||||
void SelectObjectsInRect(CViewport* view, const QRect& rect, bool bSelect);
|
||||
void FindObjectsInRect(CViewport* view, const QRect& rect, std::vector<GUID>& guids);
|
||||
void SelectObjectsInRect(CViewport* view, const QRect& rect, bool bSelect) override;
|
||||
void FindObjectsInRect(CViewport* view, const QRect& rect, std::vector<GUID>& guids) override;
|
||||
|
||||
//! Clear default selection set.
|
||||
//! @Return number of objects removed from selection.
|
||||
int ClearSelection();
|
||||
int ClearSelection() override;
|
||||
|
||||
//! Deselect all current selected objects and selects object that were unselected.
|
||||
//! @Return number of selected objects.
|
||||
int InvertSelection();
|
||||
int InvertSelection() override;
|
||||
|
||||
//! Get current selection.
|
||||
CSelectionGroup* GetSelection() const { return m_currSelection; };
|
||||
CSelectionGroup* GetSelection() const override { return m_currSelection; };
|
||||
//! Get named selection.
|
||||
CSelectionGroup* GetSelection(const QString& name) const;
|
||||
CSelectionGroup* GetSelection(const QString& name) const override;
|
||||
// Get selection group names
|
||||
void GetNameSelectionStrings(QStringList& names);
|
||||
void GetNameSelectionStrings(QStringList& names) override;
|
||||
//! Change name of current selection group.
|
||||
//! And store it in list.
|
||||
void NameSelection(const QString& name);
|
||||
void NameSelection(const QString& name) override;
|
||||
//! Set one of name selections as current selection.
|
||||
void SetSelection(const QString& name);
|
||||
void RemoveSelection(const QString& name);
|
||||
void SetSelection(const QString& name) override;
|
||||
void RemoveSelection(const QString& name) override;
|
||||
|
||||
bool IsObjectDeletionAllowed(CBaseObject* pObject);
|
||||
|
||||
//! Delete all objects in selection group.
|
||||
void DeleteSelection();
|
||||
void DeleteSelection() override;
|
||||
|
||||
uint32 ForceID() const{return m_ForceID; }
|
||||
void ForceID(uint32 FID){m_ForceID = FID; }
|
||||
uint32 ForceID() const override{return m_ForceID; }
|
||||
void ForceID(uint32 FID) override{m_ForceID = FID; }
|
||||
|
||||
//! Generates uniq name base on type name of object.
|
||||
QString GenerateUniqueObjectName(const QString& typeName);
|
||||
QString GenerateUniqueObjectName(const QString& typeName) override;
|
||||
//! Register object name in object manager, needed for generating uniq names.
|
||||
void RegisterObjectName(const QString& name);
|
||||
void RegisterObjectName(const QString& name) override;
|
||||
//! Decrease name number and remove if it was last in object manager, needed for generating uniq names.
|
||||
void UpdateRegisterObjectName(const QString& name);
|
||||
//! Enable/Disable generating of unique object names (Enabled by default).
|
||||
//! Return previous value.
|
||||
bool EnableUniqObjectNames(bool bEnable);
|
||||
bool EnableUniqObjectNames(bool bEnable) override;
|
||||
|
||||
//! Register XML template of runtime class.
|
||||
void RegisterClassTemplate(const XmlNodeRef& templ);
|
||||
@@ -249,25 +249,25 @@ public:
|
||||
void RegisterCVars();
|
||||
|
||||
//! Find object class by name.
|
||||
CObjectClassDesc* FindClass(const QString& className);
|
||||
void GetClassCategories(QStringList& categories);
|
||||
CObjectClassDesc* FindClass(const QString& className) override;
|
||||
void GetClassCategories(QStringList& categories) override;
|
||||
void GetClassCategoryToolClassNamePairs(std::vector< std::pair<QString, QString> >& categoryToolClassNamePairs) override;
|
||||
void GetClassTypes(const QString& category, QStringList& types);
|
||||
void GetClassTypes(const QString& category, QStringList& types) override;
|
||||
|
||||
//! Export objects to xml.
|
||||
//! When onlyShared is true ony objects with shared flags exported, overwise only not shared object exported.
|
||||
void Export(const QString& levelPath, XmlNodeRef& rootNode, bool onlyShared);
|
||||
void ExportEntities(XmlNodeRef& rootNode);
|
||||
void Export(const QString& levelPath, XmlNodeRef& rootNode, bool onlyShared) override;
|
||||
void ExportEntities(XmlNodeRef& rootNode) override;
|
||||
|
||||
//! Serialize Objects in manager to specified XML Node.
|
||||
//! @param flags Can be one of SerializeFlags.
|
||||
void Serialize(XmlNodeRef& rootNode, bool bLoading, int flags = SERIALIZE_ALL);
|
||||
void Serialize(XmlNodeRef& rootNode, bool bLoading, int flags = SERIALIZE_ALL) override;
|
||||
|
||||
void SerializeNameSelection(XmlNodeRef& rootNode, bool bLoading);
|
||||
void SerializeNameSelection(XmlNodeRef& rootNode, bool bLoading) override;
|
||||
|
||||
//! Load objects from object archive.
|
||||
//! @param bSelect if set newly loaded object will be selected.
|
||||
void LoadObjects(CObjectArchive& ar, bool bSelect);
|
||||
void LoadObjects(CObjectArchive& ar, bool bSelect) override;
|
||||
|
||||
//! Delete from Object manager all objects without SHARED flag.
|
||||
void DeleteNotSharedObjects();
|
||||
@@ -276,57 +276,57 @@ public:
|
||||
|
||||
bool AddObject(CBaseObject* obj);
|
||||
void RemoveObject(CBaseObject* obj);
|
||||
void ChangeObjectId(REFGUID oldId, REFGUID newId);
|
||||
bool IsDuplicateObjectName(const QString& newName) const
|
||||
void ChangeObjectId(REFGUID oldId, REFGUID newId) override;
|
||||
bool IsDuplicateObjectName(const QString& newName) const override
|
||||
{
|
||||
return FindObject(newName) ? true : false;
|
||||
}
|
||||
void ShowDuplicationMsgWarning(CBaseObject* obj, const QString& newName, bool bShowMsgBox) const;
|
||||
void ChangeObjectName(CBaseObject* obj, const QString& newName);
|
||||
void ShowDuplicationMsgWarning(CBaseObject* obj, const QString& newName, bool bShowMsgBox) const override;
|
||||
void ChangeObjectName(CBaseObject* obj, const QString& newName) override;
|
||||
|
||||
//! Convert object of one type to object of another type.
|
||||
//! Original object is deleted.
|
||||
bool ConvertToType(CBaseObject* pObject, const QString& typeName);
|
||||
bool ConvertToType(CBaseObject* pObject, const QString& typeName) override;
|
||||
|
||||
//! Set new selection callback.
|
||||
//! @return previous selection callback.
|
||||
IObjectSelectCallback* SetSelectCallback(IObjectSelectCallback* callback);
|
||||
IObjectSelectCallback* SetSelectCallback(IObjectSelectCallback* callback) override;
|
||||
|
||||
// Enables/Disables creating of game objects.
|
||||
void SetCreateGameObject(bool enable) { m_createGameObjects = enable; };
|
||||
void SetCreateGameObject(bool enable) override { m_createGameObjects = enable; };
|
||||
//! Return true if objects loaded from xml should immidiatly create game objects associated with them.
|
||||
bool IsCreateGameObjects() const { return m_createGameObjects; };
|
||||
bool IsCreateGameObjects() const override { return m_createGameObjects; };
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Get access to gizmo manager.
|
||||
IGizmoManager* GetGizmoManager();
|
||||
IGizmoManager* GetGizmoManager() override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Invalidate visibily settings of objects.
|
||||
void InvalidateVisibleList();
|
||||
void InvalidateVisibleList() override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// ObjectManager notification Callbacks.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void AddObjectEventListener(EventListener* listener);
|
||||
void RemoveObjectEventListener(EventListener* listener);
|
||||
void AddObjectEventListener(EventListener* listener) override;
|
||||
void RemoveObjectEventListener(EventListener* listener) override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Used to indicate starting and ending of objects loading.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void StartObjectsLoading(int numObjects);
|
||||
void EndObjectsLoading();
|
||||
void StartObjectsLoading(int numObjects) override;
|
||||
void EndObjectsLoading() override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Gathers all resources used by all objects.
|
||||
void GatherUsedResources(CUsedResources& resources);
|
||||
void GatherUsedResources(CUsedResources& resources) override;
|
||||
|
||||
virtual bool IsLightClass(CBaseObject* pObject);
|
||||
bool IsLightClass(CBaseObject* pObject) override;
|
||||
|
||||
virtual void FindAndRenameProperty2(const char* property2Name, const QString& oldValue, const QString& newValue);
|
||||
virtual void FindAndRenameProperty2If(const char* property2Name, const QString& oldValue, const QString& newValue, const char* otherProperty2Name, const QString& otherValue);
|
||||
virtual void FindAndRenameProperty2(const char* property2Name, const QString& oldValue, const QString& newValue) override;
|
||||
virtual void FindAndRenameProperty2If(const char* property2Name, const QString& oldValue, const QString& newValue, const char* otherProperty2Name, const QString& otherValue) override;
|
||||
|
||||
bool IsReloading() const { return m_bInReloading; }
|
||||
bool IsReloading() const override { return m_bInReloading; }
|
||||
void SetSkipUpdate(bool bSkipUpdate) override { m_bSkipObjectUpdate = bSkipUpdate; }
|
||||
|
||||
void SetExportingLevel(bool bExporting) override { m_bLevelExporting = bExporting; }
|
||||
@@ -341,7 +341,7 @@ private:
|
||||
@param objectNode Xml node to serialize object info from.
|
||||
@param pUndoObject Pointer to deleted object for undo.
|
||||
*/
|
||||
CBaseObject* NewObject(CObjectArchive& archive, CBaseObject* pUndoObject, bool bMakeNewId);
|
||||
CBaseObject* NewObject(CObjectArchive& archive, CBaseObject* pUndoObject, bool bMakeNewId) override;
|
||||
|
||||
//! Update visibility of all objects.
|
||||
void UpdateVisibilityList();
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
// Always returns false as Component entity highlighting (accenting) is taken care of elsewhere
|
||||
bool IsHighlighted() { return false; }
|
||||
// Component entity highlighting (accenting) is taken care of elsewhere
|
||||
void DrawHighlight(DisplayContext& /*dc*/) {};
|
||||
void DrawHighlight(DisplayContext& /*dc*/) override {};
|
||||
|
||||
// Don't auto-clone children. Cloning happens in groups with reference fixups,
|
||||
// and individually selected objercts should be cloned as individuals.
|
||||
@@ -164,7 +164,7 @@ protected:
|
||||
|
||||
float GetRadius();
|
||||
|
||||
void DeleteThis() { delete this; };
|
||||
void DeleteThis() override { delete this; };
|
||||
|
||||
bool IsNonLayerAncestorSelected() const;
|
||||
bool IsLayer() const;
|
||||
|
||||
@@ -182,7 +182,7 @@ private:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// AzToolsFramework::EditorContextMenu::Bus::Handler overrides
|
||||
void PopulateEditorGlobalContextMenu(QMenu* menu, const AZ::Vector2& point, int flags) override;
|
||||
int GetMenuPosition() const;
|
||||
int GetMenuPosition() const override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
+1
-1
@@ -102,7 +102,7 @@ protected:
|
||||
void AddFavorites(const AZStd::vector<const AZ::SerializeContext::ClassData*>& classDataContainer) override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void rowsInserted(const QModelIndex& parent, int start, int end);
|
||||
void rowsInserted(const QModelIndex& parent, int start, int end) override;
|
||||
|
||||
// Context menu handlers
|
||||
void ShowContextMenu(const QPoint&);
|
||||
|
||||
@@ -255,7 +255,7 @@ protected:
|
||||
bool DropMimeDataAssets(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent);
|
||||
bool CanDropMimeDataAssets(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const;
|
||||
|
||||
QMap<int, QVariant> itemData(const QModelIndex &index) const;
|
||||
QMap<int, QVariant> itemData(const QModelIndex &index) const override;
|
||||
QVariant dataForAll(const QModelIndex& index, int role) const;
|
||||
QVariant dataForName(const QModelIndex& index, int role) const;
|
||||
QVariant dataForVisibility(const QModelIndex& index, int role) const;
|
||||
|
||||
@@ -28,16 +28,16 @@ public:
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// IUnkown implementation.
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryInterface(const IID& riid, void** ppvObj);
|
||||
virtual ULONG STDMETHODCALLTYPE AddRef();
|
||||
virtual ULONG STDMETHODCALLTYPE Release();
|
||||
HRESULT STDMETHODCALLTYPE QueryInterface(const IID& riid, void** ppvObj) override;
|
||||
ULONG STDMETHODCALLTYPE AddRef() override;
|
||||
ULONG STDMETHODCALLTYPE Release() override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
virtual REFGUID ClassID();
|
||||
REFGUID ClassID() override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual int GetPagesCount();
|
||||
virtual IPreferencesPage* CreateEditorPreferencesPage(int index) override;
|
||||
int GetPagesCount() override;
|
||||
IPreferencesPage* CreateEditorPreferencesPage(int index) override;
|
||||
};
|
||||
|
||||
#endif // CRYINCLUDE_EDITOR_PREFERENCESSTDPAGES_H
|
||||
|
||||
@@ -123,18 +123,18 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ESystemClassID SystemClassID() { return m_classId; };
|
||||
ESystemClassID SystemClassID() override { return m_classId; };
|
||||
static const GUID& GetClassID()
|
||||
{
|
||||
return TWidget::GetClassID();
|
||||
}
|
||||
|
||||
virtual const GUID& ClassID()
|
||||
const GUID& ClassID() override
|
||||
{
|
||||
return GetClassID();
|
||||
}
|
||||
virtual QString ClassName() { return m_name; };
|
||||
virtual QString Category() { return m_category; };
|
||||
QString ClassName() override { return m_name; };
|
||||
QString Category() override { return m_category; };
|
||||
|
||||
QObject* CreateQObject() const override { return new TWidget(); };
|
||||
QString GetPaneTitle() override { return m_name; };
|
||||
|
||||
@@ -30,7 +30,7 @@ protected:
|
||||
void OnInitDialog() override;
|
||||
|
||||
// Derived Dialogs should override this
|
||||
virtual void GetItems(std::vector<SItem>& outItems);
|
||||
void GetItems(std::vector<SItem>& outItems) override;
|
||||
};
|
||||
|
||||
#endif // CRYINCLUDE_EDITOR_SELECTSEQUENCEDIALOG_H
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
protected:
|
||||
void dragMoveEvent(QDragMoveEvent* ev) override;
|
||||
void dragEnterEvent(QDragEnterEvent* ev) override;
|
||||
void dropEvent(QDropEvent* ev);
|
||||
void dropEvent(QDropEvent* ev) override;
|
||||
|
||||
private:
|
||||
void OnTabChanged(int index);
|
||||
|
||||
@@ -35,11 +35,11 @@ public:
|
||||
|
||||
/** Get type of this viewport.
|
||||
*/
|
||||
virtual EViewportType GetType() const { return ET_ViewportMap; }
|
||||
virtual void SetType(EViewportType type);
|
||||
EViewportType GetType() const override { return ET_ViewportMap; }
|
||||
void SetType(EViewportType type) override;
|
||||
|
||||
virtual void ResetContent();
|
||||
virtual void UpdateContent(int flags);
|
||||
void ResetContent() override;
|
||||
void UpdateContent(int flags) override;
|
||||
|
||||
//! Map viewport position to world space position.
|
||||
virtual Vec3 ViewToWorld(const QPoint& vp, bool* collideWithTerrain = nullptr, bool onlyTerrain = false, bool bSkipVegetation = false, bool bTestRenderMesh = false, bool* collideWithObject = nullptr) const override;
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
|
||||
protected:
|
||||
// Draw everything.
|
||||
virtual void Draw(DisplayContext& dc);
|
||||
void Draw(DisplayContext& dc) override;
|
||||
|
||||
private:
|
||||
bool m_bContentsUpdated;
|
||||
|
||||
@@ -187,7 +187,7 @@ protected:
|
||||
int m_customFPS;
|
||||
|
||||
void InitializeContext();
|
||||
virtual void OnMovieEvent(IMovieListener::EMovieEvent event, IAnimSequence* pSequence);
|
||||
void OnMovieEvent(IMovieListener::EMovieEvent event, IAnimSequence* pSequence) override;
|
||||
|
||||
void CaptureItemStart();
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@ public:
|
||||
void SetPlayCallback(const std::function<void()>& callback);
|
||||
|
||||
// IAnimationContextListener
|
||||
virtual void OnSequenceChanged(CTrackViewSequence* pNewSequence);
|
||||
virtual void OnTimeChanged(float newTime);
|
||||
void OnSequenceChanged(CTrackViewSequence* pNewSequence) override;
|
||||
void OnTimeChanged(float newTime) override;
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent* event) override;
|
||||
@@ -65,7 +65,7 @@ private:
|
||||
void OnSplineTimeMarkerChange();
|
||||
|
||||
// IEditorNotifyListener
|
||||
virtual void OnEditorNotifyEvent(EEditorNotifyEvent event) override;
|
||||
void OnEditorNotifyEvent(EEditorNotifyEvent event) override;
|
||||
|
||||
//ITrackViewSequenceListener
|
||||
void OnKeysChanged(CTrackViewSequence* pSequence) override;
|
||||
@@ -109,8 +109,8 @@ public:
|
||||
float GetFPS() const { return m_widget->GetFPS(); }
|
||||
void SetTickDisplayMode(ETVTickMode mode) { m_widget->SetTickDisplayMode(mode); }
|
||||
|
||||
virtual void OnSequenceChanged(CTrackViewSequence* pNewSequence) { m_widget->OnSequenceChanged(pNewSequence); }
|
||||
virtual void OnTimeChanged(float newTime) { m_widget->OnTimeChanged(newTime); }
|
||||
void OnSequenceChanged(CTrackViewSequence* pNewSequence) override { m_widget->OnSequenceChanged(pNewSequence); }
|
||||
void OnTimeChanged(float newTime) override { m_widget->OnTimeChanged(newTime); }
|
||||
|
||||
// ITrackViewSequenceListener delegation to m_widget
|
||||
void OnKeysChanged(CTrackViewSequence* pSequence) override { m_widget->OnKeysChanged(pSequence); }
|
||||
|
||||
@@ -69,10 +69,10 @@ public:
|
||||
void UpdateSequenceLockStatus();
|
||||
|
||||
// IAnimationContextListener
|
||||
virtual void OnSequenceChanged(CTrackViewSequence* pNewSequence) override;
|
||||
void OnSequenceChanged(CTrackViewSequence* pNewSequence) override;
|
||||
|
||||
// ITrackViewSequenceListener
|
||||
virtual void OnSequenceSettingsChanged(CTrackViewSequence* pSequence) override;
|
||||
void OnSequenceSettingsChanged(CTrackViewSequence* pSequence) override;
|
||||
|
||||
void UpdateDopeSheetTime(CTrackViewSequence* pSequence);
|
||||
|
||||
@@ -197,8 +197,8 @@ private:
|
||||
bool processRawInput(MSG* pMsg);
|
||||
#endif
|
||||
|
||||
virtual void OnNodeSelectionChanged(CTrackViewSequence* pSequence) override;
|
||||
virtual void OnNodeRenamed(CTrackViewNode* pNode, const char* pOldName) override;
|
||||
void OnNodeSelectionChanged(CTrackViewSequence* pSequence) override;
|
||||
void OnNodeRenamed(CTrackViewNode* pNode, const char* pOldName) override;
|
||||
|
||||
void OnSequenceAdded(CTrackViewSequence* pSequence) override;
|
||||
void OnSequenceRemoved(CTrackViewSequence* pSequence) override;
|
||||
@@ -209,8 +209,8 @@ private:
|
||||
void AddDialogListeners();
|
||||
void RemoveDialogListeners();
|
||||
|
||||
virtual void BeginUndoTransaction();
|
||||
virtual void EndUndoTransaction();
|
||||
void BeginUndoTransaction() override;
|
||||
void EndUndoTransaction() override;
|
||||
void SaveCurrentSequenceToFBX();
|
||||
void SaveSequenceTimingToXML();
|
||||
|
||||
|
||||
@@ -117,13 +117,14 @@ class CTrackViewKeyBundle
|
||||
public:
|
||||
CTrackViewKeyBundle()
|
||||
: m_bAllOfSameType(true) {}
|
||||
virtual ~CTrackViewKeyBundle() = default;
|
||||
|
||||
virtual bool AreAllKeysOfSameType() const override { return m_bAllOfSameType; }
|
||||
bool AreAllKeysOfSameType() const override { return m_bAllOfSameType; }
|
||||
|
||||
virtual unsigned int GetKeyCount() const override { return static_cast<unsigned int>(m_keys.size()); }
|
||||
virtual CTrackViewKeyHandle GetKey(unsigned int index) override { return m_keys[index]; }
|
||||
unsigned int GetKeyCount() const override { return static_cast<unsigned int>(m_keys.size()); }
|
||||
CTrackViewKeyHandle GetKey(unsigned int index) override { return m_keys[index]; }
|
||||
|
||||
virtual void SelectKeys(const bool bSelected) override;
|
||||
void SelectKeys(const bool bSelected) override;
|
||||
|
||||
CTrackViewKeyHandle GetSingleSelectedKey();
|
||||
|
||||
|
||||
@@ -100,16 +100,16 @@ public:
|
||||
void Load() override;
|
||||
|
||||
// ITrackViewNode
|
||||
virtual ETrackViewNodeType GetNodeType() const override { return eTVNT_Sequence; }
|
||||
ETrackViewNodeType GetNodeType() const override { return eTVNT_Sequence; }
|
||||
|
||||
virtual AZStd::string GetName() const override { return m_pAnimSequence->GetName(); }
|
||||
virtual bool SetName(const char* pName) override;
|
||||
virtual bool CanBeRenamed() const override { return true; }
|
||||
AZStd::string GetName() const override { return m_pAnimSequence->GetName(); }
|
||||
bool SetName(const char* pName) override;
|
||||
bool CanBeRenamed() const override { return true; }
|
||||
|
||||
// Binding/Unbinding
|
||||
virtual void BindToEditorObjects() override;
|
||||
virtual void UnBindFromEditorObjects() override;
|
||||
virtual bool IsBoundToEditorObjects() const override;
|
||||
void BindToEditorObjects() override;
|
||||
void UnBindFromEditorObjects() override;
|
||||
bool IsBoundToEditorObjects() const override;
|
||||
|
||||
// Time range
|
||||
void SetTimeRange(Range timeRange);
|
||||
@@ -136,10 +136,10 @@ public:
|
||||
uint32 GetCryMovieId() const { return m_pAnimSequence->GetId(); }
|
||||
|
||||
// Rendering
|
||||
virtual void Render(const SAnimContext& animContext) override;
|
||||
void Render(const SAnimContext& animContext) override;
|
||||
|
||||
// Playback control
|
||||
virtual void Animate(const SAnimContext& animContext) override;
|
||||
void Animate(const SAnimContext& animContext) override;
|
||||
void Resume() { m_pAnimSequence->Resume(); }
|
||||
void Pause() { m_pAnimSequence->Pause(); }
|
||||
void StillUpdate() { m_pAnimSequence->StillUpdate(); }
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
void TimeChanged(float newTime) { m_pAnimSequence->TimeChanged(newTime); }
|
||||
|
||||
// Check if it's a group node
|
||||
virtual bool IsGroupNode() const override { return true; }
|
||||
bool IsGroupNode() const override { return true; }
|
||||
|
||||
// Track Events (TODO: Undo?)
|
||||
int GetTrackEventsCount() const { return m_pAnimSequence->GetTrackEventsCount(); }
|
||||
@@ -195,7 +195,7 @@ public:
|
||||
bool IsActiveSequence() const;
|
||||
|
||||
// The root sequence node is always an active director
|
||||
virtual bool IsActiveDirector() const override { return true; }
|
||||
bool IsActiveDirector() const override { return true; }
|
||||
|
||||
// Copy keys to clipboard (in XML form)
|
||||
void CopyKeysToClipboard(const bool bOnlySelectedKeys, const bool bOnlyFromSelectedTracks);
|
||||
@@ -306,15 +306,15 @@ private:
|
||||
// Called when an animation updates needs to be schedules
|
||||
void ForceAnimation();
|
||||
|
||||
virtual void CopyKeysToClipboard(XmlNodeRef& xmlNode, const bool bOnlySelectedKeys, const bool bOnlyFromSelectedTracks) override;
|
||||
void CopyKeysToClipboard(XmlNodeRef& xmlNode, const bool bOnlySelectedKeys, const bool bOnlyFromSelectedTracks) override;
|
||||
|
||||
std::deque<CTrackViewTrack*> GetMatchingTracks(CTrackViewAnimNode* pAnimNode, XmlNodeRef trackNode);
|
||||
void GetMatchedPasteLocationsRec(std::vector<TMatchedTrackLocation>& locations, CTrackViewNode* pCurrentNode, XmlNodeRef clipboardNode);
|
||||
|
||||
virtual void BeginUndoTransaction();
|
||||
virtual void EndUndoTransaction();
|
||||
virtual void BeginRestoreTransaction();
|
||||
virtual void EndRestoreTransaction();
|
||||
void BeginUndoTransaction() override;
|
||||
void EndUndoTransaction() override;
|
||||
void BeginRestoreTransaction() override;
|
||||
void EndRestoreTransaction() override;
|
||||
|
||||
// For record mode on AZ::Entities - connect (or disconnect) to buses for notification of property changes
|
||||
void ConnectToBusesForRecording(const AZ::EntityId& entityIdForBus, bool enableConnection);
|
||||
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
CTrackViewSequenceManager();
|
||||
~CTrackViewSequenceManager();
|
||||
|
||||
virtual void OnEditorNotifyEvent(EEditorNotifyEvent event);
|
||||
void OnEditorNotifyEvent(EEditorNotifyEvent event) override;
|
||||
|
||||
unsigned int GetCount() const { return static_cast<int>(m_sequences.size()); }
|
||||
|
||||
@@ -65,7 +65,7 @@ private:
|
||||
void OnSequenceAdded(CTrackViewSequence* pSequence);
|
||||
void OnSequenceRemoved(CTrackViewSequence* pSequence);
|
||||
|
||||
virtual void OnDataBaseItemEvent(IDataBaseItem* pItem, EDataBaseItemEvent event);
|
||||
void OnDataBaseItemEvent(IDataBaseItem* pItem, EDataBaseItemEvent event) override;
|
||||
|
||||
// AZ::EntitySystemBus
|
||||
void OnEntityNameChanged(const AZ::EntityId& entityId, const AZStd::string& name) override;
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
CTrackViewSplineCtrl(QWidget* parent);
|
||||
virtual ~CTrackViewSplineCtrl();
|
||||
|
||||
virtual void ClearSelection();
|
||||
void ClearSelection() override;
|
||||
|
||||
void AddSpline(ISplineInterpolator* pSpline, CTrackViewTrack* pTrack, const QColor& color);
|
||||
void AddSpline(ISplineInterpolator * pSpline, CTrackViewTrack * pTrack, QColor anColorArray[4]);
|
||||
@@ -53,12 +53,12 @@ protected:
|
||||
void wheelEvent(QWheelEvent* event) override;
|
||||
|
||||
private:
|
||||
virtual void SelectKey(ISplineInterpolator* pSpline, int nKey, int nDimension, bool bSelect) override;
|
||||
virtual void SelectRectangle(const QRect& rc, bool bSelect) override;
|
||||
void SelectKey(ISplineInterpolator* pSpline, int nKey, int nDimension, bool bSelect) override;
|
||||
void SelectRectangle(const QRect& rc, bool bSelect) override;
|
||||
|
||||
std::vector<CTrackViewTrack*> m_tracks;
|
||||
|
||||
virtual bool GetTangentHandlePts(QPoint& inTangentPt, QPoint& pt, QPoint& outTangentPt,
|
||||
bool GetTangentHandlePts(QPoint& inTangentPt, QPoint& pt, QPoint& outTangentPt,
|
||||
int nSpline, int nKey, int nDimension) override;
|
||||
void ComputeIncomingTangentAndEaseTo(float& ds, float& easeTo, QPoint inTangentPt,
|
||||
int nSpline, int nKey, int nDimension);
|
||||
@@ -67,7 +67,7 @@ private:
|
||||
void AdjustTCB(float d_tension, float d_continuity, float d_bias);
|
||||
void MoveSelectedTangentHandleTo(const QPoint& point);
|
||||
|
||||
virtual ISplineCtrlUndo* CreateSplineCtrlUndoObject(std::vector<ISplineInterpolator*>& splineContainer);
|
||||
ISplineCtrlUndo* CreateSplineCtrlUndoObject(std::vector<ISplineInterpolator*>& splineContainer) override;
|
||||
|
||||
bool m_bKeysFreeze;
|
||||
bool m_bTangentsFreeze;
|
||||
|
||||
@@ -44,7 +44,7 @@ public slots:
|
||||
QVector<int> Groups() const;
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent* event)
|
||||
void paintEvent(QPaintEvent* event) override
|
||||
{
|
||||
if (model() && model()->rowCount() > 0)
|
||||
{
|
||||
|
||||
+122
-120
@@ -379,11 +379,11 @@ AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING
|
||||
public:
|
||||
virtual ~CVariableBase() {}
|
||||
|
||||
void SetName(const QString& name) { m_name = name; };
|
||||
void SetName(const QString& name) override { m_name = name; };
|
||||
//! Get name of parameter.
|
||||
QString GetName() const { return m_name; };
|
||||
QString GetName() const override { return m_name; };
|
||||
|
||||
QString GetHumanName() const
|
||||
QString GetHumanName() const override
|
||||
{
|
||||
if (!m_humanName.isEmpty())
|
||||
{
|
||||
@@ -391,82 +391,82 @@ public:
|
||||
}
|
||||
return m_name;
|
||||
}
|
||||
void SetHumanName(const QString& name) { m_humanName = name; }
|
||||
void SetHumanName(const QString& name) override { m_humanName = name; }
|
||||
|
||||
void SetDescription(const char* desc) { m_description = desc; };
|
||||
void SetDescription(const QString& desc) { m_description = desc; };
|
||||
void SetDescription(const char* desc) override { m_description = desc; };
|
||||
void SetDescription(const QString& desc) override { m_description = desc; };
|
||||
|
||||
//! Get name of parameter.
|
||||
QString GetDescription() const { return m_description; };
|
||||
QString GetDescription() const override { return m_description; };
|
||||
|
||||
EType GetType() const { return IVariable::UNKNOWN; };
|
||||
int GetSize() const { return sizeof(*this); };
|
||||
EType GetType() const override { return IVariable::UNKNOWN; };
|
||||
int GetSize() const override { return sizeof(*this); };
|
||||
|
||||
unsigned char GetDataType() const { return m_dataType; };
|
||||
void SetDataType(unsigned char dataType) { m_dataType = dataType; }
|
||||
unsigned char GetDataType() const override { return m_dataType; };
|
||||
void SetDataType(unsigned char dataType) override { m_dataType = dataType; }
|
||||
|
||||
void SetFlags(int flags) { m_flags = static_cast<uint16>(flags); }
|
||||
int GetFlags() const { return m_flags; }
|
||||
void SetFlagRecursive(EFlags flag) { m_flags |= flag; }
|
||||
void SetFlags(int flags) override { m_flags = static_cast<uint16>(flags); }
|
||||
int GetFlags() const override { return m_flags; }
|
||||
void SetFlagRecursive(EFlags flag) override { m_flags |= flag; }
|
||||
|
||||
void SetUserData(const QVariant &data){ m_userData = data; };
|
||||
QVariant GetUserData() const { return m_userData; }
|
||||
void SetUserData(const QVariant &data) override { m_userData = data; };
|
||||
QVariant GetUserData() const override { return m_userData; }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Set methods.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void Set([[maybe_unused]] int value) { assert(0); }
|
||||
void Set([[maybe_unused]] bool value) { assert(0); }
|
||||
void Set([[maybe_unused]] float value) { assert(0); }
|
||||
void Set([[maybe_unused]] double value) { assert(0); }
|
||||
void Set([[maybe_unused]] const Vec2& value) { assert(0); }
|
||||
void Set([[maybe_unused]] const Vec3& value) { assert(0); }
|
||||
void Set([[maybe_unused]] const Vec4& value) { assert(0); }
|
||||
void Set([[maybe_unused]] const Ang3& value) { assert(0); }
|
||||
void Set([[maybe_unused]] const Quat& value) { assert(0); }
|
||||
void Set([[maybe_unused]] const QString& value) { assert(0); }
|
||||
void Set([[maybe_unused]] const char* value) { assert(0); }
|
||||
void SetDisplayValue(const QString& value) { Set(value); }
|
||||
void Set([[maybe_unused]] int value) override { assert(0); }
|
||||
void Set([[maybe_unused]] bool value) override { assert(0); }
|
||||
void Set([[maybe_unused]] float value) override { assert(0); }
|
||||
void Set([[maybe_unused]] double value) override { assert(0); }
|
||||
void Set([[maybe_unused]] const Vec2& value) override { assert(0); }
|
||||
void Set([[maybe_unused]] const Vec3& value) override { assert(0); }
|
||||
void Set([[maybe_unused]] const Vec4& value) override { assert(0); }
|
||||
void Set([[maybe_unused]] const Ang3& value) override { assert(0); }
|
||||
void Set([[maybe_unused]] const Quat& value) override { assert(0); }
|
||||
void Set([[maybe_unused]] const QString& value) override { assert(0); }
|
||||
void Set([[maybe_unused]] const char* value) override { assert(0); }
|
||||
void SetDisplayValue(const QString& value) override { Set(value); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Get methods.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void Get([[maybe_unused]] int& value) const { assert(0); }
|
||||
void Get([[maybe_unused]] bool& value) const { assert(0); }
|
||||
void Get([[maybe_unused]] float& value) const { assert(0); }
|
||||
void Get([[maybe_unused]] double& value) const { assert(0); }
|
||||
void Get([[maybe_unused]] Vec2& value) const { assert(0); }
|
||||
void Get([[maybe_unused]] Vec3& value) const { assert(0); }
|
||||
void Get([[maybe_unused]] Vec4& value) const { assert(0); }
|
||||
void Get([[maybe_unused]] Ang3& value) const { assert(0); }
|
||||
void Get([[maybe_unused]] Quat& value) const { assert(0); }
|
||||
void Get([[maybe_unused]] QString& value) const { assert(0); }
|
||||
QString GetDisplayValue() const { QString val; Get(val); return val; }
|
||||
void Get([[maybe_unused]] int& value) const override { assert(0); }
|
||||
void Get([[maybe_unused]] bool& value) const override { assert(0); }
|
||||
void Get([[maybe_unused]] float& value) const override { assert(0); }
|
||||
void Get([[maybe_unused]] double& value) const override { assert(0); }
|
||||
void Get([[maybe_unused]] Vec2& value) const override { assert(0); }
|
||||
void Get([[maybe_unused]] Vec3& value) const override { assert(0); }
|
||||
void Get([[maybe_unused]] Vec4& value) const override { assert(0); }
|
||||
void Get([[maybe_unused]] Ang3& value) const override { assert(0); }
|
||||
void Get([[maybe_unused]] Quat& value) const override { assert(0); }
|
||||
void Get([[maybe_unused]] QString& value) const override { assert(0); }
|
||||
QString GetDisplayValue() const override { QString val; Get(val); return val; }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// IVariableContainer functions
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual void AddVariable([[maybe_unused]] IVariable* var) { assert(0); }
|
||||
void AddVariable([[maybe_unused]] IVariable* var) override { assert(0); }
|
||||
|
||||
virtual bool DeleteVariable([[maybe_unused]] IVariable* var, [[maybe_unused]] bool recursive = false) { return false; }
|
||||
virtual void DeleteAllVariables() {}
|
||||
bool DeleteVariable([[maybe_unused]] IVariable* var, [[maybe_unused]] bool recursive = false) override { return false; }
|
||||
void DeleteAllVariables() override {}
|
||||
|
||||
virtual int GetNumVariables() const { return 0; }
|
||||
virtual IVariable* GetVariable([[maybe_unused]] int index) const { return nullptr; }
|
||||
int GetNumVariables() const override { return 0; }
|
||||
IVariable* GetVariable([[maybe_unused]] int index) const override { return nullptr; }
|
||||
|
||||
virtual bool IsContainsVariable([[maybe_unused]] IVariable* pVar, [[maybe_unused]] bool bRecursive = false) const { return false; }
|
||||
bool IsContainsVariable([[maybe_unused]] IVariable* pVar, [[maybe_unused]] bool bRecursive = false) const override { return false; }
|
||||
|
||||
virtual IVariable* FindVariable([[maybe_unused]] const char* name, [[maybe_unused]] bool bRecursive = false, [[maybe_unused]] bool bHumanName = false) const { return nullptr; }
|
||||
IVariable* FindVariable([[maybe_unused]] const char* name, [[maybe_unused]] bool bRecursive = false, [[maybe_unused]] bool bHumanName = false) const override { return nullptr; }
|
||||
|
||||
virtual bool IsEmpty() const { return true; }
|
||||
bool IsEmpty() const override { return true; }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void Wire(IVariable* var)
|
||||
void Wire(IVariable* var) override
|
||||
{
|
||||
m_wiredVars.push_back(var);
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void Unwire(IVariable* var)
|
||||
void Unwire(IVariable* var) override
|
||||
{
|
||||
if (!var)
|
||||
{
|
||||
@@ -480,7 +480,7 @@ public:
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void AddOnSetCallback(OnSetCallback* func)
|
||||
void AddOnSetCallback(OnSetCallback* func) override
|
||||
{
|
||||
if (!stl::find(m_onSetFuncs, func))
|
||||
{
|
||||
@@ -489,13 +489,13 @@ public:
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void RemoveOnSetCallback(OnSetCallback* func)
|
||||
void RemoveOnSetCallback(OnSetCallback* func) override
|
||||
{
|
||||
stl::find_and_erase(m_onSetFuncs, func);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void ClearOnSetCallbacks()
|
||||
void ClearOnSetCallbacks() override
|
||||
{
|
||||
m_onSetFuncs.clear();
|
||||
}
|
||||
@@ -509,7 +509,7 @@ public:
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void RemoveOnSetEnumCallback(OnSetCallback* func)
|
||||
void RemoveOnSetEnumCallback(OnSetCallback* func) override
|
||||
{
|
||||
stl::find_and_erase(m_onSetEnumFuncs, func);
|
||||
}
|
||||
@@ -520,7 +520,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
virtual void OnSetValue([[maybe_unused]] bool bRecursive)
|
||||
void OnSetValue([[maybe_unused]] bool bRecursive) override
|
||||
{
|
||||
// If have wired variables or OnSet callback, process them.
|
||||
// Send value to wired variable.
|
||||
@@ -549,7 +549,8 @@ public:
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void Serialize(XmlNodeRef node, bool load)
|
||||
using IVariable::Serialize;
|
||||
void Serialize(XmlNodeRef node, bool load) override
|
||||
{
|
||||
if (load)
|
||||
{
|
||||
@@ -567,8 +568,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void EnableUpdateCallbacks(bool boEnable){m_boUpdateCallbacksEnabled = boEnable; };
|
||||
virtual void SetForceModified(bool bForceModified) { m_bForceModified = bForceModified; }
|
||||
void EnableUpdateCallbacks(bool boEnable) override{m_boUpdateCallbacksEnabled = boEnable; };
|
||||
void SetForceModified(bool bForceModified) override { m_bForceModified = bForceModified; }
|
||||
protected:
|
||||
// Constructor.
|
||||
CVariableBase()
|
||||
@@ -641,13 +642,13 @@ public:
|
||||
CVariableArray(){}
|
||||
|
||||
//! Get name of parameter.
|
||||
virtual EType GetType() const { return IVariable::ARRAY; };
|
||||
virtual int GetSize() const { return sizeof(CVariableArray); };
|
||||
EType GetType() const override { return IVariable::ARRAY; };
|
||||
int GetSize() const override { return sizeof(CVariableArray); };
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Set methods.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual void Set(const QString& value)
|
||||
void Set(const QString& value) override
|
||||
{
|
||||
if (m_strValue != value)
|
||||
{
|
||||
@@ -655,7 +656,7 @@ public:
|
||||
OnSetValue(false);
|
||||
}
|
||||
}
|
||||
void OnSetValue(bool bRecursive)
|
||||
void OnSetValue(bool bRecursive) override
|
||||
{
|
||||
CVariableBase::OnSetValue(bRecursive);
|
||||
if (bRecursive)
|
||||
@@ -666,7 +667,7 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
void SetFlagRecursive(EFlags flag)
|
||||
void SetFlagRecursive(EFlags flag) override
|
||||
{
|
||||
CVariableBase::SetFlagRecursive(flag);
|
||||
for (Variables::iterator it = m_vars.begin(); it != m_vars.end(); ++it)
|
||||
@@ -677,9 +678,9 @@ public:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Get methods.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual void Get(QString& value) const { value = m_strValue; }
|
||||
void Get(QString& value) const override { value = m_strValue; }
|
||||
|
||||
virtual bool HasDefaultValue() const
|
||||
bool HasDefaultValue() const override
|
||||
{
|
||||
for (Variables::const_iterator it = m_vars.begin(); it != m_vars.end(); ++it)
|
||||
{
|
||||
@@ -691,7 +692,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void ResetToDefault()
|
||||
void ResetToDefault() override
|
||||
{
|
||||
for (Variables::const_iterator it = m_vars.begin(); it != m_vars.end(); ++it)
|
||||
{
|
||||
@@ -700,7 +701,7 @@ public:
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
IVariable* Clone(bool bRecursive) const
|
||||
IVariable* Clone(bool bRecursive) const override
|
||||
{
|
||||
CVariableArray* var = new CVariableArray(*this);
|
||||
|
||||
@@ -713,7 +714,7 @@ public:
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CopyValue(IVariable* fromVar)
|
||||
void CopyValue(IVariable* fromVar) override
|
||||
{
|
||||
assert(fromVar);
|
||||
if (fromVar->GetType() != IVariable::ARRAY)
|
||||
@@ -733,20 +734,20 @@ public:
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual int GetNumVariables() const { return static_cast<int>(m_vars.size()); }
|
||||
int GetNumVariables() const override { return static_cast<int>(m_vars.size()); }
|
||||
|
||||
virtual IVariable* GetVariable(int index) const
|
||||
IVariable* GetVariable(int index) const override
|
||||
{
|
||||
assert(index >= 0 && index < (int)m_vars.size());
|
||||
return m_vars[index];
|
||||
}
|
||||
|
||||
virtual void AddVariable(IVariable* var)
|
||||
void AddVariable(IVariable* var) override
|
||||
{
|
||||
m_vars.push_back(var);
|
||||
}
|
||||
|
||||
virtual bool DeleteVariable(IVariable* var, bool recursive /*=false*/)
|
||||
bool DeleteVariable(IVariable* var, bool recursive /*=false*/) override
|
||||
{
|
||||
bool found = stl::find_and_erase(m_vars, var);
|
||||
if (!found && recursive)
|
||||
@@ -762,12 +763,12 @@ public:
|
||||
return found;
|
||||
}
|
||||
|
||||
virtual void DeleteAllVariables()
|
||||
void DeleteAllVariables() override
|
||||
{
|
||||
m_vars.clear();
|
||||
}
|
||||
|
||||
virtual bool IsContainsVariable(IVariable* pVar, bool bRecursive) const
|
||||
bool IsContainsVariable(IVariable* pVar, bool bRecursive) const override
|
||||
{
|
||||
for (Variables::const_iterator it = m_vars.begin(); it != m_vars.end(); ++it)
|
||||
{
|
||||
@@ -793,14 +794,15 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual IVariable* FindVariable(const char* name, bool bRecursive, bool bHumanName) const;
|
||||
IVariable* FindVariable(const char* name, bool bRecursive, bool bHumanName) const override;
|
||||
|
||||
virtual bool IsEmpty() const
|
||||
bool IsEmpty() const override
|
||||
{
|
||||
return m_vars.empty();
|
||||
}
|
||||
|
||||
void Serialize(XmlNodeRef node, bool load)
|
||||
using IVariable::Serialize;
|
||||
void Serialize(XmlNodeRef node, bool load) override
|
||||
{
|
||||
if (load)
|
||||
{
|
||||
@@ -1074,11 +1076,11 @@ class CVariableVoid
|
||||
{
|
||||
public:
|
||||
CVariableVoid(){};
|
||||
virtual EType GetType() const { return IVariable::UNKNOWN; };
|
||||
virtual IVariable* Clone([[maybe_unused]] bool bRecursive) const { return new CVariableVoid(*this); }
|
||||
virtual void CopyValue([[maybe_unused]] IVariable* fromVar) {};
|
||||
virtual bool HasDefaultValue() const { return true; }
|
||||
virtual void ResetToDefault() {};
|
||||
EType GetType() const override { return IVariable::UNKNOWN; };
|
||||
IVariable* Clone([[maybe_unused]] bool bRecursive) const override { return new CVariableVoid(*this); }
|
||||
void CopyValue([[maybe_unused]] IVariable* fromVar) override {};
|
||||
bool HasDefaultValue() const override { return true; }
|
||||
void ResetToDefault() override {};
|
||||
protected:
|
||||
CVariableVoid(const CVariableVoid& v)
|
||||
: CVariableBase(v) {};
|
||||
@@ -1112,44 +1114,44 @@ public:
|
||||
}
|
||||
|
||||
//! Get name of parameter.
|
||||
virtual EType GetType() const { return (EType)var_type::type_traits<T>::type(); };
|
||||
virtual int GetSize() const { return sizeof(T); };
|
||||
EType GetType() const override { return (EType)var_type::type_traits<T>::type(); };
|
||||
int GetSize() const override { return sizeof(T); };
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Set methods.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual void Set(int value) { SetValue(value); }
|
||||
virtual void Set(bool value) { SetValue(value); }
|
||||
virtual void Set(float value) { SetValue(value); }
|
||||
virtual void Set(double value) { SetValue(value); }
|
||||
virtual void Set(const Vec2& value) { SetValue(value); }
|
||||
virtual void Set(const Vec3& value) { SetValue(value); }
|
||||
virtual void Set(const Vec4& value) { SetValue(value); }
|
||||
virtual void Set(const Ang3& value) { SetValue(value); }
|
||||
virtual void Set(const Quat& value) { SetValue(value); }
|
||||
virtual void Set(const QString& value) { SetValue(value); }
|
||||
virtual void Set(const char* value) { SetValue(QString(value)); }
|
||||
void Set(int value) override { SetValue(value); }
|
||||
void Set(bool value) override { SetValue(value); }
|
||||
void Set(float value) override { SetValue(value); }
|
||||
void Set(double value) override { SetValue(value); }
|
||||
void Set(const Vec2& value) override { SetValue(value); }
|
||||
void Set(const Vec3& value) override { SetValue(value); }
|
||||
void Set(const Vec4& value) override { SetValue(value); }
|
||||
void Set(const Ang3& value) override { SetValue(value); }
|
||||
void Set(const Quat& value) override { SetValue(value); }
|
||||
void Set(const QString& value) override { SetValue(value); }
|
||||
void Set(const char* value) override { SetValue(QString(value)); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Get methods.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual void Get(int& value) const { GetValue(value); }
|
||||
virtual void Get(bool& value) const { GetValue(value); }
|
||||
virtual void Get(float& value) const { GetValue(value); }
|
||||
virtual void Get(double& value) const { GetValue(value); }
|
||||
virtual void Get(Vec2& value) const { GetValue(value); }
|
||||
virtual void Get(Vec3& value) const { GetValue(value); }
|
||||
virtual void Get(Vec4& value) const { GetValue(value); }
|
||||
virtual void Get(Quat& value) const { GetValue(value); }
|
||||
virtual void Get(QString& value) const { GetValue(value); }
|
||||
virtual bool HasDefaultValue() const
|
||||
void Get(int& value) const override { GetValue(value); }
|
||||
void Get(bool& value) const override { GetValue(value); }
|
||||
void Get(float& value) const override { GetValue(value); }
|
||||
void Get(double& value) const override { GetValue(value); }
|
||||
void Get(Vec2& value) const override { GetValue(value); }
|
||||
void Get(Vec3& value) const override { GetValue(value); }
|
||||
void Get(Vec4& value) const override { GetValue(value); }
|
||||
void Get(Quat& value) const override { GetValue(value); }
|
||||
void Get(QString& value) const override { GetValue(value); }
|
||||
bool HasDefaultValue() const override
|
||||
{
|
||||
T defval;
|
||||
var_type::init(defval);
|
||||
return m_valueDef == defval;
|
||||
}
|
||||
|
||||
virtual void ResetToDefault()
|
||||
void ResetToDefault() override
|
||||
{
|
||||
T defval;
|
||||
var_type::init(defval);
|
||||
@@ -1159,7 +1161,7 @@ public:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Limits.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual void SetLimits(float fMin, float fMax, float fStep = 0.f, bool bHardMin = true, bool bHardMax = true)
|
||||
void SetLimits(float fMin, float fMax, float fStep = 0.f, bool bHardMin = true, bool bHardMax = true) override
|
||||
{
|
||||
m_valueMin = fMin;
|
||||
m_valueMax = fMax;
|
||||
@@ -1171,7 +1173,7 @@ public:
|
||||
m_customLimits = true;
|
||||
}
|
||||
|
||||
virtual void GetLimits(float& fMin, float& fMax, float& fStep, bool& bHardMin, bool& bHardMax)
|
||||
void GetLimits(float& fMin, float& fMax, float& fStep, bool& bHardMin, bool& bHardMax) override
|
||||
{
|
||||
if (!m_customLimits && var_type::type_traits<T>::supports_range())
|
||||
{
|
||||
@@ -1199,7 +1201,7 @@ public:
|
||||
m_customLimits = false;
|
||||
}
|
||||
|
||||
virtual bool HasCustomLimits()
|
||||
bool HasCustomLimits() override
|
||||
{
|
||||
return m_customLimits;
|
||||
}
|
||||
@@ -1217,14 +1219,14 @@ public:
|
||||
void operator=(const T& value) { SetValue(value); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
IVariable* Clone([[maybe_unused]] bool bRecursive) const
|
||||
IVariable* Clone([[maybe_unused]] bool bRecursive) const override
|
||||
{
|
||||
Self* var = new Self(*this);
|
||||
return var;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CopyValue(IVariable* fromVar)
|
||||
void CopyValue(IVariable* fromVar) override
|
||||
{
|
||||
assert(fromVar);
|
||||
T val;
|
||||
@@ -1668,7 +1670,7 @@ struct CSmartVariableBase
|
||||
return *pV;
|
||||
} // Cast to CVariableBase&
|
||||
VarType& operator*() const { return *pVar; }
|
||||
VarType* operator->(void) const { return pVar; }
|
||||
VarType* operator->() const { return pVar; }
|
||||
|
||||
VarType* GetVar() const { return pVar; };
|
||||
|
||||
@@ -1730,7 +1732,7 @@ struct CSmartVariableArray
|
||||
}
|
||||
|
||||
VarType& operator*() const { return *pVar; }
|
||||
VarType* operator->(void) const { return pVar; }
|
||||
VarType* operator->() const { return pVar; }
|
||||
|
||||
VarType* GetVar() const { return pVar; };
|
||||
|
||||
@@ -1752,35 +1754,35 @@ public:
|
||||
// Dtor.
|
||||
virtual ~CVarBlock() {}
|
||||
//! Add variable to block.
|
||||
virtual void AddVariable(IVariable* var);
|
||||
void AddVariable(IVariable* var) override;
|
||||
//! Remove variable from block
|
||||
virtual bool DeleteVariable(IVariable* var, bool bRecursive = false);
|
||||
bool DeleteVariable(IVariable* var, bool bRecursive = false) override;
|
||||
|
||||
void AddVariable(IVariable* pVar, const char* varName, unsigned char dataType = IVariable::DT_SIMPLE);
|
||||
// This used from smart variable pointer.
|
||||
void AddVariable(CVariableBase& var, const char* varName, unsigned char dataType = IVariable::DT_SIMPLE);
|
||||
|
||||
//! Returns number of variables in block.
|
||||
virtual int GetNumVariables() const { return static_cast<int>(m_vars.size()); }
|
||||
int GetNumVariables() const override { return static_cast<int>(m_vars.size()); }
|
||||
|
||||
//! Get pointer to stored variable by index.
|
||||
virtual IVariable* GetVariable(int index) const
|
||||
IVariable* GetVariable(int index) const override
|
||||
{
|
||||
assert(index >= 0 && index < m_vars.size());
|
||||
return m_vars[index];
|
||||
}
|
||||
|
||||
// Clear all vars from VarBlock.
|
||||
virtual void DeleteAllVariables() { m_vars.clear(); };
|
||||
void DeleteAllVariables() override { m_vars.clear(); };
|
||||
|
||||
//! Return true if variable block is empty (Does not have any vars).
|
||||
virtual bool IsEmpty() const { return m_vars.empty(); }
|
||||
bool IsEmpty() const override { return m_vars.empty(); }
|
||||
|
||||
// Returns true if var block contains specified variable.
|
||||
virtual bool IsContainsVariable(IVariable* pVar, bool bRecursive = true) const;
|
||||
bool IsContainsVariable(IVariable* pVar, bool bRecursive = true) const override;
|
||||
|
||||
//! Find variable by name.
|
||||
virtual IVariable* FindVariable(const char* name, bool bRecursive = true, bool bHumanName = false) const;
|
||||
IVariable* FindVariable(const char* name, bool bRecursive = true, bool bHumanName = false) const override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Clone var block.
|
||||
|
||||
+51
-50
@@ -172,7 +172,7 @@ public:
|
||||
|
||||
//! Get current view matrix.
|
||||
//! This is a matrix that transforms from world space to view space.
|
||||
virtual const Matrix34& GetViewTM() const
|
||||
const Matrix34& GetViewTM() const override
|
||||
{
|
||||
AZ_Error("CryLegacy", false, "QtViewport::GetViewTM not implemented");
|
||||
static const Matrix34 m;
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Get current screen matrix.
|
||||
//! Screen matrix transform from World space to Screen space.
|
||||
virtual const Matrix34& GetScreenTM() const
|
||||
const Matrix34& GetScreenTM() const override
|
||||
{
|
||||
return m_screenTM;
|
||||
}
|
||||
@@ -190,9 +190,9 @@ public:
|
||||
virtual Vec3 MapViewToCP(const QPoint& point) = 0;
|
||||
|
||||
//! Map viewport position to world space position.
|
||||
virtual Vec3 ViewToWorld(const QPoint& vp, bool* pCollideWithTerrain = nullptr, bool onlyTerrain = false, bool bSkipVegetation = false, bool bTestRenderMesh = false, bool* collideWithObject = nullptr) const = 0;
|
||||
Vec3 ViewToWorld(const QPoint& vp, bool* pCollideWithTerrain = nullptr, bool onlyTerrain = false, bool bSkipVegetation = false, bool bTestRenderMesh = false, bool* collideWithObject = nullptr) const override = 0;
|
||||
//! Convert point on screen to world ray.
|
||||
virtual void ViewToWorldRay(const QPoint& vp, Vec3& raySrc, Vec3& rayDir) const = 0;
|
||||
void ViewToWorldRay(const QPoint& vp, Vec3& raySrc, Vec3& rayDir) const override = 0;
|
||||
//! Get normal for viewport position
|
||||
virtual Vec3 ViewToWorldNormal(const QPoint& vp, bool onlyTerrain, bool bTestRenderMesh = false) = 0;
|
||||
|
||||
@@ -261,7 +261,7 @@ public:
|
||||
virtual void SetCursorString(const QString& str) = 0;
|
||||
|
||||
virtual void SetFocus() = 0;
|
||||
virtual void Invalidate(bool bErase = 1) = 0;
|
||||
virtual void Invalidate(bool bErase = true) = 0;
|
||||
|
||||
// Is overridden by RenderViewport
|
||||
virtual void SetFOV([[maybe_unused]] float fov) {}
|
||||
@@ -274,7 +274,7 @@ public:
|
||||
|
||||
void SetViewPane(CLayoutViewPane* viewPane) { m_viewPane = viewPane; }
|
||||
|
||||
virtual CViewport *asCViewport() { return this; }
|
||||
CViewport *asCViewport() override { return this; }
|
||||
|
||||
protected:
|
||||
CLayoutViewPane* m_viewPane = nullptr;
|
||||
@@ -336,7 +336,7 @@ public:
|
||||
void SetActiveWindow() override { activateWindow(); }
|
||||
|
||||
//! Called while window is idle.
|
||||
virtual void Update();
|
||||
void Update() override;
|
||||
|
||||
/** Set name of this viewport.
|
||||
*/
|
||||
@@ -344,24 +344,24 @@ public:
|
||||
|
||||
/** Get name of viewport
|
||||
*/
|
||||
QString GetName() const;
|
||||
QString GetName() const override;
|
||||
|
||||
virtual void SetFocus() { setFocus(); }
|
||||
virtual void Invalidate([[maybe_unused]] bool bErase = 1) { update(); }
|
||||
void SetFocus() override { setFocus(); }
|
||||
void Invalidate([[maybe_unused]] bool bErase = 1) override { update(); }
|
||||
|
||||
// Is overridden by RenderViewport
|
||||
virtual void SetFOV([[maybe_unused]] float fov) {}
|
||||
virtual float GetFOV() const;
|
||||
void SetFOV([[maybe_unused]] float fov) override {}
|
||||
float GetFOV() const override;
|
||||
|
||||
// Must be overridden in derived classes.
|
||||
// Returns:
|
||||
// e.g. 4.0/3.0
|
||||
virtual float GetAspectRatio() const = 0;
|
||||
virtual void GetDimensions(int* pWidth, int* pHeight) const;
|
||||
virtual void ScreenToClient(QPoint& pPoint) const override;
|
||||
float GetAspectRatio() const override = 0;
|
||||
void GetDimensions(int* pWidth, int* pHeight) const override;
|
||||
void ScreenToClient(QPoint& pPoint) const override;
|
||||
|
||||
virtual void ResetContent();
|
||||
virtual void UpdateContent(int flags);
|
||||
void ResetContent() override;
|
||||
void UpdateContent(int flags) override;
|
||||
|
||||
//! Set current zoom factor for this viewport.
|
||||
virtual void SetZoomFactor(float fZoomFactor);
|
||||
@@ -373,10 +373,10 @@ public:
|
||||
virtual void OnDeactivate();
|
||||
|
||||
//! Map world space position to viewport position.
|
||||
virtual QPoint WorldToView(const Vec3& wp) const override;
|
||||
QPoint WorldToView(const Vec3& wp) const override;
|
||||
|
||||
//! Map world space position to 3D viewport position.
|
||||
virtual Vec3 WorldToView3D(const Vec3& wp, int nFlags = 0) const;
|
||||
Vec3 WorldToView3D(const Vec3& wp, int nFlags = 0) const override;
|
||||
|
||||
//! Map viewport position to world space position.
|
||||
virtual Vec3 ViewToWorld(const QPoint& vp, bool* pCollideWithTerrain = nullptr, bool onlyTerrain = false, bool bSkipVegetation = false, bool bTestRenderMesh = false, bool* collideWithObject = nullptr) const override;
|
||||
@@ -391,17 +391,18 @@ public:
|
||||
|
||||
//! This method return a vector (p2-p1) in world space alligned to construction plane and restriction axises.
|
||||
//! p1 and p2 must be given in world space and lie on construction plane.
|
||||
virtual Vec3 GetCPVector(const Vec3& p1, const Vec3& p2, int axis);
|
||||
using CViewport::GetCPVector;
|
||||
Vec3 GetCPVector(const Vec3& p1, const Vec3& p2, int axis) override;
|
||||
|
||||
//! Snap any given 3D world position to grid lines if snap is enabled.
|
||||
Vec3 SnapToGrid(const Vec3& vec) override;
|
||||
virtual float GetGridStep() const;
|
||||
float GetGridStep() const override;
|
||||
|
||||
//! Returns the screen scale factor for a point given in world coordinates.
|
||||
//! This factor gives the width in world-space units at the point's distance of the viewport.
|
||||
virtual float GetScreenScaleFactor([[maybe_unused]] const Vec3& worldPoint) const { return 1; };
|
||||
float GetScreenScaleFactor([[maybe_unused]] const Vec3& worldPoint) const override { return 1; };
|
||||
|
||||
void SetAxisConstrain(int axis);
|
||||
void SetAxisConstrain(int axis) override;
|
||||
|
||||
/// Take raw input and create a final mouse interaction.
|
||||
/// @attention Do not map **point** from widget to viewport explicitly,
|
||||
@@ -413,7 +414,7 @@ public:
|
||||
// Selection.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Resets current selection region.
|
||||
virtual void ResetSelectionRegion();
|
||||
void ResetSelectionRegion() override;
|
||||
//! Set 2D selection rectangle.
|
||||
void SetSelectionRectangle(const QRect& rect) override;
|
||||
|
||||
@@ -422,12 +423,12 @@ public:
|
||||
//! Called when dragging selection rectangle.
|
||||
void OnDragSelectRectangle(const QRect& rect, bool bNormalizeRect = false) override;
|
||||
//! Get selection precision tolerance.
|
||||
float GetSelectionTolerance() const { return m_selectionTolerance; }
|
||||
float GetSelectionTolerance() const override { return m_selectionTolerance; }
|
||||
//! Center viewport on selection.
|
||||
void CenterOnSelection() override {}
|
||||
void CenterOnAABB([[maybe_unused]] const AABB& aabb) override {}
|
||||
|
||||
virtual void CenterOnSliceInstance() {}
|
||||
void CenterOnSliceInstance() override {}
|
||||
|
||||
//! Performs hit testing of 2d point in view to find which object hit.
|
||||
bool HitTest(const QPoint& point, HitContext& hitInfo) override;
|
||||
@@ -440,10 +441,10 @@ public:
|
||||
float GetDistanceToLine(const Vec3& lineP1, const Vec3& lineP2, const QPoint& point) const override;
|
||||
|
||||
// Access to the member m_bAdvancedSelectMode so interested modules can know its value.
|
||||
bool GetAdvancedSelectModeFlag();
|
||||
bool GetAdvancedSelectModeFlag() override;
|
||||
|
||||
virtual void GetPerpendicularAxis(EAxis* pAxis, bool* pIs2D) const;
|
||||
virtual const ::Plane* GetConstructionPlane() const { return &m_constructionPlane; }
|
||||
void GetPerpendicularAxis(EAxis* pAxis, bool* pIs2D) const override;
|
||||
const ::Plane* GetConstructionPlane() const override { return &m_constructionPlane; }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -451,7 +452,7 @@ public:
|
||||
//! Set construction plane from given position construction matrix refrence coord system and axis settings.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void MakeConstructionPlane(int axis) override;
|
||||
virtual void SetConstructionMatrix(RefCoordSys coordSys, const Matrix34& xform);
|
||||
void SetConstructionMatrix(RefCoordSys coordSys, const Matrix34& xform) override;
|
||||
virtual const Matrix34& GetConstructionMatrix(RefCoordSys coordSys);
|
||||
// Set simple construction plane origin.
|
||||
void SetConstructionOrigin(const Vec3& worldPos);
|
||||
@@ -461,11 +462,11 @@ public:
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Undo for viewpot operations.
|
||||
void BeginUndo();
|
||||
void AcceptUndo(const QString& undoDescription);
|
||||
void CancelUndo();
|
||||
void RestoreUndo();
|
||||
bool IsUndoRecording() const;
|
||||
void BeginUndo() override;
|
||||
void AcceptUndo(const QString& undoDescription) override;
|
||||
void CancelUndo() override;
|
||||
void RestoreUndo() override;
|
||||
bool IsUndoRecording() const override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//! Get prefered original size for this viewport.
|
||||
@@ -473,39 +474,39 @@ public:
|
||||
virtual QSize GetIdealSize() const;
|
||||
|
||||
//! Check if world space bounding box is visible in this view.
|
||||
virtual bool IsBoundsVisible(const AABB& box) const;
|
||||
bool IsBoundsVisible(const AABB& box) const override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void SetCursor(const QCursor& cursor)
|
||||
void SetCursor(const QCursor& cursor) override
|
||||
{
|
||||
setCursor(cursor);
|
||||
}
|
||||
|
||||
// Set`s current cursor string.
|
||||
void SetCurrentCursor(const QCursor& hCursor, const QString& cursorString);
|
||||
virtual void SetCurrentCursor(EStdCursor stdCursor, const QString& cursorString);
|
||||
void SetCurrentCursor(EStdCursor stdCursor);
|
||||
virtual void SetCursorString(const QString& cursorString);
|
||||
void ResetCursor();
|
||||
void SetSupplementaryCursorStr(const QString& str);
|
||||
void SetCurrentCursor(EStdCursor stdCursor, const QString& cursorString) override;
|
||||
void SetCurrentCursor(EStdCursor stdCursor) override;
|
||||
void SetCursorString(const QString& cursorString) override;
|
||||
void ResetCursor() override;
|
||||
void SetSupplementaryCursorStr(const QString& str) override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Return visble objects cache.
|
||||
CBaseObjectsCache* GetVisibleObjectsCache() { return m_pVisibleObjectsCache; };
|
||||
CBaseObjectsCache* GetVisibleObjectsCache() override { return m_pVisibleObjectsCache; };
|
||||
|
||||
void RegisterRenderListener(IRenderListener* piListener);
|
||||
bool UnregisterRenderListener(IRenderListener* piListener);
|
||||
bool IsRenderListenerRegistered(IRenderListener* piListener);
|
||||
void RegisterRenderListener(IRenderListener* piListener) override;
|
||||
bool UnregisterRenderListener(IRenderListener* piListener) override;
|
||||
bool IsRenderListenerRegistered(IRenderListener* piListener) override;
|
||||
|
||||
void AddPostRenderer(IPostRenderer* pPostRenderer);
|
||||
bool RemovePostRenderer(IPostRenderer* pPostRenderer);
|
||||
void AddPostRenderer(IPostRenderer* pPostRenderer) override;
|
||||
bool RemovePostRenderer(IPostRenderer* pPostRenderer) override;
|
||||
|
||||
void CaptureMouse() override { m_mouseCaptured = true; QWidget::grabMouse(); }
|
||||
void ReleaseMouse() override { m_mouseCaptured = false; QWidget::releaseMouse(); }
|
||||
|
||||
virtual void setRay(QPoint& vp, Vec3& raySrc, Vec3& rayDir);
|
||||
virtual void setHitcontext(QPoint& vp, Vec3& raySrc, Vec3& rayDir);
|
||||
void setRay(QPoint& vp, Vec3& raySrc, Vec3& rayDir) override;
|
||||
void setHitcontext(QPoint& vp, Vec3& raySrc, Vec3& rayDir) override;
|
||||
QPoint m_vp;
|
||||
AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING
|
||||
Vec3 m_raySrc;
|
||||
|
||||
@@ -77,7 +77,7 @@ Q_SIGNALS:
|
||||
protected:
|
||||
virtual void OnInitDialog();
|
||||
|
||||
virtual void OnEditorNotifyEvent(EEditorNotifyEvent event);
|
||||
void OnEditorNotifyEvent(EEditorNotifyEvent event) override;
|
||||
void OnSystemEvent(ESystemEvent event, UINT_PTR wparam, UINT_PTR lparam) override;
|
||||
|
||||
void OnMaximize();
|
||||
|
||||
@@ -266,7 +266,7 @@ namespace AZ
|
||||
_ComponentClass::RTTI_Type().ToString<AZStd::string>().c_str(), descriptor->GetName(), _ComponentClass::RTTI_TypeName()); \
|
||||
return nullptr; \
|
||||
} \
|
||||
else if (descriptor->GetName() != _ComponentClass::RTTI_TypeName()) \
|
||||
if (descriptor->GetName() != _ComponentClass::RTTI_TypeName()) \
|
||||
{ \
|
||||
AZ_Error("Component", false, "The same component UUID (%s) / name (%s) was registered twice. This isn't allowed, " \
|
||||
"it can cause lifetime management issues / crashes.\nThis situation can happen by declaring a component " \
|
||||
|
||||
@@ -1251,6 +1251,8 @@ namespace AZ
|
||||
|
||||
return AZ::SettingsRegistryInterface::VisitResponse::Continue;
|
||||
}
|
||||
|
||||
using SettingsRegistryInterface::Visitor::Visit;
|
||||
void Visit(AZStd::string_view path, AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type, bool value) override
|
||||
{
|
||||
// By default the auto load option is true
|
||||
|
||||
@@ -196,14 +196,14 @@ namespace AZ
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// ComponentApplicationRequests
|
||||
void RegisterComponentDescriptor(const ComponentDescriptor* descriptor) override final;
|
||||
void UnregisterComponentDescriptor(const ComponentDescriptor* descriptor) override final;
|
||||
void RegisterEntityAddedEventHandler(EntityAddedEvent::Handler& handler) override final;
|
||||
void RegisterEntityRemovedEventHandler(EntityRemovedEvent::Handler& handler) override final;
|
||||
void RegisterEntityActivatedEventHandler(EntityActivatedEvent::Handler& handler) override final;
|
||||
void RegisterEntityDeactivatedEventHandler(EntityDeactivatedEvent::Handler& handler) override final;
|
||||
void SignalEntityActivated(Entity* entity) override final;
|
||||
void SignalEntityDeactivated(Entity* entity) override final;
|
||||
void RegisterComponentDescriptor(const ComponentDescriptor* descriptor) final;
|
||||
void UnregisterComponentDescriptor(const ComponentDescriptor* descriptor) final;
|
||||
void RegisterEntityAddedEventHandler(EntityAddedEvent::Handler& handler) final;
|
||||
void RegisterEntityRemovedEventHandler(EntityRemovedEvent::Handler& handler) final;
|
||||
void RegisterEntityActivatedEventHandler(EntityActivatedEvent::Handler& handler) final;
|
||||
void RegisterEntityDeactivatedEventHandler(EntityDeactivatedEvent::Handler& handler) final;
|
||||
void SignalEntityActivated(Entity* entity) final;
|
||||
void SignalEntityDeactivated(Entity* entity) final;
|
||||
bool AddEntity(Entity* entity) override;
|
||||
bool RemoveEntity(Entity* entity) override;
|
||||
bool DeleteEntity(const EntityId& id) override;
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace AZ
|
||||
class AssetTreeNodeBase
|
||||
{
|
||||
public:
|
||||
virtual ~AssetTreeNodeBase() = default;
|
||||
virtual const AssetPrimaryInfo* GetAssetPrimaryInfo() const = 0;
|
||||
virtual AssetTreeNodeBase* FindOrAddChild(const AssetTrackingId& id, const AssetPrimaryInfo* info) = 0;
|
||||
};
|
||||
@@ -94,6 +95,7 @@ namespace AZ
|
||||
class AssetTreeBase
|
||||
{
|
||||
public:
|
||||
virtual ~AssetTreeBase() = default;
|
||||
virtual AssetTreeNodeBase& GetRoot() = 0;
|
||||
};
|
||||
|
||||
@@ -101,6 +103,7 @@ namespace AZ
|
||||
class AssetAllocationTableBase
|
||||
{
|
||||
public:
|
||||
virtual ~AssetAllocationTableBase() = default;
|
||||
virtual AssetTreeNodeBase* FindAllocation(void* ptr) const = 0;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@ namespace AZ
|
||||
{
|
||||
}
|
||||
|
||||
~AssetTreeNode() override = default;
|
||||
|
||||
const AssetPrimaryInfo* GetAssetPrimaryInfo() const override
|
||||
{
|
||||
return m_primaryinfo;
|
||||
@@ -67,6 +69,8 @@ namespace AZ
|
||||
class AssetTree : public AssetTreeBase
|
||||
{
|
||||
public:
|
||||
~AssetTree() override = default;
|
||||
|
||||
AssetTreeNodeBase& GetRoot() override
|
||||
{
|
||||
return m_rootAssets;
|
||||
@@ -99,6 +103,7 @@ namespace AZ
|
||||
AllocationTable(mutex_type& mutex) : m_mutex(mutex)
|
||||
{
|
||||
}
|
||||
~AllocationTable() override = default;
|
||||
|
||||
AssetTreeNodeBase* FindAllocation(void* ptr) const override
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace AZ::Debug
|
||||
class BudgetTracker
|
||||
{
|
||||
public:
|
||||
AZ_RTTI(BudgetTracker, "{E14A746D-BFFE-4C02-90FB-4699B79864A5}");
|
||||
AZ_TYPE_INFO(BudgetTracker, "{E14A746D-BFFE-4C02-90FB-4699B79864A5}");
|
||||
static Budget* GetBudgetFromEnvironment(const char* budgetName, uint32_t crc);
|
||||
|
||||
~BudgetTracker();
|
||||
|
||||
@@ -28,21 +28,21 @@ namespace AZ
|
||||
protected:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Driller
|
||||
virtual const char* GroupName() const { return "SystemDrillers"; }
|
||||
virtual const char* GetName() const { return "TraceMessagesDriller"; }
|
||||
virtual const char* GetDescription() const { return "Handles all system messages like Assert, Exception, Error, Warning, Printf, etc."; }
|
||||
virtual void Start(const Param* params = NULL, int numParams = 0);
|
||||
virtual void Stop();
|
||||
const char* GroupName() const override { return "SystemDrillers"; }
|
||||
const char* GetName() const override { return "TraceMessagesDriller"; }
|
||||
const char* GetDescription() const override { return "Handles all system messages like Assert, Exception, Error, Warning, Printf, etc."; }
|
||||
void Start(const Param* params = NULL, int numParams = 0) override;
|
||||
void Stop() override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// TraceMessagesDrillerBus
|
||||
/// Triggered when a AZ_Assert failed. This is terminating event! (the code will break, crash).
|
||||
virtual void OnAssert(const char* message);
|
||||
virtual void OnException(const char* message);
|
||||
virtual void OnError(const char* window, const char* message);
|
||||
virtual void OnWarning(const char* window, const char* message);
|
||||
virtual void OnPrintf(const char* window, const char* message);
|
||||
void OnAssert(const char* message) override;
|
||||
void OnException(const char* message) override;
|
||||
void OnError(const char* window, const char* message) override;
|
||||
void OnWarning(const char* window, const char* message) override;
|
||||
void OnPrintf(const char* window, const char* message) override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
};
|
||||
} // namespace Debug
|
||||
|
||||
@@ -443,7 +443,7 @@ namespace AZ
|
||||
const unsigned char* GetData() const { return m_data.data(); }
|
||||
unsigned int GetDataSize() const { return static_cast<unsigned int>(m_data.size()); }
|
||||
inline void Reset() { m_data.clear(); }
|
||||
virtual void WriteBinary(const void* data, unsigned int dataSize)
|
||||
void WriteBinary(const void* data, unsigned int dataSize) override
|
||||
{
|
||||
m_data.insert(m_data.end(), reinterpret_cast<const unsigned char*>(data), reinterpret_cast<const unsigned char*>(data) + dataSize);
|
||||
}
|
||||
@@ -489,7 +489,7 @@ namespace AZ
|
||||
}
|
||||
|
||||
unsigned int GetDataLeft() const { return static_cast<unsigned int>(m_dataEnd - m_data); }
|
||||
virtual unsigned int ReadBinary(void* data, unsigned int maxDataSize)
|
||||
unsigned int ReadBinary(void* data, unsigned int maxDataSize) override
|
||||
{
|
||||
AZ_Assert(m_data != nullptr, "You must call SetData function, before you can read data!");
|
||||
AZ_Assert(data != nullptr && maxDataSize > 0, "We must have a valid pointer and max data size!");
|
||||
@@ -523,7 +523,7 @@ namespace AZ
|
||||
bool Open(const char* fileName, int mode, int platformFlags = 0);
|
||||
void Close();
|
||||
|
||||
virtual void WriteBinary(const void* data, unsigned int dataSize);
|
||||
void WriteBinary(const void* data, unsigned int dataSize) override;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -540,7 +540,7 @@ namespace AZ
|
||||
DrillerInputFileStream();
|
||||
~DrillerInputFileStream();
|
||||
bool Open(const char* fileName, int mode, int platformFlags = 0);
|
||||
virtual unsigned int ReadBinary(void* data, unsigned int maxDataSize);
|
||||
unsigned int ReadBinary(void* data, unsigned int maxDataSize) override;
|
||||
void Close();
|
||||
};
|
||||
|
||||
|
||||
@@ -98,21 +98,21 @@ namespace AZ
|
||||
|
||||
/// Return compressor type id.
|
||||
static AZ::u32 TypeId();
|
||||
virtual AZ::u32 GetTypeId() const { return TypeId(); }
|
||||
AZ::u32 GetTypeId() const override { return TypeId(); }
|
||||
/// Called when we open a stream to Read for the first time. Data contains the first. dataSize <= m_maxHeaderSize.
|
||||
virtual bool ReadHeaderAndData(CompressorStream* stream, AZ::u8* data, unsigned int dataSize);
|
||||
bool ReadHeaderAndData(CompressorStream* stream, AZ::u8* data, unsigned int dataSize) override;
|
||||
/// Called when we are about to start writing to a compressed stream.
|
||||
virtual bool WriteHeaderAndData(CompressorStream* stream);
|
||||
bool WriteHeaderAndData(CompressorStream* stream) override;
|
||||
/// Forwarded function from the Device when we from a compressed stream.
|
||||
virtual SizeType Read(CompressorStream* stream, SizeType byteSize, SizeType offset, void* buffer);
|
||||
SizeType Read(CompressorStream* stream, SizeType byteSize, SizeType offset, void* buffer) override;
|
||||
/// Forwarded function from the Device when we write to a compressed stream.
|
||||
virtual SizeType Write(CompressorStream* stream, SizeType byteSize, const void* data, SizeType offset = SizeType(-1));
|
||||
SizeType Write(CompressorStream* stream, SizeType byteSize, const void* data, SizeType offset = SizeType(-1)) override;
|
||||
/// Write a seek point.
|
||||
virtual bool WriteSeekPoint(CompressorStream* stream);
|
||||
bool WriteSeekPoint(CompressorStream* stream) override;
|
||||
/// Set auto seek point even dataSize bytes.
|
||||
virtual bool StartCompressor(CompressorStream* stream, int compressionLevel, SizeType autoSeekDataSize);
|
||||
bool StartCompressor(CompressorStream* stream, int compressionLevel, SizeType autoSeekDataSize) override;
|
||||
/// Called just before we close the stream. All compression data will be flushed and finalized. (You can't add data afterwards).
|
||||
virtual bool Close(CompressorStream* stream);
|
||||
bool Close(CompressorStream* stream) override;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace AZ
|
||||
{
|
||||
}
|
||||
protected:
|
||||
virtual void Process()
|
||||
void Process() override
|
||||
{
|
||||
m_notifyFlag->store(true, AZStd::memory_order_release);
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace AZ
|
||||
: public Sample<Vector3>
|
||||
{
|
||||
public:
|
||||
Vector3 GetInterpolatedValue(TimeType time) override final
|
||||
Vector3 GetInterpolatedValue(TimeType time) final
|
||||
{
|
||||
Vector3 interpolatedValue = m_previousValue;
|
||||
if (m_targetTimestamp != 0)
|
||||
@@ -108,7 +108,7 @@ namespace AZ
|
||||
: public Sample<Quaternion>
|
||||
{
|
||||
public:
|
||||
Quaternion GetInterpolatedValue(TimeType time) override final
|
||||
Quaternion GetInterpolatedValue(TimeType time) final
|
||||
{
|
||||
Quaternion interpolatedValue = m_previousValue;
|
||||
if (m_targetTimestamp != 0)
|
||||
@@ -144,7 +144,7 @@ namespace AZ
|
||||
: public Sample<Vector3>
|
||||
{
|
||||
public:
|
||||
Vector3 GetInterpolatedValue(TimeType /*time*/) override final
|
||||
Vector3 GetInterpolatedValue(TimeType /*time*/) final
|
||||
{
|
||||
return GetTargetValue();
|
||||
}
|
||||
@@ -155,7 +155,7 @@ namespace AZ
|
||||
: public Sample<Quaternion>
|
||||
{
|
||||
public:
|
||||
Quaternion GetInterpolatedValue(TimeType /*time*/) override final
|
||||
Quaternion GetInterpolatedValue(TimeType /*time*/) final
|
||||
{
|
||||
return GetTargetValue();
|
||||
}
|
||||
|
||||
@@ -48,18 +48,18 @@ namespace AZ
|
||||
HeapSchema(const Descriptor& desc);
|
||||
virtual ~HeapSchema();
|
||||
|
||||
virtual pointer_type Allocate(size_type byteSize, size_type alignment, int flags, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0);
|
||||
virtual void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0);
|
||||
virtual pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) { (void)ptr; (void)newSize; (void)newAlignment; return NULL; }
|
||||
virtual size_type Resize(pointer_type ptr, size_type newSize) { (void)ptr; (void)newSize; return 0; }
|
||||
virtual size_type AllocationSize(pointer_type ptr);
|
||||
pointer_type Allocate(size_type byteSize, size_type alignment, int flags, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override;
|
||||
void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override;
|
||||
pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override { (void)ptr; (void)newSize; (void)newAlignment; return NULL; }
|
||||
size_type Resize(pointer_type ptr, size_type newSize) override { (void)ptr; (void)newSize; return 0; }
|
||||
size_type AllocationSize(pointer_type ptr) override;
|
||||
|
||||
virtual size_type NumAllocatedBytes() const { return m_used; }
|
||||
virtual size_type Capacity() const { return m_capacity; }
|
||||
virtual size_type GetMaxAllocationSize() const;
|
||||
size_type GetMaxContiguousAllocationSize() const override;
|
||||
virtual IAllocatorAllocate* GetSubAllocator() { return m_subAllocator; }
|
||||
virtual void GarbageCollect() {}
|
||||
size_type NumAllocatedBytes() const override { return m_used; }
|
||||
size_type Capacity() const override { return m_capacity; }
|
||||
size_type GetMaxAllocationSize() const override;
|
||||
size_type GetMaxContiguousAllocationSize() const override;
|
||||
IAllocatorAllocate* GetSubAllocator() override { return m_subAllocator; }
|
||||
void GarbageCollect() override {}
|
||||
|
||||
private:
|
||||
AZ_FORCE_INLINE size_type ChunckSize(pointer_type ptr);
|
||||
|
||||
@@ -56,22 +56,22 @@ namespace AZ
|
||||
HphaSchema(const Descriptor& desc);
|
||||
virtual ~HphaSchema();
|
||||
|
||||
virtual pointer_type Allocate(size_type byteSize, size_type alignment, int flags = 0, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0);
|
||||
virtual void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0);
|
||||
virtual pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment);
|
||||
pointer_type Allocate(size_type byteSize, size_type alignment, int flags = 0, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override;
|
||||
void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override;
|
||||
pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override;
|
||||
/// Resizes allocated memory block to the size possible and returns that size.
|
||||
virtual size_type Resize(pointer_type ptr, size_type newSize);
|
||||
virtual size_type AllocationSize(pointer_type ptr);
|
||||
size_type Resize(pointer_type ptr, size_type newSize) override;
|
||||
size_type AllocationSize(pointer_type ptr) override;
|
||||
|
||||
virtual size_type NumAllocatedBytes() const;
|
||||
virtual size_type Capacity() const;
|
||||
virtual size_type GetMaxAllocationSize() const;
|
||||
size_type GetMaxContiguousAllocationSize() const override;
|
||||
virtual size_type GetUnAllocatedMemory(bool isPrint = false) const;
|
||||
virtual IAllocatorAllocate* GetSubAllocator() { return m_desc.m_subAllocator; }
|
||||
size_type NumAllocatedBytes() const override;
|
||||
size_type Capacity() const override;
|
||||
size_type GetMaxAllocationSize() const override;
|
||||
size_type GetMaxContiguousAllocationSize() const override;
|
||||
size_type GetUnAllocatedMemory(bool isPrint = false) const override;
|
||||
IAllocatorAllocate* GetSubAllocator() override { return m_desc.m_subAllocator; }
|
||||
|
||||
/// Return unused memory to the OS (if we don't use fixed block). Don't call this unless you really need free memory, it is slow.
|
||||
virtual void GarbageCollect();
|
||||
void GarbageCollect() override;
|
||||
|
||||
private:
|
||||
// [LY-84974][sconel@][2018-08-10] SliceStrike integration up to CL 671758
|
||||
|
||||
@@ -41,18 +41,18 @@ namespace AZ
|
||||
//---------------------------------------------------------------------
|
||||
// IAllocatorAllocate
|
||||
//---------------------------------------------------------------------
|
||||
virtual pointer_type Allocate(size_type byteSize, size_type alignment, int flags, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override;
|
||||
virtual void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override;
|
||||
virtual pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override;
|
||||
virtual size_type Resize(pointer_type ptr, size_type newSize) override;
|
||||
virtual size_type AllocationSize(pointer_type ptr) override;
|
||||
pointer_type Allocate(size_type byteSize, size_type alignment, int flags, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override;
|
||||
void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override;
|
||||
pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override;
|
||||
size_type Resize(pointer_type ptr, size_type newSize) override;
|
||||
size_type AllocationSize(pointer_type ptr) override;
|
||||
|
||||
virtual size_type NumAllocatedBytes() const override;
|
||||
virtual size_type Capacity() const override;
|
||||
virtual size_type GetMaxAllocationSize() const override;
|
||||
virtual size_type GetMaxContiguousAllocationSize() const override;
|
||||
virtual IAllocatorAllocate* GetSubAllocator() override;
|
||||
virtual void GarbageCollect() override;
|
||||
size_type NumAllocatedBytes() const override;
|
||||
size_type Capacity() const override;
|
||||
size_type GetMaxAllocationSize() const override;
|
||||
size_type GetMaxContiguousAllocationSize() const override;
|
||||
IAllocatorAllocate* GetSubAllocator() override;
|
||||
void GarbageCollect() override;
|
||||
|
||||
private:
|
||||
typedef void* (*MallocFn)(size_t);
|
||||
|
||||
@@ -849,7 +849,7 @@ namespace AZ
|
||||
return AZ::AllocatorInstance<Parent>::Get().GetUnAllocatedMemory(isPrint);
|
||||
}
|
||||
|
||||
virtual IAllocatorAllocate* GetSubAllocator() override
|
||||
IAllocatorAllocate* GetSubAllocator() override
|
||||
{
|
||||
return AZ::AllocatorInstance<Parent>::Get().GetSubAllocator();
|
||||
}
|
||||
|
||||
@@ -38,24 +38,24 @@ namespace AZ
|
||||
protected:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Driller
|
||||
virtual const char* GroupName() const { return "SystemDrillers"; }
|
||||
virtual const char* GetName() const { return "MemoryDriller"; }
|
||||
virtual const char* GetDescription() const { return "Reports all allocators and memory allocations."; }
|
||||
virtual void Start(const Param* params = NULL, int numParams = 0);
|
||||
virtual void Stop();
|
||||
const char* GroupName() const override { return "SystemDrillers"; }
|
||||
const char* GetName() const override { return "MemoryDriller"; }
|
||||
const char* GetDescription() const override { return "Reports all allocators and memory allocations."; }
|
||||
void Start(const Param* params = NULL, int numParams = 0) override;
|
||||
void Stop() override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// MemoryDrillerBus
|
||||
virtual void RegisterAllocator(IAllocator* allocator);
|
||||
virtual void UnregisterAllocator(IAllocator* allocator);
|
||||
void RegisterAllocator(IAllocator* allocator) override;
|
||||
void UnregisterAllocator(IAllocator* allocator) override;
|
||||
|
||||
virtual void RegisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount);
|
||||
virtual void UnregisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, AllocationInfo* info);
|
||||
virtual void ReallocateAllocation(IAllocator* allocator, void* prevAddress, void* newAddress, size_t newByteSize, size_t newAlignment);
|
||||
virtual void ResizeAllocation(IAllocator* allocator, void* address, size_t newSize);
|
||||
void RegisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount) override;
|
||||
void UnregisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, AllocationInfo* info) override;
|
||||
void ReallocateAllocation(IAllocator* allocator, void* prevAddress, void* newAddress, size_t newByteSize, size_t newAlignment) override;
|
||||
void ResizeAllocation(IAllocator* allocator, void* address, size_t newSize) override;
|
||||
|
||||
virtual void DumpAllAllocations();
|
||||
void DumpAllAllocations() override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void RegisterAllocatorOutput(IAllocator* allocator);
|
||||
|
||||
@@ -77,18 +77,18 @@ namespace AZ
|
||||
//---------------------------------------------------------------------
|
||||
// IAllocatorAllocate
|
||||
//---------------------------------------------------------------------
|
||||
virtual pointer_type Allocate(size_type byteSize, size_type alignment, int flags, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override;
|
||||
virtual void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override;
|
||||
virtual pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override;
|
||||
virtual size_type Resize(pointer_type ptr, size_type newSize) override;
|
||||
virtual size_type AllocationSize(pointer_type ptr) override;
|
||||
pointer_type Allocate(size_type byteSize, size_type alignment, int flags, const char* name = 0, const char* fileName = 0, int lineNum = 0, unsigned int suppressStackRecord = 0) override;
|
||||
void DeAllocate(pointer_type ptr, size_type byteSize = 0, size_type alignment = 0) override;
|
||||
pointer_type ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) override;
|
||||
size_type Resize(pointer_type ptr, size_type newSize) override;
|
||||
size_type AllocationSize(pointer_type ptr) override;
|
||||
|
||||
virtual size_type NumAllocatedBytes() const override;
|
||||
virtual size_type Capacity() const override;
|
||||
virtual size_type GetMaxAllocationSize() const override;
|
||||
size_type NumAllocatedBytes() const override;
|
||||
size_type Capacity() const override;
|
||||
size_type GetMaxAllocationSize() const override;
|
||||
size_type GetMaxContiguousAllocationSize() const override;
|
||||
virtual IAllocatorAllocate* GetSubAllocator() override;
|
||||
virtual void GarbageCollect() override;
|
||||
IAllocatorAllocate* GetSubAllocator() override;
|
||||
void GarbageCollect() override;
|
||||
|
||||
private:
|
||||
OverrunDetectionSchemaImpl* m_impl;
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace AZ
|
||||
* DO NOT OVERRIDE. This method will return in the future, but at this point things reflected here are not unreflected for all ReflectContexts (Serialize, Editor, Network, Script, etc.)
|
||||
* Place all calls to non-component reflect functions inside of a component reflect function to ensure that your types are unreflected.
|
||||
*/
|
||||
virtual void Reflect(AZ::ReflectContext*) final { }
|
||||
void Reflect(AZ::ReflectContext*) {}
|
||||
|
||||
/**
|
||||
* Override to require specific components on the system entity.
|
||||
|
||||
@@ -594,8 +594,8 @@ namespace AZ
|
||||
void SetArgumentName(size_t index, const AZStd::string& name) override;
|
||||
const AZStd::string* GetArgumentToolTip(size_t index) const override;
|
||||
void SetArgumentToolTip(size_t index, const AZStd::string& name) override;
|
||||
virtual void SetDefaultValue(size_t index, BehaviorDefaultValuePtr defaultValue) override;
|
||||
virtual BehaviorDefaultValuePtr GetDefaultValue(size_t index) const override;
|
||||
void SetDefaultValue(size_t index, BehaviorDefaultValuePtr defaultValue) override;
|
||||
BehaviorDefaultValuePtr GetDefaultValue(size_t index) const override;
|
||||
const BehaviorParameter* GetResult() const override;
|
||||
|
||||
void OverrideParameterTraits(size_t index, AZ::u32 addTraits, AZ::u32 removeTraits) override;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
#ifndef AZCORE_RTTI_H
|
||||
#define AZCORE_RTTI_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/RTTI/TypeInfo.h>
|
||||
#include <AzCore/Module/Environment.h>
|
||||
@@ -44,21 +44,9 @@ namespace AZ
|
||||
/// RTTI typeId
|
||||
typedef void (* RTTI_EnumCallback)(const AZ::TypeId& /*typeId*/, void* /*userData*/);
|
||||
|
||||
// Disabling missing override warning because we intentionally want to allow for declaring RTTI base classes that don't impelment RTTI.
|
||||
#if defined(AZ_COMPILER_CLANG)
|
||||
# define AZ_PUSH_DISABLE_OVERRIDE_WARNING \
|
||||
_Pragma("clang diagnostic push") \
|
||||
_Pragma("clang diagnostic ignored \"-Winconsistent-missing-override\"")
|
||||
# define AZ_POP_DISABLE_OVERRIDE_WARNING \
|
||||
_Pragma("clang diagnostic pop")
|
||||
#else
|
||||
# define AZ_PUSH_DISABLE_OVERRIDE_WARNING
|
||||
# define AZ_POP_DISABLE_OVERRIDE_WARNING
|
||||
#endif
|
||||
|
||||
// We require AZ_TYPE_INFO to be declared
|
||||
#define AZ_RTTI_COMMON() \
|
||||
AZ_PUSH_DISABLE_OVERRIDE_WARNING \
|
||||
AZ_PUSH_DISABLE_WARNING(26433, "-Winconsistent-missing-override") \
|
||||
void RTTI_Enable(); \
|
||||
virtual inline const AZ::TypeId& RTTI_GetType() const { return RTTI_Type(); } \
|
||||
virtual inline const char* RTTI_GetTypeName() const { return RTTI_TypeName(); } \
|
||||
@@ -66,7 +54,7 @@ namespace AZ
|
||||
virtual void RTTI_EnumTypes(AZ::RTTI_EnumCallback cb, void* userData) { RTTI_EnumHierarchy(cb, userData); } \
|
||||
static inline const AZ::TypeId& RTTI_Type() { return TYPEINFO_Uuid(); } \
|
||||
static inline const char* RTTI_TypeName() { return TYPEINFO_Name(); } \
|
||||
AZ_POP_DISABLE_OVERRIDE_WARNING
|
||||
AZ_POP_DISABLE_WARNING
|
||||
|
||||
//#define AZ_RTTI_1(_1) static_assert(false,"You must provide a valid classUuid!")
|
||||
|
||||
@@ -74,8 +62,10 @@ namespace AZ
|
||||
#define AZ_RTTI_1() AZ_RTTI_COMMON() \
|
||||
static bool RTTI_IsContainType(const AZ::TypeId& id) { return id == RTTI_Type(); } \
|
||||
static void RTTI_EnumHierarchy(AZ::RTTI_EnumCallback cb, void* userData) { cb(RTTI_Type(), userData); } \
|
||||
AZ_PUSH_DISABLE_WARNING(26433, "-Winconsistent-missing-override") \
|
||||
virtual inline const void* RTTI_AddressOf(const AZ::TypeId& id) const { return (id == RTTI_Type()) ? this : nullptr; } \
|
||||
virtual inline void* RTTI_AddressOf(const AZ::TypeId& id) { return (id == RTTI_Type()) ? this : nullptr; }
|
||||
virtual inline void* RTTI_AddressOf(const AZ::TypeId& id) { return (id == RTTI_Type()) ? this : nullptr; } \
|
||||
AZ_POP_DISABLE_WARNING
|
||||
|
||||
/// AZ_RTTI(BaseClass)
|
||||
#define AZ_RTTI_2(_1) AZ_RTTI_COMMON() \
|
||||
@@ -85,14 +75,14 @@ namespace AZ
|
||||
static void RTTI_EnumHierarchy(AZ::RTTI_EnumCallback cb, void* userData) { \
|
||||
cb(RTTI_Type(), userData); \
|
||||
AZ::Internal::RttiCaller<_1>::RTTI_EnumHierarchy(cb, userData); } \
|
||||
AZ_PUSH_DISABLE_OVERRIDE_WARNING \
|
||||
AZ_PUSH_DISABLE_WARNING(26433, "-Winconsistent-missing-override") \
|
||||
virtual inline const void* RTTI_AddressOf(const AZ::TypeId& id) const { \
|
||||
if (id == RTTI_Type()) { return this; } \
|
||||
return AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); } \
|
||||
virtual inline void* RTTI_AddressOf(const AZ::TypeId& id) { \
|
||||
if (id == RTTI_Type()) { return this; } \
|
||||
return AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); } \
|
||||
AZ_POP_DISABLE_OVERRIDE_WARNING
|
||||
AZ_POP_DISABLE_WARNING
|
||||
|
||||
/// AZ_RTTI(BaseClass1,BaseClass2)
|
||||
#define AZ_RTTI_3(_1, _2) AZ_RTTI_COMMON() \
|
||||
@@ -104,7 +94,7 @@ namespace AZ
|
||||
cb(RTTI_Type(), userData); \
|
||||
AZ::Internal::RttiCaller<_1>::RTTI_EnumHierarchy(cb, userData); \
|
||||
AZ::Internal::RttiCaller<_2>::RTTI_EnumHierarchy(cb, userData); } \
|
||||
AZ_PUSH_DISABLE_OVERRIDE_WARNING \
|
||||
AZ_PUSH_DISABLE_WARNING(26433, "-Winconsistent-missing-override") \
|
||||
virtual inline const void* RTTI_AddressOf(const AZ::TypeId& id) const { \
|
||||
if (id == RTTI_Type()) { return this; } \
|
||||
const void* r = AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); if (r) { return r; } \
|
||||
@@ -113,7 +103,7 @@ namespace AZ
|
||||
if (id == RTTI_Type()) { return this; } \
|
||||
void* r = AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); if (r) { return r; } \
|
||||
return AZ::Internal::RttiCaller<_2>::RTTI_AddressOf(this, id); } \
|
||||
AZ_POP_DISABLE_OVERRIDE_WARNING
|
||||
AZ_POP_DISABLE_WARNING
|
||||
|
||||
/// AZ_RTTI(BaseClass1,BaseClass2,BaseClass3)
|
||||
#define AZ_RTTI_4(_1, _2, _3) AZ_RTTI_COMMON() \
|
||||
@@ -127,7 +117,7 @@ namespace AZ
|
||||
AZ::Internal::RttiCaller<_1>::RTTI_EnumHierarchy(cb, userData); \
|
||||
AZ::Internal::RttiCaller<_2>::RTTI_EnumHierarchy(cb, userData); \
|
||||
AZ::Internal::RttiCaller<_3>::RTTI_EnumHierarchy(cb, userData); } \
|
||||
AZ_PUSH_DISABLE_OVERRIDE_WARNING \
|
||||
AZ_PUSH_DISABLE_WARNING(26433, "-Winconsistent-missing-override") \
|
||||
virtual inline const void* RTTI_AddressOf(const AZ::TypeId& id) const { \
|
||||
if (id == RTTI_Type()) { return this; } \
|
||||
const void* r = AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); if (r) { return r; } \
|
||||
@@ -138,7 +128,7 @@ namespace AZ
|
||||
void* r = AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); if (r) { return r; } \
|
||||
r = AZ::Internal::RttiCaller<_2>::RTTI_AddressOf(this, id); if (r) { return r; } \
|
||||
return AZ::Internal::RttiCaller<_3>::RTTI_AddressOf(this, id); } \
|
||||
AZ_POP_DISABLE_OVERRIDE_WARNING
|
||||
AZ_POP_DISABLE_WARNING
|
||||
|
||||
/// AZ_RTTI(BaseClass1,BaseClass2,BaseClass3,BaseClass4)
|
||||
#define AZ_RTTI_5(_1, _2, _3, _4) AZ_RTTI_COMMON() \
|
||||
@@ -154,7 +144,7 @@ namespace AZ
|
||||
AZ::Internal::RttiCaller<_2>::RTTI_EnumHierarchy(cb, userData); \
|
||||
AZ::Internal::RttiCaller<_3>::RTTI_EnumHierarchy(cb, userData); \
|
||||
AZ::Internal::RttiCaller<_4>::RTTI_EnumHierarchy(cb, userData); } \
|
||||
AZ_PUSH_DISABLE_OVERRIDE_WARNING \
|
||||
AZ_PUSH_DISABLE_WARNING(26433, "-Winconsistent-missing-override") \
|
||||
virtual inline const void* RTTI_AddressOf(const AZ::TypeId& id) const { \
|
||||
if (id == RTTI_Type()) { return this; } \
|
||||
const void* r = AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); if (r) { return r; } \
|
||||
@@ -167,7 +157,7 @@ namespace AZ
|
||||
r = AZ::Internal::RttiCaller<_2>::RTTI_AddressOf(this, id); if (r) { return r; } \
|
||||
r = AZ::Internal::RttiCaller<_3>::RTTI_AddressOf(this, id); if (r) { return r; } \
|
||||
return AZ::Internal::RttiCaller<_4>::RTTI_AddressOf(this, id); } \
|
||||
AZ_POP_DISABLE_OVERRIDE_WARNING
|
||||
AZ_POP_DISABLE_WARNING
|
||||
|
||||
/// AZ_RTTI(BaseClass1,BaseClass2,BaseClass3,BaseClass4,BaseClass5)
|
||||
#define AZ_RTTI_6(_1, _2, _3, _4, _5) AZ_RTTI_COMMON() \
|
||||
@@ -185,7 +175,7 @@ namespace AZ
|
||||
AZ::Internal::RttiCaller<_3>::RTTI_EnumHierarchy(cb, userData); \
|
||||
AZ::Internal::RttiCaller<_4>::RTTI_EnumHierarchy(cb, userData); \
|
||||
AZ::Internal::RttiCaller<_5>::RTTI_EnumHierarchy(cb, userData); } \
|
||||
AZ_PUSH_DISABLE_OVERRIDE_WARNING \
|
||||
AZ_PUSH_DISABLE_WARNING(26433, "-Winconsistent-missing-override") \
|
||||
virtual inline const void* RTTI_AddressOf(const AZ::TypeId& id) const { \
|
||||
if (id == RTTI_Type()) { return this; } \
|
||||
const void* r = AZ::Internal::RttiCaller<_1>::RTTI_AddressOf(this, id); if (r) { return r; } \
|
||||
@@ -200,7 +190,7 @@ namespace AZ
|
||||
r = AZ::Internal::RttiCaller<_3>::RTTI_AddressOf(this, id); if (r) { return r; } \
|
||||
r = AZ::Internal::RttiCaller<_4>::RTTI_AddressOf(this, id); if (r) { return r; } \
|
||||
return AZ::Internal::RttiCaller<_5>::RTTI_AddressOf(this, id); } \
|
||||
AZ_POP_DISABLE_OVERRIDE_WARNING
|
||||
AZ_POP_DISABLE_WARNING
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// MACRO specialization to allow optional parameters for template version of AZ_RTTI
|
||||
@@ -951,10 +941,7 @@ namespace AZ
|
||||
{
|
||||
return AZStd::shared_ptr<DestType>(ptr, castPtr);
|
||||
}
|
||||
else
|
||||
{
|
||||
return AZStd::shared_ptr<DestType>();
|
||||
}
|
||||
return AZStd::shared_ptr<DestType>();
|
||||
}
|
||||
|
||||
// RttiCast specialization for intrusive_ptr.
|
||||
@@ -1077,7 +1064,6 @@ namespace AZ
|
||||
{
|
||||
return AZ::Internal::RttiIsTypeOfIdHelper<U>::Check(id, data, typename HasAZRtti<AZStd::remove_pointer_t<U>>::kind_type());
|
||||
}
|
||||
|
||||
} // namespace AZ
|
||||
|
||||
#endif // AZCORE_RTTI_H
|
||||
#pragma once
|
||||
|
||||
@@ -19,8 +19,8 @@ namespace AZ
|
||||
public:
|
||||
AZ_COMPONENT(JsonSystemComponent, "{3C2C7234-9512-4E24-86F0-C40865D7EECE}", Component);
|
||||
|
||||
void Activate();
|
||||
void Deactivate();
|
||||
void Activate() override;
|
||||
void Deactivate() override;
|
||||
|
||||
static void Reflect(ReflectContext* reflectContext);
|
||||
};
|
||||
|
||||
@@ -46,7 +46,8 @@ namespace AZ
|
||||
public:
|
||||
AZ_RTTI(JsonUnorderedMapSerializer, "{EF4478D3-1820-4FDB-A7B7-C9711EB41602}", JsonMapSerializer);
|
||||
AZ_CLASS_ALLOCATOR_DECL;
|
||||
|
||||
|
||||
using JsonMapSerializer::Store;
|
||||
JsonSerializationResult::Result Store(rapidjson::Value& outputValue, const void* inputValue, const void* defaultValue,
|
||||
const Uuid& valueTypeId, JsonSerializerContext& context) override;
|
||||
};
|
||||
@@ -63,6 +64,7 @@ namespace AZ
|
||||
const SerializeContext::ClassElement* keyElement, const SerializeContext::ClassElement* valueElement,
|
||||
const rapidjson::Value& key, const rapidjson::Value& value, JsonDeserializerContext& context) override;
|
||||
|
||||
using JsonMapSerializer::Store;
|
||||
JsonSerializationResult::Result Store(rapidjson::Value& outputValue, const void* inputValue, const void* defaultValue,
|
||||
const Uuid& valueTypeId, JsonSerializerContext& context) override;
|
||||
};
|
||||
|
||||
@@ -78,6 +78,7 @@ namespace AZ::Internal
|
||||
|
||||
struct EnginePathsVisitor : public AZ::SettingsRegistryInterface::Visitor
|
||||
{
|
||||
using AZ::SettingsRegistryInterface::Visitor::Visit;
|
||||
void Visit(
|
||||
[[maybe_unused]] AZStd::string_view path, AZStd::string_view valueName,
|
||||
[[maybe_unused]] AZ::SettingsRegistryInterface::Type type, AZStd::string_view value) override
|
||||
@@ -355,6 +356,7 @@ namespace AZ::SettingsRegistryMergeUtils
|
||||
: m_settingsSpecialization{ specializations }
|
||||
{}
|
||||
|
||||
using AZ::SettingsRegistryInterface::Visitor::Visit;
|
||||
void Visit([[maybe_unused]] AZStd::string_view path, AZStd::string_view valueName,
|
||||
[[maybe_unused]] AZ::SettingsRegistryInterface::Type type, bool value) override
|
||||
{
|
||||
@@ -761,6 +763,7 @@ namespace AZ::SettingsRegistryMergeUtils
|
||||
return SettingsRegistryInterface::VisitResponse::Continue;
|
||||
}
|
||||
|
||||
using AZ::SettingsRegistryInterface::Visitor::Visit;
|
||||
void Visit(AZStd::string_view, [[maybe_unused]] AZStd::string_view valueName, SettingsRegistryInterface::Type, AZStd::string_view value) override
|
||||
{
|
||||
if (processingSourcePathKey)
|
||||
@@ -896,6 +899,7 @@ namespace AZ::SettingsRegistryMergeUtils
|
||||
struct CommandLineVisitor
|
||||
: AZ::SettingsRegistryInterface::Visitor
|
||||
{
|
||||
using AZ::SettingsRegistryInterface::Visitor::Visit;
|
||||
void Visit(AZStd::string_view, AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type
|
||||
, AZStd::string_view value) override
|
||||
{
|
||||
|
||||
@@ -131,17 +131,23 @@ namespace UnitTest
|
||||
, public AllocatorsBase
|
||||
{
|
||||
public:
|
||||
// Bring in both const and non-const SetUp and TearDown function into scope to resolve warning 4266
|
||||
// no override available for virtual member function from base 'benchmark::Fixture'; function is hidden
|
||||
using ::benchmark::Fixture::SetUp, ::benchmark::Fixture::TearDown;
|
||||
|
||||
//Benchmark interface
|
||||
void SetUp(const ::benchmark::State& st) override
|
||||
{
|
||||
AZ_UNUSED(st);
|
||||
SetupAllocator();
|
||||
}
|
||||
void SetUp(::benchmark::State& st) override
|
||||
{
|
||||
AZ_UNUSED(st);
|
||||
SetupAllocator();
|
||||
}
|
||||
|
||||
void TearDown(const ::benchmark::State& st) override
|
||||
{
|
||||
AZ_UNUSED(st);
|
||||
TeardownAllocator();
|
||||
}
|
||||
void TearDown(::benchmark::State& st) override
|
||||
{
|
||||
AZ_UNUSED(st);
|
||||
|
||||
@@ -116,9 +116,9 @@ namespace AZ
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// UserSettingsBus
|
||||
virtual AZStd::intrusive_ptr<UserSettings> FindUserSettings(u32 id);
|
||||
virtual void AddUserSettings(u32 id, UserSettings* settings);
|
||||
virtual bool Save(const char* settingsPath, SerializeContext* sc);
|
||||
AZStd::intrusive_ptr<UserSettings> FindUserSettings(u32 id) override;
|
||||
void AddUserSettings(u32 id, UserSettings* settings) override;
|
||||
bool Save(const char* settingsPath, SerializeContext* sc) override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static void Reflect(ReflectContext* reflection);
|
||||
|
||||
@@ -831,7 +831,6 @@ namespace AZStd
|
||||
// find first element that value is before, using operator<
|
||||
typename iterator_traits<ForwardIterator>::difference_type count = AZStd::distance(first, last);
|
||||
typename iterator_traits<ForwardIterator>::difference_type step{};
|
||||
count = AZStd::distance(first, last);
|
||||
for (; 0 < count; )
|
||||
{ // divide and conquer, find half that contains answer
|
||||
step = count / 2;
|
||||
|
||||
@@ -187,7 +187,7 @@ namespace AZStd
|
||||
: m_f(AZStd::move(f)) {}
|
||||
thread_info_impl(Internal::thread_move_t<F> f)
|
||||
: m_f(f) {}
|
||||
virtual void execute() { m_f(); }
|
||||
void execute() override { m_f(); }
|
||||
private:
|
||||
F m_f;
|
||||
|
||||
|
||||
@@ -129,16 +129,16 @@ namespace AZStd
|
||||
{
|
||||
}
|
||||
|
||||
virtual void dispose() // nothrow
|
||||
void dispose() override // nothrow
|
||||
{
|
||||
AZStd::checked_delete(px_);
|
||||
}
|
||||
virtual void destroy() // nothrow
|
||||
void destroy() override // nothrow
|
||||
{
|
||||
this->~this_type();
|
||||
a_.deallocate(this, sizeof(this_type), AZStd::alignment_of<this_type>::value);
|
||||
}
|
||||
virtual void* get_deleter(Internal::sp_typeinfo const&)
|
||||
void* get_deleter(Internal::sp_typeinfo const&) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -176,18 +176,18 @@ namespace AZStd
|
||||
{
|
||||
}
|
||||
|
||||
virtual void dispose() // nothrow
|
||||
void dispose() override // nothrow
|
||||
{
|
||||
d_(p_);
|
||||
}
|
||||
|
||||
virtual void destroy() // nothrow
|
||||
void destroy() override // nothrow
|
||||
{
|
||||
this->~this_type();
|
||||
a_.deallocate(this, sizeof(this_type), AZStd::alignment_of<this_type>::value);
|
||||
}
|
||||
|
||||
virtual void* get_deleter(Internal::sp_typeinfo const& ti)
|
||||
void* get_deleter(Internal::sp_typeinfo const& ti) override
|
||||
{
|
||||
return ti == aztypeid(D) ? &reinterpret_cast<char&>(d_) : 0;
|
||||
}
|
||||
|
||||
@@ -215,6 +215,7 @@ namespace AZStd
|
||||
|
||||
struct ErrorSink
|
||||
{
|
||||
virtual ~ErrorSink() = default;
|
||||
virtual void RegexError(regex_constants::error_type code) = 0;
|
||||
};
|
||||
}
|
||||
@@ -1079,7 +1080,7 @@ namespace AZStd
|
||||
NodeBase* m_next;
|
||||
NodeBase* m_previous;
|
||||
|
||||
virtual ~NodeBase() { }
|
||||
virtual ~NodeBase() = default;
|
||||
};
|
||||
|
||||
inline void DestroyNode(NodeBase* node, NodeBase* end = nullptr)
|
||||
@@ -1758,7 +1759,7 @@ namespace AZStd
|
||||
return (*this);
|
||||
}
|
||||
|
||||
~basic_regex()
|
||||
~basic_regex() override
|
||||
{ // destroy the object
|
||||
Clear();
|
||||
}
|
||||
@@ -2916,7 +2917,7 @@ namespace AZStd
|
||||
}
|
||||
|
||||
template<class ForwardIterator, class Element, class RegExTraits>
|
||||
inline NodeBase* Builder<ForwardIterator, Element, RegExTraits>::BeginGroup(void)
|
||||
inline NodeBase* Builder<ForwardIterator, Element, RegExTraits>::BeginGroup()
|
||||
{ // add group node
|
||||
return (NewNode(NT_group));
|
||||
}
|
||||
@@ -3026,7 +3027,7 @@ namespace AZStd
|
||||
}
|
||||
|
||||
template<class ForwardIterator, class Element, class RegExTraits>
|
||||
inline RootNode* Builder<ForwardIterator, Element, RegExTraits>::EndPattern(void)
|
||||
inline RootNode* Builder<ForwardIterator, Element, RegExTraits>::EndPattern()
|
||||
{ // wrap up
|
||||
NewNode(NT_end);
|
||||
return m_root;
|
||||
|
||||
+5
-5
@@ -21,7 +21,7 @@ namespace AZ
|
||||
class WinAPIOverrunDetectionSchema : public OverrunDetectionSchema::PlatformAllocator
|
||||
{
|
||||
public:
|
||||
virtual SystemInformation GetSystemInformation() override
|
||||
SystemInformation GetSystemInformation() override
|
||||
{
|
||||
SystemInformation result;
|
||||
SYSTEM_INFO info;
|
||||
@@ -32,7 +32,7 @@ namespace AZ
|
||||
return result;
|
||||
}
|
||||
|
||||
virtual void* ReserveBytes(size_t amount) override
|
||||
void* ReserveBytes(size_t amount) override
|
||||
{
|
||||
void* result = VirtualAlloc(0, amount, MEM_RESERVE, PAGE_NOACCESS);
|
||||
|
||||
@@ -45,12 +45,12 @@ namespace AZ
|
||||
return result;
|
||||
}
|
||||
|
||||
virtual void ReleaseReservedBytes(void* base) override
|
||||
void ReleaseReservedBytes(void* base) override
|
||||
{
|
||||
VirtualFree(base, 0, MEM_RELEASE);
|
||||
}
|
||||
|
||||
virtual void* CommitBytes(void* base, size_t amount) override
|
||||
void* CommitBytes(void* base, size_t amount) override
|
||||
{
|
||||
void* result = VirtualAlloc(base, amount, MEM_COMMIT, PAGE_READWRITE);
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace AZ
|
||||
return result;
|
||||
}
|
||||
|
||||
virtual void DecommitBytes(void* base, size_t amount) override
|
||||
void DecommitBytes(void* base, size_t amount) override
|
||||
{
|
||||
VirtualFree(base, amount, MEM_DECOMMIT);
|
||||
}
|
||||
|
||||
+1
@@ -267,6 +267,7 @@ namespace AZ::IO
|
||||
SettingsRegistryInterface::VisitResponse::Continue : SettingsRegistryInterface::VisitResponse::Skip;
|
||||
}
|
||||
|
||||
using SettingsRegistryInterface::Visitor::Visit;
|
||||
void Visit([[maybe_unused]] AZStd::string_view path, [[maybe_unused]] AZStd::string_view valueName,
|
||||
[[maybe_unused]] AZ::SettingsRegistryInterface::Type type, AZStd::string_view value) override
|
||||
{
|
||||
|
||||
@@ -100,6 +100,7 @@ namespace JsonSerializationTests
|
||||
AZ::AllocatorInstance<AZ::PoolAllocator>::Destroy();
|
||||
}
|
||||
|
||||
using JsonSerializerConformityTestDescriptor<AZ::Data::Asset<TestAssetData>>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
context->RegisterGenericType<Asset>();
|
||||
|
||||
@@ -956,18 +956,8 @@ AZ_POP_DISABLE_WARNING
|
||||
namespace Benchmark
|
||||
{
|
||||
class PathBenchmarkFixture
|
||||
: public ::benchmark::Fixture
|
||||
, public ::UnitTest::AllocatorsBase
|
||||
: public ::UnitTest::AllocatorsBenchmarkFixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
{
|
||||
::UnitTest::AllocatorsBase::SetupAllocator();
|
||||
}
|
||||
void TearDown([[maybe_unused]] const ::benchmark::State& state) override
|
||||
{
|
||||
::UnitTest::AllocatorsBase::TeardownAllocator();
|
||||
}
|
||||
protected:
|
||||
AZStd::fixed_vector<const char*, 20> m_appendPaths{ "foo", "bar", "baz", "bazzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz",
|
||||
"boo/bar/base", "C:\\path\\to\\O3DE", "C", "\\\\", "/", R"(test\\path/with\mixed\separators)" };
|
||||
|
||||
@@ -1704,7 +1704,7 @@ namespace Benchmark
|
||||
static const AZ::u32 MEDIUM_NUMBER_OF_JOBS = 1024;
|
||||
static const AZ::u32 LARGE_NUMBER_OF_JOBS = 16384;
|
||||
|
||||
void SetUp([[maybe_unused]] ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
AllocatorInstance<PoolAllocator>::Create();
|
||||
AllocatorInstance<ThreadPoolAllocator>::Create();
|
||||
@@ -1749,8 +1749,16 @@ namespace Benchmark
|
||||
return randomDepthDistribution(randomDepthGenerator);
|
||||
});
|
||||
}
|
||||
void SetUp(::benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(const ::benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
void TearDown([[maybe_unused]] ::benchmark::State& state) override
|
||||
void internalTearDown()
|
||||
{
|
||||
JobContext::SetGlobalContext(nullptr);
|
||||
|
||||
@@ -1763,6 +1771,14 @@ namespace Benchmark
|
||||
AllocatorInstance<ThreadPoolAllocator>::Destroy();
|
||||
AllocatorInstance<PoolAllocator>::Destroy();
|
||||
}
|
||||
void TearDown(::benchmark::State&) override
|
||||
{
|
||||
internalTearDown();
|
||||
}
|
||||
void TearDown(const ::benchmark::State&) override
|
||||
{
|
||||
internalTearDown();
|
||||
}
|
||||
|
||||
protected:
|
||||
inline void RunCalculatePiJob(AZ::s32 depth, AZ::s8 priority)
|
||||
|
||||
@@ -19,8 +19,7 @@ namespace Benchmark
|
||||
class BM_MathFrustum
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_testFrustum = AZ::Frustum(AZ::ViewFrustumAttributes(AZ::Transform::CreateIdentity(), 1.0f, 2.0f * atanf(0.5f), 10.0f, 90.0f));
|
||||
|
||||
@@ -40,6 +39,15 @@ namespace Benchmark
|
||||
return data;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct Data
|
||||
{
|
||||
|
||||
@@ -23,8 +23,7 @@ namespace Benchmark
|
||||
class BM_MathMatrix3x3
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_testDataArray.resize(1000);
|
||||
|
||||
@@ -44,6 +43,15 @@ namespace Benchmark
|
||||
return testData;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct TestData
|
||||
{
|
||||
|
||||
@@ -21,8 +21,7 @@ namespace Benchmark
|
||||
class BM_MathMatrix3x4
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_testDataArray.resize(1000);
|
||||
|
||||
@@ -58,6 +57,15 @@ namespace Benchmark
|
||||
return testData;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct TestData
|
||||
{
|
||||
|
||||
@@ -20,8 +20,7 @@ namespace Benchmark
|
||||
class BM_MathMatrix4x4
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_testDataArray.resize(1000);
|
||||
|
||||
@@ -41,6 +40,15 @@ namespace Benchmark
|
||||
return testData;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct TestData
|
||||
{
|
||||
|
||||
@@ -19,8 +19,7 @@ namespace Benchmark
|
||||
class BM_MathObb
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_position.Set(1.0f, 2.0f, 3.0f);
|
||||
m_rotation = AZ::Quaternion::CreateRotationZ(AZ::Constants::QuarterPi);
|
||||
@@ -28,6 +27,16 @@ namespace Benchmark
|
||||
m_obb = AZ::Obb::CreateFromPositionRotationAndHalfLengths(m_position, m_rotation, m_halfLengths);
|
||||
}
|
||||
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
AZ::Obb m_obb;
|
||||
AZ::Vector3 m_position;
|
||||
AZ::Quaternion m_rotation;
|
||||
|
||||
@@ -18,14 +18,7 @@ namespace Benchmark
|
||||
class BM_MathPlane
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
BM_MathPlane()
|
||||
{
|
||||
const unsigned int seed = 1;
|
||||
rng = std::mt19937_64(seed);
|
||||
}
|
||||
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
for (int i = 0; i < m_numIters; ++i)
|
||||
{
|
||||
@@ -39,7 +32,7 @@ namespace Benchmark
|
||||
m_distance = unif(rng);
|
||||
m_dists.push_back(m_distance);
|
||||
|
||||
//set these differently so they don't overlap with same values as other vectors
|
||||
// set these differently so they don't overlap with same values as other vectors
|
||||
m_normal = AZ::Vector3(unif(rng), unif(rng), unif(rng));
|
||||
m_normal.Normalize();
|
||||
m_distance = unif(rng);
|
||||
@@ -47,6 +40,21 @@ namespace Benchmark
|
||||
m_planes.push_back(m_plane);
|
||||
}
|
||||
}
|
||||
public:
|
||||
BM_MathPlane()
|
||||
{
|
||||
const unsigned int seed = 1;
|
||||
rng = std::mt19937_64(seed);
|
||||
}
|
||||
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
AZ::Plane m_plane;
|
||||
AZ::Vector3 m_normal;
|
||||
|
||||
@@ -17,8 +17,7 @@ namespace Benchmark
|
||||
class BM_MathQuaternion
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_quatDataArray.resize(1000);
|
||||
|
||||
@@ -42,6 +41,15 @@ namespace Benchmark
|
||||
return quatData;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct QuatData
|
||||
{
|
||||
|
||||
@@ -35,8 +35,7 @@ namespace Benchmark
|
||||
class BM_MathShapeIntersection
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_testDataArray.resize(1000);
|
||||
|
||||
@@ -58,6 +57,15 @@ namespace Benchmark
|
||||
return testData;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct TestData
|
||||
{
|
||||
|
||||
@@ -22,8 +22,7 @@ namespace Benchmark
|
||||
class BM_MathTransform
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_testDataArray.resize(1000);
|
||||
|
||||
@@ -51,6 +50,15 @@ namespace Benchmark
|
||||
return testData;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct TestData
|
||||
{
|
||||
|
||||
@@ -19,8 +19,7 @@ namespace Benchmark
|
||||
class BM_MathVector2
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_vecDataArray.resize(1000);
|
||||
|
||||
@@ -37,6 +36,15 @@ namespace Benchmark
|
||||
return vecData;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct VecData
|
||||
{
|
||||
|
||||
@@ -19,8 +19,7 @@ namespace Benchmark
|
||||
class BM_MathVector3
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_vecDataArray.resize(1000);
|
||||
|
||||
@@ -37,6 +36,15 @@ namespace Benchmark
|
||||
return vecData;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct VecData
|
||||
{
|
||||
|
||||
@@ -19,8 +19,7 @@ namespace Benchmark
|
||||
class BM_MathVector4
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_vecDataArray.resize(1000);
|
||||
|
||||
@@ -38,6 +37,15 @@ namespace Benchmark
|
||||
return vecData;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct VecData
|
||||
{
|
||||
|
||||
@@ -120,19 +120,34 @@ namespace Benchmark
|
||||
class HphaSchemaBenchmarkFixture
|
||||
: public ::benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp(const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
AZ_UNUSED(state);
|
||||
AZ::AllocatorInstance<HphaSchema_TestAllocator>::Create();
|
||||
}
|
||||
|
||||
void TearDown(const ::benchmark::State& state) override
|
||||
void internalTearDown()
|
||||
{
|
||||
AZ_UNUSED(state);
|
||||
AZ::AllocatorInstance<HphaSchema_TestAllocator>::Destroy();
|
||||
}
|
||||
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void TearDown(const benchmark::State&) override
|
||||
{
|
||||
internalTearDown();
|
||||
}
|
||||
void TearDown(benchmark::State&) override
|
||||
{
|
||||
internalTearDown();
|
||||
}
|
||||
|
||||
static void BM_Allocations(benchmark::State& state, const AllocationSizeArray& allocationArray)
|
||||
{
|
||||
AZStd::vector<void*> allocations;
|
||||
|
||||
+23
-13
@@ -1155,6 +1155,23 @@ namespace Benchmark
|
||||
{
|
||||
class StorageDriveWindowsFixture : public benchmark::Fixture
|
||||
{
|
||||
void internalTearDown()
|
||||
{
|
||||
using namespace AZ::IO;
|
||||
|
||||
AZStd::string temp;
|
||||
m_absolutePath.swap(temp);
|
||||
|
||||
delete m_streamer;
|
||||
m_streamer = nullptr;
|
||||
|
||||
SystemFile::Delete(TestFileName);
|
||||
|
||||
AZ::IO::FileIOBase::SetInstance(nullptr);
|
||||
AZ::IO::FileIOBase::SetInstance(m_previousFileIO);
|
||||
delete m_fileIO;
|
||||
m_fileIO = nullptr;
|
||||
}
|
||||
public:
|
||||
constexpr static const char* TestFileName = "StreamerBenchmark.bin";
|
||||
constexpr static size_t FileSize = 64_mib;
|
||||
@@ -1197,20 +1214,13 @@ namespace Benchmark
|
||||
}
|
||||
}
|
||||
|
||||
void TearDown([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void TearDown(const benchmark::State&) override
|
||||
{
|
||||
using namespace AZ::IO;
|
||||
|
||||
AZStd::string temp;
|
||||
m_absolutePath.swap(temp);
|
||||
|
||||
delete m_streamer;
|
||||
|
||||
SystemFile::Delete(TestFileName);
|
||||
|
||||
AZ::IO::FileIOBase::SetInstance(nullptr);
|
||||
AZ::IO::FileIOBase::SetInstance(m_previousFileIO);
|
||||
delete m_fileIO;
|
||||
internalTearDown();
|
||||
}
|
||||
void TearDown(benchmark::State&) override
|
||||
{
|
||||
internalTearDown();
|
||||
}
|
||||
|
||||
void RepeatedlyReadFile(benchmark::State& state)
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace JsonSerializationTests
|
||||
features.m_fixedSizeArray = true;
|
||||
}
|
||||
|
||||
using JsonSerializerConformityTestDescriptor<T>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
context->RegisterGenericType<T>();
|
||||
@@ -243,6 +244,7 @@ namespace JsonSerializationTests
|
||||
])";
|
||||
}
|
||||
|
||||
using ArraySerializerTestDescriptionBase<AZStd::array<BaseClass2*, 4>>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
Base::Reflect(context);
|
||||
@@ -299,6 +301,7 @@ namespace JsonSerializationTests
|
||||
AZ::JsonArraySerializer m_serializer;
|
||||
|
||||
public:
|
||||
using BaseJsonSerializerFixture::RegisterAdditional;
|
||||
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
context->RegisterGenericType<Array>();
|
||||
|
||||
@@ -60,6 +60,7 @@ namespace JsonSerializationTests
|
||||
return "[188, 288, 388]";
|
||||
}
|
||||
|
||||
using BasicContainerConformityTestDescriptor<Container>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
context->RegisterGenericType<Container>();
|
||||
@@ -133,6 +134,7 @@ namespace JsonSerializationTests
|
||||
return "[188, 288, 388]";
|
||||
}
|
||||
|
||||
using BasicContainerConformityTestDescriptor<Container>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
context->RegisterGenericType<Container>();
|
||||
@@ -225,6 +227,7 @@ namespace JsonSerializationTests
|
||||
features.m_supportsPartialInitialization = true;
|
||||
}
|
||||
|
||||
using BasicContainerConformityTestDescriptor<Container>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
SimpleClass::Reflect(context, true);
|
||||
@@ -291,6 +294,7 @@ namespace JsonSerializationTests
|
||||
using Container = AZStd::vector<SimpleClass>;
|
||||
using BaseClassContainer = AZStd::vector<AZStd::shared_ptr<BaseClass>>;
|
||||
|
||||
using JsonBasicContainerSerializerTests::RegisterAdditional;
|
||||
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override
|
||||
{
|
||||
SimpleClass::Reflect(serializeContext, true);
|
||||
@@ -352,6 +356,7 @@ namespace JsonSerializationTests
|
||||
static constexpr size_t ContainerSize = 4;
|
||||
using Container = AZStd::fixed_vector<int, ContainerSize>;
|
||||
|
||||
using JsonBasicContainerSerializerTests::RegisterAdditional;
|
||||
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override
|
||||
{
|
||||
serializeContext->RegisterGenericType<Container>();
|
||||
@@ -387,6 +392,7 @@ namespace JsonSerializationTests
|
||||
public:
|
||||
using Set = AZStd::set<int>;
|
||||
|
||||
using JsonBasicContainerSerializerTests::RegisterAdditional;
|
||||
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override
|
||||
{
|
||||
serializeContext->RegisterGenericType<Set>();
|
||||
|
||||
@@ -83,6 +83,7 @@ namespace JsonSerializationTests
|
||||
BaseJsonSerializerFixture::TearDown();
|
||||
}
|
||||
|
||||
using BaseJsonSerializerFixture::RegisterAdditional;
|
||||
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override
|
||||
{
|
||||
serializeContext->Class<BoolPointerWrapper>()
|
||||
|
||||
@@ -95,6 +95,7 @@ namespace JsonSerializationTests
|
||||
BaseJsonSerializerFixture::TearDown();
|
||||
}
|
||||
|
||||
using BaseJsonSerializerFixture::RegisterAdditional;
|
||||
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override
|
||||
{
|
||||
serializeContext->Class<DoublePointerWrapper>()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user