generated from AfonsoCMSousa/CPP-Template
27 lines
509 B
C++
27 lines
509 B
C++
#ifndef STACK_H
|
|
#define STACK_H // STACK_H
|
|
|
|
#include <stdbool.h>
|
|
#include <sys/types.h>
|
|
#include "server_structs.h"
|
|
|
|
class Stack {
|
|
private:
|
|
api_packet *data;
|
|
size_t capacity;
|
|
int top;
|
|
|
|
public:
|
|
Stack(size_t size);
|
|
~Stack();
|
|
bool isEmpty();
|
|
bool isFull();
|
|
bool push(const api_packet &item);
|
|
bool pop(api_packet &item);
|
|
bool peek(api_packet &item);
|
|
size_t size();
|
|
size_t getCapacity();
|
|
};
|
|
|
|
#endif // STACK_H
|