|
Array< PEGASUS_ARRAY_T > Class Template Reference#include <ArrayInter.h>
List of all members.
|
Public Member Functions |
| Array () |
| Array (const Array< PEGASUS_ARRAY_T > &x) |
| Array (Uint32 size) |
| Array (Uint32 size, const PEGASUS_ARRAY_T &x) |
| Array (const PEGASUS_ARRAY_T *items, Uint32 size) |
| ~Array () |
Array< PEGASUS_ARRAY_T > & | operator= (const Array< PEGASUS_ARRAY_T > &x) |
void | clear () |
void | reserveCapacity (Uint32 capacity) |
void | grow (Uint32 size, const PEGASUS_ARRAY_T &x) |
void | swap (Array< PEGASUS_ARRAY_T > &x) |
Uint32 | size () const |
Uint32 | getCapacity () const |
const PEGASUS_ARRAY_T * | getData () const |
PEGASUS_ARRAY_T & | operator[] (Uint32 index) |
const PEGASUS_ARRAY_T & | operator[] (Uint32 index) const |
void | append (const PEGASUS_ARRAY_T &x) |
void | append (const PEGASUS_ARRAY_T *x, Uint32 size) |
void | appendArray (const Array< PEGASUS_ARRAY_T > &x) |
void | prepend (const PEGASUS_ARRAY_T &x) |
void | prepend (const PEGASUS_ARRAY_T *x, Uint32 size) |
void | insert (Uint32 index, const PEGASUS_ARRAY_T &x) |
void | insert (Uint32 index, const PEGASUS_ARRAY_T *x, Uint32 size) |
void | remove (Uint32 index) |
void | remove (Uint32 index, Uint32 size) |
Detailed Description
template<class PEGASUS_ARRAY_T>
class Array< PEGASUS_ARRAY_T >
This class is used to represent arrays of intrinsic data types in CIM.
Constructor & Destructor Documentation
template<class PEGASUS_ARRAY_T>
Constructs an array object with null values (default constructor).
template<class PEGASUS_ARRAY_T>
Creates a new Array object using the parameters and values in the Array object. - Parameters:
-
| x | Specifies the new Array object name. |
template<class PEGASUS_ARRAY_T>
Constructs an array with size elements. The elements are initialized with their copy constructor. - Parameters:
-
| size | Defines the number of elements. |
template<class PEGASUS_ARRAY_T>
Array< PEGASUS_ARRAY_T >::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. |
template<class PEGASUS_ARRAY_T>
Array< PEGASUS_ARRAY_T >::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. |
template<class PEGASUS_ARRAY_T>
Destroys the objects, freeing any resources.
Member Function Documentation
template<class PEGASUS_ARRAY_T>
void Array< PEGASUS_ARRAY_T >::append |
( |
const PEGASUS_ARRAY_T * |
x, |
|
|
Uint32 |
size | |
|
) |
| | |
Appends size elements at x to the end of this array. - Parameters:
-
| x | Pointer to a buffer containing the elements to append. |
| size | A Uint32 value specifying the number of elements to append. |
template<class PEGASUS_ARRAY_T>
void Array< PEGASUS_ARRAY_T >::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:
-
template<class PEGASUS_ARRAY_T>
void Array< PEGASUS_ARRAY_T >::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. |
template<class PEGASUS_ARRAY_T>
void Array< PEGASUS_ARRAY_T >::clear |
( |
|
) |
|
Clears the contents of the array. After calling this, size() returns zero.
template<class PEGASUS_ARRAY_T>
Uint32 Array< PEGASUS_ARRAY_T >::getCapacity |
( |
|
) |
const |
Returns the capacity of the array. - Returns:
- The capacity of the array.
template<class PEGASUS_ARRAY_T>
const PEGASUS_ARRAY_T* Array< 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.
template<class PEGASUS_ARRAY_T>
void Array< PEGASUS_ARRAY_T >::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. |
| x | The element value with which to initialize the new elements. |
template<class PEGASUS_ARRAY_T>
void Array< PEGASUS_ARRAY_T >::insert |
( |
Uint32 |
index, |
|
|
const PEGASUS_ARRAY_T * |
x, |
|
|
Uint32 |
size | |
|
) |
| | |
Inserts a specified number of elements from a buffer into the array at a given index. Subsequent elements are moved down. The size of the array grows by the specified number of elements. - Parameters:
-
| index | The index at which to insert the elements into the array. |
| x | Pointer to a buffer containing the elements to insert. |
| size | A Uint32 value specifying the number of elements to insert. |
template<class PEGASUS_ARRAY_T>
void Array< PEGASUS_ARRAY_T >::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:
-
| index | The index at which to insert the element into the array. |
| x | Specifies the element to add to the array. |
template<class PEGASUS_ARRAY_T>
Array<PEGASUS_ARRAY_T>& Array< PEGASUS_ARRAY_T >::operator= |
( |
const Array< PEGASUS_ARRAY_T > & |
x |
) |
|
The values of one array object are assigned to another (assignment operator). - Parameters:
-
template<class PEGASUS_ARRAY_T>
const PEGASUS_ARRAY_T& Array< 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.
template<class PEGASUS_ARRAY_T>
PEGASUS_ARRAY_T& Array< PEGASUS_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.
template<class PEGASUS_ARRAY_T>
void Array< PEGASUS_ARRAY_T >::prepend |
( |
const PEGASUS_ARRAY_T * |
x, |
|
|
Uint32 |
size | |
|
) |
| | |
Prepends a specified number of elements from a buffer to the array. - Parameters:
-
| x | Pointer to a buffer containing the elements to prepend. |
| size | A Uint32 value specifying the number of elements to prepend. |
template<class PEGASUS_ARRAY_T>
void Array< PEGASUS_ARRAY_T >::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 prepend. |
template<class PEGASUS_ARRAY_T>
void Array< PEGASUS_ARRAY_T >::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. |
template<class PEGASUS_ARRAY_T>
void Array< PEGASUS_ARRAY_T >::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. |
template<class PEGASUS_ARRAY_T>
void Array< PEGASUS_ARRAY_T >::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 |
template<class PEGASUS_ARRAY_T>
Uint32 Array< PEGASUS_ARRAY_T >::size |
( |
|
) |
const |
Returns the number of elements in the array. - Returns:
- The number of elements in the array.
template<class PEGASUS_ARRAY_T>
void Array< PEGASUS_ARRAY_T >::swap |
( |
Array< PEGASUS_ARRAY_T > & |
x |
) |
|
Swaps the contents of two arrays. After the swap, Array x references the original values of this Array object and this Array object references the original values of Array x. - Parameters:
-
| x | The Array with which to swap values. |
The documentation for this class was generated from the following file:
- /scratch/rpmbuild.5425.Bj5455/pegasus/src/Pegasus/Common/ArrayInter.h
|