MAttributeSpecArray Class Reference
[OpenMaya - API module for common classes]

#include <MAttributeSpecArray.h>

List of all members.

Detailed Description

An attribute specification array.

Array class for MAttributeSpec.

See MAttributeSpec for more information.


apiMeshShape.cpp, and apiMeshShape.h.

Public Member Functions

 MAttributeSpecArray ()
 MAttributeSpecArray (const MAttributeSpecArray &other)
 ~MAttributeSpecArray ()
MAttributeSpec operator[] (unsigned int index) const
MAttributeSpecArrayoperator= (const MAttributeSpecArray &other)
MStatus set (const MAttributeSpec &element, unsigned int index)
MStatus setLength (unsigned int length)
unsigned int length () const
MStatus remove (unsigned int index)
MStatus insert (const MAttributeSpec &element, unsigned int index)
MStatus append (const MAttributeSpec &element)
MStatus clear ()
void setSizeIncrement (unsigned int newIncrement)
unsigned int sizeIncrement () const

Constructor & Destructor Documentation

MAttributeSpecArray::MAttributeSpecArray (  ) 

Default constructor. The array is set to contain no elements.

MAttributeSpecArray::MAttributeSpecArray ( const MAttributeSpecArray other  ) 

Copy Constructor.

[in] other the array with which to initialize this array

MAttributeSpecArray::~MAttributeSpecArray (  ) 

Class Destructor

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.

[in] index the index of the element to return
A reference to the specified element

MAttributeSpecArray & MAttributeSpecArray::operator= ( const MAttributeSpecArray other  ) 

Assignment operator.

[in] other The source object to assign from.
A reference to the copied MAttributeSpecArray object.

MStatus MAttributeSpecArray::set ( const MAttributeSpec element,
unsigned int  index 

Sets the value of the specified element to the given attribute spec.

[in] element the new value for the specified element
[in] index the index of the element to be set

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).

[in] length the new size of the array

unsigned int MAttributeSpecArray::length (  )  const

Returns the number of elements in the array.

The number of elements in the array

MStatus MAttributeSpecArray::remove ( unsigned int  index  ) 

Removes the element in the array at the given index.

[in] index the index of the element to removed

MStatus MAttributeSpecArray::insert ( const MAttributeSpec element,
unsigned int  index 

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.

[in] element the new value to insert into the array
[in] index the index of the element to set

MStatus MAttributeSpecArray::append ( const MAttributeSpec element  ) 

Adds a new element to the end of the array.

[in] element the value for the new last element

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.


void MAttributeSpecArray::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 MAttributeSpecArray::sizeIncrement (  )  const

Return the size by which the array will be expanded whenever expansion is necessary.

true if the array argument is a non-zero pointer and false otherwise

Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6