home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
VRML Tools for 3D Cyberspace
/
VRML_Tools_For_3D_Cyberspace.iso
/
amber
/
include
/
stack.hpp
< prev
next >
Wrap
C/C++ Source or Header
|
1996-07-01
|
2KB
|
86 lines
//**********************************************************************
// DIVE Laboratories, Inc.
// Copyright(c) 1995
// All rights reserved
// FILE: STACK.HPP
//
// DESCRIPTION
//
// Author: Brian D. Green
//
// Modification History:
// 3/22/95 Created
//
//**********************************************************************
#ifndef _STACK_HPP
#define _STACK_HPP
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#define DEFAULT -1
class dblNodeClass {
public:
void *obj;
dblNodeClass *next;
dblNodeClass *prev;
dblNodeClass( void *listOBJ);
dblNodeClass();
~dblNodeClass();
};
// -------------------------------------------------------------------
class stackClass {
protected:
dblNodeClass *listPtr;
dblNodeClass *head, *tail;
int count, maxSize;
//------------------------------------------------------------
// user specified print and remove functions
//------------------------------------------------------------
public:
//------------------------------------------------------------
// list manipulation fcns
//------------------------------------------------------------
void reset();
int isEmpty();
int length();
void push(void *listOBJ);
void *pop();
void *getTop();
//------------------------------------------------------------
// overloaded operators
//------------------------------------------------------------
void operator=( stackClass* otherList );
// ------------------------------------------------------------
// constructors & destructors
// ------------------------------------------------------------
stackClass(int size=32);
stackClass( stackClass* otherList );
~stackClass();
};
#endif