LeviLamina
Loading...
Searching...
No Matches
ComponentStorage.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/platform/brstd/flat_map.h"
7
8namespace cereal {
9
11public:
12 // ComponentStorage inner types define
13 using KeyIterable = ::entt::iterable_adaptor<
14 ::std::_Vector_const_iterator<::std::_Vector_val<::std::_Simple_types<::std::string>>>,
15 ::std::_Vector_const_iterator<::std::_Vector_val<::std::_Simple_types<::std::string>>>>;
16
17 using StorageType = ::brstd::flat_map<
18 ::std::string,
19 ::entt::meta_any,
20 ::std::less<void>,
21 ::std::vector<::std::string>,
22 ::std::vector<::entt::meta_any>>;
23
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<
28 8,
29 48,
31 ::std::string,
32 ::entt::meta_any,
33 ::std::less<void>,
34 ::std::vector<::std::string>,
35 ::std::vector<::entt::meta_any>>>
36 mComponents;
37 // NOLINTEND
38
39public:
40 [[nodiscard]] KeyIterable keys() const {
41 return KeyIterable{mComponents->keys().begin(), mComponents->keys().end()};
42 }
43
46 template <class T>
47 [[nodiscard]] T const& getComponent(::std::string_view name) const {
48 return this->getComponent(name).template cast<T const&>();
49 }
50
51public:
52 // member functions
53 // NOLINTBEGIN
54 MCAPI bool eraseComponent(::std::string_view name);
55
56 MCAPI ::entt::meta_any getComponent(::std::string_view name);
57
58 MCAPI ::entt::meta_any getComponent(::std::string_view name) const;
59
60 MCAPI bool operator==(::cereal::ComponentStorage const& other) const;
61
62 MCAPI ~ComponentStorage();
63 // NOLINTEND
64
65public:
66 // destructor thunk
67 // NOLINTBEGIN
68 MCAPI void $dtor();
69 // NOLINTEND
70};
71
72} // namespace cereal
Definition flat_map.h:15
Definition ComponentStorage.h:10
T const & getComponent(::std::string_view name) const
Definition ComponentStorage.h:47