00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _SIMPLETIMECONSTMAPPING_H
00022 #define _SIMPLETIMECONSTMAPPING_H
00023
00029 class SimpleTimeConstMapping: public SimpleConstMapping {
00030
00031 protected:
00032 double myValue;
00033 simtime_t start, stop;
00034 public:
00038 SimpleTimeConstMapping(double _myValue, simtime_t _start, simtime_t _stop):
00039 SimpleConstMapping(DimensionSet(Dimension::time)), myValue(_myValue), start(_start), stop(_stop) {
00040 initializeArguments(Argument(_start), Argument(_stop), Argument(1));
00041 }
00042
00046 double getValue(const Argument& pos) const { return myValue; }
00047
00051 ConstMapping* constClone() const {
00052 return new SimpleTimeConstMapping(myValue, start, stop); }
00053 };
00054
00055 #endif