-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathNSWFL_UIntegerStack.H
45 lines (37 loc) · 1.49 KB
/
NSWFL_UIntegerStack.H
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
39
40
41
42
43
44
45
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright © NetworkDLS 2023, All rights reserved
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef _NSWFL_UIntegerStack_H_
#define _NSWFL_UIntegerStack_H_
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
namespace NSWFL {
namespace Collections {
class UIntegerStack {
public:
bool Init(unsigned int iInitialSize);
bool Init(void);
bool Destroy(void);
unsigned int GetStackSize(void);
unsigned int GetFreeSize(void);
unsigned int GetStackLevel(void);
bool IsStackEmpty(void);
bool Push(unsigned int iNumber);
bool Pop(unsigned int *iNumber);
unsigned int Pop(void);
bool Peek(unsigned int *iNumber);
bool Peek(unsigned int iSlot, unsigned int *iNumber);
private:
unsigned int iStackSize;
unsigned int iInitialSize;
unsigned int *iStack;
unsigned int iFree;
};
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
} //namespace::Collections
} //namespace::NSWFL
#endif