-
Notifications
You must be signed in to change notification settings - Fork 0
/
Position.h
63 lines (46 loc) · 1.11 KB
/
Position.h
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
#ifndef Position_H
#define Position_H
#include <iostream>
using namespace std;
class Position
{
public:
Position();
Position(int x,int y);
virtual ~Position();
///\fn int GetX()
///\brief Get the X value
///
///Get the Position X parameter
///
///\return X value
int GetX() { return m_X; }
///\fn void SetX(int val)
///\brief Set the X value
///
///Set the Position X parameter
///
///\param val : next value of X
void SetX(int val) { m_X = val; }
///\fn int GetY()
///\brief Get the Y value
///
///Get the Position Y parameter
///
///\return Y value
int GetY() { return m_Y; }
///\fn void SetY(int val)
///\brief Set the Y value
///
///Set the Position Y parameter
///
///\param val : next value of Y
void SetY(int val) { m_Y = val; }
Position operator^(Position b);
virtual void print(std::ostream& os);
friend std::ostream& operator<<(std::ostream& os, Position& obj);
protected:
int m_X;/// Position X parameter
int m_Y;/// Position Y parameter
};
#endif // VECT_H