Open 3D Engine AzFramework 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.
AZ::DocumentPropertyEditor::RowAggregateAdapter Class Referenceabstract

class to allow multi-edits of row-based DPE adapters More...

#include <AggregateAdapter.h>

Inherits AZ::DocumentPropertyEditor::DocumentAdapter.

Inherited by AZ::DocumentPropertyEditor::LabeledRowAggregateAdapter.

Classes

struct  AdapterInfo
 
struct  AggregateNode
 

Public Member Functions

void AddAdapter (DocumentAdapterPtr sourceAdapter)
 
void RemoveAdapter (DocumentAdapterPtr sourceAdapter)
 
void ClearAdapters ()
 
void SetGenerateDiffRows (bool generateDiffRows)
 
ExpanderSettingsCreateExpanderSettings (DocumentAdapter *referenceAdapter, const AZStd::string &settingsRegistryKey=AZStd::string(), const AZStd::string &propertyEditorName=AZStd::string()) override
 
- Public Member Functions inherited from AZ::DocumentPropertyEditor::DocumentAdapter
 AZ_RTTI (DocumentAdapter, "{8CEFE485-45C2-4ECC-B9D1-BBE75C7B02AB}")
 
Dom::Value GetContents () const
 
void ConnectResetHandler (ResetEvent::Handler &handler)
 
void ConnectChangedHandler (ChangedEvent::Handler &handler)
 
void ConnectMessageHandler (MessageEvent::Handler &handler)
 
virtual void SetRouter (RoutingAdapter *router, const Dom::Path &route)
 
Dom::Value SendAdapterMessage (const AdapterMessage &message)
 
bool IsEmpty ()
 
virtual ExpanderSettingsCreateExpanderSettings (DocumentAdapter *referenceAdapter, const AZStd::string &settingsRegistryKey=AZStd::string(), const AZStd::string &propertyEditorName=AZStd::string())
 

Protected Member Functions

virtual AZStd::vector< AZ::Name > GetMessagesToForward ()=0
 implemented by child adapters to return a vector of message Names to forward to each sub-adapter
 
virtual Dom::Value GenerateAggregateRow (AggregateNode *matchingNode)=0
 virtual function to generate an aggregate row that represents all the matching Dom::Values with in this node
 
virtual Dom::Value GenerateValuesDifferRow (AggregateNode *mismatchNode)=0
 
virtual bool SameRow (const Dom::Value &newRow, const Dom::Value &existingRow)=0
 
virtual bool ValuesMatch (const Dom::Value &left, const Dom::Value &right)=0
 pure virtual to determine if two row values match such that they can be edited by one PropertyHandler
 
void HandleAdapterReset (DocumentAdapterPtr adapter)
 
void HandleDomChange (DocumentAdapterPtr adapter, const Dom::Patch &patch)
 
void HandleDomMessage (DocumentAdapterPtr adapter, const AZ::DocumentPropertyEditor::AdapterMessage &message, Dom::Value &value)
 
Dom::Value GenerateContents () override
 
Dom::Value HandleMessage (const AdapterMessage &message) override
 
bool NodeIsComplete (const AggregateNode *node) const
 indicates whether this node has entries for all adapters and is therefore shown in the DOM
 
void EvaluateAllEntriesMatch (AggregateNode *node)
 
size_t GetIndexForAdapter (const DocumentAdapterPtr &adapter)
 
AggregateNodeGetNodeAtAdapterPath (size_t adapterIndex, const Dom::Path &path, Dom::Path &leftoverPath)
 
Dom::Value GetComparisonRow (AggregateNode *aggregateNode, size_t omitAdapterIndex=AggregateNode::InvalidEntry)
 get a Dom Value representing the given node by asking the first valid adapter that isn't at omitAdapterIndex
 
Dom::Value GetValueForNode (AggregateNode *aggregateNode)
 generates a Dom::Value for this node (not including row descendents) for use in GenerateContents or patch operations
 
Dom::Value GetValueHierarchyForNode (AggregateNode *aggregateNode)
 generates a Dom::Value for this node and its descendents for use in GenerateContents or patch operations
 
AggregateNodeGetNodeAtPath (const Dom::Path &aggregatePath)
 gets the node at the given path relative to this adapter, if it exists
 
Dom::Path GetPathForNode (AggregateNode *node)
 returns the resultant path for this node if it exists, otherwise an empty path
 
void PopulateNodesForAdapter (size_t adapterIndex)
 
AggregateNodeAddChildRow (size_t adapterIndex, AggregateNode *parentNode, const Dom::Value &childValue, size_t childIndex, Dom::Patch *outgoingPatch)
 
void PopulateChildren (size_t adapterIndex, const Dom::Value &parentValue, AggregateNode *parentNode)
 
void ProcessRemoval (AggregateNode *rowNode, size_t adapterIndex, Dom::Patch *outgoingPatch)
 
void UpdateAndPatchNode (AggregateNode *rowNode, size_t adapterIndex, const Dom::PatchOperation &patchOperation, const Dom::Path &pathPastNode, Dom::Patch &outgoingPatch)
 
- Protected Member Functions inherited from AZ::DocumentPropertyEditor::DocumentAdapter
virtual Dom::Value GenerateContents ()=0
 
virtual Dom::Value HandleMessage (const AdapterMessage &message)
 
void NotifyResetDocument (DocumentResetType resetType=DocumentResetType::SoftReset)
 
void NotifyContentsChanged (const Dom::Patch &patch)
 

Static Protected Member Functions

static void RemoveChildRows (Dom::Value &rowValue)
 

Protected Attributes

