HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VdfTestUtils::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

 Network ()
 
 ~Network ()
 
VDF_API void Add (const std::string &nodeName, const NodeType &nodeType)
 
VDF_API void Add (const std::string &nodeName, VdfNode *customNode)
 
template<typename T >
void AddInputVector (const std::string &nodeName, size_t size=1)
 
VDF_API Nodeoperator[] (const std::string &nodeName)
 
VDF_API const Nodeoperator[] (const std::string &nodeName) const
 
VDF_API const std::string GetNodeName (const VdfId nodeId)
 
VDF_API VdfConnectionGetConnection (const std::string &connectionName)
 
VdfNetworkGetNetwork ()
 
const VdfNetworkGetNetwork () const
 

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

VdfTestUtils::Network::Network ( )
inline

Definition at line 458 of file testUtils.h.

VdfTestUtils::Network::~Network ( )
inline

Definition at line 462 of file testUtils.h.

Member Function Documentation

VDF_API void VdfTestUtils::Network::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.

VDF_API void VdfTestUtils::Network::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.

template<typename T >
void VdfTestUtils::Network::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.

VDF_API VdfConnection* VdfTestUtils::Network::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

VdfNetwork& VdfTestUtils::Network::GetNetwork ( )
inline

Returns a reference to the underlying VdfNetwork.

Definition at line 522 of file testUtils.h.

const VdfNetwork& VdfTestUtils::Network::GetNetwork ( ) const
inline

Returns a const reference to the underlying VdfNetwork.

Definition at line 526 of file testUtils.h.

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

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

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

Returns a reference to a node named nodeName.

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

Returns a const reference to a node named nodeName.

Friends And Related Function Documentation

friend class Node
friend

Definition at line 531 of file testUtils.h.


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