-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist.h
More file actions
38 lines (34 loc) · 792 Bytes
/
list.h
File metadata and controls
38 lines (34 loc) · 792 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
#ifndef LIST_H
#define LIST_H
#include <cassert>
#include "coinpile.h"
#include "thing.h"
#include <fstream>
#include <iostream>
#include <io.h>
#include "QJsonObject"
class Iterator;
class List
{
struct Node{
ParentClass* info;
Node *next= nullptr, *prev= nullptr;
};
private:
Node *head, *tail;
public:
friend class Iterator;
Iterator begin() const;
Iterator end() const;
List();
List(const List &list);
void deleteElement(ParentClass& info);
void readListFromFile(const QString& fileName);
void writeToFile(const QString& fileName) const;
void clearList();
void add(ParentClass& info);
int len() const;
bool operator==(List &list) const;
~List();
};
#endif // LIST_H