114 lines
2.7 KiB
C++
114 lines
2.7 KiB
C++
//## begin module.cm preserve=no
|
|
|
|
// %X% %Q% %Z% %W%
|
|
|
|
//## end module.cm
|
|
|
|
|
|
|
|
//## begin module.cp preserve=no
|
|
|
|
//## end module.cp
|
|
|
|
|
|
|
|
//## Module: Event; Pseudo Package specification
|
|
|
|
//## Subsystem: lab7
|
|
|
|
//## Source file: H:\kurs\avC++\lab7\Event.h
|
|
|
|
|
|
|
|
#ifndef Event_h
|
|
|
|
#define Event_h 1
|
|
|
|
|
|
|
|
//## begin module.additionalIncludes preserve=no
|
|
|
|
//## end module.additionalIncludes
|
|
|
|
|
|
|
|
//## begin module.includes preserve=yes
|
|
|
|
//## end module.includes
|
|
|
|
|
|
|
|
//## begin module.additionalDeclarations preserve=yes
|
|
|
|
typedef enum {NO_E, MOUSE_E, KEY_E} EVENT_T;
|
|
|
|
//## end module.additionalDeclarations
|
|
|
|
|
|
|
|
|
|
|
|
//## Class: Event
|
|
|
|
//## Category: lab7
|
|
|
|
//## Subsystem: lab7
|
|
|
|
//## Persistence: Transient
|
|
|
|
//## Cardinality/Multiplicity: n
|
|
|
|
|
|
|
|
class Event
|
|
|
|
{
|
|
|
|
//## begin Event.initialDeclarations preserve=yes
|
|
|
|
//## end Event.initialDeclarations
|
|
|
|
|
|
|
|
public:
|
|
|
|
//## Constructors (generated)
|
|
|
|
Event();
|
|
|
|
|
|
|
|
//## Destructor (generated)
|
|
|
|
~Event();
|
|
|
|
|
|
|
|
|
|
|
|
//## Other Operations (specified)
|
|
|
|
//## Operation: getEventType%941013981
|
|
|
|
EVENT_T getEventType ();
|
|
|
|
|
|
|
|
//## Operation: setEventType%941013982
|
|
|
|
void setEventType (EVENT_T e);
|
|
|
|
|
|
|
|
//## Operation: getxpos%941013983
|
|
|
|
int getxpos ();
|
|
|
|
|
|
|
|
//## Operation: getypos%941013984
|
|
|
|
int getypos ();
|
|
|
|
|
|
|
|
//## Operation: setxpos%941013985
|
|
|
|
void setxpos (int x);
|
|
|
|
|
|
|
|
//## Operation: setypos%941013986
|
|
|
|
void setypos (int y);
|
|
|
|
|
|
|
|
// Additional Public Declarations
|
|
|
|
//## begin Event.public preserve=yes
|
|
|
|
//## end Event.public
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// Data Members for Class Attributes
|
|
|
|
|
|
|
|
//## Attribute: eventType
|
|
|
|
//## begin Event::eventType.attr preserve=no private: EVENT_T {U}
|
|
|
|
EVENT_T eventType;
|
|
|
|
//## end Event::eventType.attr
|
|
|
|
|
|
|
|
//## Attribute: xpos
|
|
|
|
//## begin Event::xpos.attr preserve=no private: int {U}
|
|
|
|
int xpos;
|
|
|
|
//## end Event::xpos.attr
|
|
|
|
|
|
|
|
//## Attribute: ypos
|
|
|
|
//## begin Event::ypos.attr preserve=no private: int {U}
|
|
|
|
int ypos;
|
|
|
|
//## end Event::ypos.attr
|
|
|
|
|
|
|
|
// Additional Protected Declarations
|
|
|
|
//## begin Event.protected preserve=yes
|
|
|
|
//## end Event.protected
|
|
|
|
|
|
|
|
private:
|
|
|
|
// Additional Private Declarations
|
|
|
|
//## begin Event.private preserve=yes
|
|
|
|
//## end Event.private
|
|
|
|
|
|
|
|
private: //## implementation
|
|
|
|
// Additional Implementation Declarations
|
|
|
|
//## begin Event.implementation preserve=yes
|
|
|
|
//## end Event.implementation
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
//## begin Event.postscript preserve=yes
|
|
|
|
//## end Event.postscript
|
|
|
|
|
|
|
|
// Class Event
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//## begin module.epilog preserve=yes
|
|
|
|
//## end module.epilog
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|