Deluge Firmware 1.3.0
Build date: 2026.02.12
Loading...
Searching...
No Matches
bidirectional_linked_list.h
1/*
2 * Copyright © 2017-2023 Synthstrom Audible Limited
3 *
4 * This file is part of The Synthstrom Audible Deluge Firmware.
5 *
6 * The Synthstrom Audible Deluge Firmware is free software: you can redistribute it and/or modify it under the
7 * terms of the GNU General Public License as published by the Free Software Foundation,
8 * either version 3 of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * See the GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along with this program.
15 * If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#pragma once
19
20#include <cstdint>
21
23
24class BidirectionalLinkedListNode {
25public:
26 BidirectionalLinkedListNode();
27 virtual ~BidirectionalLinkedListNode();
28
29 void remove();
30 void insertOtherNodeBefore(BidirectionalLinkedListNode* otherNode);
31 bool isLast();
32
33 BidirectionalLinkedListNode* next; // Only valid if list is not NULL, contains jibberish otherwise.
34 BidirectionalLinkedListNode** prevPointer; // Only valid if list is not NULL, contains jibberish otherwise.
36};
37
38class BidirectionalLinkedList {
39public:
40 BidirectionalLinkedList();
41 void addToEnd(BidirectionalLinkedListNode* node);
44 void test();
45 int32_t getNum();
46
49 void addToStart(BidirectionalLinkedListNode* node);
50};
Definition bidirectional_linked_list.h:24
Definition bidirectional_linked_list.h:38