eventq.hh (4471:4d86c4d096ad) | eventq.hh (5336:c7e21f4e5a2e) |
---|---|
1/* 2 * Copyright (c) 2000-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 205 unchanged lines hidden (view full) --- 214 void reschedule(Tick t, bool always = false); 215 216 /// Remove the event from the current schedule 217 void deschedule(); 218 219 /// Return a C string describing the event. This string should 220 /// *not* be dynamically allocated; just a const char array 221 /// describing the event class. | 1/* 2 * Copyright (c) 2000-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 205 unchanged lines hidden (view full) --- 214 void reschedule(Tick t, bool always = false); 215 216 /// Remove the event from the current schedule 217 void deschedule(); 218 219 /// Return a C string describing the event. This string should 220 /// *not* be dynamically allocated; just a const char array 221 /// describing the event class. |
222 virtual const char *description(); | 222 virtual const char *description() const; |
223 224 /// Dump the current event data 225 void dump(); 226 227 /* 228 * This member function is invoked when the event is processed 229 * (occurs). There is no default implementation; each subclass 230 * must provide its own implementation. The event is not --- 44 unchanged lines hidden (view full) --- 275 private: 276 T *object; 277 278 public: 279 DelayEvent(Tick when, T *o) 280 : Event(&mainEventQueue), object(o) 281 { setFlags(this->AutoDestroy); schedule(when); } 282 void process() { (object->*F)(); } | 223 224 /// Dump the current event data 225 void dump(); 226 227 /* 228 * This member function is invoked when the event is processed 229 * (occurs). There is no default implementation; each subclass 230 * must provide its own implementation. The event is not --- 44 unchanged lines hidden (view full) --- 275 private: 276 T *object; 277 278 public: 279 DelayEvent(Tick when, T *o) 280 : Event(&mainEventQueue), object(o) 281 { setFlags(this->AutoDestroy); schedule(when); } 282 void process() { (object->*F)(); } |
283 const char *description() { return "delay"; } | 283 const char *description() const { return "delay"; } |
284 }; 285 286 new DelayEvent(when, object); 287} 288 289template <class T, void (T::* F)()> 290class EventWrapper : public Event 291{ --- 172 unchanged lines hidden --- | 284 }; 285 286 new DelayEvent(when, object); 287} 288 289template <class T, void (T::* F)()> 290class EventWrapper : public Event 291{ --- 172 unchanged lines hidden --- |