Loading...
Searching...
No Matches
VdfObjectPtr Class Reference

An universal class to represent pointers to various Vdf types. More...

#include <object.h>

Classes

struct  HashFunctor
 Functor to use for hash maps. More...
 

Public Types

enum  Type {
  Undefined = -1 , Node , Connection , Input ,
  Output
}
 Type of object. More...
 

Public Member Functions

 VdfObjectPtr ()
 Ctor to create the NULL object.
 
 VdfObjectPtr (VdfNode *node)
 Ctor to create an anchor from a node.
 
 VdfObjectPtr (const VdfNode *node)
 Ctor to create an anchor from a const node.
 
 VdfObjectPtr (VdfConnection *connection)
 Ctor to create an anchor from a connection.
 
 VdfObjectPtr (const VdfConnection *connection)
 Ctor to create an anchor from a const connection.
 
 VdfObjectPtr (VdfInput *input)
 Ctor to create an anchor from a input.
 
 VdfObjectPtr (const VdfInput *input)
 Ctor to create an anchor from a input.
 
 VdfObjectPtr (VdfOutput *output)
 Ctor to create an anchor from a output.
 
 VdfObjectPtr (const VdfOutput *output)
 Ctor to create an anchor from a output.
 
VdfObjectPtroperator= (const VdfObjectPtr &rhs)
 Assignment operator.
 
bool operator< (const VdfObjectPtr &rhs) const
 Less than operator used for map.
 
bool operator<= (const VdfObjectPtr &rhs) const
 
bool operator> (const VdfObjectPtr &rhs) const
 More than operator used for map.
 
bool operator>= (const VdfObjectPtr &rhs) const
 
bool operator== (const VdfObjectPtr &rhs) const
 Equality operator.
 
bool operator!= (const VdfObjectPtr &rhs) const
 Not equal operator.
 
 operator bool () const
 Returns false, if the object holds the NULL object.
 
Type GetType () const
 Returns the type of the object.
 
bool IsConst () const
 Returns true, if the object being hold is const.
 
bool IsNode () const
 Returns true if the object is a node.
 
bool IsConnection () const
 Returns true if the object is a node.
 
bool IsInput () const
 Returns true if the object is a node.
 
bool IsOutput () const
 Returns true if the object is a node.
 
VdfNodeGetNonConstNode () const
 Returns a non-const pointer to a node.
 
VdfConnectionGetNonConstConnection () const
 Returns a non-const pointer to a connection.
 
VdfInputGetNonConstInput () const
 Returns a non-const pointer to an input.
 
VdfOutputGetNonConstOutput () const
 Returns a non-const pointer to an output.
 
const VdfNodeGetNode () const
 Returns a const reference to a node.
 
const VdfConnectionGetConnection () const
 Returns a const reference to a connection.
 
const VdfInputGetInput () const
 Returns a const reference to an input.
 
const VdfOutputGetOutput () const
 Returns a const reference to an output.
 
const VdfNodeGetIfNode () const
 Returns a pointer to a VdfNode if the object is holding a node, NULL otherwise.
 
const VdfConnectionGetIfConnection () const
 Returns a pointer to a VdfConnection if the object is holding a connection, NULL otherwise.
 
const VdfInputGetIfInput () const
 Returns a pointer to a VdfInput if the object is holding a input, NULL otherwise.
 
const VdfOutputGetIfOutput () const
 Returns a pointer to a VdfOutput if the object is holding a output, NULL otherwise.
 
VdfNodeGetIfNonConstNode () const
 Returns a pointer to a VdfNode if the object is holding a non-const node, NULL otherwise.
 
VdfConnectionGetIfNonConstConnection () const
 Returns a pointer to a VdfConnection if the object is holding a non-const connection, NULL otherwise.
 
VdfInputGetIfNonConstInput () const
 Returns a pointer to a VdfInput if the object is holding a non-const input, NULL otherwise.
 
VdfOutputGetIfNonConstOutput () const
 Returns a pointer to a VdfOutput if the object is holding a non-const output, NULL otherwise.
 
