diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-04-29 09:50:57 +0200 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-04-29 09:50:57 +0200 |
commit | 07d6074b5deadc7ff6d30d5fb47fb6fa863a14ff (patch) | |
tree | 955fb6216739c3d55aeba47a3ea5d8ffc6a7f3e1 /src/deep.h | |
parent | 4a2705af8a9a6b55cf848d53f8330447138a19c4 (diff) | |
download | lanes-07d6074b5deadc7ff6d30d5fb47fb6fa863a14ff.tar.gz lanes-07d6074b5deadc7ff6d30d5fb47fb6fa863a14ff.tar.bz2 lanes-07d6074b5deadc7ff6d30d5fb47fb6fa863a14ff.zip |
All headers reformatted with updated clang-format settings
Diffstat (limited to 'src/deep.h')
-rw-r--r-- | src/deep.h | 17 |
1 files changed, 7 insertions, 10 deletions
@@ -6,7 +6,8 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifdef __cplusplus | 8 | #ifdef __cplusplus |
9 | extern "C" { | 9 | extern "C" |
10 | { | ||
10 | #endif // __cplusplus | 11 | #endif // __cplusplus |
11 | #include "lua.h" | 12 | #include "lua.h" |
12 | #ifdef __cplusplus | 13 | #ifdef __cplusplus |
@@ -53,13 +54,11 @@ struct DeepPrelude | |||
53 | class DeepFactory | 54 | class DeepFactory |
54 | { | 55 | { |
55 | protected: | 56 | protected: |
56 | |||
57 | // protected non-virtual destructor: Lanes won't manage the Factory's lifetime | 57 | // protected non-virtual destructor: Lanes won't manage the Factory's lifetime |
58 | DeepFactory() = default; | 58 | DeepFactory() = default; |
59 | ~DeepFactory() = default; | 59 | ~DeepFactory() = default; |
60 | 60 | ||
61 | public: | 61 | public: |
62 | |||
63 | // non-copyable, non-movable | 62 | // non-copyable, non-movable |
64 | DeepFactory(DeepFactory const&) = delete; | 63 | DeepFactory(DeepFactory const&) = delete; |
65 | DeepFactory(DeepFactory const&&) = delete; | 64 | DeepFactory(DeepFactory const&&) = delete; |
@@ -67,18 +66,16 @@ class DeepFactory | |||
67 | DeepFactory& operator=(DeepFactory const&&) = delete; | 66 | DeepFactory& operator=(DeepFactory const&&) = delete; |
68 | 67 | ||
69 | private: | 68 | private: |
70 | |||
71 | // NVI: private overrides | 69 | // NVI: private overrides |
72 | virtual DeepPrelude* newDeepObjectInternal(lua_State* L_) const = 0; | 70 | [[nodiscard]] virtual DeepPrelude* newDeepObjectInternal(lua_State* L_) const = 0; |
73 | virtual void deleteDeepObjectInternal(lua_State* L_, DeepPrelude* o_) const = 0; | 71 | virtual void deleteDeepObjectInternal(lua_State* L_, DeepPrelude* o_) const = 0; |
74 | virtual void createMetatable(lua_State* L_) const = 0; | 72 | virtual void createMetatable(lua_State* L_) const = 0; |
75 | virtual char const* moduleName() const = 0; | 73 | [[nodiscard]] virtual char const* moduleName() const = 0; |
76 | 74 | ||
77 | public: | 75 | public: |
78 | |||
79 | // NVI: public interface | 76 | // NVI: public interface |
80 | int pushDeepUserdata(DestState L_, int nuv_) const; | 77 | [[nodiscard]] int pushDeepUserdata(DestState L_, int nuv_) const; |
81 | DeepPrelude* toDeep(lua_State* L_, int index_) const; | 78 | [[nodiscard]] DeepPrelude* toDeep(lua_State* L_, int index_) const; |
82 | static void DeleteDeepObject(lua_State* L_, DeepPrelude* o_); | 79 | static void DeleteDeepObject(lua_State* L_, DeepPrelude* o_); |
83 | static char const* PushDeepProxy(DestState L_, DeepPrelude* o_, int nuv_, LookupMode mode_); | 80 | [[nodiscard]] static char const* PushDeepProxy(DestState L_, DeepPrelude* o_, int nuv_, LookupMode mode_); |
84 | }; | 81 | }; |