Facade-aware callback storage; invocation publishes weak ownership, retirement masks its caller.
More...
#include <current_scene.hpp>
|
| | CurrentSceneCallback (std::weak_ptr< SceneAnchor > scene, Callback &&callback) |
|
| CurrentSceneCallback (const CurrentSceneCallback &)=default |
| | Copy the weak publication and the original owning callable.
|
| | CurrentSceneCallback (CurrentSceneCallback &&other) |
|
| ~CurrentSceneCallback () |
| | Retire owned captures while both setup and current-scene attribution are suspended.
|
| | operator bool () const |
template<class... Args>
requires std::invocable<Callback &, Args...> |
| decltype(auto) | operator() (Args &&...args) const |
template<class Callback>
class portals::ui::detail::CurrentSceneCallback< Callback >
Facade-aware callback storage; invocation publishes weak ownership, retirement masks its caller.
- Template Parameters
-
| Callback | Existing owning callable; construction/moves remain within the registration boundary. |
◆ CurrentSceneCallback() [1/2]
- Parameters
-
| scene | Weak facade, empty for a standalone low-level managed owner. |
| callback | Callable transferred into this owning storage. |
◆ CurrentSceneCallback() [2/2]
- Parameters
-
| other | Owning callback transferred under the checked registration boundary. |
◆ operator bool()
- Returns
- False only for empty storage or an existing nullable callable with no target.
◆ operator()()
template<class Callback>
template<class... Args>
requires std::invocable<Callback &, Args...>
- Template Parameters
-
| Args | Original borrowed event arguments. |
- Parameters
-
| args | Forwarded only for this invocation. |
- Returns
- The original callback result without changing its checked contract.
The documentation for this class was generated from the following file: