SmartFolder  1.0
SmartFolder is a way to search files on your system and group the results. The program will interpret search queries and create a folder with symbolic links to all the found matches.
Stack.h File Reference

Header file that contains the definitions for a generic Stack data structure. More...

#include "Logger.h"
#include <stdlib.h>
Include dependency graph for Stack.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  stackElement_st
 
struct  stack_st
 

Typedefs

typedef struct stackElement_st stackElement
 
typedef struct stack_st Stack
 

Functions

StackinitStack ()
 
void push (Stack *s, void *element)
 
void * pop (Stack *s)
 
int isEmpty (Stack *s)
 
void deleteStack (Stack *s)
 

Detailed Description

Header file that contains the definitions for a generic Stack data structure.

Authors
Maxime Lovino, Thomas Ibanez
Date
January 25, 2017
Version
1.0

Function Documentation

void deleteStack ( Stack s)

Function to delete a Stack and free its memory

Parameters
sA pointer to the Stack
Stack* initStack ( )

Function to initialize an empty Stack

Returns
A pointer to an empty Stack
int isEmpty ( Stack s)

Function to check if a Stack is empty

Parameters
sA pointer to the Stack
Returns
1 if the Stack is empty, 0 otherwise
void* pop ( Stack s)

Function to pop the first element of the Stack

Parameters
sA pointer to the Stack
Returns
The first element of the Stack
void push ( Stack s,
void *  element 
)

Function to insert an element (push) in the Stack

Parameters
sA pointer to the Stack
elementThe element we want to insert