Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Fl_String_Stack.h

00001 /*
00002  * $Id: Fl_String_Stack.h,v 1.3 2003/03/15 16:09:56 laza2000 Exp $
00003  *
00004  * Extended Fast Light Toolkit (EFLTK)
00005  * Copyright (C) 2002-2003 by EDE-Team
00006  * WWW: http://www.sourceforge.net/projects/ede
00007  *
00008  * Fast Light Toolkit (FLTK)
00009  * Copyright (C) 1998-2003 by Bill Spitzak and others.
00010  * WWW: http://www.fltk.org
00011  *
00012  * This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00013  * version 2. See COPYING for details.
00014  *
00015  * Author : Mikko Lahteenmaki
00016  * Email  : mikko@fltk.net
00017  *
00018  * Please report all bugs and problems to "efltk-bugs@fltk.net"
00019  *
00020  */
00021 
00022 #ifndef _FL_STRING_STACK_H_
00023 #define _FL_STRING_STACK_H_
00024 
00025 #include "Fl_String_List.h"
00026 
00028 class Fl_String_Stack {
00029 public:
00030     // Max size, 0=unlimited
00031     Fl_String_Stack(int max_size=0) { max_size_ = max_size; }
00032     virtual ~Fl_String_Stack() { clear(); }
00033 
00034     void clear();
00035 
00036     void push(Fl_String data);
00037     Fl_String pop();
00038     Fl_String peek();
00039 
00040     bool empty() { return (items.size()==0); }
00041     uint size() { return items.size(); }
00042 
00043     uint max_size() { return max_size_; }
00044     void max_size(int m) { max_size_ = m; }
00045 
00046 protected:
00047     void check_size();
00048     Fl_String_List items;
00049     uint max_size_;
00050 };
00051 
00052 #endif

Generated on Thu Jul 31 15:33:45 2003 for eFLTK by doxygen1.2.15