- Main Page
- Modules
- Classes
- Files
- Directories

# cnmplookahead.h

    00001 //=========================================================================
    00002 //  CNMPLOOKAHEAD.H - part of
    00003 //
    00004 //                  OMNeT++/OMNEST
    00005 //           Discrete System Simulation in C++
    00006 //
    00007 //   Written by:  Andras Varga, 2003
    00008 //
    00009 //=========================================================================
    00010
    00011 /*--------------------------------------------------------------*
    00012   Copyright (C) 2003-2005 Andras Varga
    00013   Monash University, Dept. of Electrical and Computer Systems Eng.
    00014   Melbourne, Australia
    00015
    00016   This file is distributed WITHOUT ANY WARRANTY. See the file
    00017   `license' for details on this and other legal matters.
    00018 *--------------------------------------------------------------*/
    00019
    00020 #ifndef __CNMPLOOKAHEAD_H__
    00021 #define __CNMPLOOKAHEAD_H__
    00022
    00023 #include "cpolymorphic.h"
    00024
    00025 // forward declarations
    00026 class cMessage;
    00027 class cSimulation;
    00028 class cParsimCommunications;
    00029 class cParsimPartition;
    00030
    00031
    00038 class cNMPLookahead : public cPolymorphic
    00039 {
    00040   protected:
    00041     cSimulation *sim;
    00042     cParsimCommunications *comm; // TBD this is just to access numPartitions -- optimize out?
    00043     cParsimPartition *partition;
    00044     // cNullMessageProtocol *nullmsgprot;
    00045
    00046   public:
    00050     cNMPLookahead() {};
    00051
    00055     virtual ~cNMPLookahead() {}
    00056
    00060     void setContext(cSimulation *simul, cParsimPartition *seg, cParsimCommunications *co)
    00061        {sim = simul; partition = seg; comm = co;}
    00062
    00066     virtual void startRun() = 0;
    00067
    00071     virtual void endRun() = 0;
    00072
    00076     virtual double getCurrentLookahead(cMessage *msg, int procId, void *data) = 0;
    00077
    00081     virtual double getCurrentLookahead(int procId) = 0;
    00082
    00083 };
    00084
    00085 #endif