Biorbd Release_1.13.0
Loading...
Searching...
No Matches
Node.h
1#ifndef BIORBD_UTILS_NODE_H
2#define BIORBD_UTILS_NODE_H
3
4#include "biorbdConfig.h"
5
6#include <memory>
7
8#include "Utils/UtilsEnum.h"
9
10namespace BIORBD_NAMESPACE {
11namespace utils {
12class String;
13
17class BIORBD_API Node {
18 public:
22 Node();
23
28 Node(const Node &other);
29
34 Node(const String &name);
35
41 Node(const String &name, const String &parentName);
42
46 virtual ~Node();
47
52 void DeepCopy(const Node &other);
53
58 void setName(const String &name);
59
64 const String &name() const;
65
70 const String &parent() const;
71
76 void setParent(const String &name);
77
82 NODE_TYPE typeOfNode() const;
83
84 protected:
88 virtual void setType() = 0;
89
90 std::shared_ptr<String> m_name;
91 std::shared_ptr<String> m_parentName;
92 std::shared_ptr<NODE_TYPE> m_typeOfNode;
93};
94
95} // namespace utils
96} // namespace BIORBD_NAMESPACE
97
98#endif // BIORBD_UTILS_NODE_H
Node()
Construct Node.
Definition Node.cpp:8
void setParent(const String &name)
Set the parent name of the node.
Definition Node.cpp:47
const String & name() const
Return the name of the node.
Definition Node.cpp:43
NODE_TYPE typeOfNode() const
Return the type of node.
Definition Node.cpp:49
void setName(const String &name)
Set the name of the node.
Definition Node.cpp:41
std::shared_ptr< NODE_TYPE > m_typeOfNode
The type of the node.
Definition Node.h:92
void DeepCopy(const Node &other)
Deep copy of the node in another node.
Definition Node.cpp:35
std::shared_ptr< String > m_parentName
The parent name of the node.
Definition Node.h:91
const String & parent() const
Return the parent name of the node.
Definition Node.cpp:45
std::shared_ptr< String > m_name
The name of the node.
Definition Node.h:90
virtual void setType()=0
To set the type.
Wrapper around the std::string class with augmented functionality.
Definition String.h:18