C++ API Reference
|
Indexable Array of attribute patterns. More...
#include <MAttributePatternArray.h>
Public Member Functions | |
MAttributePatternArray () | |
Class Constructor. More... | |
MAttributePatternArray (const MAttributePatternArray &other) | |
Copy Constructor. More... | |
MAttributePatternArray (unsigned int initializeSize, const MAttributePattern &initialValue) | |
Create a new array of MAttributePatterns of a specified size and initialize all the elements with the given initial value. More... | |
~MAttributePatternArray () | |
Class Destructor. More... | |
const MAttributePattern & | operator[] (unsigned int index) const |
Retrieves the read-only attribute pattern which is at the specified index in the array. More... | |
MAttributePatternArray & | operator= (const MAttributePatternArray &rhs) |
Assignment operator copies all of the elements of the other array into this one. More... | |
MStatus | set (const MAttributePattern &element, unsigned int index) |
Sets an element of the array to the given attribute pattern. More... | |
MStatus | setLength (unsigned int length) |
Set the length of the array. More... | |
unsigned int | length () const |
Determines the number of elements in the array. More... | |
MStatus | remove (unsigned int index) |
Removes the attribute pattern which is at the specified index in the array. More... | |
MStatus | insert (const MAttributePattern &element, unsigned int index) |
Inserts the given attribute pattern at the specified index in the array. More... | |
MStatus | append (const MAttributePattern &element) |
Appends the given attribute pattern to the end of the array. More... | |
MStatus | copy (const MAttributePatternArray &source) |
Copy the contents of the source array to this array. More... | |
MStatus | clear () |
Clears this array. More... | |
void | setSizeIncrement (unsigned int newIncrement) |
Set the size by which the array will be expanded whenever expansion is necessary. More... | |
unsigned int | sizeIncrement () const |
Return the size by which the array will be expanded whenever expansion is necessary. More... | |
MAttributePattern & | operator[] (unsigned int index) |
Retrieves the attribute pattern which is at the specified index in the array. More... | |
Iterator | begin () |
Returns an iterator object pointed to the beginning of the array. More... | |
Iterator | end () |
Returns an iterator object pointed to the end of the array. More... | |
ConstIterator | begin () const |
Returns a const iterator object pointed to the beginning of the array. More... | |
ConstIterator | end () const |
Returns a const iterator object pointed to the end of the array. More... | |
ConstIterator | cbegin () const |
Returns a const iterator object pointed to the beginning of the array. More... | |
ConstIterator | cend () const |
Returns an iterator object pointed to the end of the array. More... | |
Static Public Member Functions | |
static const char * | className () |
Returns the name of this class. More... | |
Friends | |
OPENMAYA_EXPORT std::ostream & | operator<< (std::ostream &os, const MAttributePatternArray &array) |
NO SCRIPT SUPPORT. More... | |
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.
OPENMAYA_MAJOR_NAMESPACE_OPEN MAttributePatternArray | ( | ) |
Class Constructor.
Creates an attribute pattern Array
MAttributePatternArray | ( | const MAttributePatternArray & | other | ) |
Copy Constructor.
[in] | other | the array with which to initialize this instance |
MAttributePatternArray | ( | unsigned int | initialSize, |
const MAttributePattern & | initialValue | ||
) |
Create a new array of MAttributePatterns of a specified size and initialize all the elements with the given initial value.
[in] | initialSize | the initial size of the array |
[in] | initialValue | the initial value of each element |
Class Destructor.
No additional action.
const MAttributePattern & operator[] | ( | unsigned int | index | ) | const |
Retrieves the read-only attribute pattern which is at the specified index in the array.
[in] | index | Zero-based index to the array |
MAttributePatternArray & operator= | ( | const MAttributePatternArray & | other | ) |
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.
[in] | other | the array being copied |
MStatus set | ( | const MAttributePattern & | element, |
unsigned int | index | ||
) |
Sets an element of the array to the given attribute pattern.
[in] | element | New attribute pattern to be set on the indicated element |
[in] | index | Zero-based index to the array |
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).
[in] | length | the new size of the array |
unsigned int length | ( | ) | const |
Determines the number of elements in the array.
MStatus remove | ( | unsigned int | index | ) |
Removes the attribute pattern which is at the specified index in the array.
[in] | index | Zero-based index to the array |
MStatus insert | ( | const MAttributePattern & | element, |
unsigned int | index | ||
) |
Inserts the given attribute pattern at the specified index in the array.
[in] | element | attribute pattern to be inserted |
[in] | index | Zero-based index to the array |
MStatus append | ( | const MAttributePattern & | element | ) |
Appends the given attribute pattern to the end of the array.
[in] | element | attribute pattern to be appended |
MStatus copy | ( | const MAttributePatternArray & | source | ) |
Copy the contents of the source array to this array.
[in] | source | array to copy from |
MStatus clear | ( | ) |
Clears this array.
Length of the array becomes zero.
void setSizeIncrement | ( | unsigned int | newIncrement | ) |
Set the size by which the array will be expanded whenever expansion is necessary.
[in] | newIncrement | the new increment |
unsigned int sizeIncrement | ( | ) | const |
Return the size by which the array will be expanded whenever expansion is necessary.
MAttributePattern & operator[] | ( | unsigned int | index | ) |
Retrieves the attribute pattern which is at the specified index in the array.
[in] | index | Zero-based index to the array |
MAttributePatternArray::Iterator begin | ( | ) |
Returns an iterator object pointed to the beginning of the array.
MAttributePatternArray::Iterator end | ( | ) |
Returns an iterator object pointed to the end of the array.
MAttributePatternArray::ConstIterator begin | ( | ) | const |
Returns a const iterator object pointed to the beginning of the array.
MAttributePatternArray::ConstIterator end | ( | ) | const |
Returns a const iterator object pointed to the end of the array.
MAttributePatternArray::ConstIterator cbegin | ( | ) | const |
Returns a const iterator object pointed to the beginning of the array.
MAttributePatternArray::ConstIterator cend | ( | ) | const |
Returns an iterator object pointed to the end of the array.
|
static |
Returns the name of this class.
|
friend |
NO SCRIPT SUPPORT.
The format used is [name, name, name, ... name].
[in] | os | the ostream to print to |
[in] | array | the MAttributePatternArray whose value is to be printed |