<rf:itemid="collection-api"title="API for Qhull collections"date="Feb 2009"author="bbarber">
Qhull's collection APIs are modeled on Qt's collection API (QList, QVector, QHash). They support STL and Qt programming.
Some of Qhull's collection classes derive from STL classes. If so,
please avoid additional STL functions and operators added by inheritance.
These collection classes may be rewritten to derive from Qt classes instead.
See <rf:irefitem="cpp-collection-api"/>.
Qhull's collection API (where applicable). For documentation, see Qt's QList, QMap, QListIterator, QMapIterator, QMutableListIterator, and QMutableMapIterator
Read-write for sets/maps -- insertMulti, squeeze, take, unite
</li><li>
Search -- contains(const T &), count(const T &), indexOf, lastIndexOf
</li><li>
Search for sets/maps -- constFind, lowerBound, upperBound
</li><li>
Stream I/O -- stream <<
</li></ul>
STL list and vector -- For unfiltered access to each element.
<ul><li>
<ahref="http://stdcxx.apache.org/doc/stdlibug/16-3.html">Apache: Creating your own containers</a> -- requirements for STL containers. Iterators should define the types from 'iterator_traits'.
Not applicable to map and QMap -- at, back, pop_back, pop_front, push_back, push_front, swap
</li><li>
Not applicable to QMap -- append, first, last, lastIndexOf, mid, move, prepend, removeAll, removeAt, removeFirst, removeLast, replace, squeeze, takeAt, takeFirst, takeLast
</li><li>
Not applicable to map -- assign
</li></ul>
Qt QHash. STL extensions provide similar classes, e.g., Microsoft's stdext::hash_set. THey are nearly the same as QMap
<ul><li>
</li><li>
</li><li>
Not applicable to Qhash -- lowerBound, unite, upperBound,
</li><li>
Qt adds -- squeeze
</li></ul>
</rf:item>
<rf:itemid="class-api"title="API for Qhull collections"date="Feb 2009"author="bbarber">
<ul><li>
check... -- Throw error on failure
</li><li>
try... -- Return false on failure. Do not throw errors.
</li><li>
...Temporarily -- lifetime depends on source. e.g., toByteArrayTemporarily
</li><li>
...p -- indicates pointer-to.
</li><li>
end... -- points to one beyond the last available
</li><li>
private functions -- No syntactic indication. They may become public later on.
</li><li>
Error messages -- Preceed error messages with the name of the class throwing the error (e.g. "ClassName: ..."). If this is an internal error, use "ClassName inconsistent: ..."
</li><li>
parameter order -- qhRunId, dimension, coordinates, count.
</li><li>
toClass -- Convert into a Class object (makes a deep copy)
</li><li>
qRunId -- Requires Qh installed. Some routines allow 0 for limited info (e.g., operator<<)
</li><li>
Disable methods in derived classes -- If the default constructor, copy constructor, or copy assignment is disabled, it should be also disabled in derived classes (better error messages).
</li><li>
Constructor order -- default constructor, other constructors, copy constructor, copy assignment, destructor