109 lines
2.7 KiB
C++
109 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: Circle; Pseudo Package specification
|
|
|
|
//## Subsystem: Figures
|
|
|
|
//## Source file: H:\WebDocs\skola\Avancerad_C++\Lab4\Rose\Circle.h
|
|
|
|
|
|
|
|
#ifndef Circle_h
|
|
|
|
#define Circle_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: Circle
|
|
|
|
//## Category: Figures
|
|
|
|
//## Subsystem: Figures
|
|
|
|
//## Persistence: Transient
|
|
|
|
//## Cardinality/Multiplicity: n
|
|
|
|
|
|
|
|
class Circle : public Figure //## Inherits: <unnamed>
|
|
|
|
{
|
|
|
|
//## begin Circle.initialDeclarations preserve=yes
|
|
|
|
//## end Circle.initialDeclarations
|
|
|
|
|
|
|
|
public:
|
|
|
|
//## Constructors (generated)
|
|
|
|
Circle();
|
|
|
|
|
|
|
|
//## Constructors (specified)
|
|
|
|
//## Operation: Circle%939623931
|
|
|
|
Circle (int x, int y, int r, Color color);
|
|
|
|
|
|
|
|
//## Destructor (generated)
|
|
|
|
~Circle();
|
|
|
|
|
|
|
|
|
|
|
|
//## Other Operations (specified)
|
|
|
|
//## Operation: draw%937398670
|
|
|
|
void draw (Graphics &g);
|
|
|
|
|
|
|
|
//## Operation: erase%937398671
|
|
|
|
void erase (Graphics &g);
|
|
|
|
|
|
|
|
//## Operation: clone%937398683
|
|
|
|
Figure * clone ();
|
|
|
|
|
|
|
|
// Additional Public Declarations
|
|
|
|
//## begin Circle.public preserve=yes
|
|
|
|
//## end Circle.public
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// Additional Protected Declarations
|
|
|
|
//## begin Circle.protected preserve=yes
|
|
|
|
//## end Circle.protected
|
|
|
|
|
|
|
|
private:
|
|
|
|
// Additional Private Declarations
|
|
|
|
//## begin Circle.private preserve=yes
|
|
|
|
//## end Circle.private
|
|
|
|
|
|
|
|
private: //## implementation
|
|
|
|
// Data Members for Has Relationships
|
|
|
|
|
|
|
|
//## Documentation Circle::center.has
|
|
|
|
//## begin Circle::center.has preserve=no private: Point {1 -> 1VO}
|
|
|
|
Point center;
|
|
|
|
//## end Circle::center.has
|
|
|
|
|
|
|
|
// Data Members for Class Attributes
|
|
|
|
|
|
|
|
//## Attribute: radius
|
|
|
|
//## begin Circle::radius.attr preserve=no private: int {U}
|
|
|
|
int radius;
|
|
|
|
//## end Circle::radius.attr
|
|
|
|
|
|
|
|
// Additional Implementation Declarations
|
|
|
|
//## begin Circle.implementation preserve=yes
|
|
|
|
//## end Circle.implementation
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
//## begin Circle.postscript preserve=yes
|
|
|
|
//## end Circle.postscript
|
|
|
|
|
|
|
|
// Class Circle
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//## begin module.epilog preserve=yes
|
|
|
|
//## end module.epilog
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|