Skip to content

Class Ase::TimedSource

ClassList > Ase > TimedSource

EventLoop source for timer execution.

  • #include <loop.hh>

Inherits the following classes: Ase::EventSource

Public Attributes

Type Name
BoolSlot bool_slot_
VoidSlot void_slot_

Public Attributes inherited from Ase::EventSource

See Ase::EventSource

Type Name
uint idx
PollFD * pfd

Public Functions inherited from Ase::EventSource

See Ase::EventSource

Type Name
void add_poll (PollFD *const pfd)
Add a PollFD descriptors for poll(2) andcheck() .
virtual bool check (const LoopState & state) = 0
Check the source and its PollFD descriptors for dispatching (true return).
virtual void destroy ()
virtual bool dispatch (const LoopState & state) = 0
Dispatch source, returns if it should be kept alive.
void loop_remove ()
Remove this source from its event loop if any.
MainLoop * main_loop () const
Get the main loop for this source.
bool may_recurse () const
Indicates if this source may recurse.
void may_recurse (bool may_recurse)
Dispatch this source if its running recursively.
virtual bool prepare (const LoopState & state, int64 * timeout_usecs_p) = 0
Prepare the source for dispatching (true return) or polling (false).
bool primary () const
Indicate whether this source is primary.
void primary (bool is_primary)
Set whether this source prevents its loop from exiting.
bool recursion () const
Indicates wether the source is currently in recursion.
void remove_poll (PollFD *const pfd)
Remove a previously added PollFD .

Public Static Functions

Type Name
TimedSourceP create (const BoolSlot & slot, uint initial_interval_msecs=0, uint repeat_interval_msecs=0)
TimedSourceP create (const VoidSlot & slot, uint initial_interval_msecs=0, uint repeat_interval_msecs=0)

Protected Attributes inherited from Ase::EventSource

See Ase::EventSource

Type Name
uint dispatching_
uint id_
EventLoop * loop_
uint8 loop_state_
uint may_recurse_
struct Ase::EventSource * pfds_
uint primary_
int16 priority_
uint was_dispatching_

Protected Functions

Type Name
TimedSource (const BoolSlot & slot, uint initial_interval_msecs, uint repeat_interval_msecs)
TimedSource (const VoidSlot & slot, uint initial_interval_msecs, uint repeat_interval_msecs)
virtual bool check (const LoopState & state)
Check the source and its PollFD descriptors for dispatching (true return).
virtual bool dispatch (const LoopState & state)
Dispatch source, returns if it should be kept alive.
virtual bool prepare (const LoopState & state, int64 * timeout_usecs_p)
Prepare the source for dispatching (true return) or polling (false).
virtual ~TimedSource ()

Protected Functions inherited from Ase::EventSource

See Ase::EventSource

Type Name
EventSource ()
uint n_pfds ()
uint source_id ()
virtual ~EventSource ()

Public Attributes Documentation

variable bool_slot_

BoolSlot Ase::TimedSource::bool_slot_;

variable void_slot_

VoidSlot Ase::TimedSource::void_slot_;

Public Static Functions Documentation

function create [1/2]

static inline TimedSourceP Ase::TimedSource::create (
    const BoolSlot & slot,
    uint initial_interval_msecs=0,
    uint repeat_interval_msecs=0
) 

function create [2/2]

static inline TimedSourceP Ase::TimedSource::create (
    const VoidSlot & slot,
    uint initial_interval_msecs=0,
    uint repeat_interval_msecs=0
) 

Protected Functions Documentation

function TimedSource [1/2]

explicit Ase::TimedSource::TimedSource (
    const BoolSlot & slot,
    uint initial_interval_msecs,
    uint repeat_interval_msecs
) 

function TimedSource [2/2]

explicit Ase::TimedSource::TimedSource (
    const VoidSlot & slot,
    uint initial_interval_msecs,
    uint repeat_interval_msecs
) 

function check

virtual bool Ase::TimedSource::check (
    const LoopState & state
) 

Implements Ase::EventSource::check


function dispatch

virtual bool Ase::TimedSource::dispatch (
    const LoopState & state
) 

Implements Ase::EventSource::dispatch


function prepare

virtual bool Ase::TimedSource::prepare (
    const LoopState & state,
    int64 * timeout_usecs_p
) 

Implements Ase::EventSource::prepare


function ~TimedSource

virtual Ase::TimedSource::~TimedSource () 


The documentation for this class was generated from the following file /__w/anklang/anklang/ase/loop.hh