diff options
Diffstat (limited to 'src/intercopycontext.hpp')
-rw-r--r-- | src/intercopycontext.hpp | 57 |
1 files changed, 38 insertions, 19 deletions
diff --git a/src/intercopycontext.hpp b/src/intercopycontext.hpp index 2b247d2..84d9e70 100644 --- a/src/intercopycontext.hpp +++ b/src/intercopycontext.hpp | |||
@@ -38,11 +38,13 @@ class InterCopyContext | |||
38 | std::string_view name; // that one can change when we reuse the context | 38 | std::string_view name; // that one can change when we reuse the context |
39 | 39 | ||
40 | private: | 40 | private: |
41 | [[nodiscard]] std::string_view findLookupName() const; | 41 | [[nodiscard]] |
42 | std::string_view findLookupName() const; | ||
42 | // when mode == LookupMode::FromKeeper, L1 is a keeper state and L2 is not, therefore L2 is the state where we want to raise the error | 43 | // when mode == LookupMode::FromKeeper, L1 is a keeper state and L2 is not, therefore L2 is the state where we want to raise the error |
43 | // whon mode != LookupMode::FromKeeper, L1 is not a keeper state, therefore L1 is the state where we want to raise the error | 44 | // whon mode != LookupMode::FromKeeper, L1 is not a keeper state, therefore L1 is the state where we want to raise the error |
44 | lua_State* getErrL() const { return (mode == LookupMode::FromKeeper) ? L2.value() : L1.value(); } | 45 | lua_State* getErrL() const { return (mode == LookupMode::FromKeeper) ? L2.value() : L1.value(); } |
45 | [[nodiscard]] LuaType processConversion() const; | 46 | [[nodiscard]] |
47 | LuaType processConversion() const; | ||
46 | 48 | ||
47 | // for use in copyCachedFunction | 49 | // for use in copyCachedFunction |
48 | void copyFunction() const; | 50 | void copyFunction() const; |
@@ -50,30 +52,47 @@ class InterCopyContext | |||
50 | 52 | ||
51 | // for use in inter_copy_function | 53 | // for use in inter_copy_function |
52 | void copyCachedFunction() const; | 54 | void copyCachedFunction() const; |
53 | [[nodiscard]] bool lookupTable() const; | 55 | [[nodiscard]] |
56 | bool lookupTable() const; | ||
54 | 57 | ||
55 | // for use in inter_copy_table | 58 | // for use in inter_copy_table |
56 | void interCopyKeyValuePair() const; | 59 | void interCopyKeyValuePair() const; |
57 | [[nodiscard]] bool pushCachedMetatable() const; | 60 | [[nodiscard]] |
58 | [[nodiscard]] bool pushCachedTable() const; | 61 | bool pushCachedMetatable() const; |
62 | [[nodiscard]] | ||
63 | bool pushCachedTable() const; | ||
59 | 64 | ||
60 | // for use in inter_copy_userdata | 65 | // for use in inter_copy_userdata |
61 | [[nodiscard]] bool tryCopyClonable() const; | 66 | [[nodiscard]] |
62 | [[nodiscard]] bool tryCopyDeep() const; | 67 | bool tryCopyClonable() const; |
68 | [[nodiscard]] | ||
69 | bool tryCopyDeep() const; | ||
63 | 70 | ||
64 | // copying a single Lua stack item | 71 | // copying a single Lua stack item |
65 | [[nodiscard]] bool interCopyBoolean() const; | 72 | [[nodiscard]] |
66 | [[nodiscard]] bool interCopyFunction() const; | 73 | bool interCopyBoolean() const; |
67 | [[nodiscard]] bool interCopyLightuserdata() const; | 74 | [[nodiscard]] |
68 | [[nodiscard]] bool interCopyNil() const; | 75 | bool interCopyFunction() const; |
69 | [[nodiscard]] bool interCopyNumber() const; | 76 | [[nodiscard]] |
70 | [[nodiscard]] bool interCopyString() const; | 77 | bool interCopyLightuserdata() const; |
71 | [[nodiscard]] bool interCopyTable() const; | 78 | [[nodiscard]] |
72 | [[nodiscard]] bool interCopyUserdata() const; | 79 | bool interCopyNil() const; |
80 | [[nodiscard]] | ||
81 | bool interCopyNumber() const; | ||
82 | [[nodiscard]] | ||
83 | bool interCopyString() const; | ||
84 | [[nodiscard]] | ||
85 | bool interCopyTable() const; | ||
86 | [[nodiscard]] | ||
87 | bool interCopyUserdata() const; | ||
73 | 88 | ||
74 | public: | 89 | public: |
75 | [[nodiscard]] InterCopyResult interCopy(int n_) const; | 90 | [[nodiscard]] |
76 | [[nodiscard]] InterCopyResult interCopyOne() const; | 91 | InterCopyResult interCopy(int n_) const; |
77 | [[nodiscard]] InterCopyResult interCopyPackage() const; | 92 | [[nodiscard]] |
78 | [[nodiscard]] InterCopyResult interMove(int n_) const; | 93 | InterCopyResult interCopyOne() const; |
94 | [[nodiscard]] | ||
95 | InterCopyResult interCopyPackage() const; | ||
96 | [[nodiscard]] | ||
97 | InterCopyResult interMove(int n_) const; | ||
79 | }; | 98 | }; |