Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
class CByteArray
CObject                                     Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  Description
 
  The CByteArray class supports dynamic arrays of bytes.
 
  The member functions of CByteArray are similar to the member functions
  of class CObArray. Because of this similarity, you can use the
  CObArray reference documentation for member function specifics. Wherever
  you see a CObject pointer as a function parameter or return value,
  substitute a BYTE.
 
  CObject* CObArray::GetAt( int <nIndex> ) const;
 
  for example, translates to
 
  BYTE CByteArray::GetAt( int <nIndex> ) const;
 
  CByteArray incorporates the IMPLEMENT_SERIAL macro to support
  serialization and dumping of its elements. If an array of bytes is
  stored to an archive, either with the overloaded insertion operator or
  with the Serialize member function, each element is, in turn,
  serialized.
 
  If you need debug output from individual elements in the array, you must
  set the depth of the CDumpContext object to 1 or greater.
 
  #include <afxcoll.h>
 
  See Also
 
  CObArray
 
  Public Members
 
  Construction/Destruction
 
  CByteArray   Constructs an empty array for bytes.
 
  ~CByteArray   Destroys a CByteArray object.
 
  Bounds
 
  GetSize         Gets number of elements in this array.
 
  GetUpperBound   Returns the largest valid index.
 
  SetSize         Sets the number of elements to be contained in this
                    array.
 
  Operations
 
  FreeExtra   Frees all unused memory above the current upper bound.
 
  RemoveAll   Removes all the elements from this array.
 
  Element Access
 
  GetAt       Returns the value at a given index.
 
  SetAt       Sets the value for a given index; array not allowed to
                grow.
 
  ElementAt   Returns a temporary reference to the byte within the
                array.
 
  Growing the Array
 
  SetAtGrow   Sets the value for a given index; grows the array if
                necessary.
 
  Add         Adds an element to the end of the array; grows the array
                if necessary.
 
  Insertion/Removal
 
  InsertAt   Inserts an element  (or all the elements in another array)
               at a specified index.
 
  RemoveAt   Removes an element at a specific index.
 
  Operators
 
  operator []   Sets or gets the element at the specified index.
 
 
                                     -♦-