Blame qtools/qarray.doc

Packit 1c1d7e
/****************************************************************************
Packit 1c1d7e
** 
Packit 1c1d7e
**
Packit 1c1d7e
** QArray class documentation
Packit 1c1d7e
**
Packit 1c1d7e
** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
Packit 1c1d7e
**
Packit 1c1d7e
** This file is part of the Qt GUI Toolkit.
Packit 1c1d7e
**
Packit 1c1d7e
** This file may be distributed under the terms of the Q Public License
Packit 1c1d7e
** as defined by Trolltech AS of Norway and appearing in the file
Packit 1c1d7e
** LICENSE.QPL included in the packaging of this file.
Packit 1c1d7e
**
Packit 1c1d7e
** This file may be distributed and/or modified under the terms of the
Packit 1c1d7e
** GNU General Public License version 2 as published by the Free Software
Packit 1c1d7e
** Foundation and appearing in the file LICENSE.GPL included in the
Packit 1c1d7e
** packaging of this file.
Packit 1c1d7e
**
Packit 1c1d7e
** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
Packit 1c1d7e
** licenses may use this file in accordance with the Qt Commercial License
Packit 1c1d7e
** Agreement provided with the Software.
Packit 1c1d7e
**
Packit 1c1d7e
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
Packit 1c1d7e
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Packit 1c1d7e
**
Packit 1c1d7e
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
Packit 1c1d7e
**   information about Qt Commercial License Agreements.
Packit 1c1d7e
** See http://www.trolltech.com/qpl/ for QPL licensing information.
Packit 1c1d7e
** See http://www.trolltech.com/gpl/ for GPL licensing information.
Packit 1c1d7e
**
Packit 1c1d7e
** Contact info@trolltech.com if any conditions of this licensing are
Packit 1c1d7e
** not clear to you.
Packit 1c1d7e
**
Packit 1c1d7e
**********************************************************************/
Packit 1c1d7e
Packit 1c1d7e
Packit 1c1d7e
/*****************************************************************************
Packit 1c1d7e
  QArray documentation
Packit 1c1d7e
 *****************************************************************************/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \class QArray qarray.h
Packit 1c1d7e
  \brief The QArray class is a template class that provides arrays of simple types.
Packit 1c1d7e
Packit 1c1d7e
  \ingroup tools
Packit 1c1d7e
Packit 1c1d7e
  QArray is implemented as a template class. Define a template
Packit 1c1d7e
  instance QArray\<X\> to create an array that contains X items.
Packit 1c1d7e
Packit 1c1d7e
  QArray stores the array elements directly in the array. It can only
Packit 1c1d7e
  deal with simple types, i.e. C++ types, structs and classes that have
Packit 1c1d7e
  no constructors, destructors or virtual functions.  QArray uses
Packit 1c1d7e
  bitwise operations to copy and compare array elements.
Packit 1c1d7e
Packit 1c1d7e
  The QVector collection class is also a kind of array.  Like most
Packit 1c1d7e
  \link collection.html collection classes\endlink, it has pointers to the
Packit 1c1d7e
  contained items.
Packit 1c1d7e
Packit 1c1d7e
  QArray uses explicit \link shclass.html sharing\endlink with a reference
Packit 1c1d7e
  count.  If more than one array share common data, and one array is
Packit 1c1d7e
  modified, all arrays will be modified.
Packit 1c1d7e
Packit 1c1d7e
  The benefit of sharing is that a program does not need to duplicate
Packit 1c1d7e
  data when it is not required, which results in less memory usage and
Packit 1c1d7e
  less copying of data.
Packit 1c1d7e
Packit 1c1d7e
  Example:
Packit 1c1d7e
  \code
Packit 1c1d7e
    #include <qarray.h>
Packit 1c1d7e
    #include <stdio.h>
Packit 1c1d7e
Packit 1c1d7e
    QArray<int> fib( int num )			// returns fibonacci array
Packit 1c1d7e
    {
Packit 1c1d7e
	ASSERT( num > 2 );
Packit 1c1d7e
	QArray<int> f( num );			// array of ints
Packit 1c1d7e
Packit 1c1d7e
        f[0] = f[1] = 1;			// initialize first two numbers
Packit 1c1d7e
	for ( int i=2; i
Packit 1c1d7e
	    f[i] = f[i-1] + f[i-2];	
Packit 1c1d7e
Packit 1c1d7e
	return f;
Packit 1c1d7e
    }
Packit 1c1d7e
Packit 1c1d7e
    void main()
Packit 1c1d7e
    {
Packit 1c1d7e
	QArray<int> a = fib( 6 );		// get 6 first fibonaccis
Packit 1c1d7e
	int i;
Packit 1c1d7e
Packit 1c1d7e
	for ( i=0; i
Packit 1c1d7e
	    prinf( "%d: %d\n", i, a[i] );
Packit 1c1d7e
Packit 1c1d7e
	printf( "1 is found %d time(s)\n", a.contains(1) );
Packit 1c1d7e
	printf( "5 is found at index %d\n", a.find(5) );
Packit 1c1d7e
    }
Packit 1c1d7e
  \endcode
Packit 1c1d7e
Packit 1c1d7e
  Program output:
Packit 1c1d7e
  \code
Packit 1c1d7e
	0: 1
Packit 1c1d7e
	1: 1
Packit 1c1d7e
	2: 2
Packit 1c1d7e
	3: 3
Packit 1c1d7e
	4: 5
Packit 1c1d7e
	5: 8
Packit 1c1d7e
	1 is found 2 times
Packit 1c1d7e
	5 is found at index 4
Packit 1c1d7e
  \endcode
Packit 1c1d7e
Packit 1c1d7e
  Note about using QArray for manipulating structs or classes:
Packit 1c1d7e
  Compilers will often pad the size of structs of odd sizes up to the
Packit 1c1d7e
  nearest word boundary. This will then be the size QArray will use
Packit 1c1d7e
  for its bitwise element comparisons. Since the remaining bytes will
Packit 1c1d7e
  typically be uninitialized, this can cause find() etc. to fail to
Packit 1c1d7e
  find the element. Example:
Packit 1c1d7e
Packit 1c1d7e
  \code
Packit 1c1d7e
    struct MyStruct
Packit 1c1d7e
    {
Packit 1c1d7e
      short i;                    // 2 bytes
Packit 1c1d7e
      char c;                     // 1 byte
Packit 1c1d7e
    };                            // sizeof(MyStruct) may be padded to 4 bytes
Packit 1c1d7e
Packit 1c1d7e
    QArray<MyStruct> a(1);
Packit 1c1d7e
    a[0].i = 5;
Packit 1c1d7e
    a[0].c = 't';
Packit 1c1d7e
Packit 1c1d7e
    MyStruct x;
Packit 1c1d7e
    x.i = '5';
Packit 1c1d7e
    x.c = 't';
Packit 1c1d7e
    int i = a.find( x );          // May return -1 if the pad bytes differ
Packit 1c1d7e
  \endcode
Packit 1c1d7e
Packit 1c1d7e
  To workaround this, make sure that you use a struct where sizeof()
Packit 1c1d7e
  returns the same as the sum of the sizes of the members, either by
Packit 1c1d7e
  changing the types of the struct members or by adding dummy members.
Packit 1c1d7e
Packit 1c1d7e
  \sa \link shclass.html Shared Classes\endlink
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn QArray::QArray()
Packit 1c1d7e
  Constructs a null array.
Packit 1c1d7e
  \sa isNull()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn QArray::QArray( int size )
Packit 1c1d7e
  Constructs an array with room for \e size elements.
Packit 1c1d7e
  Makes a null array if \e size == 0.
Packit 1c1d7e
Packit 1c1d7e
  Note that the elements are not initialized.
Packit 1c1d7e
Packit 1c1d7e
  \sa resize(), isNull()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn QArray::QArray( const QArray<type> &a )
Packit 1c1d7e
  Constructs a shallow copy of \e a.
Packit 1c1d7e
  \sa assign()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn QArray::QArray( int, int )
Packit 1c1d7e
  Constructs an array without allocating array space.
Packit 1c1d7e
  The arguments should be (0, 0). Use at own risk.
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn QArray::~QArray()
Packit 1c1d7e
  Dereferences the array data and deletes it if this was the last
Packit 1c1d7e
  reference.
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn QArray<type> &QArray::operator=( const QArray<type> &a )
Packit 1c1d7e
  Assigns a shallow copy of \e a to this array and returns a reference
Packit 1c1d7e
  to this array.
Packit 1c1d7e
Packit 1c1d7e
  Equivalent to assign( a ).
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn type *QArray::data() const
Packit 1c1d7e
  Returns a pointer to the actual array data.
Packit 1c1d7e
Packit 1c1d7e
  The array is a null array if data() == 0 (null pointer).
Packit 1c1d7e
Packit 1c1d7e
  \sa isNull()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn uint QArray::nrefs() const
Packit 1c1d7e
  Returns the reference count for the shared array data. This reference count
Packit 1c1d7e
  is always greater than zero.
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn uint QArray::size() const
Packit 1c1d7e
  Returns the size of the array (max number of elements).
Packit 1c1d7e
Packit 1c1d7e
  The array is a null array if size() == 0.
Packit 1c1d7e
Packit 1c1d7e
  \sa isNull(), resize()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn uint QArray::count() const
Packit 1c1d7e
  Returns the same as size().
Packit 1c1d7e
Packit 1c1d7e
  \sa size()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn bool QArray::isEmpty() const
Packit 1c1d7e
  Returns TRUE if the array is empty, i.e. size() == 0, otherwise FALSE.
Packit 1c1d7e
Packit 1c1d7e
  isEmpty() is equivalent with isNull() for QArray.  Note that this is not
Packit 1c1d7e
  the case for QCString::isEmpty().
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn bool QArray::isNull() const
Packit 1c1d7e
  Returns TRUE if the array is null, otherwise FALSE.
Packit 1c1d7e
Packit 1c1d7e
  A null array has size() == 0 and data() == 0.
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn bool QArray::resize( uint size )
Packit 1c1d7e
  Resizes (expands or shrinks) the array to \e size elements. The array
Packit 1c1d7e
  becomes a null array if \e size == 0.
Packit 1c1d7e
Packit 1c1d7e
  Returns TRUE if successful, or FALSE if the memory cannot be allocated.
Packit 1c1d7e
Packit 1c1d7e
  New elements will not be initialized.
Packit 1c1d7e
Packit 1c1d7e
  \sa size()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn bool QArray::truncate( uint pos )
Packit 1c1d7e
  Truncates the array at position \e pos.
Packit 1c1d7e
Packit 1c1d7e
  Returns TRUE if successful, or FALSE if the memory cannot be allocated.
Packit 1c1d7e
Packit 1c1d7e
  Equivalent to resize(\e pos).
Packit 1c1d7e
Packit 1c1d7e
  \sa resize()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn bool QArray::fill( const type &v, int size )
Packit 1c1d7e
  Fills the array with the value \e v. If \e size is specified as different
Packit 1c1d7e
  from -1, then the array will be resized before filled.
Packit 1c1d7e
Packit 1c1d7e
  Returns TRUE if successful, or FALSE if the memory cannot be allocated
Packit 1c1d7e
  (only when \e size != -1).
Packit 1c1d7e
Packit 1c1d7e
  \sa resize()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn void QArray::detach()
Packit 1c1d7e
  Detaches this array from shared array data, i.e. makes a private, deep
Packit 1c1d7e
  copy of the data.
Packit 1c1d7e
Packit 1c1d7e
  Copying will only be performed if the
Packit 1c1d7e
  \link nrefs() reference count\endlink is greater than one.
Packit 1c1d7e
Packit 1c1d7e
  \sa copy()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn QArray<type> QArray::copy() const
Packit 1c1d7e
  Returns a deep copy of this array.
Packit 1c1d7e
  \sa detach(), duplicate()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn QArray<type> &QArray::assign( const QArray<type> &a )
Packit 1c1d7e
  Shallow copy. Dereferences the current array and references the data
Packit 1c1d7e
  contained in \e a instead. Returns a reference to this array.
Packit 1c1d7e
  \sa operator=()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn QArray<type> &QArray::assign( const type *data, uint size )
Packit 1c1d7e
  Shallow copy. Dereferences the current array and references the
Packit 1c1d7e
  array data \e data, which contains \e size elements.
Packit 1c1d7e
  Returns a reference to this array.
Packit 1c1d7e
Packit 1c1d7e
  Do not delete \e data later, QArray takes care of that.
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn QArray<type> &QArray::duplicate( const QArray<type> &a )
Packit 1c1d7e
  Deep copy. Dereferences the current array and obtains a copy of the data
Packit 1c1d7e
  contained in \e a instead. Returns a reference to this array.
Packit 1c1d7e
  \sa copy()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn QArray<type> &QArray::duplicate( const type *data, uint size )
Packit 1c1d7e
  Deep copy. Dereferences the current array and obtains a copy of the
Packit 1c1d7e
  array data \e data instead.  Returns a reference to this array.
Packit 1c1d7e
  \sa copy()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn QArray<type> &QArray::setRawData( const type *data, uint size )
Packit 1c1d7e
Packit 1c1d7e
  Sets raw data and returns a reference to the array.
Packit 1c1d7e
Packit 1c1d7e
  Dereferences the current array and sets the new array data to \e data and
Packit 1c1d7e
  the new array size to \e size.  Do not attempt to resize or re-assign the
Packit 1c1d7e
  array data when raw data has been set.
Packit 1c1d7e
  Call resetRawData(d,len) to reset the array.
Packit 1c1d7e
Packit 1c1d7e
  Setting raw data is useful because it sets QArray data without allocating
Packit 1c1d7e
  memory or copying data.
Packit 1c1d7e
Packit 1c1d7e
  Example I (intended use):
Packit 1c1d7e
  \code
Packit 1c1d7e
    static char bindata[] = { 231, 1, 44, ... };
Packit 1c1d7e
    QByteArray	a;
Packit 1c1d7e
    a.setRawData( bindata, sizeof(bindata) );	// a points to bindata
Packit 1c1d7e
    QDataStream s( a, IO_ReadOnly );		// open on a's data
Packit 1c1d7e
    s >> <something>;				// read raw bindata
Packit 1c1d7e
    a.resetRawData( bindata, sizeof(bindata) ); // finished
Packit 1c1d7e
  \endcode
Packit 1c1d7e
Packit 1c1d7e
  Example II (you don't want to do this):
Packit 1c1d7e
  \code
Packit 1c1d7e
    static char bindata[] = { 231, 1, 44, ... };
Packit 1c1d7e
    QByteArray	a, b;
Packit 1c1d7e
    a.setRawData( bindata, sizeof(bindata) );	// a points to bindata
Packit 1c1d7e
    a.resize( 8 );				// will crash
Packit 1c1d7e
    b = a;					// will crash
Packit 1c1d7e
    a[2] = 123;					// might crash
Packit 1c1d7e
      // forget to resetRawData - will crash
Packit 1c1d7e
  \endcode
Packit 1c1d7e
Packit 1c1d7e
  \warning If you do not call resetRawData(), QArray will attempt to
Packit 1c1d7e
  deallocate or reallocate the raw data, which might not be too good.
Packit 1c1d7e
  Be careful.
Packit 1c1d7e
Packit 1c1d7e
  \sa resetRawData()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn void QArray::resetRawData( const type *data, uint size )
Packit 1c1d7e
  Resets raw data that was set using setRawData().
Packit 1c1d7e
Packit 1c1d7e
  The arguments must be the data and length that were passed to
Packit 1c1d7e
  setRawData().	 This is for consistency checking.
Packit 1c1d7e
Packit 1c1d7e
  \sa setRawData()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn int QArray::find( const type &v, uint index ) const
Packit 1c1d7e
  Finds the first occurrence of \e v, starting at position \e index.
Packit 1c1d7e
Packit 1c1d7e
  Returns the position of \e v, or -1 if \e v could not be found.
Packit 1c1d7e
Packit 1c1d7e
  \sa contains()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn int QArray::contains( const type &v ) const
Packit 1c1d7e
  Returns the number of times \e v occurs in the array.
Packit 1c1d7e
  \sa find()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn void QArray::sort()
Packit 1c1d7e
  Sorts the array elements in ascending order, using bitwise
Packit 1c1d7e
  comparison (memcmp()).
Packit 1c1d7e
Packit 1c1d7e
  \sa bsearch()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn int QArray::bsearch( const type &v ) const
Packit 1c1d7e
  In a sorted array, finds the first occurrence of \e v using binary
Packit 1c1d7e
  search. For a sorted array, this is generally much faster than
Packit 1c1d7e
  find(), which does a linear search.
Packit 1c1d7e
Packit 1c1d7e
  Returns the position of \e v, or -1 if \e v could not be found.
Packit 1c1d7e
Packit 1c1d7e
  \sa sort(), find()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn type &QArray::operator[]( int index ) const
Packit 1c1d7e
  Returns a reference to the element at position \e index in the array.
Packit 1c1d7e
Packit 1c1d7e
  This can be used to both read and set an element.  Equivalent to at().
Packit 1c1d7e
Packit 1c1d7e
  \sa at()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn type &QArray::at( uint index ) const
Packit 1c1d7e
  Returns a reference to the element at position \e index in the array.
Packit 1c1d7e
Packit 1c1d7e
  This can be used to both read and set an element.
Packit 1c1d7e
Packit 1c1d7e
  \sa operator[]()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn QArray::operator const type *() const
Packit 1c1d7e
  Cast operator.  Returns a pointer to the array.
Packit 1c1d7e
  \sa data()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn bool QArray::operator==( const QArray<type> &a ) const
Packit 1c1d7e
  Returns TRUE if this array is equal to \e a, otherwise FALSE.
Packit 1c1d7e
Packit 1c1d7e
  The two arrays are bitwise compared.
Packit 1c1d7e
Packit 1c1d7e
  \sa operator!=()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn bool QArray::operator!=( const QArray<type> &a ) const
Packit 1c1d7e
  Returns TRUE if this array is different from \e a, otherwise FALSE.
Packit 1c1d7e
Packit 1c1d7e
  The two arrays are bitwise compared.
Packit 1c1d7e
Packit 1c1d7e
  \sa operator==()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn Iterator QArray::begin()
Packit 1c1d7e
  Returns an iterator pointing at the beginning of this array.
Packit 1c1d7e
  This iterator can be used as the iterators of QValueList and QMap
Packit 1c1d7e
  for example. In fact it does not only behave like a usual pointer:
Packit 1c1d7e
  It is a pointer.
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn Iterator QArray::end()
Packit 1c1d7e
  Returns an iterator pointing behind the last element of this array.
Packit 1c1d7e
  This iterator can be used as the iterators of QValueList and QMap
Packit 1c1d7e
  for example. In fact it does not only behave like a usual pointer:
Packit 1c1d7e
  It is a pointer.
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn ConstIterator QArray::begin() const
Packit 1c1d7e
  Returns a const iterator pointing at the beginning of this array.
Packit 1c1d7e
  This iterator can be used as the iterators of QValueList and QMap
Packit 1c1d7e
  for example. In fact it does not only behave like a usual pointer:
Packit 1c1d7e
  It is a pointer.
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \fn ConstIterator QArray::end() const
Packit 1c1d7e
  Returns a const iterator pointing behind the last element of this array.
Packit 1c1d7e
  This iterator can be used as the iterators of QValueList and QMap
Packit 1c1d7e
  for example. In fact it does not only behave like a usual pointer:
Packit 1c1d7e
  It is a pointer.
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
Packit 1c1d7e
/*****************************************************************************
Packit 1c1d7e
  QByteArray documentation
Packit 1c1d7e
 *****************************************************************************/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \class QByteArray qcstring.h
Packit 1c1d7e
  \brief The QByteArray class provides an array of bytes.
Packit 1c1d7e
Packit 1c1d7e
  \inherit QArray
Packit 1c1d7e
Packit 1c1d7e
  \ingroup tools
Packit 1c1d7e
Packit 1c1d7e
  The QByteArray class provides an explicitly shared array of
Packit 1c1d7e
  bytes. It is useful for manipulating memory areas with custom
Packit 1c1d7e
  data. QByteArray is implemented as QArray<char>. See the QArray
Packit 1c1d7e
  documentation for further information.
Packit 1c1d7e
*/