MAttributeIndex Class Reference

#include <MAttributeIndex.h>

Class 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:

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. More...
 
 MAttributeIndex (int value)
 Constructor. More...
 
 MAttributeIndex (double value)
 Constructor. More...
 
MIndexType type () const
 Returns the type of attribute index. More...
 
bool hasRange () const
 Return true if a range was specified. More...
 
bool hasValidRange () const
 Return true if upper value is greater than lower value. More...
 
bool hasLowerBound () const
 Return true if if there is a lower bound specified. More...
 
bool hasUpperBound () const
 Return true if if there is an upper bound specified. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
bool isBounded () const
 Returns true if this object is bounded. More...
 
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. More...
 
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. More...
 
MStatus setType (MIndexType type)
 Sets the type of attribute index. More...
 
MStatus setValue (int value)
 Sets the index value of this object. More...
 
MStatus setValue (double value)
 Sets the index value of this object. More...
 
MStatus setLower (int value)
 Sets the lower bounds of this object. More...
 
MStatus setLower (double value)
 Sets the lower bounds of this object. More...
 
MStatus setUpper (int value)
 Sets the upper bounds of this object. More...
 
MStatus setUpper (double value)
 Sets the upper bounds of this object. More...
 
MAttributeIndexoperator= (const MAttributeIndex &other)
 Assignment operator. More...
 
bool operator== (const MAttributeIndex &other) const
 Equality operator. More...
 
bool operator!= (const MAttributeIndex &other) const
 Inequality operator. More...
 

Static Public Member Functions

static const char * className ()
 Returns the name of this class. More...
 

Friends

class MAttributeSpec
 

Member Enumeration Documentation

enum MIndexType

Data types for attribute indices.

Enumerator
kInteger 

Integer index (e.g.

mesh.cp[5])

kFloat 

Floating-poing index (e.g.

curve.u[1.3])

Constructor & Destructor Documentation

MAttributeIndex ( const MAttributeIndex other)

Copy constructor.

Parameters
[in]othervalue to copy
MAttributeIndex ( int  value)

Constructor.

Parameters
[in]valueindex value to set
MAttributeIndex ( double  value)

Constructor.

Parameters
[in]valueindex value to set

Member Function Documentation

Returns the type of attribute index.

Valid index types are kInteger and kFloat.

Returns
The index type
bool hasRange ( ) const

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

Return true if upper value is greater than lower value.

Returns
Boolean indicating whether the range is valid or not.
bool hasLowerBound ( ) const

Return true if if there is a lower bound specified.

Returns
Boolean to indicate if there is a lower bound.
+ Examples:
bool hasUpperBound ( ) const

Return true if if there is an upper bound specified.

Returns
Boolean to indicate if there is an upper bound.
+ Examples:
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.

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

Parameters
[out]valuelower bound value is returned through this parameter.
Returns
+ Examples:
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.

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

Parameters
[out]valuelower bound value is returned through this parameter.
Returns
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.

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

Parameters
[out]valueupper bound value is returned through this parameter.
Returns
+ Examples:
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.

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

Parameters
[out]valueupper bound value is returned through this parameter.
Returns
bool isBounded ( ) const

Returns true if this object is bounded.

Returns
  • boolean indicating if the 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.

Parameters
[out]valuevalue of the index is returned through this parameter.
Returns
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.

Parameters
[out]valuevalue of the index is returned through this parameter.
Returns

Sets the type of attribute index.

Valid index types are kInteger and kFloat.

Parameters
[in]typethe index type to set
Returns
MStatus setValue ( int  value)

Sets the index value of this object.

Parameters
[in]valuethe value to set
Returns
MStatus setValue ( double  value)

Sets the index value of this object.

Parameters
[in]valuethe value to set
Returns
MStatus setLower ( int  value)

Sets the lower bounds of this object.

Parameters
[in]valuethe value to set
Returns
MStatus setLower ( double  value)

Sets the lower bounds of this object.

Parameters
[in]valuethe value to set
Returns
MStatus setUpper ( int  value)

Sets the upper bounds of this object.

Parameters
[in]valuethe value to set
Returns
MStatus setUpper ( double  value)

Sets the upper bounds of this object.

Parameters
[in]valuethe value to set
Returns
MAttributeIndex & operator= ( const MAttributeIndex other)

Assignment operator.

Parameters
[in]otherobject to copy or reference
Returns
A reference to the copied MAttributeIndex object.
bool operator== ( const MAttributeIndex other) const

Equality operator.

Parameters
[in]otherobject to compare with.
Returns
Boolean indicating whether the objects are same.
bool operator!= ( const MAttributeIndex other) const

Inequality operator.

Parameters
[in]otherobject to compare with.
Returns
Boolean indicating whether the objects are same.
const char * className ( )
static

Returns the name of this class.

Returns
The name of this class.

The documentation for this class was generated from the following files:
  • MAttributeIndex.h
  • MAttributeIndex.cpp