Biorbd
Node.h
1 #ifndef BIORBD_UTILS_NODE_H
2 #define BIORBD_UTILS_NODE_H
3 
4 #include <memory>
5 #include "biorbdConfig.h"
6 #include "Utils/UtilsEnum.h"
7 
8 namespace biorbd {
9 namespace utils {
10 class String;
11 
15 class BIORBD_API Node
16 {
17 public:
21  Node();
22 
27  Node(
28  const biorbd::utils::Node& other);
29 
34  Node(
35  const biorbd::utils::String &name);
36 
42  Node(
43  const biorbd::utils::String &name,
44  const biorbd::utils::String &parentName);
45 
49  virtual ~Node();
50 
55  void DeepCopy(const biorbd::utils::Node& other);
56 
61  void setName(const biorbd::utils::String &name);
62 
66  const biorbd::utils::String& name() const;
67 
71  const biorbd::utils::String& parent() const;
72 
77  void setParent(
78  const biorbd::utils::String &name);
79 
83  biorbd::utils::NODE_TYPE typeOfNode() const;
84 
85 protected:
89  virtual void setType() = 0;
90 
91  std::shared_ptr<biorbd::utils::String> m_name;
92  std::shared_ptr<biorbd::utils::String> m_parentName;
93  std::shared_ptr<biorbd::utils::NODE_TYPE> m_typeOfNode;
94 
95 };
96 
97 }}
98 
99 #endif // BIORBD_UTILS_NODE_H
biorbd::utils::Node::m_name
std::shared_ptr< biorbd::utils::String > m_name
The name of the node.
Definition: Node.h:91
biorbd::utils::Node::setType
virtual void setType()=0
To set the type.
biorbd::utils::Node
A node is an abstract element which is assigned to a parent.
Definition: Node.h:16
biorbd::utils::Node::m_parentName
std::shared_ptr< biorbd::utils::String > m_parentName
The parent name of the node.
Definition: Node.h:92
biorbd::utils::String
Wrapper around the std::string class with augmented functionality.
Definition: String.h:17
biorbd::utils::Node::m_typeOfNode
std::shared_ptr< biorbd::utils::NODE_TYPE > m_typeOfNode
The type of the node.
Definition: Node.h:93