Public Member Functions
CBoolArray Class Reference

Detailed Description

The CBoolArray is an uni-dimensional array of bool values.

The array is zero-based, which means that the first item index is 0 and the larger index is one less that the number of elements contained in the array.

See also:
CEdgeRefArray::GetIsHardArray

#include <xsi_boolarray.h>

List of all members.

Public Member Functions

 CBoolArray (LONG in_size=0)
 CBoolArray (const CBoolArray &in_array)
 ~CBoolArray ()
CBoolArrayoperator= (const CBoolArray &in_array)
LONG GetCount () const
CStatus Add (const bool &in_item)
CStatus Clear ()
CStatus Resize (LONG in_size)
const bool & operator[] (LONG in_index) const
bool & operator[] (LONG in_index)
bool operator== (const CBoolArray &in_array) const
bool operator!= (const CBoolArray &in_array) const

Constructor & Destructor Documentation

CBoolArray ( LONG  in_size = 0)

Constructs a CBoolArray and optionally initializes the array to a known size.

Parameters:
in_sizeSize of array, defaults to 0.
CBoolArray ( const CBoolArray in_array)

Constructs a CBoolArray object from another CBoolArray object.

Parameters:
in_arrayconstant CBoolArray object.
~CBoolArray ( )

Default destructor.


Member Function Documentation

CBoolArray& operator= ( const CBoolArray in_array)

Assignment operator.

Parameters:
in_arrayconstant class object.
Returns:
A reference to this array.
LONG GetCount ( ) const

Returns the number of items in this CBoolArray

Returns:
The number of items in the array.
CStatus Add ( const bool &  in_item)

Adds a bool to the end of this array.

Parameters:
in_itemNew item to be added at the end of the array.
Returns:
CStatus::OK success
CStatus Clear ( )

Erases all elements contained in the array.

Returns:
CStatus::OK success
CStatus Resize ( LONG  in_size)

Reallocates memory for the array, preserves its contents if new new size is larger than existing size.

Parameters:
in_sizeNew size of the array.
Returns:
CStatus::OK success
CStatus::InvalidArgument in_size < 0
const bool& operator[] ( LONG  in_index) const

Accessor to elements at a given index. This function can only be called by constant objects, the returned value is read-only.

Parameters:
in_indexIndex in this zero based array. The index must be smaller than the number of elements in the array, otherwise the results are unpredicted.
Returns:
A read-only reference to the indexed item.
bool& operator[] ( LONG  in_index)

Accessor to elements at a given index.

Parameters:
in_indexIndex in this zero based array. The index must be smaller than the number of elements in the array, otherwise the results are unpredicted.
Returns:
A reference to the indexed item.
bool operator== ( const CBoolArray in_array) const

Equality operator.

Parameters:
in_arrayCBoolArray to compare with.
Returns:
True if in_array contains the same number of elements as this array and that all members of in_array are equal to the corresponding one contained in this array.
bool operator!= ( const CBoolArray in_array) const

Inequality operator.

Parameters:
in_arrayCBoolArray to compare with.
Returns:
True if one member of in_array is different of the corresponding members in this array or if the arrays are not of the same size.

The documentation for this class was generated from the following file: