-
Notifications
You must be signed in to change notification settings - Fork 0
/
Node.hpp
executable file
·44 lines (42 loc) · 1005 Bytes
/
Node.hpp
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
//
// Node.hpp
// CSA_Simulator
//
// Created by Erik Sandgren on 27/12/15.
// Copyright © 2015 Erik Sandgren. All rights reserved.
//
#ifndef GUARD_Node_hpp
#define GUARD_Node_hpp
#include <stdio.h>
#include <vector>
class Node {
public:
Node();
~Node();
Node(unsigned long int toa);
Node(unsigned long int toa, bool countable);
void setDegree(int newDegree);
void resolve(unsigned long int timeStep);
void removeEdge(Node* adr);
void printDegree();
void printNeighbors();
void letGoOffNeighbours();
void addNeighbor(Node* newNeighbor);
unsigned long int getTimeOfArrival();
Node* getNeighbour(int i);
int getDegree();
int degree;
int getDelay();
bool getDecoded();
void setDecoded();
int getNumNeighbours();
bool getCountable();
void setCountable();
private:
bool decoded_;
bool countable_;
int delay_;
unsigned long int timeOfArrival_;
std::vector<Node*> neighbours_;
};
#endif /* Node_h */