16 #ifndef __OMNETPP_CEVENTHEAP_H    17 #define __OMNETPP_CEVENTHEAP_H    19 #include "cfutureeventset.h"    54     void shiftup(
int from=1);
    56     int cblength()
 const  {
return (cbtail-cbhead) & (cbsize-1);}
    57     cEvent *cbget(
int k)  {
return cb[(cbhead+k) & (cbsize-1)];}
    60     void heapInsert(
cEvent *event);
    61     void cbInsert(
cEvent *event);
    66     bool getUseCb()
 const {
return useCb;}
    67     void setUseCb(
bool b) {ASSERT(cbhead==cbtail); useCb = b;}
    81     cEventHeap(
const char *name=
nullptr, 
int initialCapacity=128);
   108     virtual std::string str() 
const override;
   114     virtual void forEachChild(
cVisitor *v) 
override;
   124     virtual void insert(
cEvent *event) 
override;
   130     virtual cEvent *peekFirst() 
const override;
   136     virtual cEvent *removeFirst() 
override;
   141     virtual void putBackFirst(
cEvent *event) 
override;
   152     virtual bool isEmpty()
 const override {
return cbhead==cbtail && heapLength==0;}
   157     virtual void clear() 
override;
   166     virtual int getLength()
 const override {
return cblength() + heapLength;}
   174     virtual cEvent *
get(
int k) 
override;
   180     virtual void sort() 
override;
 Abstract base class for the future event set (FES), a central data structure for discrete event simul...
Definition: cfutureeventset.h:32
 
Represents an event in the discrete event simulator. 
Definition: cevent.h:43
 
virtual bool isEmpty() const override
Definition: ceventheap.h:152
 
The default, binary heap based implementation of the future event set. 
Definition: ceventheap.h:35
 
int64_t eventnumber_t
Sequence number of events during the simulation. Events are numbered from one. (Event number zero is ...
Definition: simkerneldefs.h:78
 
Enables traversing the tree of (cObject-rooted) simulation objects. 
Definition: cvisitor.h:56
 
Definition: cabstracthistogram.h:21
 
virtual int getLength() const override
Definition: ceventheap.h:166
 
virtual cEventHeap * dup() const override
Definition: ceventheap.h:102