Charades
Public Member Functions | Public Attributes | List of all members
LPBase Class Reference

Non-templated base class for LP, so that the simulator can deal with a single LP base type. More...

#include <lp.h>

Inheritance diagram for LPBase:
LP< Derived, M, Ms >

Public Member Functions

virtual void initialize ()
 Called to initialize LP state and seed initial events.
 
virtual void forward (Event *e)
 Overridden by LP.
 
virtual void reverse (Event *e)
 Overridden by LP.
 
virtual void commit (Event *e)
 Overridden by LP.
 
virtual void finalize ()
 Called to perform any final actions before simulation exit.
 
virtual bool compare (const Event *e1, const Event *e2)
 Called by the scheduler to break ties on events with the same timestamp. More...
 
void set_current_event (Event *e)
 
Eventget_current_event () const
 
Time get_current_time () const
 
virtual void pup (PUP::er &p)
 

Public Attributes

LPChareowner
 The LPChare this LP object lives on.
 
unsigned gid
 The global id of this LP.
 
RNG rng
 The random number generator for this LP.
 

Detailed Description

Non-templated base class for LP, so that the simulator can deal with a single LP base type.

Event handling methods are overridden by LP so that event handling can be specialized by event type via an event dispatcher.

Member Function Documentation

◆ compare()

virtual bool LPBase::compare ( const Event e1,
const Event e2 
)
inlinevirtual

Called by the scheduler to break ties on events with the same timestamp.

Can be overridden by derived classes for model specific tiebreaking.


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