#include <event.h>

Inheritance diagram for EventScheduler:
Collaboration diagram for EventScheduler:

Public Types

enum  CheckError {
  EVENT_IDLE = -1 ,
  EVENT_ERROR = -2
}
 

Public Member Functions

 EventScheduler ()
 
 ~EventScheduler () override
 
void cancel (EVH *func, void *arg)
 
void clean ()
 
int timeRemaining () const
 
void dump (Packable *)
 
bool find (EVH *func, void *arg)
 
void schedule (const char *name, EVH *func, void *arg, double when, int weight, bool cbdata=true)
 
int checkEvents (int timeout) override
 

Static Public Member Functions

static EventSchedulerGetInstance ()
 

Private Attributes

ev_entrytasks
 

Static Private Attributes

static EventScheduler _instance
 

Detailed Description

Definition at line 45 of file event.h.

Member Enumeration Documentation

◆ CheckError

enum AsyncEngine::CheckError
inherited
Enumerator
EVENT_IDLE 
EVENT_ERROR 

Definition at line 26 of file AsyncEngine.h.

Constructor & Destructor Documentation

◆ EventScheduler()

EventScheduler::EventScheduler ( )

Definition at line 152 of file event.cc.

◆ ~EventScheduler()

EventScheduler::~EventScheduler ( )
override

Definition at line 155 of file event.cc.

References clean().

Member Function Documentation

◆ cancel()

void EventScheduler::cancel ( EVH func,
void *  arg 
)

Definition at line 161 of file event.cc.

References ev_entry::arg, debug_trap(), E, ev_entry::func, and tasks.

Referenced by eventDelete(), and TestEvent::testCancel().

◆ checkEvents()

int EventScheduler::checkEvents ( int  timeout)
overridevirtual

◆ clean()

void EventScheduler::clean ( )

Definition at line 250 of file event.cc.

References ev_entry::next, and tasks.

Referenced by ~EventScheduler().

◆ dump()

void EventScheduler::dump ( Packable out)

◆ find()

bool EventScheduler::find ( EVH func,
void *  arg 
)

Definition at line 280 of file event.cc.

References ev_entry::arg, ev_entry::func, ev_entry::next, and tasks.

Referenced by eventFind(), and TestEvent::testFind().

◆ GetInstance()

EventScheduler * EventScheduler::GetInstance ( )
static

◆ schedule()

void EventScheduler::schedule ( const char *  name,
EVH func,
void *  arg,
double  when,
int  weight,
bool  cbdata = true 
)

◆ timeRemaining()

int EventScheduler::timeRemaining ( ) const

Definition at line 199 of file event.cc.

References current_dtime, AsyncEngine::EVENT_IDLE, max(), tasks, and ev_entry::when.

Referenced by checkEvents().

Member Data Documentation

◆ _instance

EventScheduler EventScheduler::_instance
staticprivate

Definition at line 67 of file event.h.

Referenced by GetInstance().

◆ tasks

ev_entry* EventScheduler::tasks
private

Definition at line 68 of file event.h.

Referenced by cancel(), checkEvents(), clean(), dump(), find(), schedule(), and timeRemaining().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors