HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
common.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 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_USD_USD_COMMON_H
8 #define PXR_USD_USD_COMMON_H
9 
10 /// \file usd/common.h
11 
12 #include "pxr/pxr.h"
13 #include "pxr/usd/usd/api.h"
17 
19 #include "pxr/usd/usd/timeCode.h"
20 
21 #include <string>
22 #include <map>
23 
25 
26 // Forward declare Usd classes.
27 class UsdStage;
28 class UsdObject;
29 class UsdPrim;
30 class UsdProperty;
31 class UsdAttribute;
32 class UsdRelationship;
33 class UsdStageCache;
34 
35 class VtValue;
36 
38 typedef UsdStagePtr UsdStageWeakPtr;
39 
40 /// Return a human-readable description.
41 USD_API
42 std::string UsdDescribe(const UsdObject &);
43 /// \overload
44 USD_API
45 std::string UsdDescribe(const UsdStageRefPtr &);
46 /// \overload
47 USD_API
48 std::string UsdDescribe(const UsdStageWeakPtr &);
49 /// \overload
50 USD_API
51 std::string UsdDescribe(const UsdStage *);
52 /// \overload
53 USD_API
54 std::string UsdDescribe(const UsdStage &);
55 /// \overload
56 USD_API
57 std::string UsdDescribe(const UsdStageCache &);
58 
59 // XXX:
60 // Currently used for querying composed values from text layers, so VtValue is
61 // the optimal value-store, but this may not always be the case.
62 typedef std::map<class TfToken, VtValue,
65 
66 /// \enum UsdListPosition
67 ///
68 /// Specifies a position to add items to lists. Used by some Add()
69 /// methods in the USD API that manipulate lists, such as AddReference().
70 ///
72  /// The position at the front of the prepend list.
73  /// An item added at this position will, after composition is applied,
74  /// be stronger than other items prepended in this layer, and stronger
75  /// than items added by weaker layers.
77  /// The position at the back of the prepend list.
78  /// An item added at this position will, after composition is applied,
79  /// be weaker than other items prepended in this layer, but stronger
80  /// than items added by weaker layers.
82  /// The position at the front of the append list.
83  /// An item added at this position will, after composition is applied,
84  /// be stronger than other items appended in this layer, and stronger
85  /// than items added by weaker layers.
87  /// The position at the back of the append list.
88  /// An item added at this position will, after composition is applied,
89  /// be weaker than other items appended in this layer, but stronger
90  /// than items added by weaker layers.
92 };
93 
94 /// \enum UsdLoadPolicy
95 ///
96 /// Controls UsdStage::Load() and UsdPrim::Load() behavior regarding whether or
97 /// not descendant prims are loaded.
98 ///
100  /// Load a prim plus all its descendants.
102  /// Load a prim by itself with no descendants.
104 };
105 
106 /// \enum UsdSchemaKind
107 ///
108 /// An enum representing which kind of schema a given schema class belongs to.
109 /// For more details on the different kinds of schemas, see
110 /// \ref Usd_Page_GeneratingSchemas.
111 ///
112 enum class UsdSchemaKind {
113  /// Invalid or unknown schema kind.
114  Invalid,
115  /// Represents abstract or base schema types that are interface-only
116  /// and cannot be instantiated. These are reserved for core base classes
117  /// known to the usdGenSchema system, so this should never be assigned to
118  /// generated schema classes.
119  AbstractBase,
120  /// Represents a non-concrete typed schema
122  /// Represents a concrete typed schema
124  /// Non-applied API schema
126  /// Single Apply API schema
128  /// Multiple Apply API Schema
130 };
131 
133 
134 #endif
UsdLoadPolicy
Definition: common.h:99
Non-applied API schema.
Load a prim by itself with no descendants.
Definition: common.h:103
#define USD_API
Definition: api.h:23
TF_DECLARE_WEAK_AND_REF_PTRS(UsdStage)
Single Apply API schema.
UsdStagePtr UsdStageWeakPtr
Definition: common.h:38
Definition: token.h:70
Represents a concrete typed schema.
Represents a non-concrete typed schema.
USD_API std::string UsdDescribe(const UsdObject &)
Return a human-readable description.
Definition: prim.h:116
std::map< class TfToken, VtValue, TfDictionaryLessThan > UsdMetadataValueMap
Definition: common.h:64
UsdSchemaKind
Definition: common.h:112
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
Invalid or unknown schema kind.
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
UsdListPosition
Definition: common.h:71
Definition: value.h:146
Multiple Apply API Schema.
Load a prim plus all its descendants.
Definition: common.h:101