arduino-audio-tools
Toggle main menu visibility
Main Page
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
f
g
i
m
p
r
s
t
u
v
w
Functions
Variables
Typedefs
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
i
l
m
n
p
r
s
t
u
v
w
x
y
Enumerations
Related Symbols
Files
File List
File Members
All
Functions
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Friends
Modules
Pages
Loading...
Searching...
No Matches
src
AudioTools
CoreAudio
AudioBasic
Collections
Stack.h
1
#pragma once
2
#include "AudioTools/CoreAudio/AudioBasic/Collections/List.h"
3
4
namespace
audio_tools
{
5
13
template
<
class
T>
14
class
Stack
{
15
public
:
16
Stack
() =
default
;
17
18
bool
push(T& data){
19
return
l.push_back(data);
20
}
21
22
bool
pop(T& data){
23
return
l.pop_back(data);
24
}
25
26
bool
peek(T& data){
27
if
(size()==0)
return
false
;
28
data = *(--l.end());
29
return
true
;
30
}
31
32
size_t
size() {
33
return
l.size();
34
}
35
36
bool
clear() {
37
return
l.clear();
38
}
39
40
bool
empty() {
41
return
l.empty();
42
}
43
44
void
setAllocator(
Allocator
&allocator){
45
l.setAllocator(allocator);
46
}
47
48
protected
:
49
List<T>
l;
50
};
14
class
Stack
{
…
};
51
52
53
}
audio_tools::Allocator
Memory allocateator which uses malloc.
Definition
Allocator.h:23
audio_tools::List
Double linked list.
Definition
List.h:18
audio_tools::Stack
LIFO Stack which is based on a List.
Definition
Stack.h:14
audio_tools
Generic Implementation of sound input and output for desktop environments using portaudio.
Definition
AudioCodecsBase.h:10
Generated by
1.9.8