-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReadWritable.cpp
More file actions
49 lines (40 loc) · 909 Bytes
/
Copy pathReadWritable.cpp
File metadata and controls
49 lines (40 loc) · 909 Bytes
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
// Name: Ritik Bheda
// student #: 169174182
// file name: ReadWritable.cpp
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include "ReadWritable.h"
using namespace std;
namespace sdds
{
// zero argument constructor
ReadWritable::ReadWritable()
{
modeFlag = false;
}
// fucntion to return tehe modeFlaag
bool ReadWritable::isCsv()const
{
return this->modeFlag;
}
// function to set the value of the modeFag
void ReadWritable::setCsv(bool input)
{
this->modeFlag = input;
}
// the ostream operator << to display the details
std::ostream& operator<<(std::ostream& os, const ReadWritable& src)
{
return src.write(os);
}
// the istream operator >> to input the value
std::istream& operator>>(std::istream& is, ReadWritable& src)
{
return src.read(is);
}
// the destructor
ReadWritable::~ReadWritable()
{
//empty
}
}