Loading...
Searching...
No Matches
Network Class Reference

This is a container class used to hold on to all the nodes and to facilitate their management. More...

#include <testUtils.h>

Public Member Functions

VDF_API void Add (const std::string &nodeName, const NodeType &nodeType)
 Creates a node named nodeName of type nodeType.
 
VDF_API void Add (const std::string &nodeName, VdfNode *customNode)
 Takes ownership of a customNode that was created externally.
 
template<typename T >
void AddInputVector (const std::string &nodeName, size_t size=1)
 Creates an input vector of type T named nodeName.
 
VDF_API Nodeoperator[] (const std::string &nodeName)
 Returns a reference to a node named nodeName.
 
VDF_API const Nodeoperator[] (const std::string &nodeName) const
 Returns a const reference to a node named nodeName.
 
VDF_API const std::string GetNodeName (const VdfId nodeId)
 Returns the node name for the VdfTestUtils::Node corresponding to a VdfNode with VdfId nodeId.
 
VDF_API VdfConnectionGetConnection (const std::string &connectionName)
 Returns a pointer to a connection named connectionName.
 
VdfNetworkGetNetwork ()
 Returns a reference to the underlying VdfNetwork.
 
const VdfNetworkGetNetwork () const
 Returns a const reference to the underlying VdfNetwork.
 

Friends

class Node
 

Detailed Description

This is a container class used to hold on to all the nodes and to facilitate their management.

Definition at line 405 of file testUtils.h.

Constructor & Destructor Documentation

◆ Network()

Network ( )
inline

Definition at line 458 of file testUtils.h.

◆ ~Network()

~Network ( )
inline

Definition at line 462 of file testUtils.h.

Member Function Documentation

◆ Add() [1/2]

VDF_API void Add ( const std::string &  nodeName,
const NodeType nodeType 
)

Creates a node named nodeName of type nodeType.

Note that nodeName will be the debug name of the created node.

Note also that there is no error checking of whether or not this nodeName has already been used, and the new node will simply overwrite the old one.

◆ Add() [2/2]

VDF_API void Add ( const std::string &  nodeName,
VdfNode customNode 
)

Takes ownership of a customNode that was created externally.

It must have been created with this network's VdfNetwork though.

◆ AddInputVector()

void AddInputVector ( const std::string &  nodeName,
size_t  size = 1 
)
inline

Creates an input vector of type T named nodeName.

Definition at line 487 of file testUtils.h.

◆ GetConnection()

VDF_API VdfConnection * GetConnection ( const std::string &  connectionName)

Returns a pointer to a connection named connectionName.

The syntax for connectionName is:

srcNode:connector -> tgtNode:connector

If there is exactly one input or output connector only, you can also write:

srcNode -> tgtNode:connector

◆ GetNetwork() [1/2]

VdfNetwork & GetNetwork ( )
inline

Returns a reference to the underlying VdfNetwork.

Definition at line 522 of file testUtils.h.

◆ GetNetwork() [2/2]

const VdfNetwork & GetNetwork ( ) const
inline

Returns a const reference to the underlying VdfNetwork.

Definition at line 526 of file testUtils.h.

◆ GetNodeName()

VDF_API const std::string GetNodeName ( const VdfId  nodeId)

Returns the node name for the VdfTestUtils::Node corresponding to a VdfNode with VdfId nodeId.

◆ operator[]() [1/2]

VDF_API Node & operator[] ( const std::string &  nodeName)

Returns a reference to a node named nodeName.

◆ operator[]() [2/2]

VDF_API const Node & operator[] ( const std::string &  nodeName) const

Returns a const reference to a node named nodeName.

Friends And Related Function Documentation

◆ Node

friend class Node
friend

Definition at line 531 of file testUtils.h.


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