Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1010 B

  1. /*
  2. * jod07Dec92: Fixed the Consrtuctor and added the Destructor.
  3. * ane11Jan93: Added copy constructor
  4. *
  5. */
  6. #define INCL_BASE
  7. #define INCL_NOPM
  8. #include "cdefine.h"
  9. #include "event.h"
  10. #include "update.h"
  11. #include "eventime.h"
  12. //#include "apc.h"
  13. //#include "update.h"
  14. /*
  15. C+
  16. Name :EventTimer
  17. SYnop :Constructor. Simply stores the Event and the UpdateObject to
  18. notify.
  19. */
  20. EventTimer::EventTimer(PEvent anEvent,PUpdateObj anUpdateObj,
  21. ULONG MilliSecondDelay)
  22. :Timer(MilliSecondDelay)
  23. //c-
  24. {
  25. theEvent =anEvent;
  26. theUpdateableObject =anUpdateObj;
  27. }
  28. EventTimer :: EventTimer (REventTimer aTimer) : Timer (aTimer)
  29. {
  30. theEvent = aTimer.theEvent;
  31. theUpdateableObject = aTimer.theUpdateableObject;
  32. }
  33. EventTimer :: ~EventTimer()
  34. {
  35. if (theEvent) {
  36. delete theEvent;
  37. theEvent = NULL;
  38. }
  39. };
  40. VOID EventTimer::Execute()
  41. //c-
  42. {
  43. if (theUpdateableObject&&theEvent) theUpdateableObject->Update(theEvent);
  44. }