Loading...
Searching...
No Matches
schema.h
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_SDF_SCHEMA_H
25#define PXR_USD_SDF_SCHEMA_H
26
27#include "pxr/pxr.h"
28#include "pxr/usd/sdf/api.h"
29#include "pxr/usd/sdf/allowed.h"
30#include "pxr/usd/sdf/types.h"
31#include "pxr/usd/sdf/valueTypeName.h"
32
33#include "pxr/base/plug/notice.h"
34#include "pxr/base/tf/hash.h"
35#include "pxr/base/tf/hashmap.h"
38#include "pxr/base/tf/token.h"
39#include "pxr/base/tf/type.h"
41#include "pxr/base/vt/value.h"
42
43#include <memory>
44#include <string>
45#include <vector>
46
47PXR_NAMESPACE_OPEN_SCOPE
48
49class JsValue;
50class SdfPath;
51class SdfPayload;
52class SdfReference;
53class Sdf_ValueTypeRegistry;
54
56
62class SdfSchemaBase : public TfWeakBase {
63 SdfSchemaBase(const SdfSchemaBase&) = delete;
64 SdfSchemaBase& operator=(const SdfSchemaBase&) = delete;
65protected:
66 class _SpecDefiner;
67
68public:
74 public:
76 const SdfSchemaBase& schema,
77 const TfToken& name,
78 const VtValue& fallbackValue);
79
80 typedef std::vector< std::pair<TfToken, JsValue> > InfoVec;
81
82 SDF_API const TfToken& GetName() const;
83 SDF_API const VtValue& GetFallbackValue() const;
84 SDF_API const InfoVec& GetInfo() const;
85
86 SDF_API bool IsPlugin() const;
87 SDF_API bool IsReadOnly() const;
88 SDF_API bool HoldsChildren() const;
89
93
94 template <class T>
95 SdfAllowed IsValidValue(const T& value) const
96 {
97 return (_valueValidator ?
98 _valueValidator(_schema, VtValue(value)) :
99 SdfAllowed(true));
100 }
101
102 template <class T>
103 SdfAllowed IsValidListValue(const T& value) const
104 {
105 return (_listValueValidator ?
106 _listValueValidator(_schema, VtValue(value)) :
107 SdfAllowed(true));
108 }
109
110 template <class T>
111 SdfAllowed IsValidMapKey(const T& value) const
112 {
113 return (_mapKeyValidator ?
114 _mapKeyValidator(_schema, VtValue(value)) :
115 SdfAllowed(true));
116 }
117
118 template <class T>
119 SdfAllowed IsValidMapValue(const T& value) const
120 {
121 return (_mapValueValidator ?
122 _mapValueValidator(_schema, VtValue(value)) :
123 SdfAllowed(true));
124 }
125
127
130
132
133 FieldDefinition& Plugin();
134 FieldDefinition& Children();
135 FieldDefinition& ReadOnly();
136 FieldDefinition& AddInfo(const TfToken& tok, const JsValue& val);
137
138 using Validator =
139 SdfAllowed (*) (const SdfSchemaBase&, const VtValue&);
140 FieldDefinition& ValueValidator(Validator v);
141 FieldDefinition& ListValueValidator(Validator v);
142 FieldDefinition& MapKeyValidator(Validator v);
143 FieldDefinition& MapValueValidator(Validator v);
144
146
147 private:
148 const SdfSchemaBase& _schema;
149 TfToken _name;
150 VtValue _fallbackValue;
151 InfoVec _info;
152
153 bool _isPlugin;
154 bool _isReadOnly;
155 bool _holdsChildren;
156
157 Validator _valueValidator;
158 Validator _listValueValidator;
159 Validator _mapKeyValidator;
160 Validator _mapValueValidator;
161 };
162
163 // Structure containing information about a field as it pertains to the
164 // spec this object defines.
165 struct _FieldInfo {
166 _FieldInfo(): required(false), metadata(false) { }
167 bool required;
168 bool metadata;
169 TfToken metadataDisplayGroup;
170 };
171
172 class SpecDefinition;
173
179 public:
181 SDF_API TfTokenVector GetFields() const;
182
185 return _requiredFields;
186 }
187
190
192 SDF_API bool IsValidField(const TfToken& name) const;
193
195 SDF_API bool IsMetadataField(const TfToken& name) const;
196
200 SDF_API
202
204 SDF_API bool IsRequiredField(const TfToken& name) const;
205
206
207 private:
208 typedef TfHashMap<TfToken, _FieldInfo, TfToken::HashFunctor>
209 _FieldMap;
210 _FieldMap _fields;
211
212 // A separate vector of required field names from _fields. Access to
213 // these is in a hot path, so we cache them separately.
214 TfTokenVector _requiredFields;
215
216 private:
217 friend class _SpecDefiner;
218 void _AddField(const TfToken& name, const _FieldInfo& fieldInfo);
219 };
220
223 SDF_API
224 const FieldDefinition* GetFieldDefinition(const TfToken &fieldKey) const;
225
228 inline const SpecDefinition* GetSpecDefinition(SdfSpecType specType) const {
229 return _specDefinitions[specType].second ?
230 &_specDefinitions[specType].first : nullptr;
231 }
232
235
238 SDF_API
239 bool IsRegistered(const TfToken &fieldKey, VtValue *fallback=NULL) const;
240
243 SDF_API
244 bool HoldsChildren(const TfToken &fieldKey) const;
245
248 SDF_API
249 const VtValue& GetFallback(const TfToken &fieldKey) const;
250
252 SDF_API
253 VtValue CastToTypeOf(const TfToken &fieldKey, const VtValue &value) const;
254
256 SDF_API
257 bool IsValidFieldForSpec(const TfToken &fieldKey, SdfSpecType specType) const;
258
260 SDF_API TfTokenVector GetFields(SdfSpecType specType) const;
261
264
268 SDF_API
270 TfToken const &metadataField) const;
271
273 SDF_API const TfTokenVector &GetRequiredFields(SdfSpecType specType) const;
274
279 inline bool IsRequiredFieldName(const TfToken &fieldName) const {
280 for (TfToken const &fname: _requiredFieldNames) {
281 if (fname == fieldName) {
282 return true;
283 }
284 }
285 return false;
286 }
287
289
294
295 SDF_API
297 SDF_API
298 static SdfAllowed IsValidIdentifier(const std::string& name);
299 SDF_API
300 static SdfAllowed IsValidNamespacedIdentifier(const std::string& name);
301 SDF_API
302 static SdfAllowed IsValidInheritPath(const SdfPath& path);
303 SDF_API
304 static SdfAllowed IsValidPayload(const SdfPayload& payload);
305 SDF_API
306 static SdfAllowed IsValidReference(const SdfReference& ref);
307 SDF_API
308 static SdfAllowed IsValidRelationshipTargetPath(const SdfPath& path);
309 SDF_API
310 static SdfAllowed IsValidRelocatesPath(const SdfPath& path);
311 SDF_API
312 static SdfAllowed IsValidRelocate(const SdfRelocate& relocate);
313 SDF_API
314 static SdfAllowed IsValidSpecializesPath(const SdfPath& path);
315 SDF_API
316 static SdfAllowed IsValidSubLayer(const std::string& sublayer);
317 SDF_API
318 static SdfAllowed IsValidVariantIdentifier(const std::string& name);
319 SDF_API
320 static SdfAllowed IsValidVariantSelection(const std::string& sel);
321
323
326
332 SDF_API
333 SdfAllowed IsValidValue(const VtValue& value) const;
334
336 SDF_API
337 std::vector<SdfValueTypeName> GetAllTypes() const;
338
340 SDF_API
341 SdfValueTypeName FindType(const TfToken& typeName) const;
343 SDF_API
344 SdfValueTypeName FindType(const char *typeName) const;
346 SDF_API
347 SdfValueTypeName FindType(std::string const &typeName) const;
348
350 SDF_API
352 const TfToken& role = TfToken()) const;
353
355 SDF_API
357 const TfToken& role = TfToken()) const;
358
362 SDF_API
364
366
367protected:
373 public:
376
378 const TfToken& name, bool required = false);
379 _SpecDefiner& MetadataField(
380 const TfToken& name, bool required = false);
381 _SpecDefiner& MetadataField(
382 const TfToken& name, const TfToken& displayGroup,
383 bool required = false);
384
385 _SpecDefiner &CopyFrom(const SpecDefinition &other);
386
388 private:
389 friend class SdfSchemaBase;
390 explicit _SpecDefiner(SdfSchemaBase *schema, SpecDefinition *definition)
391 : _schema(schema)
392 , _definition(definition)
393 {}
394 SdfSchemaBase *_schema;
395 SpecDefinition *_definition;
396 };
397
400 public:
401 explicit _ValueTypeRegistrar(Sdf_ValueTypeRegistry*);
402
403 class Type
404 {
405 public:
406 ~Type();
407
408 // Specify a type with the given name, default value, and default
409 // array value of VtArray<T>.
410 template <class T>
411 Type(const TfToken& name, const T& defaultValue)
412 : Type(name, VtValue(defaultValue), VtValue(VtArray<T>()))
413 { }
414 template <class T>
415 Type(char const *name, const T& defaultValue)
416 : Type(TfToken(name),
417 VtValue(defaultValue), VtValue(VtArray<T>()))
418 { }
419
420 // Specify a type with the given name and underlying C++ type.
421 // No default value or array value will be registered.
422 Type(const TfToken& name, const TfType& type);
423
424 // Set C++ type name string for this type. Defaults to type name
425 // from TfType.
426 Type& CPPTypeName(const std::string& cppTypeName);
427
428 // Set shape for this type. Defaults to shapeless.
429 Type& Dimensions(const SdfTupleDimensions& dims);
430
431 // Set default unit for this type. Defaults to dimensionless unit.
432 Type& DefaultUnit(TfEnum unit);
433
434 // Set role for this type. Defaults to no role.
435 Type& Role(const TfToken& role);
436
437 // Indicate that arrays of this type are not supported.
438 Type& NoArrays();
439
440 private:
441 Type(const TfToken& name,
442 const VtValue& defaultValue,
443 const VtValue& defaultArrayValue);
444
445 class _Impl;
446 std::unique_ptr<_Impl> _impl;
447
448 friend class _ValueTypeRegistrar;
449 };
450
452 void AddType(const Type& type);
453
454 private:
455 Sdf_ValueTypeRegistry* _registry;
456 };
457
459
462 class EmptyTag {};
464
465 virtual ~SdfSchemaBase();
466
474 template <class T>
476 const TfToken &fieldKey, const T &fallback, bool plugin = false)
477 {
478 return _CreateField(fieldKey, VtValue(fallback), plugin);
479 }
480
484 // Mark the definition as valid and return a pointer to it.
485 _specDefinitions[type].second = true;
486 return _SpecDefiner(this, &_specDefinitions[type].first);
487 }
488
492
495
499
502
505
508
512 typedef std::function<VtValue(const std::string&, const JsValue&)>
514
517 const std::vector<const SdfSchemaBase::FieldDefinition *>
518 _UpdateMetadataFromPlugins(const PlugPluginPtrVector& plugins,
519 const std::string& metadataTag =
520 std::string(),
521 const _DefaultValueFactoryFn& defFactory =
523
524private:
525 friend class _SpecDefiner;
526
527 void _OnDidRegisterPlugins(const PlugNotice::DidRegisterPlugins& n);
528
529 // Return a _SpecDefiner for an existing spec definition, \p local.
531 return _SpecDefiner(this, local);
532 }
533
534 void _AddRequiredFieldName(const TfToken &name);
535
536 const SpecDefinition* _CheckAndGetSpecDefinition(SdfSpecType type) const;
537
538 friend struct Sdf_SchemaFieldTypeRegistrar;
539 FieldDefinition& _CreateField(
540 const TfToken &fieldKey, const VtValue &fallback, bool plugin = false);
541
542 template <class T>
543 FieldDefinition& _DoRegisterField(const TfToken &fieldKey, const T &fallback)
544 {
545 return _DoRegisterField(fieldKey, VtValue(fallback));
546 }
547
548 FieldDefinition& _DoRegisterField(
549 const TfToken &fieldKey, const VtValue &fallback);
550
551private:
552 typedef TfHashMap<TfToken, SdfSchemaBase::FieldDefinition,
554 _FieldDefinitionMap;
555 _FieldDefinitionMap _fieldDefinitions;
556
557 // Pair of definition and flag indicating validity.
558 std::pair<SdfSchemaBase::SpecDefinition, bool>
559 _specDefinitions[SdfNumSpecTypes];
560
561 std::unique_ptr<Sdf_ValueTypeRegistry> _valueTypeRegistry;
562 TfTokenVector _requiredFieldNames;
563};
564
570class SdfSchema : public SdfSchemaBase {
571public:
572 SDF_API
573 static const SdfSchema& GetInstance()
574 {
576 }
577
578private:
579 friend class TfSingleton<SdfSchema>;
580 SdfSchema();
581 virtual ~SdfSchema();
582};
583
584SDF_API_TEMPLATE_CLASS(TfSingleton<SdfSchema>);
585
589#define SDF_FIELD_KEYS \
590 ((Active, "active")) \
591 ((AllowedTokens, "allowedTokens")) \
592 ((AssetInfo, "assetInfo")) \
593 ((ColorConfiguration, "colorConfiguration")) \
594 ((ColorManagementSystem, "colorManagementSystem")) \
595 ((ColorSpace, "colorSpace")) \
596 ((Comment, "comment")) \
597 ((ConnectionPaths, "connectionPaths")) \
598 ((Custom, "custom")) \
599 ((CustomData, "customData")) \
600 ((CustomLayerData, "customLayerData")) \
601 ((Default, "default")) \
602 ((DefaultPrim, "defaultPrim")) \
603 ((DisplayGroup, "displayGroup")) \
604 ((DisplayGroupOrder, "displayGroupOrder")) \
605 ((DisplayName, "displayName")) \
606 ((DisplayUnit, "displayUnit")) \
607 ((Documentation, "documentation")) \
608 ((EndTimeCode, "endTimeCode")) \
609 ((ExpressionVariables, "expressionVariables")) \
610 ((FramePrecision, "framePrecision")) \
611 ((FramesPerSecond, "framesPerSecond")) \
612 ((Hidden, "hidden")) \
613 ((HasOwnedSubLayers, "hasOwnedSubLayers")) \
614 ((InheritPaths, "inheritPaths")) \
615 ((Instanceable, "instanceable")) \
616 ((Kind, "kind")) \
617 ((LayerRelocates, "layerRelocates")) \
618 ((PrimOrder, "primOrder")) \
619 ((NoLoadHint, "noLoadHint")) \
620 ((Owner, "owner")) \
621 ((Payload, "payload")) \
622 ((Permission, "permission")) \
623 ((Prefix, "prefix")) \
624 ((PrefixSubstitutions, "prefixSubstitutions")) \
625 ((PropertyOrder, "propertyOrder")) \
626 ((References, "references")) \
627 ((Relocates, "relocates")) \
628 ((SessionOwner, "sessionOwner")) \
629 ((Specializes, "specializes")) \
630 ((Specifier, "specifier")) \
631 ((StartTimeCode, "startTimeCode")) \
632 ((SubLayers, "subLayers")) \
633 ((SubLayerOffsets, "subLayerOffsets")) \
634 ((Suffix, "suffix")) \
635 ((SuffixSubstitutions, "suffixSubstitutions")) \
636 ((SymmetricPeer, "symmetricPeer")) \
637 ((SymmetryArgs, "symmetryArgs")) \
638 ((SymmetryArguments, "symmetryArguments")) \
639 ((SymmetryFunction, "symmetryFunction")) \
640 ((TargetPaths, "targetPaths")) \
641 ((TimeSamples, "timeSamples")) \
642 ((TimeCodesPerSecond, "timeCodesPerSecond")) \
643 ((TypeName, "typeName")) \
644 ((VariantSelection, "variantSelection")) \
645 ((Variability, "variability")) \
646 ((VariantSetNames, "variantSetNames")) \
647 \
648 /* XXX: These fields should move into Sd. See bug 123508. */ \
649 ((EndFrame, "endFrame")) \
650 ((StartFrame, "startFrame"))
651
652#define SDF_CHILDREN_KEYS \
653 ((ConnectionChildren, "connectionChildren")) \
654 ((ExpressionChildren, "expressionChildren")) \
655 ((MapperArgChildren, "mapperArgChildren")) \
656 ((MapperChildren, "mapperChildren")) \
657 ((PrimChildren, "primChildren")) \
658 ((PropertyChildren, "properties")) \
659 ((RelationshipTargetChildren, "targetChildren")) \
660 ((VariantChildren, "variantChildren")) \
661 ((VariantSetChildren, "variantSetChildren"))
662
663TF_DECLARE_PUBLIC_TOKENS(SdfFieldKeys, SDF_API, SDF_FIELD_KEYS);
664TF_DECLARE_PUBLIC_TOKENS(SdfChildrenKeys, SDF_API, SDF_CHILDREN_KEYS);
665
666PXR_NAMESPACE_CLOSE_SCOPE
667
668#endif // PXR_USD_SDF_SCHEMA_H
A discriminated union type for JSON values.
Definition: value.h:62
Notice sent after new plugins have been registered with the Plug registry.
Definition: notice.h:51
Defines an interface to registered plugins.
Definition: plugin.h:57
Indicates if an operation is allowed and, if not, why not.
Definition: allowed.h:46
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:290
Represents a payload and all its meta data.
Definition: payload.h:58
Represents a reference and all its meta data.
Definition: reference.h:75
Class that defines fields for a spec type.
Definition: schema.h:372
_SpecDefiner & Field(const TfToken &name, bool required=false)
Functions for setting spec attributes during registration.
A helper for registering value types.
Definition: schema.h:399
void AddType(const Type &type)
Register a value type and its corresponding array value type.
Class defining various attributes for a field.
Definition: schema.h:73
FieldDefinition & FallbackValue(const VtValue &v)
Functions for setting field attributes during registration.
SdfAllowed IsValidValue(const T &value) const
Validation functions that return true if a given value passes the registered validator or if no valid...
Definition: schema.h:95
Class representing fields and other information for a spec type.
Definition: schema.h:178
SDF_API bool IsValidField(const TfToken &name) const
Returns whether the given field is valid for this spec.
TfTokenVector const & GetRequiredFields() const
Returns all value fields marked as required for this spec.
Definition: schema.h:184
SDF_API TfTokenVector GetFields() const
Returns all fields for this spec.
SDF_API bool IsMetadataField(const TfToken &name) const
Returns whether the given field is metadata for this spec.
SDF_API bool IsRequiredField(const TfToken &name) const
Returns whether the given field is required for this spec.
SDF_API TfTokenVector GetMetadataFields() const
Returns all value fields marked as metadata for this spec.
SDF_API TfToken GetMetadataFieldDisplayGroup(const TfToken &name) const
Returns the display group for this metadata field.
Generic class that provides information about scene description fields but doesn't actually provide a...
Definition: schema.h:62
void _RegisterPluginFields()
Registers plugin fields and sets up handling so that fields will be added when additional plugins are...
SDF_API std::vector< SdfValueTypeName > GetAllTypes() const
Returns all registered type names.
SDF_API TfToken GetMetadataFieldDisplayGroup(SdfSpecType specType, TfToken const &metadataField) const
Return the metadata field display group for metadata metadataField on specType.
SDF_API VtValue CastToTypeOf(const TfToken &fieldKey, const VtValue &value) const
Coerce value to the correct type for the specified field.
SDF_API const FieldDefinition * GetFieldDefinition(const TfToken &fieldKey) const
Returns the field definition for the given field.
SDF_API SdfValueTypeName FindType(const TfToken &typeName) const
Return the type name object for the given type name token.
std::function< VtValue(const std::string &, const JsValue &)> _DefaultValueFactoryFn
Factory function for creating a default value for a metadata field.
Definition: schema.h:513
bool IsRequiredFieldName(const TfToken &fieldName) const
Return true if fieldName is a required field name for at least one spec type, return false otherwise.
Definition: schema.h:279
SDF_API bool HoldsChildren(const TfToken &fieldKey) const
Returns whether the given field is a 'children' field – that is, it indexes certain children beneath ...
SDF_API TfTokenVector GetMetadataFields(SdfSpecType specType) const
Returns all metadata fields registered for the given spec type.
SDF_API SdfValueTypeName FindType(const VtValue &value, const TfToken &role=TfToken()) const
Return the type name object for the value's type and optional role.
_SpecDefiner _ExtendSpecDefinition(SdfSpecType specType)
Returns a _SpecDefiner for the previously-defined spec type for specifying additional fields.
SDF_API bool IsRegistered(const TfToken &fieldKey, VtValue *fallback=NULL) const
Convenience functions for accessing specific field information.
SDF_API SdfValueTypeName FindOrCreateType(const TfToken &typeName) const
Return the type name object for the given type name string if it exists otherwise create a temporary ...
static SDF_API SdfAllowed IsValidAttributeConnectionPath(const SdfPath &path)
Specific validation functions for various fields.
SDF_API const VtValue & GetFallback(const TfToken &fieldKey) const
Return the fallback value for the specified fieldKey or the empty value if fieldKey is not registered...
void _RegisterStandardTypes()
Registers standard attribute value types.
void _RegisterStandardFields()
Registers the standard fields.
SDF_API SdfAllowed IsValidValue(const VtValue &value) const
Scene description value types.
SDF_API SdfValueTypeName FindType(std::string const &typeName) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
const std::vector< const SdfSchemaBase::FieldDefinition * > _UpdateMetadataFromPlugins(const PlugPluginPtrVector &plugins, const std::string &metadataTag=std::string(), const _DefaultValueFactoryFn &defFactory=_DefaultValueFactoryFn())
Registers all metadata fields specified in the given plugins under the given metadata tag.
const SpecDefinition * GetSpecDefinition(SdfSpecType specType) const
Returns the spec definition for the given spec type.
Definition: schema.h:228
SDF_API bool IsValidFieldForSpec(const TfToken &fieldKey, SdfSpecType specType) const
Return whether the given field is valid for the given spec type.
SDF_API TfTokenVector GetFields(SdfSpecType specType) const
Returns all fields registered for the given spec type.
void _RegisterLegacyTypes()
Registers legacy attribute value types.
SDF_API SdfValueTypeName FindType(const TfType &type, const TfToken &role=TfToken()) const
Return the type name object for the given type and optional role.
_ValueTypeRegistrar _GetTypeRegistrar() const
Returns a type registrar.
SDF_API SdfValueTypeName FindType(const char *typeName) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
_SpecDefiner _Define(SdfSpecType type)
Registers the given spec type with this schema and return a _SpecDefiner for specifying additional fi...
Definition: schema.h:483
SDF_API const TfTokenVector & GetRequiredFields(SdfSpecType specType) const
Returns all required fields registered for the given spec type.
FieldDefinition & _RegisterField(const TfToken &fieldKey, const T &fallback, bool plugin=false)
Creates and registers a new field named fieldKey with the fallback value fallback.
Definition: schema.h:475
Construct an SdfSchemaBase but does not populate it with standard fields and types.
Definition: schema.h:462
Class that provides information about the various scene description fields.
Definition: schema.h:570
Represents a value type name, i.e.
Definition: valueTypeName.h:88
An enum class that records both enum type and enum value.
Definition: enum.h:137
Manage a single instance of an object (see.
Definition: singleton.h:122
static T & GetInstance()
Return a reference to an object of type T, creating it if necessary.
Definition: singleton.h:137
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:88
TfType represents a dynamic runtime type.
Definition: type.h:65
Enable a concrete base class for use with TfWeakPtr.
Definition: weakBase.h:141
Represents an arbitrary dimensional rectangular container class.
Definition: array.h:228
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:164
#define TF_DECLARE_WEAK_PTRS(type)
Define standard weak pointer types.
Definition: declarePtrs.h:62
Manage a single instance of an object.
This file defines some macros that are useful for declaring and using static TfTokens.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:98
Represents the shape of a value type (or that of an element in an array).
Definition: valueTypeName.h:47
Functor to use for hash maps from tokens to other things.
Definition: token.h:166
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:457
Basic Sdf data types.
SdfSpecType
An enum that specifies the type of an object.
Definition: types.h:85
std::pair< SdfPath, SdfPath > SdfRelocate
A single relocate specifying a source SdfPath and a target SdfPath for a relocation.
Definition: types.h:288