#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) | |
PatchOperation & | operator= (const PatchOperation &)=default |
PatchOperation & | operator= (PatchOperation &&)=default |
bool | operator== (const PatchOperation &rhs) const |
bool | operator!= (const PatchOperation &rhs) const |
Type | GetType () const |
void | SetType (Type type) |
const Path & | GetDestinationPath () const |
void | SetDestinationPath (Path path) |
const Value & | GetValue () const |
void | SetValue (Value value) |
const Path & | GetSourcePath () const |
void | SetSourcePath (Path path) |
AZ::Outcome< Value, AZStd::string > | Apply (Value rootElement) const |
PatchOutcome | ApplyInPlace (Value &rootElement) const |
AZ::Outcome< Value, AZStd::string > | ApplyAndDenormalize (Value rootElement) |
PatchOutcome | ApplyInPlaceAndDenormalize (Value &rootElement) |
bool | ContainsNormalizedEntries () const |
Value | GetDomRepresentation () const |
AZ::Outcome< AZStd::fixed_vector< PatchOperation, 2 >, AZStd::string > | GetInverse (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::string > | CreateFromDomRepresentation (Value domValue) |
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
|
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. |
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.