Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
platform
MemoryTracking
TagStack.h
1
#pragma once
2
3
// simple in-place stack designed to avoid allocations (as it is used inside the memory allocation debugging).
4
// See the comment on https://github.com/eegeo/eegeo-mobile/commit/e31e67e0da5f46043d33366dbe73e7b92dcec8c5 for a discussion
5
// of why this isn't an STL stack.
6
template
<
int
TMaxDepth>
7
class
TagStack
8
{
9
public
:
10
11
TagStack
() :
12
m_currentIndex(0)
13
{
14
m_tags[0] =
""
;
15
}
16
17
void
PushTag(
const
char
* tag) { m_tags[++m_currentIndex] = tag; }
18
void
PopTag() { --m_currentIndex; }
19
const
char
* Peek()
const
{
return
m_tags[m_currentIndex]; }
20
21
private
:
22
23
int
m_currentIndex;
24
const
char
* m_tags[TMaxDepth];
25
};
26
Generated on Sat Jun 10 2023 02:00:31 for eeGeo Platform SDK by
1.8.3.1