In file ../../src/Pegasus/Common/ArrayInter.h:

template<class PEGASUS_ARRAY_T> class Array PEGASUS_TEMPLATE_SPECIALIZATION class PEGASUS_COMMON_LINKAGE Array

This class is used to represent arrays of intrinsic data types in CIM.

Documentation

This class is used to represent arrays of intrinsic data types in CIM.

Inheritance:


Public Methods

[more] Array ()
Constructs an array object with null values (default constructor)
[more] Array (const Array<PEGASUS_ARRAY_T>& x)
Creates a new Array object using the parameters and values in the Array object.
[more] Array (Uint32 size)
Constructs an array with size elements.
[more] Array (Uint32 size, const PEGASUS_ARRAY_T& x)
Constructs an array with size elements.
[more] Array (const PEGASUS_ARRAY_T* items, Uint32 size)
Constructs an array with size elements.
[more] ~Array ()
Destroys the objects, freeing any resources
[more]Array<PEGASUS_ARRAY_T> & operator= (const Array<PEGASUS_ARRAY_T>& x)
The values of one array object are assigned to another (assignment operator).
[more]void clear ()
Clears the contents of the array.
[more]void reserveCapacity (Uint32 capacity)
Reserves memory for capacity elements.
[more]void grow (Uint32 size, const PEGASUS_ARRAY_T& x)
Make the size of the array grow by size elements.
[more]void swap (Array<PEGASUS_ARRAY_T>& x)
Swaps the contents of two arrays.
[more]Uint32 size () const
Returns the number of elements in the array.
[more]Uint32 getCapacity () const
Returns the capacity of the array.
[more]const PEGASUS_ARRAY_T* getData () const
Returns a pointer to the first element of the array.
[more]PEGASUS_ARRAY_T& operator[] (Uint32 index)
Returns the element indicated by the index argument.
[more]const PEGASUS_ARRAY_T& operator[] (Uint32 index) const
Returns the element in the const array specified as the index argument.
[more]void append (const PEGASUS_ARRAY_T& x)
Appends an element to the end of the array.
[more]void append (const PEGASUS_ARRAY_T* x, Uint32 size)
Appends size elements at x to the end of this array.
[more]void appendArray (const Array<PEGASUS_ARRAY_T>& x)
Appends one array to another.
[more]void prepend (const PEGASUS_ARRAY_T& x)
Appends one element to the beginning of the array.
[more]void prepend (const PEGASUS_ARRAY_T* x, Uint32 size)
Appends size elements to the array starting at the memory address given by x.
[more]void insert (Uint32 index, const PEGASUS_ARRAY_T& x)
Inserts the element at the given index in the array.
[more]void insert (Uint32 index, const PEGASUS_ARRAY_T* x, Uint32 size)
Inserts size elements at x into the array at the given index.
[more]void remove (Uint32 index)
Removes the element at the given index from the array.
[more]void remove (Uint32 index, Uint32 size)
Removes size elements starting at the given index.

o Array()
Constructs an array object with null values (default constructor)

o Array(const Array<PEGASUS_ARRAY_T>& x)
Creates a new Array object using the parameters and values in the Array object.
Parameters:
x - Specifies the new Array object name.

o Array(Uint32 size)
Constructs an array with size elements. The elements are initialized with their copy constructor.
Parameters:
- size Defines the number of elements.

o Array(Uint32 size, const PEGASUS_ARRAY_T& x)
Constructs an array with size elements. The elements are initialized with array x.
Parameters:
- size Defines the number of elements.
x - Specifies the new array object name.

o Array(const PEGASUS_ARRAY_T* items, Uint32 size)
Constructs an array with size elements. The values come from the items pointer.
Parameters:
items - References the values of the specified array.
- size Uint32 representing how many elements are in the array.

o ~Array()
Destroys the objects, freeing any resources

oArray<PEGASUS_ARRAY_T> & operator=(const Array<PEGASUS_ARRAY_T>& x)
The values of one array object are assigned to another (assignment operator).
Parameters:
x - Array object to assign the Array parameters to.

ovoid clear()
Clears the contents of the array. After calling this, size() returns zero.

ovoid reserveCapacity(Uint32 capacity)
Reserves memory for capacity elements. Notice that this does not change the size of the array (size() returns what it did before). If the capacity of the array is already greater or equal to the capacity argument, this method has no effect. After calling reserveCapacity(), getCapacity() returns a value which is greater or equal to the capacity argument.
Parameters:
capacity - Defines the size that is to be reserved

ovoid grow(Uint32 size, const PEGASUS_ARRAY_T& x)
Make the size of the array grow by size elements. The new size will be size() + size. The new elements (there are size of them) are initialized with x.
Parameters:
- size Defines the number of elements by which the array is to grow.

ovoid swap(Array<PEGASUS_ARRAY_T>& x)
Swaps the contents of two arrays. Array x references the original values in the Array object (y) and the values of the Array object (y) reference the original values of Array x.

oUint32 size() const
Returns the number of elements in the array.
Returns:
The number of elements in the array.

oUint32 getCapacity() const
Returns the capacity of the array.
Returns:
The capacity of the array.

oconst PEGASUS_ARRAY_T* getData() const
Returns a pointer to the first element of the array.
Returns:
A pointer to the first element of the array.

oPEGASUS_ARRAY_T& operator[](Uint32 index)
Returns the element indicated by the index argument.
Returns:
A reference to the element defined by index so that it may be modified.

oconst PEGASUS_ARRAY_T& operator[](Uint32 index) const
Returns the element in the const array specified as the index argument. The return value cannot be modified since it is constant.
Returns:
A reference to the element defined by index but the reference cannot be modified.

ovoid append(const PEGASUS_ARRAY_T& x)
Appends an element to the end of the array. This increases the size of the array by one.
Parameters:
x - Element to append.

ovoid append(const PEGASUS_ARRAY_T* x, Uint32 size)
Appends size elements at x to the end of this array.
Parameters:
- size Uint32 value to append to the size of the array.

ovoid appendArray(const Array<PEGASUS_ARRAY_T>& x)
Appends one array to another. The size of this array grows by the size of the other.
Parameters:
x - Array to add to the appended array.

ovoid prepend(const PEGASUS_ARRAY_T& x)
Appends one element to the beginning of the array. This increases the size by one.
Parameters:
x - The element to pre pend.

ovoid prepend(const PEGASUS_ARRAY_T* x, Uint32 size)
Appends size elements to the array starting at the memory address given by x. The array grows by size elements.
Parameters:
- size Uint32 size to add to the array at address x.
x - Specifies where to begin increasing size elements of the array.

ovoid insert(Uint32 index, const PEGASUS_ARRAY_T& x)
Inserts the element at the given index in the array. Subsequent elements are moved down. The size of the array grows by one.
Parameters:
x - Specifies the element to add to the array.

ovoid insert(Uint32 index, const PEGASUS_ARRAY_T* x, Uint32 size)
Inserts size elements at x into the array at the given index. Subsequent elements are moved down. The size of the array grows by size elements.
Parameters:
x - Specifies where to begin adding elements in the array.
- size Uint32 size to add to the array starting at element x.

ovoid remove(Uint32 index)
Removes the element at the given index from the array. The size of the array shrinks by one.
Parameters:
index - Specifies the array element to remove.

ovoid remove(Uint32 index, Uint32 size)
Removes size elements starting at the given index. The size of the array shrinks by size elements.
Parameters:
index - Specifies where in the array to begin removing elements.
- size Uint32 size that specifies how many elements to remove from the array.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java