neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neolib::callback_timer Class Reference

#include <timer.hpp>

Inheritance diagram for neolib::callback_timer:
neolib::timer neolib::noncopyable neolib::lifetime< Base > neolib::i_lifetime neogfx::widget_timer

Public Member Functions

 callback_timer (i_async_task &aTask, std::function< void(callback_timer &)> aCallback, const duration_type &aDuration_s, bool aInitialWait=true)
 
 callback_timer (i_async_task &aTask, const i_lifetime &aContext, std::function< void(callback_timer &)> aCallback, const duration_type &aDuration_s, bool aInitialWait=true)
 
template<typename Context >
 callback_timer (i_async_task &aTask, const Context &aContext, std::function< void(callback_timer &)> aCallback, const duration_type &aDuration_s, bool aInitialWait=true)
 
 ~callback_timer ()
 
- Public Member Functions inherited from neolib::timer
 timer (i_async_task &aTask, const duration_type &aDuration_s, bool aInitialWait=true)
 
 timer (i_async_task &aTask, const i_lifetime &aContext, const duration_type &aDuration_s, bool aInitialWait=true)
 
template<typename Context >
 timer (i_async_task &aTask, const Context &aContext, const duration_type &aDuration_s, bool aInitialWait=true)
 
 timer (const timer &aOther)
 
timeroperator= (const timer &aOther)
 
virtual ~timer ()
 
i_async_taskowner_task () const
 
void enable (bool aWait=true)
 
void disable ()
 
bool enabled () const
 
bool disabled () const
 
void again ()
 
void again_if ()
 
void cancel ()
 
void reset ()
 
bool waiting () const
 
const duration_typeduration () const
 
void set_duration (const duration_type &aDuration_s, bool aEffectiveImmediately=false)
 
void set_debug (bool aDebug)
 
- Public Member Functions inherited from neolib::lifetime< Base >
 lifetime (lifetime_state aState=lifetime_state::Alive)
 
virtual ~lifetime ()
 
lifetime_state object_state () const final
 
std::shared_ptr< std::atomic< lifetime_state > > object_state_ptr () const final
 
bool is_creating () const final
 
bool is_alive () const final
 
bool is_destroying () const final
 
bool is_destroyed () const final
 
void set_alive () override
 
void set_destroying () override
 
void set_destroyed () override
 
- Public Member Functions inherited from neolib::i_lifetime
virtual ~i_lifetime ()=default
 

Additional Inherited Members

- Public Types inherited from neolib::timer
typedef std::chrono::duration< double > duration_type
 
- Public Types inherited from neolib::lifetime< Base >
typedef neolib::destroyed_flag destroyed_flag
 
- Protected Member Functions inherited from neolib::timer
void unsubscribe ()
 

Detailed Description

Definition at line 111 of file timer.hpp.

Constructor & Destructor Documentation

◆ callback_timer() [1/3]

neolib::callback_timer::callback_timer ( i_async_task aTask,
std::function< void(callback_timer &)>  aCallback,
const duration_type aDuration_s,
bool  aInitialWait = true 
)

◆ callback_timer() [2/3]

neolib::callback_timer::callback_timer ( i_async_task aTask,
const i_lifetime aContext,
std::function< void(callback_timer &)>  aCallback,
const duration_type aDuration_s,
bool  aInitialWait = true 
)

◆ callback_timer() [3/3]

template<typename Context >
neolib::callback_timer::callback_timer ( i_async_task aTask,
const Context aContext,
std::function< void(callback_timer &)>  aCallback,
const duration_type aDuration_s,
bool  aInitialWait = true 
)
inline

Definition at line 117 of file timer.hpp.

◆ ~callback_timer()

neolib::callback_timer::~callback_timer ( )

The documentation for this class was generated from the following file: