CoastalME (Coastal Modelling Environment)
Simulates the long-term behaviour of complex coastlines
Loading...
Searching...
No Matches
2di_point.h
Go to the documentation of this file.
1
12
13#ifndef C2DIPOINT_H
14#define C2DIPOINT_H
15/* ===============================================================================================================================
16 This file is part of CoastalME, the Coastal Modelling Environment.
17
18 CoastalME is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
19
20 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23===============================================================================================================================*/
25{
26 private:
28 int nX;
29
31 int nY;
32
33 protected:
34 public:
35 CGeom2DIPoint(void);
36 explicit CGeom2DIPoint(CGeom2DIPoint const*);
37 CGeom2DIPoint(int const, int const);
38
39 int nGetX(void) const;
40 int nGetY(void) const;
41 int* pnGetX();
42 int* pnGetY();
43 void SetX(int const);
44 void SetY(int const);
45 void SetXY(int const, int const);
46 // void SetXY(CGeom2DIPoint const*);
47
48 void AddXAddY(int const, int const);
49 void AddXAddY(double const, double const);
50 void DivXDivY(double const, double const);
51
53 bool operator==(CGeom2DIPoint const*) const;
54 bool operator==(CGeom2DIPoint) const;
55 bool operator!=(CGeom2DIPoint const*) const;
56 bool operator!=(CGeom2DIPoint) const;
57};
58#endif // C2DIPOINT_H
CGeom2DIPoint(void)
Constructor with no parameters (the X and Y coordinates of the new CGeom2DIPoint object are set to ze...
Definition 2di_point.cpp:24
bool operator!=(CGeom2DIPoint const *) const
Compares two CGeom2DIPoint objects for inequality.
void SetY(int const)
The integer parameter sets a value for the CGeom2DIPoint object's Y coordinate.
Definition 2di_point.cpp:75
int nGetY(void) const
Returns the CGeom2DIPoint object's integer Y coordinate.
Definition 2di_point.cpp:51
int nY
The integer y coordinate.
Definition 2di_point.h:31
void SetXY(int const, int const)
The two integer parameters set values for the CGeom2DIPoint object's X and Y coordinates.
Definition 2di_point.cpp:81
bool operator==(CGeom2DIPoint const *) const
Compares two CGeom2DIPoint objects for equality.
void DivXDivY(double const, double const)
Divides the CGeom2DIPoint object's X coordinate by the first double parameter (rounded),...
void SetX(int const)
The integer parameter sets a value for the CGeom2DIPoint object's X coordinate.
Definition 2di_point.cpp:69
CGeom2DIPoint & operator=(CGeom2DIPoint const *)
Sets one CGeom2DIPoint object to be the same as another.
int * pnGetY()
Returns a reference to the CGeom2DIPoint object's integer Y coordinate.
Definition 2di_point.cpp:63
void AddXAddY(int const, int const)
The parameter is a pointer to a CGeom2DIPoint object, this is used to set values for the CGeom2DIPoin...
Definition 2di_point.cpp:95
int * pnGetX()
Returns a reference to the CGeom2DIPoint object's integer X coordinate.
Definition 2di_point.cpp:57
int nGetX(void) const
Returns the CGeom2DIPoint object's integer X coordinate.
Definition 2di_point.cpp:45
int nX
The integer x coordinate.
Definition 2di_point.h:28