Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::ui::detail::CurrentSceneCallback< Callback > Class Template Reference

Facade-aware callback storage; invocation publishes weak ownership, retirement masks its caller. More...

#include <current_scene.hpp>

Public Member Functions

 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

Detailed Description

template<class Callback>
class portals::ui::detail::CurrentSceneCallback< Callback >

Facade-aware callback storage; invocation publishes weak ownership, retirement masks its caller.

Template Parameters
CallbackExisting owning callable; construction/moves remain within the registration boundary.

Constructor & Destructor Documentation

◆ CurrentSceneCallback() [1/2]

template<class Callback>
portals::ui::detail::CurrentSceneCallback< Callback >::CurrentSceneCallback ( std::weak_ptr< SceneAnchor > scene,
Callback && callback )
inline
Parameters
sceneWeak facade, empty for a standalone low-level managed owner.
callbackCallable transferred into this owning storage.

◆ CurrentSceneCallback() [2/2]

template<class Callback>
portals::ui::detail::CurrentSceneCallback< Callback >::CurrentSceneCallback ( CurrentSceneCallback< Callback > && other)
inline
Parameters
otherOwning callback transferred under the checked registration boundary.

Member Function Documentation

◆ operator bool()

template<class Callback>
portals::ui::detail::CurrentSceneCallback< Callback >::operator bool ( ) const
inlineexplicit
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...>
decltype(auto) portals::ui::detail::CurrentSceneCallback< Callback >::operator() ( Args &&... args) const
inline
Template Parameters
ArgsOriginal borrowed event arguments.
Parameters
argsForwarded 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: