summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qvarlengtharray.qdoc
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2010-03-29 08:34:23 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2010-03-29 12:05:16 (GMT)
commit809583a34cb69367ecb4218f798a5928de9aacec (patch)
tree83c8e127b069957f17d9b1684956b5d684895bae /src/corelib/tools/qvarlengtharray.qdoc
parent62b082833d904688e44e1bac4849bfa54bf5fe82 (diff)
downloadQt-809583a34cb69367ecb4218f798a5928de9aacec.zip
Qt-809583a34cb69367ecb4218f798a5928de9aacec.tar.gz
Qt-809583a34cb69367ecb4218f798a5928de9aacec.tar.bz2
QVarLenghtArray: add some API to be consistant to QVector
That way it is easier to have QVarLenghtArray as a drop-in replacement for QVector Reviewed-by: Joao
Diffstat (limited to 'src/corelib/tools/qvarlengtharray.qdoc')
-rw-r--r--src/corelib/tools/qvarlengtharray.qdoc32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc
index bb7a3de..38901e5 100644
--- a/src/corelib/tools/qvarlengtharray.qdoc
+++ b/src/corelib/tools/qvarlengtharray.qdoc
@@ -197,7 +197,7 @@
\a i must be a valid index position in the array (i.e., 0 <= \a i
< size()).
- \sa data()
+ \sa data(), at()
*/
/*! \fn const T &QVarLengthArray::operator[](int i) const
@@ -272,3 +272,33 @@
Constructs a copy of \a other.
*/
+/*! \fn const T &QVarLengthArray::at(int i) const
+
+ Returns a reference to the item at index position \a i.
+
+ \a i must be a valid index position in the array (i.e., 0 <= \a i
+ < size()).
+
+ \sa value(), operator[]()
+*/
+
+/*! \fn T QVarLengthArray::value(int i) const
+
+ Returns the value at index position \a i.
+
+ If the index \a i is out of bounds, the function returns
+ a \l{default-constructed value}. If you are certain that
+ \a i is within bounds, you can use at() instead, which is slightly
+ faster.
+
+ \sa at(), operator[]()
+*/
+
+/*! \fn T QVarLengthArray::value(int i, const T &defaultValue) const
+
+ \overload
+
+ If the index \a i is out of bounds, the function returns
+ \a defaultValue.
+*/
+