-
Notifications
You must be signed in to change notification settings - Fork 0
/
Map.cpp
41 lines (36 loc) · 734 Bytes
/
Map.cpp
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
#include "Map.h"
// default constructor
Map::Map()
{
frameNum = 0; // default set to 0 until updated
valid = false; // default set to false until updated
}
/**
* @brief - sets private variable frameNum. Used in PageTable::pageInsert()
* @param frameNumber - to be assigned to this->frameNum
*/
void Map::setFrameNum(int frameNumber)
{
this->frameNum = frameNumber;
}
/**
* @brief - sets valid to true. Used in PageTable::pageInsert()
*/
void Map::setValid()
{
this->valid = true;
}
/**
* @brief - returns private variable this->valid
*/
bool Map::isValid()
{
return this->valid;
}
/**
* @brief - returns private variable frameNum
*/
unsigned int Map::getFrameNum()
{
return frameNum;
}