Detailed Description
The CColorArray is a one-dimensional, zero-based array of CColor objects.
- See also:
- CColor
#include <xsi_color.h>
List of all members.
Constructor & Destructor Documentation
Constructs a CColorArray and optionally initializes the array to a specified size.
- Parameters:
-
in_size | Size of array. The default size is 0. |
Member Function Documentation
Returns the number of items in this CColorArray.
- Returns:
- The number of items in the array
Adds a CColor to the end of this array.
- Parameters:
-
in_item | New CColor to add to the array. |
- Returns:
- CStatus::OK if successful.
Removes all elements from the array.
- Returns:
- CStatus::OK if successful.
Reallocates memory for the array, and preserves the existing contents if the new size is larger than the current size.
- Parameters:
-
in_size | New size of the array. |
- Returns:
- CStatus::OK if successful.
-
CStatus::InvalidArgument if in_size < 0.
const CColor& operator[] |
( |
LONG |
in_index | ) |
const |
Returns the array element at a given index. This function can only be called by constant objects, and the returned value is read-only.
- Parameters:
-
in_index | The index of the element to get. The index must be greater than or equal to zero, and less than the number of elements in the array, otherwise the results are unpredictable. |
- Returns:
- A read-only reference to the indexed item.
CColor& operator[] |
( |
LONG |
in_index | ) |
|
Returns an array element at the specified index.
- Parameters:
-
in_index | The index of the element to get. The index must be greater than or equal to zero, and less than the number of elements in the array, otherwise the results are unpredictable. |
- Returns:
- A reference to the indexed item.
Tests if two CColorArray objects are equal.
- Parameters:
-
- Returns:
- True if
in_array
has the same size as this array and the elements of in_array
are equal to the corresponding elements in this array.
Tests if two CColorArray objects are different.
- Parameters:
-
- Returns:
- True if at least one element is different, or if the arrays have different sizes.
The documentation for this class was generated from the following file: