Skip to content

Commit c485f16

Browse files
Implement method chain template WithAndThen.
1 parent 229b7d2 commit c485f16

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

Source/GUI/Toolkit/Include/SettingWindow_LayoutManager.hpp

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,7 @@ GUI_TOOLKIT_NAMESPACE
2828
private:
2929
PtrUnique<DataImpl> Impl;
3030

31-
public:
32-
Self *StartBuild() noexcept;
33-
34-
CLASS_BUILD(T, V)
35-
inline Self *WithAndThen(T DataImpl::*member, V &&value) noexcept {
36-
Impl.get()->*member = FORWARD(V, value);
37-
38-
return this;
39-
}
40-
41-
Self *WhenDone() noexcept;
42-
31+
private:
4332
Layout *GetLayout() noexcept;
4433
ComponentsManager *GetComponentsManager() noexcept;
4534

@@ -71,6 +60,18 @@ GUI_TOOLKIT_NAMESPACE
7160
Layout *layout,
7261
ComponentsManager *componentsManager) const noexcept;
7362

63+
public:
64+
Self *StartBuild() noexcept;
65+
66+
CLASS_BUILD(T, V)
67+
inline Self *WithAndThen(T DataImpl::*member, V &&value) noexcept {
68+
Impl.get()->*member = FORWARD(V, value);
69+
70+
return this;
71+
}
72+
73+
Self *WhenDone() noexcept;
74+
7475
void SetupSettingWindowLayout() noexcept;
7576

7677
};

0 commit comments

Comments
 (0)