Sen API
Sen Libraries
Loading...
Searching...
No Matches
classdoc_tree.h
Go to the documentation of this file.
1// === classdoc_tree.h =================================================================================================
2// Sen Infrastructure
3// Released under the Apache License v2.0 (SPDX-License-Identifier Apache-2.0).
4// See the LICENSE.txt file for more information.
5// © Airbus SAS, Airbus Helicopters, and Airbus Defence and Space SAU/GmbH/SAS.
6// =====================================================================================================================
7
8#ifndef SEN_LIBS_GEN_SRC_MKDOCS_CLASSDOC_TREE_H
9#define SEN_LIBS_GEN_SRC_MKDOCS_CLASSDOC_TREE_H
10
11// sen
13
14// std
15#include <vector>
16
17namespace sen::gen::detail
18{
19
20class TypeStorage;
21
22class Node final
23{
24public:
25 SEN_MOVE_ONLY(Node)
26
27public:
28 Node(const sen::ClassType* meta, Node* parent, TypeStorage* storage);
29 ~Node() = default;
30
31public:
32 [[nodiscard]] Node* getOrCreateChild(std::vector<const sen::ClassType*> path, TypeStorage* storage);
33 [[nodiscard]] Node* getParent() noexcept;
34 [[nodiscard]] const sen::ClassType* getMeta() const noexcept;
35 [[nodiscard]] std::vector<Node>& getChildren() noexcept;
36 [[nodiscard]] TypeStorage* getStorage() noexcept;
37
38private:
39 std::vector<Node> children_;
40 const sen::ClassType* meta_;
41 Node* parent_ = nullptr;
42 TypeStorage* storage_;
43};
44
45} // namespace sen::gen::detail
46
47#endif // SEN_LIBS_GEN_SRC_MKDOCS_CLASSDOC_TREE_H
std::vector< Node > & getChildren() noexcept
Node * getParent() noexcept
Node(const sen::ClassType *meta, Node *parent, TypeStorage *storage)
const sen::ClassType * getMeta() const noexcept
TypeStorage * getStorage() noexcept
Node * getOrCreateChild(std::vector< const sen::ClassType * > path, TypeStorage *storage)
Definition type_storage.h:33
Definition type_storage.h:28
Definition assert.h:17
STL namespace.