VDF_API const VdfNodeGetOwningNode () const
 Returns the owning node of this object if object is an input or output.
 
VDF_API std::string GetDebugName () const
 Returns a debug name for this object.
 
const void * GetIdentity () const
 Returns the identity of this object as a void *.
 

Detailed Description

An universal class to represent pointers to various Vdf types.

XXX: We are considering using a base class within Vdf, but we want to measure the speed/size impact first.

XXX: We could pack everything into 8 bytes and use it as value type.

Definition at line 39 of file object.h.

Member Enumeration Documentation

◆ Type

enum Type

Type of object.

Definition at line 44 of file object.h.

Constructor & Destructor Documentation

◆ VdfObjectPtr() [1/9]

VdfObjectPtr ( )
inline

Ctor to create the NULL object.

Definition at line 56 of file object.h.

◆ VdfObjectPtr() [2/9]

VdfObjectPtr ( VdfNode node)
inline

Ctor to create an anchor from a node.

Definition at line 63 of file object.h.

◆ VdfObjectPtr() [3/9]

VdfObjectPtr ( const VdfNode node)
inline

Ctor to create an anchor from a const node.

Definition at line 70 of file object.h.

◆ VdfObjectPtr() [4/9]

VdfObjectPtr ( VdfConnection connection)
inline

Ctor to create an anchor from a connection.

Definition at line 77 of file object.h.

◆ VdfObjectPtr() [5/9]

VdfObjectPtr ( const VdfConnection connection)
inline

Ctor to create an anchor from a const connection.

Definition at line 84 of file object.h.

◆ VdfObjectPtr() [6/9]

VdfObjectPtr ( VdfInput input)
inline

Ctor to create an anchor from a input.

Definition at line 91 of file object.h.

◆ VdfObjectPtr() [7/9]

VdfObjectPtr ( const VdfInput input)
inline

Ctor to create an anchor from a input.

Definition at line 98 of file object.h.

◆ VdfObjectPtr() [8/9]

VdfObjectPtr ( VdfOutput output)
inline

Ctor to create an anchor from a output.

Definition at line 105 of file object.h.

◆ VdfObjectPtr() [9/9]

VdfObjectPtr ( const VdfOutput output)
inline

Ctor to create an anchor from a output.

Definition at line 112 of file object.h.

Member Function Documentation

◆ GetConnection()

const VdfConnection & GetConnection ( ) const
inline

Returns a const reference to a connection.

Fails if object is not a connection.

Definition at line 277 of file object.h.

◆ GetDebugName()

VDF_API std::string GetDebugName ( ) const

Returns a debug name for this object.

◆ GetIdentity()

const void * GetIdentity ( ) const
inline

Returns the identity of this object as a void *.

Definition at line 378 of file object.h.

◆ GetIfConnection()

const VdfConnection * GetIfConnection ( ) const
inline

Returns a pointer to a VdfConnection if the object is holding a connection, NULL otherwise.

Definition at line 311 of file object.h.

◆ GetIfInput()

const VdfInput * GetIfInput ( ) const
inline

Returns a pointer to a VdfInput if the object is holding a input, NULL otherwise.

Definition at line 319 of file object.h.

◆ GetIfNode()

const VdfNode * GetIfNode ( ) const
inline

Returns a pointer to a VdfNode if the object is holding a node, NULL otherwise.

Definition at line 303 of file object.h.

◆ GetIfNonConstConnection()

VdfConnection * GetIfNonConstConnection ( ) const
inline

Returns a pointer to a VdfConnection if the object is holding a non-const connection, NULL otherwise.

Definition at line 343 of file object.h.

◆ GetIfNonConstInput()

VdfInput * GetIfNonConstInput ( ) const
inline

Returns a pointer to a VdfInput if the object is holding a non-const input, NULL otherwise.

Definition at line 351 of file object.h.

◆ GetIfNonConstNode()

VdfNode * GetIfNonConstNode ( ) const
inline

Returns a pointer to a VdfNode if the object is holding a non-const node, NULL otherwise.

Definition at line 335 of file object.h.

◆ GetIfNonConstOutput()

