Network manager class.
More...
#include <NetworkManager.h>
|
| NetworkManager () |
| Constructor.
|
|
| ~NetworkManager () |
| Destructor.
|
|
| NetworkManager (const NetworkManager &other) |
| Copy constructor.
|
|
NetworkManager & | operator= (const NetworkManager &other) |
| Assign operator.
|
|
Node * | createNode (const std::string &typeName, const std::string &name) |
| Creates a node inside this graph. More...
|
|
bool | renameNode (const std::string &name, const std::string &newName) |
| Renames a node inside this graph. More...
|
|
void | addNode (Node *node, const std::string &name) |
| Adds a node to the graph. More...
|
|
void | deleteNode (const std::string &name) |
| Deletes a node. More...
|
|
bool | connectAttr (const std::string &sourceNode, const std::string &sourceAttribute, const std::string &destinationNode, const std::string &destinationAttribute) |
| Connects two nodes.
|
|
bool | disconnectAttr (const std::string &sourceNode, const std::string &sourceAttribute, const std::string &destinationNode, const std::string &destinationAttribute) |
| Disconnects two nodes.
|
|
Node * | getNode (const std::string &name) |
| Gets the node with the given name. More...
|
|
template<class T > |
T * | getNode (const std::string &name) |
| Gets the node with the given name. More...
|
|
std::vector< Node * > | getAllNodes () |
| Gets all nodes of the graph.
|
|
std::vector< std::string > | getNodeNames () |
| Gets all node names of the graph.
|
|
void | computeNode (const std::string &nodeName, const AtomsGraph::ComputeData *computeData, bool multithread=false, bool useNetworkCache=false) |
| Evaluates a node and the incoming graph. More...
|
|
NetworkManager | clone () const |
| Clones the graph.
|
|
void | cleanNetwork () |
| Deletes all the nodes.
|
|
void | cacheNodeNetwork (const std::string &nodeName) |
| Cache nodes order. More...
|
|
void | clearNodeNetworkCache (const std::string &nodeName) |
| Clear a cache.
|
|
void | clearNodeNetworkCaches () |
| Clear all caches.
|
|
void | reset () |
| Reset the network without deleting the node cached.
|
|
void | clearNodeCache () |
| Clear the node cache removing all the nodes that are not in use.
|
|
void | setAllNodeDirty () |
| Set all nodes as dirty.
|
|
|
std::string | getUniqueName (const std::string &name) |
| Generates an unique node name.
|
|
◆ addNode()
void AtomsGraph::NetworkManager::addNode |
( |
Node * |
node, |
|
|
const std::string & |
name |
|
) |
| |
Adds a node to the graph.
- Parameters
-
◆ cacheNodeNetwork()
void AtomsGraph::NetworkManager::cacheNodeNetwork |
( |
const std::string & |
nodeName | ) |
|
Cache nodes order.
The computation order of the nodes is cached starting from a specific node. The cache is later used to compute the graph without traversing the graph connection. This improve the performance when a node is computed multiple times
- Parameters
-
◆ computeNode()
void AtomsGraph::NetworkManager::computeNode |
( |
const std::string & |
nodeName, |
|
|
const AtomsGraph::ComputeData * |
computeData, |
|
|
bool |
multithread = false , |
|
|
bool |
useNetworkCache = false |
|
) |
| |
Evaluates a node and the incoming graph.
- Parameters
-
nodeName | Node name |
multithread | Evaluate the graph using multiple threads |
◆ createNode()
Node* AtomsGraph::NetworkManager::createNode |
( |
const std::string & |
typeName, |
|
|
const std::string & |
name |
|
) |
| |
Creates a node inside this graph.
- Parameters
-
- Returns
- New node created
◆ deleteNode()
void AtomsGraph::NetworkManager::deleteNode |
( |
const std::string & |
name | ) |
|
Deletes a node.
- Parameters
-
◆ getNode() [1/2]
Node* AtomsGraph::NetworkManager::getNode |
( |
const std::string & |
name | ) |
|
Gets the node with the given name.
- Parameters
-
◆ getNode() [2/2]
template<class T >
T * AtomsGraph::NetworkManager::getNode |
( |
const std::string & |
name | ) |
|
Gets the node with the given name.
- Parameters
-
◆ renameNode()
bool AtomsGraph::NetworkManager::renameNode |
( |
const std::string & |
name, |
|
|
const std::string & |
newName |
|
) |
| |
Renames a node inside this graph.
- Parameters
-
name | Old name |
newName | New name |
The documentation for this class was generated from the following files: