Open 3D Engine AzToolsFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzToolsFramework::InstanceDataNode Class Reference

Inherited by AzToolsFramework::InstanceDataHierarchy.

Public Types

enum class  ComparisonFlags : AZ::u32 { None = 0 , New = (1 << 0) , Differs = (1 << 1) , Removed = (1 << 2) }
 
typedef AZStd::list< InstanceDataNodeNodeContainer
 
using Identifier = AZ::u64
 Field address structure, which is a string of the 64-bit addresses of each ancestor along the hierarchy.
 
using Address = AZStd::vector< Identifier >
 
typedef AZStd::function< const AZ::SerializeContext::ClassData *(const AZ::Uuid &classId, const AZ::Uuid &typeId, AZ::SerializeContext *context)> SelectClassCallback
 Has this node (or children if specified) changed in any way from their comparison node.
 
typedef AZStd::function< bool(void *dataPtr, const AZ::SerializeContext::ClassElement *classElement, bool noDefaultData, AZ::SerializeContext *context)> FillDataClassCallback
 
typedef AZStd::function< void(const AZ::Uuid &classId)> CustomElementCreationHandler
 

Public Member Functions

template<class T >
bool Read (T &value)
 Read a value into a variable of type T. Returns true if values read are the same across all instances in this node.
 
bool ReadRaw (void *&valuePtr, AZ::TypeId valueType)
 
template<class T >
void Write (const T &value)
 Write a value to the node (same value is written to all instances regardless of their original value).
 
void WriteRaw (const void *valuePtr, AZ::TypeId valueType)
 
bool IsMultiInstance () const
 Check if have more than one instance for this node.
 
size_t GetNumInstances () const
 
bool HasInstances () const
 
void * GetInstance (size_t idx) const
 
void ** GetInstanceAddress (size_t idx) const
 
void * FirstInstance () const
 
InstanceDataNodeGetRoot () const
 
InstanceDataNodeGetParent () const
 
NodeContainer & GetChildren ()
 
const NodeContainer & GetChildren () const
 
const AZ::SerializeContext::ClassData * GetClassMetadata () const
 
const AZ::SerializeContext::ClassElement * GetElementMetadata () const
 
const AZ::Edit::ElementData * GetElementEditMetadata () const
 
const AZ::Edit::ElementData * GetGroupElementMetadata () const
 
AZ::SerializeContext * GetSerializeContext () const
 
void MarkNewVersusComparison ()
 Flags management when using a comparison instance.
 
void MarkDifferentVersusComparison ()
 This node differs from that of the comparison instance.
 
void MarkRemovedVersusComparison ()
 This node does not exist in the target hierarchy.
 
void ClearComparisonData ()
 Clear comparison flags (for re-computation).
 
bool IsNewVersusComparison () const
 Has this node been flagged as new vs. the comparison instance?
 
bool IsDifferentVersusComparison () const
 Has this node been flagged as different from the comparison instance?
 
bool IsRemovedVersusComparison () const
 Is this node not in the comparison instance?
 
const InstanceDataNodeGetComparisonNode () const
 Retrieves the corresopnding node in the comparison hierarchy, if relevant.
 
bool HasChangesVersusComparison (bool includeChildren) const
 
bool CreateContainerElement (const SelectClassCallback &selectClass, const FillDataClassCallback &fillData)
 
bool ChildMatchesAddress (const InstanceDataNode::Address &elementAddress) const
 
Address ComputeAddress () const
 
AZ::Edit::Attribute * FindAttribute (AZ::Edit::AttributeId nameCrc) const
 Check the element edit data, class element, and class data for the specified attribute.
 
template<class T >
bool ReadAttribute (AZ::Edit::AttributeId nameCrc, T &value, bool readChildAttributes=false) const
 Read the value T of the specified attribute into value if it exists and shares the same value across all instances.
 

Static Public Attributes

static const Identifier InvalidIdentifier = static_cast<Identifier>(~0)
 

Protected Types

typedef AZStd::vector< void * > InstanceArray
 

Protected Attributes

InstanceArray m_instances
 
InstanceDataNodem_parent
 
InstanceDataNodem_root
 
NodeContainer m_children
 
const AZ::SerializeContext::ClassData * m_classData
 
const AZ::SerializeContext::ClassElement * m_classElement
 
const AZ::Edit::ElementData * m_elementEditData
 
AZ::SerializeContext * m_context
 
AZ::u32 m_comparisonFlags
 
const InstanceDataNodem_comparisonNode
 
bool m_matched
 
Identifier m_identifier
 
const AZ::Edit::ElementData * m_groupElementData
 

Friends

class InstanceDataHierarchy
 
template<typename WrappedType >
class RpePropertyHandlerWrapper
 

Member Enumeration Documentation

◆ ComparisonFlags

Comparison flags set on nodes as deltas are detected versus the comparison instance, if set.

Enumerator
New 

Node is new to the root instance (not found in comparison instance).

Differs 

Node exists in both the comparison and root instances, but values differ.

Removed 

Node exists in the source hierarchy, but not the target.

Member Function Documentation

◆ ComputeAddress()

Address AzToolsFramework::InstanceDataNode::ComputeAddress ( ) const

Calculate full hierarchical address of this node, which is a vector of node-local addresses from the node's identifier up to the top of the hierarchy (Address = {[node] [nodeparent] ... [root]})

◆ MarkNewVersusComparison()

void AzToolsFramework::InstanceDataNode::MarkNewVersusComparison ( )

Flags management when using a comparison instance.

This node does not exist in the comparison instance's hierarchy.


The documentation for this class was generated from the following file: