summaryrefslogtreecommitdiff
path: root/algo1w3/NAWLinkedList.h
blob: 411da61ee4dc85ff2c1adc2fd96ff51c9d7acada (plain)
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
#pragma once

#include <stdlib.h>

class NAW;
class NAWLink;

class NAWLinkedList {
public:
	NAWLinkedList();
	virtual ~NAWLinkedList();

public:
	virtual void addToStart(const NAW&);
	virtual NAWLink* search(const NAW&) const;
	/** @brief return parent node of node found, if found */
	virtual NAWLink* searchParent(const NAW&) const;
	virtual void showAll() const;
	/** @brief remove first *FOUND* */
	virtual NAWLink* removeFirst(const NAW&);

private:
	size_t size = 0;
	NAWLink* next = nullptr;
};