GenericStack - Generic stacks module
[Non-specific low-level tools level]

Generic stacks module (former pilegen module). More...

Data Structures

struct  CharStack
 Stack of char (former Pile_char). More...
struct  LongStack
 Stack of long (former Pile_longint). More...
struct  DoubleStack
 Stack of double (former Pile_double). More...
struct  IntStack
 Stack of int (former Pile_int). More...
struct  PointerStack
 Stack of pointers (void*) (former Pile_pointeur). More...

Defines

#define stackFree(stack)
#define stackIsEmpty(stack)
#define stackIsNotEmpty(stack)
#define stackGetTopValue(stack)
#define stackEmpty(stack)

Functions

char charStackRemove (CharStack *stack)
int intStackRemove (IntStack *stack)
guint32 longStackRemove (LongStack *stack)
double doubleStackRemove (DoubleStack *stack)
void * pointerStackRemove (PointerStack *stack)
CharStackcharStackCreate ()
void charStackAdd (CharStack *stack, char value)
IntStackintStackCreate ()
void intStackAdd (CharStack *stack, int value)
LongStacklongStackCreate ()
void longStackAdd (LongStack *stack, long value)
DoubleStackdoubleStackCreate ()
void doubleStackAdd (DoubleStack *stack, double value)
PointerStackpointerStackCreate ()
void pointerStackAdd (PointerStack *stack, void *value)

Detailed Description

Generic stacks module (former pilegen module).

SlpTK Library 0.6.0

Required header
<genericstack.h>
Author:
Antonin Merçay

Jean-Cédric Chappelier (creation on 23.01.1997)

Antonin Merçay (revision on 17.11.2004)

Date:
2 March 2005
Version:
0.6.0

Define Documentation

#define stackEmpty ( stack   ) 

Empty the stack (remove all its elements)

Parameters:
[in] stack The stack to empty
Former(s) function(s):
Vide_Pile

#define stackFree ( stack   ) 

Free the memory allocated to a given stack

Parameters:
[in] stack The stack to free
Former(s) function(s):
Libere_Pile

#define stackGetTopValue ( stack   ) 

Return the value of the element on the top of the stack.

Remarks:
The element is not removed from the stack
Parameters:
[in] stack The stack
Returns:
The value of the element on the top of the stack
Former(s) function(s):
Pile_Top

#define stackIsEmpty ( stack   ) 

Return TRUE if the given stack is empty

Parameters:
[in] stack The stack
Returns:
The boolean result
See also:
stackIsNotEmpty()
Former(s) function(s):
Pile_Vide

#define stackIsNotEmpty ( stack   ) 

Return TRUE if the given stack is not empty

Parameters:
[in] stack The stack
Returns:
The boolean result
See also:
stackIsEmpty()
Former(s) function(s):
Pile_NonVide


Function Documentation

void charStackAdd ( CharStack stack,
char  value 
)

Add an element on the top of the stack

Parameters:
[in] stack The stack
[in] value The value of the added element
Former(s) function(s):
Empile_*

CharStack* charStackCreate (  ) 

Create a new stack of a given type

Returns:
The new stack
See also:
stackFree()
Former(s) function(s):
Init_Pile_*

char charStackRemove ( CharStack stack  ) 

Remove the element on the top of the stack and return its value

Parameters:
[in] stack The stack
Returns:
The value of the element removed
Former(s) function(s):
Depile_*

void doubleStackAdd ( DoubleStack stack,
double  value 
)

Add an element on the top of the stack

Parameters:
[in] stack The stack
[in] value The value of the added element
Former(s) function(s):
Empile_*

DoubleStack* doubleStackCreate (  ) 

Create a new stack of a given type

Returns:
The new stack
See also:
stackFree()
Former(s) function(s):
Init_Pile_*

double doubleStackRemove ( DoubleStack stack  ) 

Remove the element on the top of the stack and return its value

Parameters:
[in] stack The stack
Returns:
The value of the element removed
Former(s) function(s):
Depile_*

void intStackAdd ( CharStack stack,
int  value 
)

Add an element on the top of the stack

Parameters:
[in] stack The stack
[in] value The value of the added element
Former(s) function(s):
Empile_*

IntStack* intStackCreate (  ) 

Create a new stack of a given type

Returns:
The new stack
See also:
stackFree()
Former(s) function(s):
Init_Pile_*

int intStackRemove ( IntStack stack  ) 

Remove the element on the top of the stack and return its value

Parameters:
[in] stack The stack
Returns:
The value of the element removed
Former(s) function(s):
Depile_*

void longStackAdd ( LongStack stack,
long  value 
)

Add an element on the top of the stack

Parameters:
[in] stack The stack
[in] value The value of the added element
Former(s) function(s):
Empile_*

LongStack* longStackCreate (  ) 

Create a new stack of a given type

Returns:
The new stack
See also:
stackFree()
Former(s) function(s):
Init_Pile_*

guint32 longStackRemove ( LongStack stack  ) 

Remove the element on the top of the stack and return its value

Parameters:
[in] stack The stack
Returns:
The value of the element removed
Former(s) function(s):
Depile_*

void pointerStackAdd ( PointerStack stack,
void *  value 
)

Add an element on the top of the stack

Parameters:
[in] stack The stack
[in] value The value of the added element
Former(s) function(s):
Empile_*

PointerStack* pointerStackCreate (  ) 

Create a new stack of a given type

Returns:
The new stack
See also:
stackFree()
Former(s) function(s):
Init_Pile_*

void * pointerStackRemove ( PointerStack stack  ) 

Remove the element on the top of the stack and return its value

Parameters:
[in] stack The stack
Returns:
The value of the element removed
Former(s) function(s):
Depile_*


Generated on Thu Mar 22 17:46:31 2007 for SlpTk by  doxygen 1.4.7