|
| AZ_CLASS_ALLOCATOR (Link, AZ::SystemAllocator) |
|
| AZ_RTTI (Link, "{49230756-7BAA-4456-8DFE-0E18CB887DB5}") |
|
| Link (LinkId linkId) |
|
| Link (const Link &other)=delete |
|
Link & | operator= (const Link &other)=delete |
|
| Link (Link &&other) noexcept |
|
Link & | operator= (Link &&other) noexcept |
|
void | SetSourceTemplateId (TemplateId id) |
|
void | SetTargetTemplateId (TemplateId id) |
|
void | SetLinkDom (const PrefabDomValue &linkDom) |
|
void | SetLinkPatches (const PrefabDom &patches) |
|
void | SetInstanceName (const char *instanceName) |
|
bool | IsValid () const |
|
TemplateId | GetSourceTemplateId () const |
|
TemplateId | GetTargetTemplateId () const |
|
LinkId | GetId () const |
|
void | GetLinkPatches (PrefabDomValue &patchesDom, PrefabDomAllocator &allocator) const |
|
void | GetLinkDom (PrefabDomValue &linkDom, PrefabDomAllocator &allocator) const |
|
bool | AreOverridesPresent (AZ::Dom::Path path, AZ::Dom::PrefixTreeTraversalFlags prefixTreeTraversalFlags=AZ::Dom::PrefixTreeTraversalFlags::ExcludeParentPaths) const |
|
PrefabDomConstReference | GetOverridePatchAtExactPath (AZ::Dom::Path path) const |
|
AZ::Dom::DomPrefixTree< PrefabOverrideMetadata > | RemoveOverrides (AZ::Dom::Path path) |
|
bool | AddOverrides (const AZ::Dom::Path &path, AZ::Dom::DomPrefixTree< PrefabOverrideMetadata > &&subTree) |
|
void | AddOverrides (const PrefabDomValue &patches) |
|
PrefabDomPath | GetInstancePath () const |
|
const AZStd::string & | GetInstanceName () const |
|
bool | UpdateTarget () |
|
PrefabDomValue & | GetLinkedInstanceDom () |
|
void | AddLinkIdToInstanceDom (PrefabDomValue &instanceDomValue) |
|
◆ AddLinkIdToInstanceDom()
void AzToolsFramework::Prefab::Link::AddLinkIdToInstanceDom |
( |
PrefabDomValue & |
instanceDomValue | ) |
|
Adds a linkId name,value object to the DOM of an instance.
- Parameters
-
instanceDomValue | The DOM value of the instance within the target template DOM. |
◆ AddOverrides() [1/2]
bool AzToolsFramework::Prefab::Link::AddOverrides |
( |
const AZ::Dom::Path & |
path, |
|
|
AZ::Dom::DomPrefixTree< PrefabOverrideMetadata > && |
subTree |
|
) |
| |
Adds overrides at the provided path by attaching the provided subtree representing new overrides
- Parameters
-
path | The path at which new overrides should be added |
subTree | The tree representing the new overrides to be added |
- Returns
- Whether the overrides are successfully added or not.
◆ AddOverrides() [2/2]
void AzToolsFramework::Prefab::Link::AddOverrides |
( |
const PrefabDomValue & |
patches | ) |
|
Adds overrides patches to the tree. It can be used to add patches to tree for an entity.
- Parameters
-
patches | The override patches that will be added to tree. |
◆ AreOverridesPresent()
bool AzToolsFramework::Prefab::Link::AreOverridesPresent |
( |
AZ::Dom::Path |
path, |
|
|
AZ::Dom::PrefixTreeTraversalFlags |
prefixTreeTraversalFlags = AZ::Dom::PrefixTreeTraversalFlags::ExcludeParentPaths |
|
) |
| const |
Checks whether overrides are present by querying the patches tree with the provided path
- Parameters
-
path | The path to query the overrides tree with. |
prefixTreeTraversalFlags | The traversal flags for the prefix tree. The default is to exclude parent paths because we usually check for overrides on one or more components/properties within an entity. |
- Returns
- true if overrides are present at the provided path.
◆ GetLinkDom()
void AzToolsFramework::Prefab::Link::GetLinkDom |
( |
PrefabDomValue & |
linkDom, |
|
|
PrefabDomAllocator & |
allocator |
|
) |
| const |
Populates the link DOM provided with 'Source' and 'Patches' fields. 'Patches' are fetched from 'm_linkPatchesTree'.
- Parameters
-
[out] | linkDom | The DOM to populate with source and patches information. |
| allocator | The allocator to use for memory allocations of patches. |
◆ GetLinkedInstanceDom()
PrefabDomValue & AzToolsFramework::Prefab::Link::GetLinkedInstanceDom |
( |
| ) |
|
Get the DOM of the instance that the link points to.
- Returns
- The DOM of the linked instance
◆ GetLinkPatches()
void AzToolsFramework::Prefab::Link::GetLinkPatches |
( |
PrefabDomValue & |
patchesDom, |
|
|
PrefabDomAllocator & |
allocator |
|
) |
| const |
Populates the patches DOM provided with the patches fetched from 'm_linkPatchesTree'
- Parameters
-
[out] | patchesDom | The DOM to populate with patches |
| allocator | The allocator to use for memory allocations of patches. |
◆ GetOverridePatchAtExactPath()
PrefabDomConstReference AzToolsFramework::Prefab::Link::GetOverridePatchAtExactPath |
( |
AZ::Dom::Path |
path | ) |
const |
Gets an override patch at the exact provided path
- Parameters
-
path | The path to get override for. |
- Returns
- an override patch if an override is present at the exact provided path.
◆ RemoveOverrides()
AZ::Dom::DomPrefixTree< PrefabOverrideMetadata > AzToolsFramework::Prefab::Link::RemoveOverrides |
( |
AZ::Dom::Path |
path | ) |
|
Removes overrides at the provided path and all the nodes under it from the override tree
- Parameters
-
path | The path at which the overrides should be removed from |
- Returns
- The sub-tree representing the removed overrides.
The documentation for this class was generated from the following file:
- Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Link/Link.h