-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPolygonCommand.h
More file actions
executable file
·78 lines (65 loc) · 2.65 KB
/
PolygonCommand.h
File metadata and controls
executable file
·78 lines (65 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//------------------------------------------------------------------------------
/// Filename: PolygonCommand.h
/// Description: Header for Base Class PolygonCommand
/// Authors:
/// Ralph Ankele (0931953)
/// Tutor: Manuel Weber
/// Group: 24
/// Created: 08.09.2011
/// Last change: 19.09.2011
//------------------------------------------------------------------------------
#ifndef POLYGONCOMMAND_H_INCLUDED
#define POLYGONCOMMAND_H_INCLUDED
#include "Command.h"
#include "Coordinates.h"
#include <vector>
class UserInterface;
class Database;
class SVGHandler;
class Error;
//------------------------------------------------------------------------------
/// typedef to a vector of Coordinates
typedef std::vector<Coordinates> SVGCoordinates;
class PolygonCommand: public Command
{
private:
//----------------------------------------------------------------------------
/// Connection to SVGHandler
SVGHandler *svgh_;
//----------------------------------------------------------------------------
/// Connection to class Error
Error *error_;
//----------------------------------------------------------------------------
/// Vector with Startpoint Coordinates
SVGCoordinates coordinates_;
//----------------------------------------------------------------------------
/// Copy Constructor
/// Makes a copy of another PolygonCommand Object.
/// @param source Original to copy.
PolygonCommand(const PolygonCommand& source);
//----------------------------------------------------------------------------
/// Assignment Operator
/// Used to assign one PolygonCommand to another
/// @param source Original with values to copy.
PolygonCommand &operator=(const PolygonCommand& source);
public:
//----------------------------------------------------------------------------
/// Constructor
/// @param ui Connection to UserInterface
/// @param db Connection to Database
/// @param svgh Connection to SVGHandler
PolygonCommand(UserInterface *ui,
Database *db,
SVGHandler *svgh);
//----------------------------------------------------------------------------
/// Destructor
virtual ~PolygonCommand() throw();
//----------------------------------------------------------------------------
/// This Function executes the PolygonCommand
/// @return returns true if execute was correct
virtual bool execute();
//----------------------------------------------------------------------------
/// This Function reads the Coordinates of a Polygon
void readCoordinates();
};
#endif //POLYGONCOMMAND_H_INCLUDED