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

Fl_Int_List.h

00001 /*
00002  * $Id: Fl_Int_List.h,v 1.5 2003/07/03 20:36:35 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_INT_LIST_H_
00023 #define _FL_INT_LIST_H_
00024 
00025 #include "Fl_Ptr_List.h"
00026 
00028 class FL_API Fl_Int_List : public Fl_Ptr_List {
00029 public:
00030     Fl_Int_List() : Fl_Ptr_List() { }
00031     virtual ~Fl_Int_List() { clear(); }
00032 
00033     void sort();
00034 
00035     void append(int item) { Fl_Ptr_List::append((void *)item); }
00036     void prepend(int item) { Fl_Ptr_List::prepend((void *)item); }
00037     void insert(unsigned pos, int item) { Fl_Ptr_List::insert(pos, (void *)item); }
00038 
00039     //Return first index of found integer. -1 if none
00040     int index_of(const int i);
00041     int contains(const int i);
00042 
00043     char *to_string(const char *separator=",");
00044     void from_string(const char * s, const char * separator=",");
00045 
00046     int item(uint index) const { return (int)Fl_Ptr_List::item(index); }
00047     int &operator [](uint ind) const { return (int&)items[ind]; }
00048 };
00049 
00050 #endif

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