aboutsummaryrefslogtreecommitdiff
path: root/src/deep.h
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-04-29 09:50:57 +0200
committerBenoit Germain <benoit.germain@ubisoft.com>2024-04-29 09:50:57 +0200
commit07d6074b5deadc7ff6d30d5fb47fb6fa863a14ff (patch)
tree955fb6216739c3d55aeba47a3ea5d8ffc6a7f3e1 /src/deep.h
parent4a2705af8a9a6b55cf848d53f8330447138a19c4 (diff)
downloadlanes-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.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/deep.h b/src/deep.h
index 45f7841..6f6e99d 100644
--- a/src/deep.h
+++ b/src/deep.h
@@ -6,7 +6,8 @@
6 */ 6 */
7 7
8#ifdef __cplusplus 8#ifdef __cplusplus
9extern "C" { 9extern "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
53class DeepFactory 54class 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};