Loading...
Searching...
No Matches
stage.h
Go to the documentation of this file.
1//
2// Copyright 2025 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_EXEC_ESF_STAGE_H
8#define PXR_EXEC_ESF_STAGE_H
9
11
12#include "pxr/pxr.h"
13
15
16#include "pxr/base/tf/token.h"
17#include "pxr/base/tf/type.h"
18
19#include <utility>
20
21PXR_NAMESPACE_OPEN_SCOPE
22
23class EsfAttribute;
24class EsfJournal;
25class EsfObject;
26class EsfPrim;
27class EsfProperty;
28class EsfRelationship;
29class SdfPath;
30
42{
43public:
44 ESF_API ~EsfStageInterface() override;
45
48 const SdfPath &path,
49 EsfJournal *journal) const;
50
53 const SdfPath &path,
54 EsfJournal *journal) const;
55
58 const SdfPath &path,
59 EsfJournal *journal) const;
60
63 const SdfPath &path,
64 EsfJournal *journal) const;
65
68 const SdfPath &path,
69 EsfJournal *journal) const;
70
72 std::pair<TfToken, TfToken> GetTypeNameAndInstance(
73 const TfToken &apiSchemaName) const {
74 return _GetTypeNameAndInstance(apiSchemaName);
75 }
76
79 const TfToken &schemaTypeName) const {
80 return _GetAPITypeFromSchemaTypeName(schemaTypeName);
81 }
82
83private:
84 // These methods must be implemented by the scene adapter implementation.
85 virtual EsfAttribute _GetAttributeAtPath(
86 const SdfPath &path) const = 0;
87 virtual EsfObject _GetObjectAtPath(
88 const SdfPath &path) const = 0;
89 virtual EsfPrim _GetPrimAtPath(
90 const SdfPath &path) const = 0;
91 virtual EsfProperty _GetPropertyAtPath(
92 const SdfPath &path) const = 0;
93 virtual EsfRelationship _GetRelationshipAtPath(
94 const SdfPath &path) const = 0;
95 virtual std::pair<TfToken, TfToken> _GetTypeNameAndInstance(
96 const TfToken &apiSchemaName) const = 0;
97 virtual TfType _GetAPITypeFromSchemaTypeName(
98 const TfToken &schemaTypeName) const = 0;
99};
100
107class EsfStage : public EsfFixedSizePolymorphicHolder<EsfStageInterface, 16>
108{
109public:
111};
112
113PXR_NAMESPACE_CLOSE_SCOPE
114
115#endif
Holds an implementation of EsfAttributeInterface in a fixed-size buffer.
Definition: attribute.h:70
Enables a base class to be used with EsfFixedSizePolymorphicHolder.
Stores polymorphic objects in a fixed-size buffer.
EsfFixedSizePolymorphicHolder()=delete
The default constructor is deleted because instances must always contain a derived object.
Stores a collection of edit reasons associated with scene objects.
Definition: journal.h:38
Holds an implementation of EsfObjectInterface in a fixed-size buffer.
Definition: object.h:150
Holds an implementation of EsfPrimInterface in a fixed-size buffer.
Definition: prim.h:85
Holds an implementation of EsfPropertyInterface in a fixed-size buffer.
Definition: property.h:62
Holds an implementation of EsfRelationshipInterface in a fixed-size buffer.
Definition: relationship.h:61
Holds an implementation of EsfStageInterface in a fixed-size buffer.
Definition: stage.h:108
Stage abstraction for scene adapter implementations.
Definition: stage.h:42
ESF_API EsfObject GetObjectAtPath(const SdfPath &path, EsfJournal *journal) const
std::pair< TfToken, TfToken > GetTypeNameAndInstance(const TfToken &apiSchemaName) const
Definition: stage.h:72
ESF_API EsfRelationship GetRelationshipAtPath(const SdfPath &path, EsfJournal *journal) const
ESF_API EsfPrim GetPrimAtPath(const SdfPath &path, EsfJournal *journal) const
TfType GetAPITypeFromSchemaTypeName(const TfToken &schemaTypeName) const
Definition: stage.h:78
ESF_API EsfAttribute GetAttributeAtPath(const SdfPath &path, EsfJournal *journal) const
ESF_API EsfProperty GetPropertyAtPath(const SdfPath &path, EsfJournal *journal) const
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
TfType represents a dynamic runtime type.
Definition: type.h:48
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...