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

Fl_Ptr_List Class Reference

Fl_Ptr_List is implementation of EFLTK generic pointer-list... More...

#include <Fl_Ptr_List.h>

Inheritance diagram for Fl_Ptr_List:

Fl_Callback_List Fl_Image_List Fl_Int_List Fl_Widget_List Fl_XmlNode_List List of all members.

Public Methods

 Fl_Ptr_List ()
virtual ~Fl_Ptr_List ()
virtual void clear ()
void resize (unsigned newsize)
void auto_delete (bool val)
bool auto_delete ()
void blocksize (int s)
int blocksize ()
bool empty () const
unsigned count () const
unsigned size () const
void append (void *item)
void prepend (void *item)
void insert (unsigned pos, Fl_Ptr_List_Item item)
void replace (unsigned pos, Fl_Ptr_List_Item item)
void remove (unsigned pos)
bool remove (Fl_Ptr_List_Item ptr)
void sort (Fl_Sort_Function cmpfunc)
 Sort array using qsort algorithm. More...

Fl_Ptr_List_Item search (Fl_Ptr_List_Item key, Fl_Search_Function cmpfunc)
 Search from list, using linear search algorithm. More...

Fl_Ptr_List_Item binary_search (Fl_Ptr_List_Item key, Fl_Search_Function cmpfunc)
 Search from list, using linear search algorithm. More...

int index_of (const Fl_Ptr_List_Item p) const
 Returns index item 'p', support only pointer comparing. More...

Fl_Ptr_List_Item item (unsigned index) const
Fl_Ptr_List_Item & operator[] (unsigned ind) const
Fl_Ptr_List_Item * data () const
Fl_Ptr_List & operator= (const Fl_Ptr_List &list)
 Fl_Ptr_List (const Fl_Ptr_List &list)
int for_each (Fl_Foreach_Function todo, void *arg)
int for_each (Fl_Foreach_Function todo, void *arg) const

Protected Methods

virtual void free_item (Fl_Ptr_List_Item item)

Protected Attributes

Fl_Ptr_List_Item * items
bool auto_delete_

Detailed Description

Fl_Ptr_List is implementation of EFLTK generic pointer-list...

(More information about this class is comming soon, or not.. :)

Definition at line 37 of file Fl_Ptr_List.h.


Member Function Documentation

Fl_Ptr_List_Item Fl_Ptr_List::binary_search Fl_Ptr_List_Item    key,
Fl_Search_Function    cmpfunc
 

Search from list, using linear search algorithm.

Note:
List MUST be sorted before doing binary search.
'cmpfunc' returns:
  • 0 if item1 == item2
  • > 0 (positive integer) if item1 > item2
  • < 0 (negative integer) if item1 < item2
Parameters:
cmpfunc  user provided compare function.

int Fl_Ptr_List::index_of const Fl_Ptr_List_Item    p const
 

Returns index item 'p', support only pointer comparing.

Returns -1, if item not in list.

Fl_Ptr_List_Item Fl_Ptr_List::search Fl_Ptr_List_Item    key,
Fl_Search_Function    cmpfunc
 

Search from list, using linear search algorithm.

'cmpfunc' returns:

  • 0 if item1 == item2
  • !=0 (non-zero integer) if item1 != item2
Parameters:
cmpfunc  user provided compare function.

void Fl_Ptr_List::sort Fl_Sort_Function    cmpfunc
 

Sort array using qsort algorithm.

'cmpfunc' returns:

  • 0 if item1 == item2
  • > 0 (positive integer) if item1 > item2
  • < 0 (negative integer) if item1 < item2
Parameters:
cmpfunc  user provided compare function.


The documentation for this class was generated from the following file:
Generated on Thu Jul 31 15:33:51 2003 for eFLTK by doxygen1.2.15