- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions | Friends

# MAttributeIndex Class Reference
OpenMaya - API module for common classes

Search for all occurrences

## Detailed Description

The index information for an attribute specification.

Class that provides access to the index part of an attribute specification (MAttributeSpec).

See MAttributeSpec for more information.

Examples:

  apiMeshShape.cpp.

`#include <MAttributeIndex.h>`

List of all members.

## Public Types
enum | MIndexType { kInteger, kFloat }
| Data types for attribute indices. More...
## Public Member Functions
| MAttributeIndex ()
| Constructor.
| ~MAttributeIndex ()
| Destructor.
| MAttributeIndex (const MAttributeIndex &other)
| Copy constructor.
| MAttributeIndex (int value)
| Constructor.
| MAttributeIndex (double value)
| Constructor.
MIndexType | type () const
| Returns the type of attribute index.
bool | hasRange () const
| Return true if a range was specified.
bool | hasValidRange () const
| Return true if upper value is greater than lower value.
bool | hasLowerBound () const
| Return true if if there is a lower bound specified.
bool | hasUpperBound () const
| Return true if if there is an upper bound specified.
MStatus | getLower (int &value) const
| Return the lower bound for this object or false if 1) the type does not match the argument type or 2) there is no lower bound.
MStatus | getLower (double &value) const
| Return the lower bound for this object or false if 1) the type does not match the argument type or 2) there is no lower bound.
MStatus | getUpper (int &value) const
| Return the upper bound for this object or false if 1) the type does not match the argument type or 2) there is no upper bound.
MStatus | getUpper (double &value) const
| Return the upper bound for this object or false if 1) the type does not match the argument type or 2) there is no upper bound.
bool | isBounded () const
| Returns true if this object is bounded.
MStatus | getValue (int &value) const
| Return the current value of the index or false if 1) the type does not match the argument type or 2) the index is a range or 3) the index is unbounded.
MStatus | getValue (double &value) const
| Return the current value of the index or false if 1) the type does not match the argument type or 2) the index is a range or 3) the index is unbounded.
MStatus | setType (MIndexType type)
| Sets the type of attribute index.
MStatus | setValue (int value)
| Sets the index value of this object.
MStatus | setValue (double value)
| Sets the index value of this object.
MStatus | setLower (int value)
| Sets the lower bounds of this object.
MStatus | setLower (double value)
| Sets the lower bounds of this object.
MStatus | setUpper (int value)
| Sets the upper bounds of this object.
MStatus | setUpper (double value)
| Sets the upper bounds of this object.
MAttributeIndex & | operator= (const MAttributeIndex &other)
| Assignment operator.
bool | operator== (const MAttributeIndex &other) const
| Equality operator.
bool | operator!= (const MAttributeIndex &other) const
| Inequality operator.
## Static Public Member Functions
static const char * | className ()
| Returns the name of this class.
## Friends
class | MAttributeSpec Search for all occurrences

## Member Enumeration Documentation

enum MIndexType

Search for all occurrences

Data types for attribute indices.

Enumerator:

  kInteger | Integer index (e.g. mesh.cp[5]) Search for all occurrences
  kFloat | Floating-poing index (e.g. curve.u[1.3]) Search for all occurrences

## Constructor & Destructor Documentation

MAttributeIndex | ( | const MAttributeIndex & | other | ) |

Copy constructor.

Parameters:

  [in] | other | value to copy

MAttributeIndex | ( | int | value | ) |

Constructor.

Parameters:

  [in] | value | index value to set

MAttributeIndex | ( | double | value | ) |

Constructor.

Parameters:

  [in] | value | index value to set

## Member Function Documentation

MAttributeIndex::MIndexType type | ( |  | ) | const

Search for all occurrences

Returns the type of attribute index.

Valid index types are kInteger and kFloat.

Returns:
  The index type

bool hasRange | ( |  | ) | const

Search for all occurrences

Return true if a range was specified.

Note: false will be returned for an unbounded range which can be tested using the hasBound method.

Returns:
  Boolean indicating whether the range exists or not.

bool hasValidRange | ( |  | ) | const

Search for all occurrences

Return true if upper value is greater than lower value.

Returns:
  Boolean indicating whether the range is valid or not.

bool hasLowerBound | ( |  | ) | const

Search for all occurrences

Return true if if there is a lower bound specified.

Returns:
  Boolean to indicate if there is a lower bound.

Examples:
  apiMeshShape.cpp.

bool hasUpperBound | ( |  | ) | const

Search for all occurrences

Return true if if there is an upper bound specified.

Returns:
  Boolean to indicate if there is an upper bound.

Examples:
  apiMeshShape.cpp.

MStatus getLower | ( | int & | value | ) | const

Search for all occurrences

Return the lower bound for this object or false if 1) the type does not match the argument type or 2) there is no lower bound.

(both of which can be tested for using other methods on this class).

Parameters:

  [out] | value | lower bound value is returned through this parameter.

Returns:
  - MS::kSuccess the call was successful.
  - MS::kFailure method failed.

