-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNode.h
More file actions
40 lines (27 loc) · 860 Bytes
/
Node.h
File metadata and controls
40 lines (27 loc) · 860 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
#ifndef NODE_H
#define NODE_H
#include <string>
struct Node {
private:
std::string data;
Node* prev;
Node* next;
public:
Node();
Node(const std::string& newData);
std::string getData() const;
void setData(const std::string& newData);
Node* getPrev () const;
Node* getNext () const;
void setPrev(Node* newPrev);
void setNext(Node* newNext);
};
bool operator==(const Node& lhs, const Node& rhs);
bool operator==(const Node& lhs, const std::string& rhs);
bool operator==(const std::string& lhs, const Node& rhs);
bool operator<(const Node& lhs, const Node& rhs);
bool operator>(const Node& lhs, const Node& rhs);
bool operator<=(const Node& lhs, const Node& rhs);
bool operator>=(const Node& lhs, const Node& rhs);
bool operator!=(const Node& lhs, const Node& rhs);
#endif