-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cell.h
83 lines (75 loc) · 2.29 KB
/
Cell.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#ifndef CELL_H
#define CELL_H
#include "Wall.h"
#include "CurvyWall.h"
#include <vector>
class Tissue; // forward declaration
class Cell {
private:
int id;
vector<Wall*> cell_wall;
Tissue* belongs_to;
public: // Do NOT make any modifications below!
/*********************************************************************
* Constructor
*
* The first @param is the id of the cell
* The second @param is the cell wall which defines the shape of the cell
* The third @param is the Tissue that cell belongs to
*/
Cell(int, const vector<Wall*>&, Tissue*);
/*********************************************************************
* Copy Constructor
*
* Deep copy
*/
Cell(const Cell&);
/*********************************************************************
* GetCellID
*
* @return the cell id
*/
int GetCellID() const;
/*********************************************************************
* GetCellID
*
* @return pointer for the tissue that this cell belongs to.
*/
Tissue* GetTissue() const;
/*********************************************************************
* GetCellWall
*
* @return the cell wall
*/
const vector<Wall*>& GetCellWall() const;
/*********************************************************************
* RenewCellWall
*
* Replaces the current cell wall with the one given in the argument
*/
void RenewCellWall(vector<Wall*>&);
/*********************************************************************
* StrengthenCellWall
*
* Creates a new cell wall by connecting the partial walls which can
be added with + operator
* Replaces the old cell wall with the new one
*/
void StrengthenCellWall();
/*********************************************************************
* Destructor
*
*/
~Cell();
/*********************************************************************
* Stream Operator
*
* Prints cell wall
* The format is: (p1.x,p1.y) - (p2.x,p2.y) - ... - (pn.x,pn.y)
where p1, p2, ..., pn are the the particles on the cell wall.
* Do NOT add new line character "\n" to the end of the stream.
*/
friend ostream& operator<<(ostream&, const Cell&);
/********************************************************************/
};
#endif