In file libs/csinput/cseventq.h:

## class csEventQueue : public csBase

> This class represents a windowing system event queue

## Inheritance:

### Public Methods

void Clear()
  Clear event queue
csEventQueue(size_t iLength = DEF_EVENT_QUEUE_LENGTH)
  Initializes the event queue
csEvent* Get()
  Get next event from queue or NULL
bool IsEmpty()
  Query if queue is empty
void Put(csEvent *Event)
  Put a event into queue
virtual ~csEventQueue()
  Destroy an event queue object

### Private Fields

volatile csEvent** EventQueue
  The queue itself
volatile size_t evqHead
  Queue head and tail pointers
volatile size_t Length
  The maximum queue length
volatile int SpinLock
  Protection against multiple threads

### Private Methods

inline void Lock()
  Lock the queue for modifications: NESTED CALLS TO LOCK/UNLOCK NOT ALLOWED!
void Resize(size_t iLength)
  Enlarge the queue size.
inline void Unlock()
  Unlock the queue

### Inherited from csBase:

## Documentation

> This class represents a windowing system event queue.

> Each application have its own event queue. Any component can manipulate event queue via its app field, since event queue can be reached through csApp::EventQueue() method (for example, to clear event queue (caution!) call app->EventQueue()->Clear()).

> The implemented event queue is limited thread-safe. There are some primitive spinlocks acquired/released in critical sections.

`volatile csEvent** EventQueue`
  The queue itself

`volatile size_t evqHead`
  Queue head and tail pointers

`volatile size_t Length`
  The maximum queue length

`volatile int SpinLock`
  Protection against multiple threads

`csEventQueue(size_t iLength = DEF_EVENT_QUEUE_LENGTH)`
  Initializes the event queue

`virtual ~csEventQueue()`
  Destroy an event queue object

`void Put(csEvent *Event)`
  Put a event into queue

`csEvent* Get()`
  Get next event from queue or NULL

`void Clear()`
  Clear event queue

`bool IsEmpty()`
  Query if queue is empty

`void Resize(size_t iLength)`
  Enlarge the queue size.

`inline void Lock()`
  Lock the queue for modifications: NESTED CALLS TO LOCK/UNLOCK NOT ALLOWED!

`inline void Unlock()`
  Unlock the queue

This class has no child classes.

alphabetic index hierarchy of classes

this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de