salsa
0.4.0
|
#include <Node.hh>
Public Member Functions | |
Node (std::string name="", std::string uuid="") | |
virtual | ~Node () |
virtual void | print () const |
virtual void | json (Json::Value &root) |
virtual void | publish () |
std::string | name () const |
Returns node name. | |
std::string | uuid () const |
Returns node UUID. | |
std::weak_ptr< Node > | parent () const |
Returns parent node. | |
std::vector< std::shared_ptr< Node > > | nodes () const |
Returns nodes. | |
void | name (std::string n) |
Sets node name. | |
void | uuid (std::string uuid) |
Sets node uuid. | |
void | parent (std::weak_ptr< Node > node) |
Sets parent. | |
void | add (std::shared_ptr< Node > node) |
Adds node to the list of nodes. | |
std::shared_ptr< Node > | find (std::string name) const |
Find node by name. More... | |
void | removeByUUID (std::string uuid) |
Remove node by uuid. More... | |
void | add (std::shared_ptr< Publisher > pPublisher) |
Adds publisher to the node. | |
std::vector< std::shared_ptr< Publisher > > | publishers () const |
Returns publishers. | |
NodeInfo * | nodeInfo () const |
Returns Node Info. | |
Protected Attributes | |
NodeInfo * | mpNodeInfo {new NodeInfo()} |
Node Info. | |
std::weak_ptr< Node > | mpParent |
Parent node. | |
std::vector< std::shared_ptr< Node > > | mChildNodes = {} |
List of nodes. | |
std::vector< std::shared_ptr< Publisher > > | mPublishers = {} |
List of publishers. | |
Salsa::Node::Node | ( | std::string | name = "" , |
std::string | uuid = "" |
||
) |
|
virtual |
std::shared_ptr< Node > Salsa::Node::find | ( | std::string | name | ) | const |
Find node by name.
Returns node by name
Definition at line 113 of file Node.cc.
References mChildNodes, and name().
|
virtual |
|
virtual |
Prints node info
Definition at line 91 of file Node.cc.
References mChildNodes, mpNodeInfo, mpParent, and mPublishers.
|
virtual |
Publish network status
Definition at line 150 of file Node.cc.
References json(), mPublishers, name(), parent(), and publishers().
void Salsa::Node::removeByUUID | ( | std::string | uuid | ) |
Remove node by uuid.
Removes node by uuid
Definition at line 130 of file Node.cc.
References mChildNodes.