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

Fl_Packed_Strings.h

00001 /*
00002  * $Id: Fl_Packed_Strings.h,v 1.1 2003/04/16 19:34:42 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 #ifndef _FL_PACKED_STRINGS_H_
00022 #define _FL_PACKED_STRINGS_H_
00023 
00024 #include "Enumerations.h"
00025 
00029 class FL_API Fl_Packed_Strings {
00030 public:
00031     Fl_Packed_Strings();
00032     Fl_Packed_Strings(int cnt, const char *strings[]);
00033     ~Fl_Packed_Strings();
00034 
00035     void resize(unsigned count);
00036 
00037     void set(unsigned index, const char *string);
00038     const char *get(unsigned index) const;
00039 
00040     unsigned count() const { return *(unsigned *)m_buffer; }
00041 
00042     const char *operator[](unsigned index) const { return get(index); }
00043     Fl_Packed_Strings& operator=(const Fl_Packed_Strings&);
00044 
00045 private:
00046     unsigned m_size;
00047     void  *m_buffer;
00048 };
00049 
00050 #endif

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