SUMO - Simulation of Urban MObility
MSTriggeredReader.h
Go to the documentation of this file.
00001 /****************************************************************************/
00008 // The basic class for classes that read triggers
00009 /****************************************************************************/
00010 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00011 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
00012 /****************************************************************************/
00013 //
00014 //   This file is part of SUMO.
00015 //   SUMO is free software: you can redistribute it and/or modify
00016 //   it under the terms of the GNU General Public License as published by
00017 //   the Free Software Foundation, either version 3 of the License, or
00018 //   (at your option) any later version.
00019 //
00020 /****************************************************************************/
00021 #ifndef MSTriggeredReader_h
00022 #define MSTriggeredReader_h
00023 
00024 
00025 // ===========================================================================
00026 // included modules
00027 // ===========================================================================
00028 #ifdef _MSC_VER
00029 #include <windows_config.h>
00030 #else
00031 #include <config.h>
00032 #endif
00033 
00034 #include <string>
00035 #include <microsim/MSNet.h>
00036 
00037 
00038 // ===========================================================================
00039 // class definitions
00040 // ===========================================================================
00046 class MSTriggeredReader {
00047 public:
00049     virtual ~MSTriggeredReader();
00050 
00051     void init();
00052     bool isInitialised() const;
00053     SUMOTime wrappedExecute(SUMOTime current);
00054 
00055 protected:
00057     MSTriggeredReader(MSNet& net);
00058 
00062     virtual bool processNextEntryReaderTriggered() = 0;
00063 
00065     virtual bool readNextTriggered() = 0;
00066 
00067     virtual void myInit() = 0;
00068 
00069     virtual void inputEndReached() = 0;
00070 
00071 
00072 protected:
00074     SUMOTime myOffset;
00075     bool myWasInitialised;
00076 
00077 private:
00079     MSTriggeredReader(const MSTriggeredReader&);
00080 
00082     MSTriggeredReader& operator=(const MSTriggeredReader&);
00083 
00084 
00085 };
00086 
00087 
00088 #endif
00089 
00090 /****************************************************************************/
00091 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines