107 lines
2.8 KiB
C++
107 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: Figures
|
|
|
|
//## Source file: H:\WebDocs\skola\Avancerad_C++\Lab4\Rose\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
|
|
|
|
|
|
|
|
// Point
|
|
|
|
#include "H:\WebDocs\skola\Avancerad_C++\Lab4\Rose\Point.h"
|
|
|
|
// Figure
|
|
|
|
#include "H:\WebDocs\skola\Avancerad_C++\Lab4\Rose\Figure.h"
|
|
|
|
//## begin module.additionalDeclarations preserve=yes
|
|
|
|
//## end module.additionalDeclarations
|
|
|
|
|
|
|
|
|
|
|
|
//## Class: Rectangle
|
|
|
|
//## Category: Figures
|
|
|
|
//## Subsystem: Figures
|
|
|
|
//## Persistence: Transient
|
|
|
|
//## Cardinality/Multiplicity: n
|
|
|
|
|
|
|
|
class Rectangle : public Figure //## Inherits: <unnamed>
|
|
|
|
{
|
|
|
|
//## begin Rectangle.initialDeclarations preserve=yes
|
|
|
|
//## end Rectangle.initialDeclarations
|
|
|
|
|
|
|
|
public:
|
|
|
|
//## Constructors (generated)
|
|
|
|
Rectangle();
|
|
|
|
|
|
|
|
//## Constructors (specified)
|
|
|
|
//## Operation: Rectangle%939623932
|
|
|
|
Rectangle (int x1, int y1, int x2, int y2, Color color);
|
|
|
|
|
|
|
|
//## Destructor (generated)
|
|
|
|
~Rectangle();
|
|
|
|
|
|
|
|
|
|
|
|
//## Other Operations (specified)
|
|
|
|
//## Operation: draw%937398672
|
|
|
|
void draw (Graphics &g);
|
|
|
|
|
|
|
|
//## Operation: erase%937398673
|
|
|
|
void erase (Graphics &g);
|
|
|
|
|
|
|
|
//## Operation: clone%937398684
|
|
|
|
Figure * clone ();
|
|
|
|
|
|
|
|
// Additional Public Declarations
|
|
|
|
//## begin Rectangle.public preserve=yes
|
|
|
|
//## end Rectangle.public
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// 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
|
|
|
|
// Data Members for Has Relationships
|
|
|
|
|
|
|
|
//## Documentation Rectangle::leftTop.has
|
|
|
|
//## begin Rectangle::leftTop.has preserve=no private: Point {1 -> 1VO}
|
|
|
|
Point leftTop;
|
|
|
|
//## end Rectangle::leftTop.has
|
|
|
|
|
|
|
|
//## Documentation Rectangle::rightBottom.has
|
|
|
|
//## begin Rectangle::rightBottom.has preserve=no private: Point {1 -> 1VO}
|
|
|
|
Point rightBottom;
|
|
|
|
//## end Rectangle::rightBottom.has
|
|
|
|
|
|
|
|
// 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
|
|
|