#include </home/clem/local/src/opie/qmake/include/qgvector.h>
Inheritance diagram for QGVector:


Public Member Functions | |
| QDataStream & | read (QDataStream &) |
| QDataStream & | write (QDataStream &) const |
| virtual int | compareItems (Item, Item) |
Protected Member Functions | |
| QGVector () | |
| QGVector (uint size) | |
| QGVector (const QGVector &v) | |
| ~QGVector () | |
| QGVector & | operator= (const QGVector &v) |
| bool | operator== (const QGVector &v) const |
| Item * | data () const |
| uint | size () const |
| uint | count () const |
| bool | insert (uint index, Item) |
| bool | remove (uint index) |
| Item | take (uint index) |
| void | clear () |
| bool | resize (uint newsize) |
| bool | fill (Item, int flen) |
| void | sort () |
| int | bsearch (Item) const |
| int | findRef (Item, uint index) const |
| int | find (Item, uint index) const |
| uint | containsRef (Item) const |
| uint | contains (Item) const |
| Item | at (uint index) const |
| bool | insertExpand (uint index, Item) |
| void | toList (QGList *) const |
| virtual QDataStream & | read (QDataStream &, Item &) |
| virtual QDataStream & | write (QDataStream &, Item) const |
Static Private Member Functions | |
| static void | warningIndexRange (uint) |
Private Attributes | |
| Item * | vec |
| uint | len |
| uint | numItems |
Friends | |
| class | QGList |
For internal use only.
QGVector is an internal class that acts as a base class for the QPtrVector collection class.
QGVector has some virtual functions that may be reimplemented in subclasses to customize behavior.
compareItems() compares two collection/vector items. read() reads a collection/vector item from a QDataStream. write() writes a collection/vector item to a QDataStream.
Definition at line 46 of file qgvector.h.
|
|
Definition at line 161 of file qgvector.cpp. |
|
|
Definition at line 167 of file qgvector.cpp. |
|
|
Definition at line 180 of file qgvector.cpp. References i, len, NEW, QPtrCollection::newItem(), numItems, and vec. |
|
|
Definition at line 201 of file qgvector.cpp. References clear(). |
|
|
Reimplemented in QPtrVector< type >, QPtrVector< Lookahead >, QPtrVector< CharClass >, and QPtrVector< State >. Definition at line 86 of file qgvector.h. References len. Referenced by QPtrVector< State >::at(), operator==(), and QPtrVector< State >::operator[](). |
|
|
Definition at line 411 of file qgvector.cpp. References d, FALSE, len, qWarning(), and TRUE. Referenced by QPtrVector< State >::bsearch(). |
|
|
Removes all objects from the collection. The objects will be deleted if auto-delete has been enabled.
Implements QPtrCollection. Reimplemented in QPtrVector< type >, QPtrVector< Lookahead >, QPtrVector< CharClass >, and QPtrVector< State >. Definition at line 286 of file qgvector.cpp. References DELETE, QPtrCollection::deleteItem(), i, len, numItems, and vec. Referenced by QPtrVector< State >::clear(), operator=(), read(), and ~QGVector(). |
|
||||||||||||
|
This virtual function compares two list items. Returns:
This function returns int rather than bool so that reimplementations can return one of three values and use it to sort by:
The QPtrVector::sort() and QPtrVector::bsearch() functions require that compareItems() is implemented as described here. This function should not modify the vector because some const functions call compareItems(). Definition at line 121 of file qgvector.cpp. Referenced by cmp_vec(), and operator==(). |
|
|
Definition at line 491 of file qgvector.cpp. Referenced by QPtrVector< State >::contains(). |
|
|
Definition at line 481 of file qgvector.cpp. Referenced by QPtrVector< State >::containsRef(). |
|
|
Returns the number of objects in the collection. Implements QPtrCollection. Reimplemented in QPtrVector< type >, QPtrVector< Lookahead >, QPtrVector< CharClass >, and QPtrVector< State >. Definition at line 67 of file qgvector.h. Referenced by QPtrVector< State >::count(), QPtrVector< State >::isEmpty(), operator==(), sort(), and write(). |
|
|
Reimplemented in QPtrVector< type >, QPtrVector< Lookahead >, QPtrVector< CharClass >, and QPtrVector< State >. Definition at line 65 of file qgvector.h. Referenced by QPtrVector< State >::data(). |
|
||||||||||||
|
Definition at line 347 of file qgvector.cpp. References FALSE, i, insert(), len, resize(), and TRUE. Referenced by QPtrVector< State >::fill(). |
|
||||||||||||
|
Definition at line 464 of file qgvector.cpp. References d, i, len, and qWarning(). Referenced by QPtrVector< State >::find(). |
|
||||||||||||
|
Definition at line 449 of file qgvector.cpp. References d, i, len, and qWarning(). Referenced by QPtrVector< State >::findRef(). |
|
||||||||||||
|
Definition at line 232 of file qgvector.cpp. References QPtrCollection::deleteItem(), FALSE, len, QPtrCollection::newItem(), numItems, qWarning(), TRUE, and vec. Referenced by fill(), QPtrVector< State >::insert(), and insertExpand(). |
|
||||||||||||
|
Definition at line 503 of file qgvector.cpp. |
|
|
Definition at line 206 of file qgvector.cpp. References clear(), i, len, NEW, QPtrCollection::newItem(), numItems, and vec. Referenced by QPtrVector< State >::operator=(). |
|
|
Definition at line 578 of file qgvector.cpp. References at(), compareItems(), count(), FALSE, i, size(), and TRUE. Referenced by QPtrVector< State >::operator==(). |
|
||||||||||||
|
Reads a collection/vector item from the stream s and returns a reference to the stream. The default implementation sets d to 0.
Definition at line 136 of file qgvector.cpp. |
|
|
Definition at line 547 of file qgvector.cpp. References clear(), d, i, resize(), and vec. Referenced by operator>>(). |
|
|
Reimplemented in QPtrVector< type >, QPtrVector< Lookahead >, QPtrVector< CharClass >, and QPtrVector< State >. Definition at line 255 of file qgvector.cpp. References QPtrCollection::deleteItem(), FALSE, len, numItems, qWarning(), TRUE, and vec. Referenced by QPtrVector< State >::remove(). |
|
|
Reimplemented in QPtrVector< type >, QPtrVector< Lookahead >, QPtrVector< CharClass >, and QPtrVector< State >. Definition at line 299 of file qgvector.cpp. References DELETE, QPtrCollection::deleteItem(), FALSE, i, len, NEW, numItems, TRUE, and vec. Referenced by fill(), insertExpand(), read(), and QPtrVector< State >::resize(). |
|
|
Reimplemented in QPtrVector< type >, QPtrVector< Lookahead >, QPtrVector< CharClass >, and QPtrVector< State >. Definition at line 66 of file qgvector.h. References len. Referenced by QPtrVector< State >::isNull(), operator==(), QPtrVector< State >::size(), and write(). |
|
|
Reimplemented in QPtrVector< type >, QPtrVector< Lookahead >, QPtrVector< CharClass >, and QPtrVector< State >. Definition at line 380 of file qgvector.cpp. References cmp_vec(), count(), end, len, start, and vec. Referenced by QPtrVector< State >::sort(). |
|
|
Reimplemented in QPtrVector< type >, QPtrVector< Lookahead >, QPtrVector< CharClass >, and QPtrVector< State >. Definition at line 271 of file qgvector.cpp. References d, len, numItems, qWarning(), and vec. Referenced by QPtrVector< State >::take(). |
|
|
Reimplemented in QPtrVector< type >, QPtrVector< Lookahead >, QPtrVector< CharClass >, and QPtrVector< State >. Definition at line 513 of file qgvector.cpp. Referenced by QPtrVector< State >::toList(). |
|
|
Definition at line 523 of file qgvector.cpp. References qWarning(). |
|
||||||||||||
|
Writes a collection/vector item to the stream s and returns a reference to the stream. The default implementation does nothing.
Definition at line 151 of file qgvector.cpp. |
|
|
Definition at line 564 of file qgvector.cpp. References count(), i, size(), and vec. Referenced by operator<<(). |
|
|
Definition at line 48 of file qgvector.h. |
|
|
Definition at line 105 of file qgvector.h. Referenced by clear(), fill(), insert(), insertExpand(), operator=(), QGVector(), remove(), resize(), sort(), and take(). |
|
|
Definition at line 106 of file qgvector.h. Referenced by clear(), insert(), operator=(), QGVector(), remove(), resize(), and take(). |
|
|
Definition at line 104 of file qgvector.h. Referenced by clear(), insert(), operator=(), QGVector(), read(), remove(), resize(), sort(), take(), and write(). |
1.4.2