Examples:
  apiMeshShape.cpp.

MStatus getLower | ( | double & | value | ) | const

Search for all occurrences

Return the lower bound for this object or false if 1) the type does not match the argument type or 2) there is no lower bound.

(both of which can be tested for using other methods on this class).

Parameters:

  [out] | value | lower bound value is returned through this parameter.

Returns:
  - MS::kSuccess the call was successful.
  - MS::kFailure method failed.

MStatus getUpper | ( | int & | value | ) | const

Search for all occurrences

Return the upper bound for this object or false if 1) the type does not match the argument type or 2) there is no upper bound.

(both of which can be tested for using other methods on this class).

Parameters:

  [out] | value | upper bound value is returned through this parameter.

Returns:
  - MS::kSuccess the call was successful.
  - MS::kFailure method failed.

Examples:
  apiMeshShape.cpp.

MStatus getUpper | ( | double & | value | ) | const

Search for all occurrences

Return the upper bound for this object or false if 1) the type does not match the argument type or 2) there is no upper bound.

(both of which can be tested for using other methods on this class).

Parameters:

  [out] | value | upper bound value is returned through this parameter.

Returns:
  - MS::kSuccess the call was successful.
  - MS::kFailure method failed.

bool isBounded | ( |  | ) | const

Search for all occurrences

Returns true if this object is bounded.

Returns:
  - boolean indicating if the object is bounded.

MStatus getValue | ( | int & | value | ) | const

Search for all occurrences

Return the current value of the index or false if 1) the type does not match the argument type or 2) the index is a range or 3) the index is unbounded.

Parameters:

  [out] | value | value of the index is returned through this parameter.

Returns:
  - MS::kSuccess the call was successful.
  - MS::kFailure method failed.

MStatus getValue | ( | double & | value | ) | const

Search for all occurrences

Return the current value of the index or false if 1) the type does not match the argument type or 2) the index is a range or 3) the index is unbounded.

Parameters:

  [out] | value | value of the index is returned through this parameter.

Returns:
  - MS::kSuccess the call was successful.
  - MS::kFailure method failed.

MStatus setType | ( | MAttributeIndex::MIndexType | type | ) |

Search for all occurrences

Sets the type of attribute index.

Valid index types are kInteger and kFloat.

Parameters:

  [in] | type | the index type to set

Returns:
  - MS::kSuccess the index type was set
  - MS::kFailure invalid index type specified

MStatus setValue | ( | int | value | ) |

Search for all occurrences

Sets the index value of this object.

Parameters:

  [in] | value | the value to set

Returns:
  - MS::kSuccess the value was set
  - MS::kFailure error setting value

MStatus setValue | ( | double | value | ) |

Search for all occurrences

Sets the index value of this object.

Parameters:

  [in] | value | the value to set

Returns:
  - MS::kSuccess the value was set
  - MS::kFailure error setting value

MStatus setLower | ( | int | value | ) |

Search for all occurrences

Sets the lower bounds of this object.

Parameters:

  [in] | value | the value to set

Returns:
  - MS::kSuccess the value was set
  - MS::kFailure error setting value

MStatus setLower | ( | double | value | ) |

Search for all occurrences

Sets the lower bounds of this object.

Parameters:

  [in] | value | the value to set

Returns:
  - MS::kSuccess the value was set
  - MS::kFailure error setting value

MStatus setUpper | ( | int | value | ) |

Search for all occurrences

Sets the upper bounds of this object.

Parameters:

  [in] | value | the value to set

Returns:
  - MS::kSuccess the value was set
  - MS::kFailure error setting value

MStatus setUpper | ( | double | value | ) |

Search for all occurrences

Sets the upper bounds of this object.

Parameters:

  [in] | value | the value to set

Returns:
  - MS::kSuccess the value was set
  - MS::kFailure error setting value

MAttributeIndex & operator= | ( | const MAttributeIndex & | other | ) |

Assignment operator.

Parameters:

  [in] | other | object to copy or reference

Returns:
  A reference to the copied MAttributeIndex object.

bool operator== | ( | const MAttributeIndex & | other | ) | const

Equality operator.

Parameters:

  [in] | other | object to compare with.

Returns:
  Boolean indicating whether the objects are same.

bool operator!= | ( | const MAttributeIndex & | other | ) | const

Inequality operator.

Parameters:

  [in] | other | object to compare with.

Returns:
  Boolean indicating whether the objects are same.

const char * className | ( |  | ) | `[static]`

Search for all occurrences

Returns the name of this class.

Returns:
  The name of this class.

MAttributeIndex MAttributeIndex MAttributeIndex MAttributeIndex MAttributeIndex MAttributeIndex MAttributeIndex MAttributeIndex MAttributeIndex MAttributeIndex
MAttributeIndex MAttributeIndex MAttributeIndex MAttributeIndex MAttributeIndex MAttributeIndex MAttributeIndex MAttributeIndex MAttributeIndex MAttributeIndex