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
14
15#ifndef C2DIPOINT_H
16#define C2DIPOINT_H
17/*===============================================================================================================================
18
19This file is part of CoastalME, the Coastal Modelling Environment.
20
21CoastalME 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.
22
23This 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.
24
25You 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.
26
27===============================================================================================================================*/
29{
30private:
32 int nX;
33
35 int nY;
36
37protected:
38
39public:
40 CGeom2DIPoint(void);
41 CGeom2DIPoint(int const, int const);
42
43 int nGetX(void) const;
44 int nGetY(void) const;
45 int* pnGetX();
46 int* pnGetY();
47 void SetX(int const);
48 void SetY(int const);
49 void SetXY(int const, int const);
50// void SetXY(CGeom2DIPoint const*);
51
52 void AddXAddY(int const, int const);
53 void AddXAddY(double const, double const);
54 void DivXDivY(double const, double const);
55
56 void operator= (CGeom2DIPoint const*);
57 bool operator== (CGeom2DIPoint const*) const;
58 bool operator== (CGeom2DIPoint) const;
59 bool operator!= (CGeom2DIPoint const*) const;
60 bool operator!= (CGeom2DIPoint) const;
61};
62#endif // C2DIPOINT_H
CGeom2DIPoint(void)
Constructor with no parameters (the X and Y coordinates of the CGeom2DIPoint object are set to zero i...
Definition 2di_point.cpp:28
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:72
int nGetY(void) const
Returns the CGeom2DIPoint object's integer Y coordinate.
Definition 2di_point.cpp:48
int nY
The integer y coordinate.
Definition 2di_point.h:35
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:78
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:66
void 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:60
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:92
int * pnGetX()
Returns a reference to the CGeom2DIPoint object's integer X coordinate.
Definition 2di_point.cpp:54
int nGetX(void) const
Returns the CGeom2DIPoint object's integer X coordinate.
Definition 2di_point.cpp:42
int nX
The integer x coordinate.
Definition 2di_point.h:32