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 ascii 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 UsdSchemaType
124 ///
125 /// An enum representing which type of schema a given schema class belongs to
126 ///
127 enum class UsdSchemaType {
128  /// Represents abstract or base schema types that are interface-only
129  /// and cannot be instantiated. These are reserved for core base classes
130  /// known to the usdGenSchema system, so this should never be assigned to
131  /// generated schema classes.
132  AbstractBase,
133  /// Represents a non-concrete typed schema
135  /// Represents a concrete typed schema
137  /// Non-applied API schema
139  /// Single Apply API schema
141  /// Multiple Apply API Schema
143 
144 };
145 
147 
148 #endif
#define USD_API
Definition: api.h:40
UsdListPosition
Definition: common.h:88
Load a prim plus all its descendants.
Definition: common.h:118
TF_DECLARE_WEAK_AND_REF_PTRS(UsdStage)
Represents a concrete typed schema.
USD_API std::string UsdDescribe(const UsdObject &)
Return a human-readable description.
Definition: token.h:87
std::map< class TfToken, VtValue, TfDictionaryLessThan > UsdMetadataValueMap
Definition: common.h:81
Multiple Apply API Schema.
Non-applied API schema.
Load a prim by itself with no descendants.
Definition: common.h:120
UsdSchemaType
Definition: common.h:127
Definition: prim.h:132
Single Apply API schema.
Represents a non-concrete typed schema.
UsdStagePtr UsdStageWeakPtr
Definition: common.h:55
GLsizei const GLchar *const * string
Definition: glew.h:1844
UsdLoadPolicy
Definition: common.h:116
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1346
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
Definition: value.h:174