VdfOutput * GetIfNonConstOutput ( ) const
inline

Returns a pointer to a VdfOutput if the object is holding a non-const output, NULL otherwise.

Definition at line 359 of file object.h.

◆ GetIfOutput()

const VdfOutput * GetIfOutput ( ) const
inline

Returns a pointer to a VdfOutput if the object is holding a output, NULL otherwise.

Definition at line 327 of file object.h.

◆ GetInput()

const VdfInput & GetInput ( ) const
inline

Returns a const reference to an input.

Fails if object is not an input.

Definition at line 285 of file object.h.

◆ GetNode()

const VdfNode & GetNode ( ) const
inline

Returns a const reference to a node.

Fails if object is not a node.

Definition at line 268 of file object.h.

◆ GetNonConstConnection()

VdfConnection * GetNonConstConnection ( ) const
inline

Returns a non-const pointer to a connection.

Fails if object is const or not a connection (cf. GetIfNode()).

Definition at line 239 of file object.h.

◆ GetNonConstInput()

VdfInput * GetNonConstInput ( ) const
inline

Returns a non-const pointer to an input.

Fails if object is const or not an input (cf. GetIfNode()).

Definition at line 249 of file object.h.

◆ GetNonConstNode()

VdfNode * GetNonConstNode ( ) const
inline

Returns a non-const pointer to a node.

Fails if object is const or not a node (cf. GetIfNode()).

Definition at line 229 of file object.h.

◆ GetNonConstOutput()

VdfOutput * GetNonConstOutput ( ) const
inline

Returns a non-const pointer to an output.

Fails if object is const or not an output (cf. GetIfNode()).

Definition at line 259 of file object.h.

◆ GetOutput()

const VdfOutput & GetOutput ( ) const
inline

Returns a const reference to an output.

Fails if object is not an output.

Definition at line 294 of file object.h.

◆ GetOwningNode()

VDF_API const VdfNode * GetOwningNode ( ) const

Returns the owning node of this object if object is an input or output.

Returns the node itself if object is a node and returns NULL if object is a connection.

◆ GetType()

Type GetType ( ) const
inline

Returns the type of the object.

Definition at line 186 of file object.h.

◆ IsConnection()

bool IsConnection ( ) const
inline

Returns true if the object is a node.

Definition at line 207 of file object.h.

◆ IsConst()

bool IsConst ( ) const
inline

Returns true, if the object being hold is const.

Definition at line 193 of file object.h.

◆ IsInput()

bool IsInput ( ) const
inline

Returns true if the object is a node.

Definition at line 214 of file object.h.

◆ IsNode()

bool IsNode ( ) const
inline

Returns true if the object is a node.

Definition at line 200 of file object.h.

◆ IsOutput()

bool IsOutput ( ) const
inline

Returns true if the object is a node.

Definition at line 221 of file object.h.

◆ operator bool()

operator bool ( ) const
inline

Returns false, if the object holds the NULL object.

Definition at line 179 of file object.h.

◆ operator!=()

bool operator!= ( const VdfObjectPtr rhs) const
inline

Not equal operator.

Definition at line 162 of file object.h.

◆ operator<()

bool operator< ( const VdfObjectPtr rhs) const
inline

Less than operator used for map.

Definition at line 130 of file object.h.

◆ operator<=()

bool operator<= ( const VdfObjectPtr rhs) const
inline

Definition at line 135 of file object.h.

◆ operator=()

VdfObjectPtr & operator= ( const VdfObjectPtr rhs)
inline

Assignment operator.

Definition at line 119 of file object.h.

◆ operator==()

bool operator== ( const VdfObjectPtr rhs) const
inline

Equality operator.

Note that constness doesn't matter.

Definition at line 154 of file object.h.

◆ operator>()

bool operator> ( const VdfObjectPtr rhs) const
inline

More than operator used for map.

Definition at line 142 of file object.h.

◆ operator>=()

bool operator>= ( const VdfObjectPtr rhs) const
inline

Definition at line 147 of file object.h.


The documentation for this class was generated from the following file: