115 lines
2.8 KiB
C++
115 lines
2.8 KiB
C++
//## begin module.cm preserve=no
|
|
|
|
// %X% %Q% %Z% %W%
|
|
|
|
//## end module.cm
|
|
|
|
|
|
|
|
//## begin module.cp preserve=no
|
|
|
|
//## end module.cp
|
|
|
|
|
|
|
|
//## Module: Rectangle; Pseudo Package specification
|
|
|
|
//## Subsystem: lab7
|
|
|
|
//## Source file: H:\kurs\avC++\lab7\Rectngle.h
|
|
|
|
|
|
|
|
#ifndef Rectngle_h
|
|
|
|
#define Rectngle_h 1
|
|
|
|
|
|
|
|
//## begin module.additionalIncludes preserve=no
|
|
|
|
//## end module.additionalIncludes
|
|
|
|
|
|
|
|
//## begin module.includes preserve=yes
|
|
|
|
//## end module.includes
|
|
|
|
|
|
|
|
//## begin module.additionalDeclarations preserve=yes
|
|
|
|
//## end module.additionalDeclarations
|
|
|
|
|
|
|
|
|
|
|
|
//## Class: Rectangle
|
|
|
|
//## Category: lab7
|
|
|
|
//## Subsystem: lab7
|
|
|
|
//## Persistence: Transient
|
|
|
|
//## Cardinality/Multiplicity: n
|
|
|
|
|
|
|
|
class Rectangle
|
|
|
|
{
|
|
|
|
//## begin Rectangle.initialDeclarations preserve=yes
|
|
|
|
//## end Rectangle.initialDeclarations
|
|
|
|
|
|
|
|
public:
|
|
|
|
//## Constructors (generated)
|
|
|
|
Rectangle();
|
|
|
|
|
|
|
|
//## Destructor (generated)
|
|
|
|
~Rectangle();
|
|
|
|
|
|
|
|
|
|
|
|
//## Other Operations (specified)
|
|
|
|
//## Operation: getXpos%940945803
|
|
|
|
int getXpos ();
|
|
|
|
|
|
|
|
//## Operation: getYpos%940945804
|
|
|
|
int getYpos ();
|
|
|
|
|
|
|
|
//## Operation: getWidth%940945805
|
|
|
|
int getWidth ();
|
|
|
|
|
|
|
|
//## Operation: getHeight%940945806
|
|
|
|
int getHeight ();
|
|
|
|
|
|
|
|
//## Operation: setValue%940945813
|
|
|
|
void setValue (int x1, int y1, int x2, int y2);
|
|
|
|
|
|
|
|
// Additional Public Declarations
|
|
|
|
//## begin Rectangle.public preserve=yes
|
|
|
|
//## end Rectangle.public
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// Data Members for Class Attributes
|
|
|
|
|
|
|
|
//## Attribute: xPos
|
|
|
|
//## begin Rectangle::xPos.attr preserve=no private: int {U}
|
|
|
|
int xPos;
|
|
|
|
//## end Rectangle::xPos.attr
|
|
|
|
|
|
|
|
//## Attribute: yPos
|
|
|
|
//## begin Rectangle::yPos.attr preserve=no private: int {U}
|
|
|
|
int yPos;
|
|
|
|
//## end Rectangle::yPos.attr
|
|
|
|
|
|
|
|
//## Attribute: width
|
|
|
|
//## begin Rectangle::width.attr preserve=no private: int {U}
|
|
|
|
int width;
|
|
|
|
//## end Rectangle::width.attr
|
|
|
|
|
|
|
|
//## Attribute: height
|
|
|
|
//## begin Rectangle::height.attr preserve=no private: int {U}
|
|
|
|
int height;
|
|
|
|
//## end Rectangle::height.attr
|
|
|
|
|
|
|
|
// Additional Protected Declarations
|
|
|
|
//## begin Rectangle.protected preserve=yes
|
|
|
|
//## end Rectangle.protected
|
|
|
|
|
|
|
|
private:
|
|
|
|
// Additional Private Declarations
|
|
|
|
//## begin Rectangle.private preserve=yes
|
|
|
|
//## end Rectangle.private
|
|
|
|
|
|
|
|
private: //## implementation
|
|
|
|
// Additional Implementation Declarations
|
|
|
|
//## begin Rectangle.implementation preserve=yes
|
|
|
|
//## end Rectangle.implementation
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
//## begin Rectangle.postscript preserve=yes
|
|
|
|
//## end Rectangle.postscript
|
|
|
|
|
|
|
|
// Class Rectangle
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//## begin module.epilog preserve=yes
|
|
|
|
//## end module.epilog
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|