Skip to content

Class Ase::EventSource

ClassList > Ase > EventSource

EventLoop source for callback execution.

  • #include <loop.hh>

Inherited by the following classes: Ase::DispatcherSource, Ase::PollFDSource, Ase::TimedSource, Ase::USignalSource

Public Attributes

Type Name
uint idx
PollFD * pfd

Public Functions

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 .

Protected Attributes

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
EventSource ()
uint n_pfds ()
uint source_id ()
virtual ~EventSource ()

Public Attributes Documentation

variable idx

uint Ase::EventSource::idx;

variable pfd

PollFD* Ase::EventSource::pfd;

Public Functions Documentation

function add_poll

void Ase::EventSource::add_poll (
    PollFD *const pfd
) 

function check

virtual bool Ase::EventSource::check (
    const LoopState & state
) = 0

function destroy

virtual void Ase::EventSource::destroy () 

function dispatch

virtual bool Ase::EventSource::dispatch (
    const LoopState & state
) = 0

function loop_remove

void Ase::EventSource::loop_remove () 

function main_loop

inline MainLoop * Ase::EventSource::main_loop () const

function may_recurse [1/2]

bool Ase::EventSource::may_recurse () const

function may_recurse [2/2]

void Ase::EventSource::may_recurse (
    bool may_recurse
) 

function prepare

virtual bool Ase::EventSource::prepare (
    const LoopState & state,
    int64 * timeout_usecs_p
) = 0

function primary [1/2]

bool Ase::EventSource::primary () const

function primary [2/2]

void Ase::EventSource::primary (
    bool is_primary
) 

function recursion

bool Ase::EventSource::recursion () const

function remove_poll

void Ase::EventSource::remove_poll (
    PollFD *const pfd
) 

Protected Attributes Documentation

variable dispatching_

uint Ase::EventSource::dispatching_;

variable id_

uint Ase::EventSource::id_;

variable loop_

EventLoop* Ase::EventSource::loop_;

variable loop_state_

uint8 Ase::EventSource::loop_state_;

variable may_recurse_

uint Ase::EventSource::may_recurse_;

variable pfds_

struct Ase::EventSource           * Ase::EventSource::pfds_;

variable primary_

uint Ase::EventSource::primary_;

variable priority_

int16 Ase::EventSource::priority_;

variable was_dispatching_

uint Ase::EventSource::was_dispatching_;

Protected Functions Documentation

function EventSource

explicit Ase::EventSource::EventSource () 

function n_pfds

uint Ase::EventSource::n_pfds () 

function source_id

inline uint Ase::EventSource::source_id () 

function ~EventSource

virtual Ase::EventSource::~EventSource () 


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