chia-hsun wu / Mbed 2 deprecated Boboobooov10

Dependencies:   mbed-rtos mbed

Fork of Boboobooov4 by kao yi

Embed: (wiki syntax)

« Back to documentation index

Stack< T > Class Template Reference

Stack< T > Class Template Reference

Stack class. More...

#include <Stack.h>

Public Member Functions

 Stack (int p_size)
 init Stack class
int push (T dat)
 push to stack
int pop (T *dat)
 pop from stack

Detailed Description

template<class T>
class Stack< T >

Stack class.

Definition at line 19 of file Stack.h.


Constructor & Destructor Documentation

Stack ( int  p_size )

init Stack class

Parameters:
p_sizesize of stack

Definition at line 14 of file Stack.cpp.


Member Function Documentation

int pop ( T *  dat )

pop from stack

Parameters:
datdata
Returns:
0:ok / -1:error

Definition at line 39 of file Stack.cpp.

int push ( dat )

push to stack

Parameters:
datdata
Returns:
data or -1:error

Definition at line 28 of file Stack.cpp.