Main Page | Class List | File List | Class Members | File Members

CStack Interface Reference

#import <cstack.h>

List of all members.

Public Member Functions

(id) init
 Initialize stack.

(void) dealloc
 Deallocate stack.

(void) push:
 Push object to stack.

(id) pop
 Pop data from stack.

(uint_t) num
 Get number of objects in the stack.

(id) objectAtTop
 Get object at the top of stack.

(id) objectAtIndex:
 Get object by index.


Protected Attributes

CStackElmPtr stack_bottom
uint_t current_num
uint_t max_num


Detailed Description

CStack operates stack of objects.


Member Function Documentation

- (void) CStack:
 

Deallocate stack.

Description
Deallocate stack.

- (id) CStack:
 

Initialize stack.

Description
Initialize stack.

- (uint_t) CStack:
 

Get number of objects in the stack.

Returns:
Number of objects.
Description
Get number of objects in the stack.

- (id) CStack: (id) 
(uint_t) 
(id)  idx
 

Get object by index.

Return values:
obj Object at index depth of stack.
nil Object is not found there.
Description
Get object by index.

- (id) CStack:
 

Get object at the top of stack.

Return values:
obj Object at top of stack.
nil Stack is empty.
Description
Get object at the top of stack. The object is not poped.

- (id) CStack:
 

Pop data from stack.

Return values:
obj Object at top of stack.
nil When the stack is empty.
Description
Pop data from stack.

- (void) CStack: (id) 
(id) 
(id)  obj
 

Push object to stack.

Parameters:
obj New object to stack.
Description
Deallocate stack.


Member Data Documentation

uint_t CStack::current_num [protected]
 

Number of valid objects in the stack

uint_t CStack::max_num [protected]
 

Maximum size of stack

CStackElmPtr CStack::stack_bottom [protected]
 

Pointer of the stack. The lower address contains deeper data in the stack.


The documentation for this interface was generated from the following file:
Generated on Wed Jul 14 18:34:59 2004 for Coconut by doxygen 1.3.6