8#ifndef PXR_USD_NDR_PROPERTY_H
9#define PXR_USD_NDR_PROPERTY_H
14#include "pxr/usd/ndr/api.h"
17#include "pxr/base/vt/value.h"
20PXR_NAMESPACE_OPEN_SCOPE
46 const NdrTokenMap& metadata
77 bool IsArray()
const {
return (_arraySize > 0) || _isDynamicArray; }
111 virtual const NdrTokenMap&
GetMetadata()
const {
return _metadata; }
171 bool _isDynamicArray;
173 NdrTokenMap _metadata;
176PXR_NAMESPACE_CLOSE_SCOPE
Represents a property (input or output) that is part of a NdrNode instance.
virtual NDR_API NdrSdfTypeIndicator GetTypeAsSdfType() const
Converts the property's type from GetType() into a NdrSdfTypeIndicator.
NDR_API const VtValue & GetDefaultValue() const
Gets this property's default value associated with the type of the property.
NDR_API bool IsOutput() const
Whether this property is an output.
virtual NDR_API bool IsConnectable() const
Whether this property can be connected to other properties.
virtual NDR_API bool CanConnectTo(const NdrProperty &other) const
Determines if this property can be connected to the specified property.
virtual NDR_API const NdrTokenMap & GetMetadata() const
All of the metadata that came from the parse process.
NDR_API const TfToken & GetType() const
Gets the type of the property.
virtual NDR_API const VtValue & GetDefaultValueAsSdfType() const
Provides default value corresponding to the SdfValueTypeName returned by GetTypeAsSdfType.
virtual NDR_API std::string GetInfoString() const
Gets a string with basic information about this property.
virtual NDR_API ~NdrProperty()
Destructor.
NDR_API NdrProperty(const TfToken &name, const TfToken &type, const VtValue &defaultValue, bool isOutput, size_t arraySize, bool isDynamicArray, const NdrTokenMap &metadata)
Constructor.
NDR_API bool IsDynamicArray() const
Whether this property's array type is dynamically-sized.
NDR_API int GetArraySize() const
Gets this property's array size.
NDR_API bool IsArray() const
Whether this property's type is an array type.
NDR_API const TfToken & GetName() const
Gets the name of the property.
Represents a mapping from an Ndr Property type to Sdf type.
Token for efficient comparison, assignment, and hashing of known strings.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
Common typedefs that are used throughout the NDR library.