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.

74 lines
1.7 KiB

  1. /*
  2. * REVISIONS:
  3. * sja05Nov92: Calls FlushALL method of the list object to destroy the
  4. * event attributes
  5. * sja05Nov92: Added new constructor which allows #define'ed values to be
  6. * used as values
  7. * pcy23Nov92: ifdef around os2.h
  8. * pcy26Nov92: Fixed ifdef syntax
  9. * ane08Feb93: Added Copy constructor
  10. * jps13Jul94: removed os2.h; changed value from INT to LONG
  11. *
  12. */
  13. #ifndef __EVENT_H
  14. #define __EVENT_H
  15. #if !defined ( __LIST_H )
  16. #include "list.h"
  17. #endif
  18. #if !defined ( __ATTRIB_H )
  19. #include "attrib.h"
  20. #endif
  21. _CLASSDEF(Event)
  22. #define MAX_EVENT_COUNT 1000
  23. class Event : public Obj {
  24. private:
  25. static INT EventCount;
  26. INT theId;
  27. Attribute theEvent;
  28. PList theExtendedList;
  29. protected:
  30. #ifdef APCDEBUG
  31. virtual ostream& printMeOut(ostream& os);
  32. #endif
  33. public:
  34. Event(INT anEventCode, LONG aValue);
  35. Event(INT, PCHAR);
  36. Event(const Event &anEvent);
  37. virtual ~Event();
  38. INT GetId() const { return theId; };
  39. PAttribute GetEvent() { return &theEvent; };
  40. INT GetCode() const { return theEvent.GetCode();};
  41. const PCHAR GetValue();
  42. VOID SetCode(INT aCode) { theEvent.SetCode(aCode);};
  43. INT SetValue(LONG);
  44. INT SetAttributeValue(INT,LONG);
  45. INT SetValue(const PCHAR);
  46. INT SetAttributeValue(INT, const PCHAR);
  47. PList GetAttributeList() { return theExtendedList; }
  48. const PCHAR GetAttributeValue(INT);
  49. void AppendAttribute(INT, PCHAR);
  50. void AppendAttribute(INT, FLOAT);
  51. void AppendAttribute(RAttribute);
  52. virtual INT IsA() const { return APC_EVENT; };
  53. virtual INT Equal( RObj ) const;
  54. };
  55. #endif