Skip to content

Latest commit

 

History

History
82 lines (59 loc) · 5.48 KB

cdwordarray-class.md

File metadata and controls

82 lines (59 loc) · 5.48 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: CDWordArray Class
CDWordArray Class
11/04/2016
CDWordArray
AFXCOLL/CDWordArray
AFXCOLL/CDWordArray::CDWordArray
AFXCOLL/CDWordArray::Add
AFXCOLL/CDWordArray::Append
AFXCOLL/CDWordArray::Copy
AFXCOLL/CDWordArray::ElementAt
AFXCOLL/CDWordArray::FreeExtra
AFXCOLL/CDWordArray::GetAt
AFXCOLL/CDWordArray::GetCount
AFXCOLL/CDWordArray::GetData
AFXCOLL/CDWordArray::GetSize
AFXCOLL/CDWordArray::GetUpperBound
AFXCOLL/CDWordArray::InsertAt
AFXCOLL/CDWordArray::IsEmpty
AFXCOLL/CDWordArray::RemoveAll
AFXCOLL/CDWordArray::RemoveAt
AFXCOLL/CDWordArray::SetAt
AFXCOLL/CDWordArray::SetAtGrow
AFXCOLL/CDWordArray::SetSize
CDWordArray [MFC], CDWordArray
CDWordArray [MFC], Add
CDWordArray [MFC], Append
CDWordArray [MFC], Copy
CDWordArray [MFC], ElementAt
CDWordArray [MFC], FreeExtra
CDWordArray [MFC], GetAt
CDWordArray [MFC], GetCount
CDWordArray [MFC], GetData
CDWordArray [MFC], GetSize
CDWordArray [MFC], GetUpperBound
CDWordArray [MFC], InsertAt
CDWordArray [MFC], IsEmpty
CDWordArray [MFC], RemoveAll
CDWordArray [MFC], RemoveAt
CDWordArray [MFC], SetAt
CDWordArray [MFC], SetAtGrow
CDWordArray [MFC], SetSize
581be11e-ced6-47d1-8679-e0b8e7d99494

CDWordArray Class

Supports arrays of 32-bit doublewords.

Syntax

class CDWordArray : public CObject

Members

The member functions of CDWordArray 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 DWORD.

CObject* CObArray::GetAt( int <nIndex> ) const;

for example, translates to

DWORD CDWordArray::GetAt( int <nIndex> ) const;

Public Constructors

Name Description
CDWordArray::CDWordArray Constructs an empty array.

Public Methods

Name Description
CDWordArray::Add Adds an element to the end of the array; grows the array if necessary.
CDWordArray::Append Appends another array to the array; grows the array if necessary.
CDWordArray::Copy Copies another array to the array; grows the array if necessary.
CDWordArray::ElementAt Returns a temporary reference to the byte within the array.
CDWordArray::FreeExtra Frees all unused memory above the current upper bound.
CDWordArray::GetAt Returns the value at a given index.
CDWordArray::GetCount Gets the number of elements in this array.
CDWordArray::GetData Allows access to elements in the array. Can be NULL.
CDWordArray::GetSize Gets the number of elements in this array.
CDWordArray::GetUpperBound Returns the largest valid index.
CDWordArray::InsertAt Inserts an element (or all the elements in another array) at a specified index.
CDWordArray::IsEmpty Determines if the array is empty.
CDWordArray::RemoveAll Removes all the elements from this array.
CDWordArray::RemoveAt Removes an element at a specific index.
CDWordArray::SetAt Sets the value for a given index; array not allowed to grow.
CDWordArray::SetAtGrow Sets the value for a given index; grows the array if necessary.
CDWordArray::SetSize Sets the number of elements to be contained in this array.

Public Operators

Name Description
CDWordArray::operator [ ] Sets or gets the element at the specified index.

Remarks

CDWordArray incorporates the IMPLEMENT_SERIAL macro to support serialization and dumping of its elements. If an array of doublewords is stored to an archive, either with the overloaded insertion ( <<) operator or with the Serialize member function, each element is, in turn, serialized.

Note

Before using an array, use SetSize to establish its size and allocate memory for it. If you do not use SetSize, adding elements to your array causes it to be frequently reallocated and copied. Frequent reallocation and copying are inefficient and can fragment memory.

If you need debug output from individual elements in the array, you must set the depth of the CDumpContext object to 1 or greater.

For more information on using CDWordArray, see the article Collections.

Requirements

Header: afxcoll.h

See also

CObject Class
Hierarchy Chart
CObArray Class