7#ifndef PXR_EXEC_VDF_OBJECT_H
8#define PXR_EXEC_VDF_OBJECT_H
14#include "pxr/exec/vdf/api.h"
21PXR_NAMESPACE_OPEN_SCOPE
78 : _connection(connection),
85 : _constConnection(connection),
113 : _constOutput(output),
123 _isConst = rhs._isConst;
132 return _node < rhs._node;
137 return !(rhs < *
this);
149 return !(*
this < rhs);
156 return _type == rhs._type &&
164 return !(*
this == rhs);
173 return (
size_t)obj._node;
179 operator bool()
const
202 return _type == Node;
209 return _type == Connection;
216 return _type == Input;
223 return _type == Output;
280 return *_constConnection;
297 return *_constOutput;
305 return IsNode() ? _constNode : NULL;
321 return IsInput() ? _constInput : NULL;
329 return IsOutput() ? _constOutput : NULL;
418PXR_NAMESPACE_CLOSE_SCOPE
A class that fully represents a connection between two VdfNodes.
This is the base class for all nodes in a VdfNetwork.
An universal class to represent pointers to various Vdf types.
VdfObjectPtr(const VdfNode *node)
Ctor to create an anchor from a const node.
VdfObjectPtr(VdfOutput *output)
Ctor to create an anchor from a output.
VdfObjectPtr(VdfInput *input)
Ctor to create an anchor from a input.
VdfInput * GetNonConstInput() const
Returns a non-const pointer to an input.
const VdfNode & GetNode() const
Returns a const reference to a node.
bool IsConnection() const
Returns true if the object is a node.
VdfNode * GetIfNonConstNode() const
Returns a pointer to a VdfNode if the object is holding a non-const node, NULL otherwise.
const VdfOutput & GetOutput() const
Returns a const reference to an output.
Type GetType() const
Returns the type of the object.
bool IsNode() const
Returns true if the object is a node.
bool operator!=(const VdfObjectPtr &rhs) const
Not equal operator.
VDF_API std::string GetDebugName() const
Returns a debug name for this object.
const VdfNode * GetIfNode() const
Returns a pointer to a VdfNode if the object is holding a node, NULL otherwise.
VdfInput * GetIfNonConstInput() const
Returns a pointer to a VdfInput if the object is holding a non-const input, NULL otherwise.
VdfObjectPtr(const VdfInput *input)
Ctor to create an anchor from a input.
VDF_API const VdfNode * GetOwningNode() const
Returns the owning node of this object if object is an input or output.
VdfConnection * GetIfNonConstConnection() const
Returns a pointer to a VdfConnection if the object is holding a non-const connection,...
const VdfOutput * GetIfOutput() const
Returns a pointer to a VdfOutput if the object is holding a output, NULL otherwise.
VdfObjectPtr(const VdfConnection *connection)
Ctor to create an anchor from a const connection.
const VdfConnection * GetIfConnection() const
Returns a pointer to a VdfConnection if the object is holding a connection, NULL otherwise.
bool IsConst() const
Returns true, if the object being hold is const.
bool operator>(const VdfObjectPtr &rhs) const
More than operator used for map.
VdfConnection * GetNonConstConnection() const
Returns a non-const pointer to a connection.
bool operator==(const VdfObjectPtr &rhs) const
Equality operator.
VdfNode * GetNonConstNode() const
Returns a non-const pointer to a node.
bool IsInput() const
Returns true if the object is a node.
const VdfInput & GetInput() const
Returns a const reference to an input.
const VdfInput * GetIfInput() const
Returns a pointer to a VdfInput if the object is holding a input, NULL otherwise.
VdfObjectPtr(VdfNode *node)
Ctor to create an anchor from a node.
const void * GetIdentity() const
Returns the identity of this object as a void *.
VdfOutput * GetIfNonConstOutput() const
Returns a pointer to a VdfOutput if the object is holding a non-const output, NULL otherwise.
const VdfConnection & GetConnection() const
Returns a const reference to a connection.
VdfObjectPtr()
Ctor to create the NULL object.
bool IsOutput() const
Returns true if the object is a node.
bool operator<(const VdfObjectPtr &rhs) const
Less than operator used for map.
VdfObjectPtr(const VdfOutput *output)
Ctor to create an anchor from a output.
VdfObjectPtr & operator=(const VdfObjectPtr &rhs)
Assignment operator.
VdfOutput * GetNonConstOutput() const
Returns a non-const pointer to an output.
VdfObjectPtr(VdfConnection *connection)
Ctor to create an anchor from a connection.
A VdfOutput represents an output on a node.
std::set< VdfObjectPtr > VdfObjectPtrSet
An object set.
std::vector< VdfObjectPtr > VdfObjectPtrVector
An object vector.
#define TF_AXIOM(cond)
Aborts if the condition cond is not met.
Functor to use for hash maps.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...