Gadget
rectangle.h
Go to the documentation of this file.
1 #ifndef rectangle_h
2 #define rectangle_h
3 
4 #include "gadget.h"
5 #include "commentstream.h"
6 
11 class Rectangle {
12 public:
16  Rectangle();
21  Rectangle(CommentStream& infile);
25  ~Rectangle() {};
30  double getLowerX() { return xLower; };
35  double getLowerY() { return yLower; };
40  double getUpperX() { return xUpper; };
45  double getUpperY() { return yUpper; };
50  double getArea() { return areaSize; };
51 private:
55  double xLower;
59  double yLower;
63  double xUpper;
67  double yUpper;
71  double areaSize;
72 };
73 
74 #endif
This is the class used to strip comments (and whitespace) from any input stream.
Definition: commentstream.h:40
This is the class used to store the co-ordinates and size of an area, used when calculating the migra...
Definition: rectangle.h:11
~Rectangle()
This is the default Rectangle destructor.
Definition: rectangle.h:25
double getLowerY()
This will return the lower co-ordinate for the y axis of the rectangle.
Definition: rectangle.h:35
double getUpperY()
This will return the upper co-ordinate for the y axis of the rectangle.
Definition: rectangle.h:45
double getLowerX()
This will return the lower co-ordinate for the x axis of the rectangle.
Definition: rectangle.h:30
Rectangle()
This is the default Rectangle constructor.
Definition: rectangle.cc:4
double getUpperX()
This will return the upper co-ordinate for the x axis of the rectangle.
Definition: rectangle.h:40
double getArea()
This will return the size of the rectangle.
Definition: rectangle.h:50