Public Member Functions | Private Member Functions | List of all members
QStrIList Class Reference

#include <qstrlist.h>

Inheritance diagram for QStrIList:
QStrList QInternalList< type > QGList QCollection

Public Member Functions

 QStrIList (bool deepCopies=TRUE)
 
 ~QStrIList ()
 
- Public Member Functions inherited from QStrList
 QStrList (bool deepCopies=TRUE)
 
 QStrList (const QStrList &)
 
 ~QStrList ()
 
QStrListoperator= (const QStrList &)
 
- Public Member Functions inherited from QInternalList< type >
 QInternalList ()
 
 QInternalList (const QInternalList< type > &l)
 
 ~QInternalList ()
 
QInternalList< type > & operator= (const QInternalList< type > &l)
 
bool operator== (const QInternalList< type > &list) const
 
uint count () const
 
bool isEmpty () const
 
bool insert (uint i, const type *d)
 
void inSort (const type *d)
 
void prepend (const type *d)
 
void append (const type *d)
 
bool remove (uint i)
 
bool remove ()
 
bool remove (const type *d)
 
bool removeRef (const type *d)
 
void removeNode (QLNode *n)
 
bool removeFirst ()
 
bool removeLast ()
 
typetake (uint i)
 
typetake ()
 
typetakeNode (QLNode *n)
 
void clear ()
 
void sort ()
 
int find (const type *d)
 
int findNext (const type *d)
 
int findRef (const type *d)
 
int findNextRef (const type *d)
 
uint contains (const type *d) const
 
uint containsRef (const type *d) const
 
typeat (uint i)
 
int at () const
 
typecurrent () const
 
QLNodecurrentNode () const
 
typegetFirst () const
 
typegetLast () const
 
typefirst ()
 
typelast ()
 
typenext ()
 
typeprev ()
 
void toVector (QGVector *vec) const
 
- Public Member Functions inherited from QGList
QDataStreamread (QDataStream &)
 
QDataStreamwrite (QDataStream &) const
 
- Public Member Functions inherited from QCollection
bool autoDelete () const
 
void setAutoDelete (bool enable)
 

Private Member Functions

int compareItems (QCollection::Item s1, QCollection::Item s2)
 

Additional Inherited Members

- Public Types inherited from QCollection
typedef void * Item
 
- Protected Member Functions inherited from QGList
 QGList ()
 
 QGList (const QGList &)
 
virtual ~QGList ()
 
QGListoperator= (const QGList &)
 
bool operator== (const QGList &) const
 
void inSort (QCollection::Item)
 
void append (QCollection::Item)
 
bool insertAt (uint index, QCollection::Item)
 
void relinkNode (QLNode *)
 
bool removeNode (QLNode *)
 
bool remove (QCollection::Item=0)
 
bool removeRef (QCollection::Item=0)
 
bool removeFirst ()
 
bool removeLast ()
 
bool removeAt (uint index)
 
QCollection::Item takeNode (QLNode *)
 
QCollection::Item take ()
 
QCollection::Item takeAt (uint index)
 
QCollection::Item takeFirst ()
 
QCollection::Item takeLast ()
 
void sort ()
 
int findRef (QCollection::Item, bool=TRUE)
 
int find (QCollection::Item, bool=TRUE)
 
uint containsRef (QCollection::Item) const
 
uint contains (QCollection::Item) const
 
QCollection::Item at (uint index)
 
int at () const
 
QLNodecurrentNode () const
 
QCollection::Item get () const
 
QCollection::Item cfirst () const
 
QCollection::Item clast () const
 
QCollection::Item first ()
 
QCollection::Item last ()
 
QCollection::Item next ()
 
QCollection::Item prev ()
 
void toVector (QGVector *) const
 
- Protected Member Functions inherited from QCollection
 QCollection ()
 
 QCollection (const QCollection &)
 
virtual ~QCollection ()
 
- Protected Attributes inherited from QCollection
bool del_item
 

Detailed Description

Definition at line 80 of file qstrlist.h.

Constructor & Destructor Documentation

QStrIList::QStrIList ( bool  deepCopies = TRUE)
inline

Definition at line 83 of file qstrlist.h.

83 : QStrList( deepCopies ) {}
QStrList(bool deepCopies=TRUE)
Definition: qstrlist.h:60
QStrIList::~QStrIList ( )
inline

Definition at line 84 of file qstrlist.h.

84 { clear(); }

Member Function Documentation

int QStrIList::compareItems ( QCollection::Item  item1,
QCollection::Item  item2 
)
inlineprivatevirtual

This virtual function compares two list items.

Returns:

  • 0 if item1 == item2
  • non-zero if item1 != item2

This function returns int rather than bool so that reimplementations can return three values and use it to sort by:

  • 0 if item1 == item2
  • > 0 (positive integer) if item1 > item2
  • < 0 (negative integer) if item1 < item2

The QList::inSort() function requires that compareItems() is implemented as described here.

This function should not modify the list because some const functions call compareItems().

The default implementation compares the pointers:

Reimplemented from QStrList.

Definition at line 86 of file qstrlist.h.

87  { return qstricmp((const char*)s1,
88  (const char*)s2); }
int qstricmp(const char *str1, const char *str2)
Definition: qcstring.cpp:567

The documentation for this class was generated from the following file: