Atoms Crowd  7.0.0
NetworkManager.impl.h
1 // ===========================================================================
2 // Copyright (c) 2015 Toolchefs Ltd. All rights reserved.
3 //
4 // Use of this software is subject to the terms of the Toolchefs license
5 // agreement provided at the time of installation or download, or which
6 // otherwise accompanies this software in either electronic or hard copy form.
7 // ===========================================================================
8 
9 namespace AtomsGraph
10 {
11  template<class T>
12  T* NetworkManager::getNode(const std::string& name)
13  {
14  Node* node = getNode(name);
15  if (node && (node->typeId() == T::staticTypeId()))
16  return static_cast<T*>(node);
17  return nullptr;
18  }
19 }
Node * getNode(const std::string &name)
Gets the node with the given name.
Definition: Node.h:31
virtual unsigned int typeId() const =0
Type id.
AtomsGraph namespace.
Definition: PosePort.h:15