eventxx  1.0.1
eventxx::basic_event Struct Reference

Basic event from which all events derive. More...

Inheritance diagram for eventxx::basic_event:

Public Member Functions

bool pending (type ev) const throw ()
 Checks if there is an event pending. More...
 
time timeout () const throw ()
 Timeout of the event. More...
 
void priority (int priority) const throw (invalid_event, invalid_priority)
 Sets the event's priority. More...
 
int fd () const throw ()
 Event's file descriptor. More...
 

Protected Member Functions

 basic_event () throw ()
 

Detailed Description

Basic event from which all events derive.

All events derive from this class, so it's useful for use in containers, like:

std::list< eventxx::basic_event* > events;
Examples
prio-test.cpp.

Constructor & Destructor Documentation

◆ basic_event()

eventxx::basic_event::basic_event ( )
throw (
)
inlineprotected
Note
This is an abstract class, you can't instantiate it.

Member Function Documentation

◆ fd()

int eventxx::basic_event::fd ( ) const
throw (
)
inline

Event's file descriptor.

Returns
Event's file descriptor.
Examples
prio-test.cpp.

Referenced by eventxx::event< ccallback_type >::event(), and eventxx::event< F >::event().

◆ pending()

bool eventxx::basic_event::pending ( type  ev) const
throw (
)
inline

Checks if there is an event pending.

Parameters
evType of event to check.
Returns
true if there is a pending event, false if not.

◆ priority()

void eventxx::basic_event::priority ( int  priority) const
throw (invalid_event,
invalid_priority
)
inline

Sets the event's priority.

Parameters
priorityNew event priority.
Precondition
The event must be added to some dispatcher.
See also
dispatcher::dispatcher(int)

◆ timeout()

time eventxx::basic_event::timeout ( ) const
throw (
)
inline

Timeout of the event.

Returns
Timeout of the event.

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