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 Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_USD_USD_COMMON_H
25 #define PXR_USD_USD_COMMON_H
26 
27 /// \file usd/common.h
28 
29 #include "pxr/pxr.h"
30 #include "pxr/usd/usd/api.h"
34 
36 #include "pxr/usd/usd/timeCode.h"
37 
38 #include <string>
39 #include <map>
40 
42 
43 // Forward declare Usd classes.
44 class UsdStage;
45 class UsdObject;
46 class UsdPrim;
47 class UsdProperty;
48 class UsdAttribute;
49 class UsdRelationship;
50 class UsdStageCache;
51 
52 class VtValue;
53 
55 typedef UsdStagePtr UsdStageWeakPtr;
56 
57 /// Return a human-readable description.
58 USD_API
60 /// \overload
61 USD_API
62 std::string UsdDescribe(const UsdStageRefPtr &);
63 /// \overload
64 USD_API
66 /// \overload
67 USD_API
69 /// \overload
70 USD_API
72 /// \overload
73 USD_API
75 
76 // XXX:
77 // Currently used for querying composed values from text layers, so VtValue is
78 // the optimal value-store, but this may not always be the case.
79 typedef std::map<class TfToken, VtValue,
82 
83 /// \enum UsdListPosition
84 ///
85 /// Specifies a position to add items to lists. Used by some Add()
86 /// methods in the USD API that manipulate lists, such as AddReference().
87 ///
89  /// The position at the front of the prepend list.
90  /// An item added at this position will, after composition is applied,
91  /// be stronger than other items prepended in this layer, and stronger
92  /// than items added by weaker layers.
94  /// The position at the back of the prepend list.
95  /// An item added at this position will, after composition is applied,
96  /// be weaker than other items prepended in this layer, but stronger
97  /// than items added by weaker layers.
99  /// The position at the front of the append list.
100  /// An item added at this position will, after composition is applied,
101  /// be stronger than other items appended in this layer, and stronger
102  /// than items added by weaker layers.
104  /// The position at the back of the append list.
105  /// An item added at this position will, after composition is applied,
106  /// be weaker than other items appended in this layer, but stronger
107  /// than items added by weaker layers.
109 };
110 
111 /// \enum UsdLoadPolicy
112 ///
113 /// Controls UsdStage::Load() and UsdPrim::Load() behavior regarding whether or
114 /// not descendant prims are loaded.
115 ///
117  /// Load a prim plus all its descendants.
119  /// Load a prim by itself with no descendants.
121 };
122 
123 /// \enum UsdSchemaKind
124 ///
125 /// An enum representing which kind of schema a given schema class belongs to.
126 /// For more details on the different kinds of schemas, see
127 /// \ref Usd_Page_GeneratingSchemas.
128 ///
129 enum class UsdSchemaKind {
130  /// Invalid or unknown schema kind.
131  Invalid,
132  /// Represents abstract or base schema types that are interface-only
133  /// and cannot be instantiated. These are reserved for core base classes
134  /// known to the usdGenSchema system, so this should never be assigned to
135  /// generated schema classes.
136  AbstractBase,
137  /// Represents a non-concrete typed schema
139  /// Represents a concrete typed schema
141  /// Non-applied API schema
143  /// Single Apply API schema
145  /// Multiple Apply API Schema
147 };
148 
150 
151 #endif
UsdLoadPolicy
Definition: common.h:116
Non-applied API schema.
Load a prim by itself with no descendants.
Definition: common.h:120
#define USD_API
Definition: api.h:40
TF_DECLARE_WEAK_AND_REF_PTRS(UsdStage)
Single Apply API schema.
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
UsdStagePtr UsdStageWeakPtr
Definition: common.h:55
Definition: token.h:87
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:133
std::map< class TfToken, VtValue, TfDictionaryLessThan > UsdMetadataValueMap
Definition: common.h:81
UsdSchemaKind
Definition: common.h:129
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1432
Invalid or unknown schema kind.
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
UsdListPosition
Definition: common.h:88
Definition: value.h:164
Multiple Apply API Schema.
Load a prim plus all its descendants.
Definition: common.h:118