AZStd::vector< AZStd::unique_ptr< AdapterInfo > > m_adapters
 all the adapters represented in this aggregate (multi-edit)
 
AZStd::unique_ptr< AggregateNodem_rootNode
 
unsigned int m_updateFrame = 0
 monotonically increasing frame counter that increments whenever a source adapter gets an update
 
bool m_generateDiffRows = true
 
AdapterBuilder m_builder
 

Additional Inherited Members

- Public Types inherited from AZ::DocumentPropertyEditor::DocumentAdapter
using ResetEvent = Event<>
 
using ChangedEvent = Event< const Dom::Patch & >
 
using MessageEvent = Event< const AdapterMessage &, Dom::Value & >
 
- Static Public Member Functions inherited from AZ::DocumentPropertyEditor::DocumentAdapter
static bool IsDebugModeEnabled ()
 
static void SetDebugModeEnabled (bool enableDebugMode)
 
static bool IsRow (const Dom::Value &domValue)
 convenience method to determine whether a particular Dom Value is a row
 
- Protected Types inherited from AZ::DocumentPropertyEditor::DocumentAdapter
enum class  DocumentResetType { SoftReset , HardReset }
 Specifies the type of reset operation triggered in NotifyResetDocument. More...
 

Detailed Description

class to allow multi-edits of row-based DPE adapters

Member Function Documentation

◆ AddChildRow()

AggregateNode * AZ::DocumentPropertyEditor::RowAggregateAdapter::AddChildRow ( size_t  adapterIndex,
AggregateNode parentNode,
const Dom::Value &  childValue,
size_t  childIndex,
Dom::Patch *  outgoingPatch 
)
protected

adds a child row given the adapter index, parentNode, new value, and new index.

Parameters
outgoingPatchIf generating a patch operation for this add is desirable, specify a non-null outgoingPatch

◆ CreateExpanderSettings()

ExpanderSettings * AZ::DocumentPropertyEditor::RowAggregateAdapter::CreateExpanderSettings ( DocumentAdapter referenceAdapter,
const AZStd::string &  settingsRegistryKey = AZStd::string(),
const AZStd::string &  propertyEditorName = AZStd::string() 
)
overridevirtual

◆ GenerateAggregateRow()

virtual Dom::Value AZ::DocumentPropertyEditor::RowAggregateAdapter::GenerateAggregateRow ( AggregateNode matchingNode)
protectedpure virtual

virtual function to generate an aggregate row that represents all the matching Dom::Values with in this node

Implemented in AZ::DocumentPropertyEditor::LabeledRowAggregateAdapter.

◆ GenerateContents()

Dom::Value AZ::DocumentPropertyEditor::RowAggregateAdapter::GenerateContents ( )
overrideprotectedvirtual

Generates the contents of this adapter. This must be an Adapter DOM node. These contents will be cached - to notify clients of changes to the structure, NotifyResetDocument or NotifyContentsChanged must be used.

See also
AdapterBuilder for building out this DOM structure.

Implements AZ::DocumentPropertyEditor::DocumentAdapter.

◆ GenerateValuesDifferRow()

virtual Dom::Value AZ::DocumentPropertyEditor::RowAggregateAdapter::GenerateValuesDifferRow ( AggregateNode mismatchNode)
protectedpure virtual

pure virtual to generate a "values differ" row that is appropriate for this type of AggregateAdapter mismatchNode is provided so the row presented can include information from individual mismatched Dom::Values, if desired

Implemented in AZ::DocumentPropertyEditor::LabeledRowAggregateAdapter.

◆ GetMessagesToForward()

virtual AZStd::vector< AZ::Name > AZ::DocumentPropertyEditor::RowAggregateAdapter::GetMessagesToForward ( )
protectedpure virtual

implemented by child adapters to return a vector of message Names to forward to each sub-adapter

Implemented in AZ::DocumentPropertyEditor::LabeledRowAggregateAdapter.

◆ HandleMessage()

Dom::Value AZ::DocumentPropertyEditor::RowAggregateAdapter::HandleMessage ( const AdapterMessage message)
overrideprotectedvirtual

Called by SendAdapterMessage before the view is notified. This may be overridden to handle BoundAdapterMessages on fields.

Reimplemented from AZ::DocumentPropertyEditor::DocumentAdapter.

◆ ProcessRemoval()

void AZ::DocumentPropertyEditor::RowAggregateAdapter::ProcessRemoval ( AggregateNode rowNode,
size_t  adapterIndex,
Dom::Patch *  outgoingPatch 
)
protected

removes the entry for adapterIndex in this node

Parameters
outgoingPatchwhen outgoingPatch is not null, this will add a remove patch operation to it, if appropriate

◆ SameRow()

virtual bool AZ::DocumentPropertyEditor::RowAggregateAdapter::SameRow ( const Dom::Value &  newRow,
const Dom::Value &  existingRow 
)
protectedpure virtual

pure virtual to determine if the row value from one adapter should be considered the same aggregate row as a value from another adapter

Implemented in AZ::DocumentPropertyEditor::LabeledRowAggregateAdapter.

◆ SetGenerateDiffRows()

void AZ::DocumentPropertyEditor::RowAggregateAdapter::SetGenerateDiffRows ( bool  generateDiffRows)
inline

determines whether to generate "values differ" rows at all if not, just generates rows based on the first adapter

◆ ValuesMatch()

virtual bool AZ::DocumentPropertyEditor::RowAggregateAdapter::ValuesMatch ( const Dom::Value &  left,
const Dom::Value &  right 
)
protectedpure virtual

pure virtual to determine if two row values match such that they can be edited by one PropertyHandler

Implemented in AZ::DocumentPropertyEditor::LabeledRowAggregateAdapter.


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