Classes | Public Member Functions | Protected Member Functions | Protected Attributes

ScheduledEventsQueue Class Reference

A storage of scheduled Events to be delivered at a later point in the simulation. More...

#include <ScheduledEventsQueue.h>

List of all members.

Classes

struct  Node
 Structure which stores the index of the spike target group and a pointer to the next element in various lists. More...
class  NodeCompare

Public Member Functions

 ScheduledEventsQueue (int chunkSize=EVENT_BUFFER_CHUNK_SIZE)
 Constructor of a queue of scheduled events.
virtual ~ScheduledEventsQueue ()
 Destructor: Deletes all scheduled spikes.
void scheduleEvent (event_target_group_id_t etg, Time t)
 Schedule a group of event targets to get an event at time t.
Nodetop ()
Time topTime ()
void pop ()
void reset ()
 Must be called at the begin (reset) of a simulation.
bool empty () const
 returns true if the queue is empty.

Protected Member Functions

void init ()
 Set up internal memory management.
NodegetFreeNode (void)
 Get a new Node from the internal memory management.

Protected Attributes

priority_queue< Node *, vector
< Node * >, NodeCompare
event_queue
vector< Node * > chunkBuffer
 Buffer with pointers to chunks of memory allocated.
NodecurrentFreeChunk
 Pointer to array of Nodes to take from (from position nextFreeNodeIdx).
int nextFreeNodeIdx
 Index into array currentFreeChunk which specifies the next Node to use.
size_t nextFreeChunkIdx
 Index into chunkBuffer which specifies the next free chunk of memory to use.
NoderecycledNodes
 Head of list of Nodes which can be reused.
int chunkSize
 Number of Nodes per chunk of memory to allocate.
double fillitup [32]

Detailed Description

A storage of scheduled Events to be delivered at a later point in the simulation.


Member Function Documentation

void ScheduledEventsQueue::scheduleEvent ( event_target_group_id_t  etg,
Time  t 
) [inline]

Schedule a group of event targets to get an event at time t.

Parameters:
etg The identifier of the event target group to be used as identifier in EventTargetGroupPool::beginEventTarget( Etg )
t The time stamp of the event

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