Loading...
Searching...
No Matches
prim.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_PRIM_H
8#define PXR_EXEC_ESF_PRIM_H
9
11
12#include "pxr/pxr.h"
13
14#include "pxr/exec/esf/api.h"
16#include "pxr/exec/esf/object.h"
17
18#include "pxr/base/tf/token.h"
19#include "pxr/base/tf/type.h"
20#include "pxr/usd/sdf/path.h"
21
22PXR_NAMESPACE_OPEN_SCOPE
23
24class EsfJournal;
25class EsfPrim;
26class EsfAttribute;
27
36class ESF_API_TYPE EsfPrimInterface : public EsfObjectInterface
37{
38public:
39 ESF_API ~EsfPrimInterface() override;
40
42 ESF_API const TfTokenVector &GetAppliedSchemas(EsfJournal *journal) const;
43
46 const TfToken &attributeName,
47 EsfJournal *journal) const;
48
51 const TfToken &relationshipName,
52 EsfJournal *journal) const;
53
55 ESF_API EsfPrim GetParent(EsfJournal *journal) const;
56
58 ESF_API TfType GetType(EsfJournal *journal) const;
59
61 virtual bool IsPseudoRoot() const = 0;
62
63protected:
66
67private:
68 // These methods must be implemented by the scene adapter implementation.
69 virtual const TfTokenVector &_GetAppliedSchemas() const = 0;
70 virtual EsfAttribute _GetAttribute(
71 const TfToken &attributeName) const = 0;
72 virtual EsfPrim _GetParent() const = 0;
73 virtual EsfRelationship _GetRelationship(
74 const TfToken &relationshipName) const = 0;
75 virtual TfType _GetType() const = 0;
76};
77
84class EsfPrim : public EsfFixedSizePolymorphicHolder<EsfPrimInterface, 48>
85{
86public:
88};
89
90PXR_NAMESPACE_CLOSE_SCOPE
91
92#endif
Holds an implementation of EsfAttributeInterface in a fixed-size buffer.
Definition: attribute.h:70
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
Scene object abstraction for scene adapter implementations.
Definition: object.h:45
Holds an implementation of EsfPrimInterface in a fixed-size buffer.
Definition: prim.h:85
Prim abstraction for scene adapter implementations.
Definition: prim.h:37
ESF_API EsfPrim GetParent(EsfJournal *journal) const
ESF_API const TfTokenVector & GetAppliedSchemas(EsfJournal *journal) const
ESF_API EsfAttribute GetAttribute(const TfToken &attributeName, EsfJournal *journal) const
ESF_API TfType GetType(EsfJournal *journal) const
EsfPrimInterface(const SdfPath &path)
This constructor may only be called by the scene adapter implementation.
Definition: prim.h:65
ESF_API EsfRelationship GetRelationship(const TfToken &relationshipName, EsfJournal *journal) const
virtual bool IsPseudoRoot() const =0
Holds an implementation of EsfRelationshipInterface in a fixed-size buffer.
Definition: relationship.h:61
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...
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440