BasicNode.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <swarmio/Node.h>
4 
5 namespace swarmio::transport
6 {
11  class SWARMIO_API BasicNode : public Node
12  {
13  private:
14 
19  std::string _uuid;
20 
25  std::string _name;
26 
31  std::string _deviceClass;
32 
33  public:
34 
42  BasicNode(const std::string& uuid, const std::string& name, const std::string& deviceClass)
43  : _uuid(uuid), _name(name), _deviceClass(deviceClass) { }
44 
50  virtual const std::string& GetUUID() const override
51  {
52  return _uuid;
53  }
54 
60  virtual const std::string& GetName() const override
61  {
62  return _name;
63  }
64 
70  virtual const std::string& GetDeviceClass() const override
71  {
72  return _deviceClass;
73  }
74  };
75 }
virtual const std::string & GetDeviceClass() const override
Get the class of the underlying device.
Definition: BasicNode.h:70
std::string _uuid
The unique identifier of the node.
Definition: BasicNode.h:19
virtual const std::string & GetUUID() const override
Get the unique identifier of the node.
Definition: BasicNode.h:50
std::string _deviceClass
Device class.
Definition: BasicNode.h:31
virtual const std::string & GetName() const override
Returns the (possibly non-unique) name of the node.
Definition: BasicNode.h:60
BasicNode(const std::string &uuid, const std::string &name, const std::string &deviceClass)
Construct a new BasicNode object.
Definition: BasicNode.h:42
std::string _name
The name of the node.
Definition: BasicNode.h:25
Represents a Node the Endpoint knows about and can send messages to.
A simple Node with a UUID.
Definition: BasicNode.h:11


swarmros
Author(s):
autogenerated on Fri Apr 3 2020 03:42:47