-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathNode.cpp
More file actions
46 lines (36 loc) · 648 Bytes
/
Node.cpp
File metadata and controls
46 lines (36 loc) · 648 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
/*
* Node.cpp
*
* Created on: Nov 19, 2016
* Author: rocco
*/
#include "Node.h"
#include <stdlib.h>
Node::Node() : valueInMonies(0.0), timeStamp(nullptr), next(nullptr), pos(0) {}
Node::~Node()
{
delete timeStamp;
delete next;
}
Node::Node(double priceIn, fakeTime* timeIn)
{
valueInMonies = priceIn;
timeStamp = timeIn;
next = nullptr;
pos = 0;
}
void Node::setNext(Node* nextIn)
{
next = nextIn;
}
void Node::setPos(int posIn)
{
pos = posIn;
}
int Node::getPos() { return pos; }
Node* Node::getNext()
{
return next;
}
double Node::getPrice() { return valueInMonies; }
fakeTime* Node::getTime() { return timeStamp; }