104 lines
2.5 KiB
C++
104 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: Figure; Pseudo Package specification
|
|
|
|
//## Subsystem: Figures
|
|
|
|
//## Source file: H:\WebDocs\skola\Avancerad_C++\Lab4\Rose\Figure.h
|
|
|
|
|
|
|
|
#ifndef Figure_h
|
|
|
|
#define Figure_h 1
|
|
|
|
|
|
|
|
//## begin module.additionalIncludes preserve=no
|
|
|
|
//## end module.additionalIncludes
|
|
|
|
|
|
|
|
//## begin module.includes preserve=yes
|
|
|
|
//## end module.includes
|
|
|
|
|
|
|
|
// Graphics
|
|
|
|
#include "Graphic\Graphics.h"
|
|
|
|
//## begin module.additionalDeclarations preserve=yes
|
|
|
|
//## end module.additionalDeclarations
|
|
|
|
|
|
|
|
|
|
|
|
//## Class: Figure; Abstract
|
|
|
|
//## Category: Figures
|
|
|
|
//## Subsystem: Figures
|
|
|
|
//## Persistence: Transient
|
|
|
|
//## Cardinality/Multiplicity: n
|
|
|
|
|
|
|
|
//## Uses: <unnamed>; Graphics { -> }
|
|
|
|
|
|
|
|
class Figure
|
|
|
|
{
|
|
|
|
//## begin Figure.initialDeclarations preserve=yes
|
|
|
|
//## end Figure.initialDeclarations
|
|
|
|
|
|
|
|
public:
|
|
|
|
//## Constructors (generated)
|
|
|
|
Figure();
|
|
|
|
|
|
|
|
//## Destructor (generated)
|
|
|
|
~Figure();
|
|
|
|
|
|
|
|
|
|
|
|
//## Other Operations (specified)
|
|
|
|
//## Operation: draw%937398679
|
|
|
|
virtual void draw (Graphics &g) = 0;
|
|
|
|
|
|
|
|
//## Operation: erase%937398680
|
|
|
|
virtual void erase (Graphics &g) = 0;
|
|
|
|
|
|
|
|
//## Operation: clone%937398681
|
|
|
|
virtual Figure * clone () = 0;
|
|
|
|
|
|
|
|
//## Operation: getColor%939623933
|
|
|
|
Color getColor ();
|
|
|
|
|
|
|
|
//## Operation: setColor%939623934
|
|
|
|
void setColor (Color c);
|
|
|
|
|
|
|
|
// Additional Public Declarations
|
|
|
|
//## begin Figure.public preserve=yes
|
|
|
|
//## end Figure.public
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// Additional Protected Declarations
|
|
|
|
//## begin Figure.protected preserve=yes
|
|
|
|
//## end Figure.protected
|
|
|
|
|
|
|
|
private:
|
|
|
|
// Additional Private Declarations
|
|
|
|
//## begin Figure.private preserve=yes
|
|
|
|
//## end Figure.private
|
|
|
|
|
|
|
|
private: //## implementation
|
|
|
|
// Data Members for Class Attributes
|
|
|
|
|
|
|
|
//## Attribute: color
|
|
|
|
//## begin Figure::color.attr preserve=no private: Color {U}
|
|
|
|
Color color;
|
|
|
|
//## end Figure::color.attr
|
|
|
|
|
|
|
|
// Additional Implementation Declarations
|
|
|
|
//## begin Figure.implementation preserve=yes
|
|
|
|
//## end Figure.implementation
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
//## begin Figure.postscript preserve=yes
|
|
|
|
//## end Figure.postscript
|
|
|
|
|
|
|
|
// Class Figure
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//## begin module.epilog preserve=yes
|
|
|
|
//## end module.epilog
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|