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 IsValidSpecializesPath(const SdfPath& path);
313 SDF_API
314 static SdfAllowed IsValidSubLayer(const std::string& sublayer);
315 SDF_API
316 static SdfAllowed IsValidVariantIdentifier(const std::string& name);
317 SDF_API
318 static SdfAllowed IsValidVariantSelection(const std::string& sel);
319
321
324
330 SDF_API
331 SdfAllowed IsValidValue(const VtValue& value) const;
332
334 SDF_API
335 std::vector<SdfValueTypeName> GetAllTypes() const;
336
338 SDF_API
339 SdfValueTypeName FindType(const TfToken& typeName) const;
341 SDF_API
342 SdfValueTypeName FindType(const char *typeName) const;
344 SDF_API
345 SdfValueTypeName FindType(std::string const &typeName) const;
346
348 SDF_API
350 const TfToken& role = TfToken()) const;
351
353 SDF_API
355 const TfToken& role = TfToken()) const;
356
360 SDF_API
362
364
365protected:
371 public:
374
376 const TfToken& name, bool required = false);
377 _SpecDefiner& MetadataField(
378 const TfToken& name, bool required = false);
379 _SpecDefiner& MetadataField(
380 const TfToken& name, const TfToken& displayGroup,
381 bool required = false);
382
383 _SpecDefiner &CopyFrom(const SpecDefinition &other);
384
386 private:
387 friend class SdfSchemaBase;
388 explicit _SpecDefiner(SdfSchemaBase *schema, SpecDefinition *definition)
389 : _schema(schema)
390 , _definition(definition)
391 {}
392 SdfSchemaBase *_schema;
393 SpecDefinition *_definition;
394 };
395
398 public:
399 explicit _ValueTypeRegistrar(Sdf_ValueTypeRegistry*);
400
401 class Type
402 {
403 public:
404 ~Type();
405
406 // Specify a type with the given name, default value, and default
407 // array value of VtArray<T>.
408 template <class T>
409 Type(const TfToken& name, const T& defaultValue)
410 : Type(name, VtValue(defaultValue), VtValue(VtArray<T>()))
411 { }
412 template <class T>
413 Type(char const *name, const T& defaultValue)
414 : Type(TfToken(name),
415 VtValue(defaultValue), VtValue(VtArray<T>()))
416 { }
417
418 // Specify a type with the given name and underlying C++ type.
419 // No default value or array value will be registered.
420 Type(const TfToken& name, const TfType& type);
421
422 // Set C++ type name string for this type. Defaults to type name
423 // from TfType.
424 Type& CPPTypeName(const std::string& cppTypeName);
425
426 // Set shape for this type. Defaults to shapeless.
427 Type& Dimensions(const SdfTupleDimensions& dims);
428
429 // Set default unit for this type. Defaults to dimensionless unit.
430 Type& DefaultUnit(TfEnum unit);
431
432 // Set role for this type. Defaults to no role.
433 Type& Role(const TfToken& role);
434
435 // Indicate that arrays of this type are not supported.
436 Type& NoArrays();
437
438 private:
439 Type(const TfToken& name,
440 const VtValue& defaultValue,
441 const VtValue& defaultArrayValue);
442
443 class _Impl;
444 std::unique_ptr<_Impl> _impl;
445
446 friend class _ValueTypeRegistrar;
447 };
448
450 void AddType(const Type& type);
451
452 private:
453 Sdf_ValueTypeRegistry* _registry;
454 };
455
457
460 class EmptyTag {};
462
463 virtual ~SdfSchemaBase();
464
472 template <class T>
474 const TfToken &fieldKey, const T &fallback, bool plugin = false)
475 {
476 return _CreateField(fieldKey, VtValue(fallback), plugin);
477 }
478
482 // Mark the definition as valid and return a pointer to it.
483 _specDefinitions[type].second = true;
484 return _SpecDefiner(this, &_specDefinitions[type].first);
485 }
486
490
493
497
500
503
506
510 typedef std::function<VtValue(const std::string&, const JsValue&)>
512
515 const std::vector<const SdfSchemaBase::FieldDefinition *>
516 _UpdateMetadataFromPlugins(const PlugPluginPtrVector& plugins,
517 const std::string& metadataTag =
518 std::string(),
519 const _DefaultValueFactoryFn& defFactory =
521
522private:
523 friend class _SpecDefiner;
524
525 void _OnDidRegisterPlugins(const PlugNotice::DidRegisterPlugins& n);
526
527 // Return a _SpecDefiner for an existing spec definition, \p local.
529 return _SpecDefiner(this, local);
530 }
531
532 void _AddRequiredFieldName(const TfToken &name);
533
534 const SpecDefinition* _CheckAndGetSpecDefinition(SdfSpecType type) const;
535
536 friend struct Sdf_SchemaFieldTypeRegistrar;
537 FieldDefinition& _CreateField(
538 const TfToken &fieldKey, const VtValue &fallback, bool plugin = false);
539
540 template <class T>
541 FieldDefinition& _DoRegisterField(const TfToken &fieldKey, const T &fallback)
542 {
543 return _DoRegisterField(fieldKey, VtValue(fallback));
544 }
545
546 FieldDefinition& _DoRegisterField(
547 const TfToken &fieldKey, const VtValue &fallback);
548
549private:
550 typedef TfHashMap<TfToken, SdfSchemaBase::FieldDefinition,
552 _FieldDefinitionMap;
553 _FieldDefinitionMap _fieldDefinitions;
554
555 // Pair of definition and flag indicating validity.
556 std::pair<SdfSchemaBase::SpecDefinition, bool>
557 _specDefinitions[SdfNumSpecTypes];
558
559 std::unique_ptr<Sdf_ValueTypeRegistry> _valueTypeRegistry;
560 TfTokenVector _requiredFieldNames;
561};
562
568class SdfSchema : public SdfSchemaBase {
569public:
570 SDF_API
571 static const SdfSchema& GetInstance()
572 {
574 }
575
576private:
577 friend class TfSingleton<SdfSchema>;
578 SdfSchema();
579 virtual ~SdfSchema();
580};
581
582SDF_API_TEMPLATE_CLASS(TfSingleton<SdfSchema>);
583
587#define SDF_FIELD_KEYS \
588 ((Active, "active")) \
589 ((AllowedTokens, "allowedTokens")) \
590 ((AssetInfo, "assetInfo")) \
591 ((ColorConfiguration, "colorConfiguration")) \
592 ((ColorManagementSystem, "colorManagementSystem")) \
593 ((ColorSpace, "colorSpace")) \
594 ((Comment, "comment")) \
595 ((ConnectionPaths, "connectionPaths")) \
596 ((Custom, "custom")) \
597 ((CustomData, "customData")) \
598 ((CustomLayerData, "customLayerData")) \
599 ((Default, "default")) \
600 ((DefaultPrim, "defaultPrim")) \
601 ((DisplayGroup, "displayGroup")) \
602 ((DisplayGroupOrder, "displayGroupOrder")) \
603 ((DisplayName, "displayName")) \
604 ((DisplayUnit, "displayUnit")) \
605 ((Documentation, "documentation")) \
606 ((EndTimeCode, "endTimeCode")) \
607 ((ExpressionVariables, "expressionVariables")) \
608 ((FramePrecision, "framePrecision")) \
609 ((FramesPerSecond, "framesPerSecond")) \
610 ((Hidden, "hidden")) \
611 ((HasOwnedSubLayers, "hasOwnedSubLayers")) \
612 ((InheritPaths, "inheritPaths")) \
613 ((Instanceable, "instanceable")) \
614 ((Kind, "kind")) \
615 ((PrimOrder, "primOrder")) \
616 ((NoLoadHint, "noLoadHint")) \
617 ((Owner, "owner")) \
618 ((Payload, "payload")) \
619 ((Permission, "permission")) \
620 ((Prefix, "prefix")) \
621 ((PrefixSubstitutions, "prefixSubstitutions")) \
622 ((PropertyOrder, "propertyOrder")) \
623 ((References, "references")) \
624 ((Relocates, "relocates")) \
625 ((SessionOwner, "sessionOwner")) \
626 ((Specializes, "specializes")) \
627 ((Specifier, "specifier")) \
628 ((StartTimeCode, "startTimeCode")) \
629 ((SubLayers, "subLayers")) \
630 ((SubLayerOffsets, "subLayerOffsets")) \
631 ((Suffix, "suffix")) \
632 ((SuffixSubstitutions, "suffixSubstitutions")) \
633 ((SymmetricPeer, "symmetricPeer")) \
634 ((SymmetryArgs, "symmetryArgs")) \
635 ((SymmetryArguments, "symmetryArguments")) \
636 ((SymmetryFunction, "symmetryFunction")) \
637 ((TargetPaths, "targetPaths")) \
638 ((TimeSamples, "timeSamples")) \
639 ((TimeCodesPerSecond, "timeCodesPerSecond")) \
640 ((TypeName, "typeName")) \
641 ((VariantSelection, "variantSelection")) \
642 ((Variability, "variability")) \
643 ((VariantSetNames, "variantSetNames")) \
644 \
645 /* XXX: These fields should move into Sd. See bug 123508. */ \
646 ((EndFrame, "endFrame")) \
647 ((StartFrame, "startFrame"))
648
649#define SDF_CHILDREN_KEYS \
650 ((ConnectionChildren, "connectionChildren")) \
651 ((ExpressionChildren, "expressionChildren")) \
652 ((MapperArgChildren, "mapperArgChildren")) \
653 ((MapperChildren, "mapperChildren")) \
654 ((PrimChildren, "primChildren")) \
655 ((PropertyChildren, "properties")) \
656 ((RelationshipTargetChildren, "targetChildren")) \
657 ((VariantChildren, "variantChildren")) \
658 ((VariantSetChildren, "variantSetChildren"))
659
660TF_DECLARE_PUBLIC_TOKENS(SdfFieldKeys, SDF_API, SDF_FIELD_KEYS);
661TF_DECLARE_PUBLIC_TOKENS(SdfChildrenKeys, SDF_API, SDF_CHILDREN_KEYS);
662
663PXR_NAMESPACE_CLOSE_SCOPE
664
665#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:291
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:370
_SpecDefiner & Field(const TfToken &name, bool required=false)
Functions for setting spec attributes during registration.
A helper for registering value types.
Definition: schema.h:397
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:511
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:481
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:473
Construct an SdfSchemaBase but does not populate it with standard fields and types.
Definition: schema.h:460
Class that provides information about the various scene description fields.
Definition: schema.h:568
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:165
#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:108
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:84