8#ifndef PXR_USD_NDR_NODE_H
9#define PXR_USD_NDR_NODE_H
14#include "pxr/usd/ndr/api.h"
17#include "pxr/usd/ndr/nodeDiscoveryResult.h"
20PXR_NAMESPACE_OPEN_SCOPE
37 const NdrVersion& version,
38 const std::string& name,
42 const std::string& definitionURI,
43 const std::string& implementationURI,
44 NdrPropertyUniquePtrVec&& properties,
45 const NdrTokenMap& metadata = NdrTokenMap(),
46 const std::string &sourceCode = std::string());
62 const std::string&
GetName()
const {
return _name; }
132 virtual bool IsValid()
const {
return _isValid; }
192 std::string _definitionURI;
193 std::string _implementationURI;
194 NdrPropertyUniquePtrVec _properties;
195 NdrTokenMap _metadata;
196 std::string _sourceCode;
198 NdrPropertyPtrMap _inputs;
199 NdrTokenVec _inputNames;
200 NdrPropertyPtrMap _outputs;
201 NdrTokenVec _outputNames;
204PXR_NAMESPACE_CLOSE_SCOPE
Represents an abstract node.
NDR_API NdrNode(const NdrIdentifier &identifier, const NdrVersion &version, const std::string &name, const TfToken &family, const TfToken &context, const TfToken &sourceType, const std::string &definitionURI, const std::string &implementationURI, NdrPropertyUniquePtrVec &&properties, const NdrTokenMap &metadata=NdrTokenMap(), const std::string &sourceCode=std::string())
Constructor.
NdrVersion GetVersion() const
Return the version of the node.
NDR_API NdrPropertyConstPtr GetInput(const TfToken &inputName) const
Get an input property by name.
const TfToken & GetFamily() const
Gets the name of the family that the node belongs to.
NDR_API NdrPropertyConstPtr GetOutput(const TfToken &outputName) const
Get an output property by name.
virtual NDR_API bool IsValid() const
Whether or not this node is valid.
const std::string & GetName() const
Gets the name of the node.
virtual NDR_API std::string GetInfoString() const
Gets a string with basic information about this node.
const TfToken & GetContext() const
Gets the context of the node.
virtual NDR_API ~NdrNode()
Destructor.
NDR_API const NdrTokenMap & GetMetadata() const
All metadata that came from the parse process.
NDR_API const NdrTokenVec & GetInputNames() const
Get an ordered list of all the input names on this node.
const std::string & GetResolvedImplementationURI() const
Gets the URI to the resource that provides this node's implementation.
const std::string & GetSourceCode() const
Returns the source code for this node.
NDR_API const NdrTokenVec & GetOutputNames() const
Get an ordered list of all the output names on this node.
const TfToken & GetSourceType() const
Gets the type of source that this node originated from.
const NdrIdentifier & GetIdentifier() const
Return the identifier of the node.
const std::string & GetResolvedDefinitionURI() const
Gets the URI to the resource that provided this node's definition.
Token for efficient comparison, assignment, and hashing of known strings.
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.