#include
<MAttributeSpecArray.h>
List of all
members.
Detailed Description
An attribute specification array.
Array class for MAttributeSpec.
See MAttributeSpec for more
information.
Constructor & Destructor Documentation
MAttributeSpecArray::MAttributeSpecArray |
( |
|
) |
|
Default constructor. The array is set to contain no
elements.
Copy Constructor.
- Parameters:
-
[in] |
other |
the array with which to initialize this array |
MAttributeSpecArray::~MAttributeSpecArray |
( |
|
) |
|
Member Function Documentation
MAttributeSpec
MAttributeSpecArray::operator[] |
( |
unsigned int |
index |
) |
const |
Index operator. Returns the value of the element at the given
index. Valid indices are 0 to
length()-1.
- Parameters:
-
[in] |
index |
the index of the element to return |
- Returns:
- A reference to the specified element
Assignment operator.
- Parameters:
-
[in] |
other |
The source object to assign from. |
- Returns:
- A reference to the copied MAttributeSpecArray
object.
Sets the value of the specified element to the given attribute
spec.
- Parameters:
-
[in] |
element |
the new value for the specified element |
[in] |
index |
the index of the element to be set |
- Returns:
-
MStatus
MAttributeSpecArray::setLength |
( |
unsigned int |
length |
) |
|
Set the length of the array. This will grow and shrink the array
as desired. Elements that are grown have uninitialized values,
while those which are shrunk will lose the data contained in the
deleted elements (ie. it will release the memory).
- Parameters:
-
[in] |
length |
the new size of the array |
- Returns:
-
unsigned int MAttributeSpecArray::length |
( |
|
) |
const |
Returns the number of elements in the array.
- Returns:
- The number of elements in the array
MStatus MAttributeSpecArray::remove |
( |
unsigned int |
index |
) |
|
Removes the element in the array at the given index.
- Parameters:
-
[in] |
index |
the index of the element to removed |
- Returns:
-
Inserts a new value into the array at the given index. The
initial element at that index, and all following elements, are
shifted towards the last.
- Parameters:
-
[in] |
element |
the new value to insert into the array |
[in] |
index |
the index of the element to set |
- Returns:
-
Adds a new element to the end of the array.
- Parameters:
-
[in] |
element |
the value for the new last element |
- Returns:
-
MStatus MAttributeSpecArray::clear |
( |
|
) |
|
Clear the contents of the array. After this operation the length
method will return 0. This does not change the amount of memory
allocated to the array, only the number of valid elements in
it.
- Returns:
-
void MAttributeSpecArray::setSizeIncrement |
( |
unsigned int |
newIncrement |
) |
|
Set the size by which the array will be expanded whenever
expansion is necessary.
- Parameters:
-
[in] |
newIncrement |
the new increment |
unsigned int
MAttributeSpecArray::sizeIncrement |
( |
|
) |
const |
Return the size by which the array will be expanded whenever
expansion is necessary.
- Returns:
- true if the array argument is a non-zero pointer and false
otherwise