iceoryx_posh  2.0.2
node.hpp
1 // Copyright (c) 2019 by Robert Bosch GmbH. All rights reserved.
2 // Copyright (c) 2021 by Apex.AI Inc. All rights reserved.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 // SPDX-License-Identifier: Apache-2.0
17 #ifndef IOX_POSH_RUNTIME_NODE_HPP
18 #define IOX_POSH_RUNTIME_NODE_HPP
19 
20 #include "iceoryx_posh/capro/service_description.hpp"
21 #include "iceoryx_posh/iceoryx_posh_types.hpp"
22 
23 namespace iox
24 {
25 namespace runtime
26 {
27 class NodeData;
28 
30 class Node
31 {
32  public:
35  Node(const NodeName_t& nodeName) noexcept;
36 
38  ~Node() noexcept;
39 
40  Node(const Node&) = delete;
41  Node& operator=(const Node&) = delete;
42 
45  Node(Node&& rhs) noexcept;
46 
49  Node& operator=(Node&& rhs) noexcept;
50 
53  NodeName_t getNodeName() const noexcept;
54 
57  RuntimeName_t getRuntimeName() const noexcept;
58 
59  protected:
60  Node(NodeData* const data) noexcept;
61 
62  NodeData* m_data = nullptr;
63 };
64 } // namespace runtime
65 } // namespace iox
66 
67 #endif // IOX_POSH_RUNTIME_NODE_HPP
class which represents a node
Definition: node.hpp:31
Node(const NodeName_t &nodeName) noexcept
constructor which requires the name of the node
RuntimeName_t getRuntimeName() const noexcept
returns the name of the application's runtime
~Node() noexcept
destructor
NodeName_t getNodeName() const noexcept
returns the name of the node