102 lines
2.5 KiB
C++
102 lines
2.5 KiB
C++
//## begin module.cm preserve=no
|
|
|
|
// %X% %Q% %Z% %W%
|
|
|
|
//## end module.cm
|
|
|
|
|
|
|
|
//## begin module.cp preserve=no
|
|
|
|
//## end module.cp
|
|
|
|
|
|
|
|
//## Module: Line; Pseudo Package specification
|
|
|
|
//## Subsystem: Figures
|
|
|
|
//## Source file: H:\WebDocs\skola\Avancerad_C++\Lab4\Rose\Line.h
|
|
|
|
|
|
|
|
#ifndef Line_h
|
|
|
|
#define Line_h 1
|
|
|
|
|
|
|
|
//## begin module.additionalIncludes preserve=no
|
|
|
|
//## end module.additionalIncludes
|
|
|
|
|
|
|
|
//## begin module.includes preserve=yes
|
|
|
|
//## end module.includes
|
|
|
|
|
|
|
|
// pList
|
|
|
|
#include "H:\WebDocs\skola\Avancerad_C++\Lab4\Rose\pList.h"
|
|
|
|
// Figure
|
|
|
|
#include "H:\WebDocs\skola\Avancerad_C++\Lab4\Rose\Figure.h"
|
|
|
|
//## begin module.additionalDeclarations preserve=yes
|
|
|
|
//## end module.additionalDeclarations
|
|
|
|
|
|
|
|
|
|
|
|
//## Class: Line
|
|
|
|
//## Category: Figures
|
|
|
|
//## Subsystem: Figures
|
|
|
|
//## Persistence: Transient
|
|
|
|
//## Cardinality/Multiplicity: n
|
|
|
|
|
|
|
|
class Line : public Figure //## Inherits: <unnamed>
|
|
|
|
{
|
|
|
|
//## begin Line.initialDeclarations preserve=yes
|
|
|
|
//## end Line.initialDeclarations
|
|
|
|
|
|
|
|
public:
|
|
|
|
//## Constructors (specified)
|
|
|
|
//## Operation: Line%939623930
|
|
|
|
Line (int x1, int y1, int x2, int y2, Color color);
|
|
|
|
|
|
|
|
//## Destructor (generated)
|
|
|
|
~Line();
|
|
|
|
|
|
|
|
|
|
|
|
//## Other Operations (specified)
|
|
|
|
//## Operation: draw%937398668
|
|
|
|
void draw (Graphics &g);
|
|
|
|
|
|
|
|
//## Operation: erase%937398669
|
|
|
|
void erase (Graphics &g);
|
|
|
|
|
|
|
|
//## Operation: clone%937398682
|
|
|
|
Figure * clone ();
|
|
|
|
|
|
|
|
//## Operation: add%939734504
|
|
|
|
void add (int x, int y);
|
|
|
|
|
|
|
|
// Additional Public Declarations
|
|
|
|
//## begin Line.public preserve=yes
|
|
|
|
//## end Line.public
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// Additional Protected Declarations
|
|
|
|
//## begin Line.protected preserve=yes
|
|
|
|
//## end Line.protected
|
|
|
|
|
|
|
|
private:
|
|
|
|
// Additional Private Declarations
|
|
|
|
//## begin Line.private preserve=yes
|
|
|
|
//## end Line.private
|
|
|
|
|
|
|
|
private: //## implementation
|
|
|
|
// Data Members for Has Relationships
|
|
|
|
|
|
|
|
//## Documentation Line::myPoints.has
|
|
|
|
//## begin Line::myPoints.has preserve=no private: pList {1 -> 1VO}
|
|
|
|
pList myPoints;
|
|
|
|
//## end Line::myPoints.has
|
|
|
|
|
|
|
|
// Additional Implementation Declarations
|
|
|
|
//## begin Line.implementation preserve=yes
|
|
|
|
//## end Line.implementation
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
//## begin Line.postscript preserve=yes
|
|
|
|
//## end Line.postscript
|
|
|
|
|
|
|
|
// Class Line
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//## begin module.epilog preserve=yes
|
|
|
|
//## end module.epilog
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|