Open 3D Engine AzCore 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::Dom::PatchOperation Class Referencefinal

#include <DomPatch.h>

Public Types

enum class  Type {
  Add , Remove , Replace , Copy ,
  Move , Test
}
 The operation to perform. More...
 
enum class  ExistenceCheckFlags : AZ::u8 { DefaultExistenceCheck = 0x0 , VerifyFullPath = 0x1 , AllowEndOfArray = 0x2 }
 
using InversePatches = AZStd::fixed_vector< PatchOperation, 2 >
 

Public Member Functions

 PatchOperation (const PatchOperation &)=default
 
 PatchOperation (PatchOperation &&)=default
 
 PatchOperation (Path destionationPath, Type type, Value value)
 
 PatchOperation (Path destionationPath, Type type, Path sourcePath)
 
 PatchOperation (Path path, Type type)
 
PatchOperationoperator= (const PatchOperation &)=default
 
PatchOperationoperator= (PatchOperation &&)=default
 
bool operator== (const PatchOperation &rhs) const
 
bool operator!= (const PatchOperation &rhs) const
 
Type GetType () const
 
void SetType (Type type)
 
const PathGetDestinationPath () const
 
void SetDestinationPath (Path path)
 
const ValueGetValue () const
 
void SetValue (Value value)
 
const PathGetSourcePath () const
 
void SetSourcePath (Path path)
 
AZ::Outcome< Value, AZStd::stringApply (Value rootElement) const
 
PatchOutcome ApplyInPlace (Value &rootElement) const
 
AZ::Outcome< Value, AZStd::stringApplyAndDenormalize (Value rootElement)
 
PatchOutcome ApplyInPlaceAndDenormalize (Value &rootElement)
 
bool ContainsNormalizedEntries () const
 
Value GetDomRepresentation () const
 
AZ::Outcome< AZStd::fixed_vector< PatchOperation, 2 >, AZStd::stringGetInverse (Value stateBeforeApplication) const
 

Static Public Member Functions

static PatchOperation AddOperation (Path destinationPath, Value value)
 
static PatchOperation RemoveOperation (Path pathToRemove)
 
static PatchOperation ReplaceOperation (Path destinationPath, Value value)
 
static PatchOperation CopyOperation (Path destinationPath, Path sourcePath)
 
static PatchOperation MoveOperation (Path destinationPath, Path sourcePath)
 
static PatchOperation TestOperation (Path testPath, Value value)
 
static AZ::Outcome< PatchOperation, AZStd::stringCreateFromDomRepresentation (Value domValue)
 

Detailed Description

A patch operation that represents an atomic operation for mutating or validating a Value. PatchOperations can be created with helper methods in Patch. /see Patch

Member Enumeration Documentation

◆ Type

enum class AZ::Dom::PatchOperation::Type
strong

The operation to perform.

Enumerator
Add 

Inserts or replaces the value at DestinationPath with Value.

Remove 

Removes the entry at DestinationPath.

Replace 

Replaces the value at DestinationPath with Value.

Copy 

Copies the contents of SourcePath to DestinationPath.

Move 

Moves the contents of SourcePath to DestinationPath.

Test 

Ensures the contents of DestinationPath match Value or fails, performs no mutations.

Member Function Documentation

◆ ContainsNormalizedEntries()

bool AZ::Dom::PatchOperation::ContainsNormalizedEntries ( ) const

Returns true if this contains an "EndOfArray" entry in any relevant paths, meaning resolving the path requires a lookup inside a target DOM.


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