MAttributePatternArray Class Reference
#include <MAttributePatternArray.h>
Indexable Array of attribute patterns.
Provides methods for manipulating arrays of attribute patterns.
Arrays of attribute patterns are used when constructing pattern lists from a string or file description. Since there's no way of knowing in advance how many will be created from a given description this general purpose array was needed.
The length of the array adjusts automatically.
Class Constructor.
Creates an attribute pattern Array
Copy Constructor.
- Parameters
-
[in] | other | the array with which to initialize this instance |
Create a new array of MAttributePatterns of a specified size and initialize all the elements with the given initial value.
- Parameters
-
[in] | initialSize | the initial size of the array |
[in] | initialValue | the initial value of each element |
Class Destructor.
No additional action.
Retrieves the read-only attribute pattern which is at the specified index in the array.
- Parameters
-
[in] | index | Zero-based index to the array |
- Returns
- Attribute pattern at the specified index
Assignment operator copies all of the elements of the other array into this one.
If the other array was returned as a reference to internal data then this array will also become a reference rather than doing a full copy.
- Parameters
-
[in] | other | the array being copied |
- Returns
- A reference to this array
Sets an element of the array to the given attribute pattern.
- Parameters
-
[in] | element | New attribute pattern to be set on the indicated element |
[in] | index | Zero-based index to the array |
- Returns
- MS::kSuccess on success, otherwise MS::kFailure
MStatus 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 |
unsigned int length |
( |
| ) |
const |
Determines the number of elements in the array.
- Returns
- Number of elements in the array
MStatus remove |
( |
unsigned int |
index | ) |
|
Removes the attribute pattern which is at the specified index in the array.
- Parameters
-
[in] | index | Zero-based index to the array |
- Returns
- MS::kSuccess on success, otherwise MS::kFailure
Inserts the given attribute pattern at the specified index in the array.
- Parameters
-
[in] | element | attribute pattern to be inserted |
[in] | index | Zero-based index to the array |
- Returns
- MS::kSuccess on success, otherwise MS::kFailure
Appends the given attribute pattern to the end of the array.
- Parameters
-
[in] | element | attribute pattern to be appended |
- Returns
- MS::kSuccess on success, otherwise MS::kFailure
Copy the contents of the source array to this array.
- Parameters
-
[in] | source | array to copy from |
- Returns
- MS::kSuccess if the copy was successful and MS::kFailure otherwise
void 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 sizeIncrement |
( |
| ) |
const |
Return the size by which the array will be expanded whenever expansion is necessary.
- Returns
- The size increment.
Retrieves the attribute pattern which is at the specified index in the array.
- Parameters
-
[in] | index | Zero-based index to the array |
- Returns
- Attribute pattern at the specified index
const char * className |
( |
| ) |
|
|
static |
Returns the name of this class.
- Returns
- The name of this class.
NO SCRIPT SUPPORT.
The format used is [name, name, name, ... name].
- Parameters
-
- Returns
- The ostream reference, s, provided as the first parameter.
The documentation for this class was generated from the following files:
- MAttributePatternArray.h
- MAttributePatternArray.cpp