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

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions

# MCacheFormatDescription Class Reference
OpenMaya - API module for common classes

Search for all occurrences

## Detailed Description

Cache format description.

The MCacheFormatDescription is a utility class used by MPxCacheFormat when implementing custom cache plug-ins that define their own handling of the cache format (usually provided by Maya's own xml format).

`#include <MCacheFormatDescription.h>`

List of all members.

## Public Types
enum | CacheFileDistribution { kNoFile, kOneFile, kOneFilePerFrame }
| Cache file distribution types. More...
enum | CacheDataType { kUnknownData, kDouble, kDoubleArray, kDoubleVectorArray, kInt32Array, kFloatArray, kFloatVectorArray }
| Cache file data types. More...
enum | CacheSamplingType { kRegular, kIrregular }
| Cache file sampling types. More...
## Public Member Functions
void | setDistribution (CacheFileDistribution distribution)
| Set up the cache format when reading the description file.
void | setTimePerFrame (const MTime &timePerFrame)
| Set the time per frame.
void | addDescriptionInfo (const MString &info)
| Add a descriptive string.
unsigned int | addChannel (const MString &channelName, const MString &interpretation, CacheDataType dataType, CacheSamplingType samplingType, const MTime &samplingRate, const MTime &startTime, const MTime &endTime, MStatus *status=NULL)
| Add a channel.
CacheFileDistribution | getDistribution () const
| Get information about the format in order to write the description file.
MTime | getTimePerFrame () const
| Get the time per frame.
void | getStartAndEndTimes (MTime &startTime, MTime &endTime) const
| Get the start and end times.
void | getDescriptionInfo (MStringArray &info) const
| This method is not available in Python.
MStringArray | getDescriptionInfo () const
| Get the descriptive strings.
unsigned int | getNumChannels () const
| Get the number of channels.
MString | getChannelName (unsigned int channelIndex) const
| Get a channel's name.
MString | getChannelInterpretation (unsigned int channelIndex) const
| Get a channel's intepretation.
CacheDataType | getChannelDataType (unsigned int channelIndex) const
| Get a channel's data type.
CacheSamplingType | getChannelSamplingType (unsigned int channelIndex) const
| Get a channel's sampling type.
MTime | getChannelSamplingRate (unsigned int channelIndex) const
| Get a channel's sampling rate.
MTime | getChannelStartTime (unsigned int channelIndex) const
| Get a channel's start time.
MTime | getChannelEndTime (unsigned int channelIndex) const
| Get a channel's end time.
## Static Public Member Functions
static const char * | className ()
| Returns the name of this class.

## Member Enumeration Documentation

enum CacheFileDistribution

Search for all occurrences

Cache file distribution types.

Enumerator:

  kNoFile | just memory cache Search for all occurrences
  kOneFile | one file for all frames Search for all occurrences
  kOneFilePerFrame | one file per frame Search for all occurrences

enum CacheDataType

Search for all occurrences

Cache file data types.

Enumerator:

  kUnknownData | unknown data Search for all occurrences
  kDouble | a single double value Search for all occurrences
  kDoubleArray | an array of double values Search for all occurrences
  kDoubleVectorArray | an array of double vector values Search for all occurrences
  kInt32Array | an array of int32 values Search for all occurrences
  kFloatArray | an array of float values Search for all occurrences
  kFloatVectorArray | an array of float vector values Search for all occurrences

enum CacheSamplingType

Search for all occurrences

Cache file sampling types.

Enumerator:

  kRegular | regular sampling Search for all occurrences
  kIrregular | irregular sampling Search for all occurrences

## Member Function Documentation

void setDistribution | ( | CacheFileDistribution | distribution | ) |

Search for all occurrences

Set up the cache format when reading the description file.

Set the distribution.

Parameters:

  [in] | distribution | the distribution to set

void setTimePerFrame | ( | const MTime & | timePerFrame | ) |

Search for all occurrences

Set the time per frame.

Parameters:

  [in] | timePerFrame | the time per frame to set

void addDescriptionInfo | ( | const MString & | info | ) |

Search for all occurrences

Add a descriptive string.

Parameters:

  [in] | info | the string to add

unsigned int addChannel | ( | const MString & | channelName,
|  | const MString & | interpretation,
|  | CacheDataType | dataType,
|  | CacheSamplingType | samplingType,
|  | const MTime & | samplingRate,
|  | const MTime & | startTime,
|  | const MTime & | endTime,
|  | MStatus * | status = `NULL`
| ) |  |

Search for all occurrences

Add a channel.

Parameters:

  [in] | channelName | the new channel's name
  [in] | interpretation | the new channel's interpretation
  [in] | dataType | the new channel's data type
  [in] | samplingType | the new channel's sampling type
  [in] | samplingRate | the new channel's sampling rate
  [in] | startTime | the new channel's start time
  [in] | endTime | the new channel's end time
  [out] | status | the return status

Returns:
  The index of the added channel.

Status Codes:
  - MS::kSuccess if the channel was successfully added
  - MS::kFailure otherwise

MCacheFormatDescription::CacheFileDistribution getDistribution | ( |  | ) | const

Search for all occurrences

Get information about the format in order to write the description file.

Get the distribution.

Returns:
  the distribution value

MTime getTimePerFrame | ( |  | ) | const

Search for all occurrences

Get the time per frame.

Returns:
  the time per frame

void getStartAndEndTimes | ( | MTime & | startTime,
|  | MTime & | endTime
| ) |  | const

Search for all occurrences

Get the start and end times.

Parameters:

  [out] | startTime | the start time
  [out] | endTime | the end time

void getDescriptionInfo | ( | MStringArray & | info | ) | const

Search for all occurrences

This method is not available in Python.

Get the descriptive strings.

Parameters:

  [out] | info | the array of descriptive strings

MStringArray getDescriptionInfo | ( |  | ) | const

Search for all occurrences

Get the descriptive strings.

Returns:
  the array of descriptive strings

unsigned int getNumChannels | ( |  | ) | const

Search for all occurrences

Get the number of channels.

Returns:
  the number of channels

MString getChannelName | ( | unsigned int | channelIndex | ) | const

Search for all occurrences

Get a channel's name.

Parameters:

  [in] | channelIndex | the index of the channel to be queried

Returns:
  the channel's name

MString getChannelInterpretation | ( | unsigned int | channelIndex | ) | const

Search for all occurrences

Get a channel's intepretation.

Parameters:

  [in] | channelIndex | the index of the channel to be queried

Returns:
  the channel's intepretation

MCacheFormatDescription::CacheDataType getChannelDataType | ( | unsigned int | channelIndex | ) | const

Search for all occurrences

Get a channel's data type.

Parameters:

  [in] | channelIndex | the index of the channel to be queried

Returns:
  the channel's data type

MCacheFormatDescription::CacheSamplingType getChannelSamplingType | ( | unsigned int | channelIndex | ) | const

Search for all occurrences

Get a channel's sampling type.

Parameters:

  [in] | channelIndex | the index of the channel to be queried

Returns:
  the channel's sampling type

MTime getChannelSamplingRate | ( | unsigned int | channelIndex | ) | const

Search for all occurrences

Get a channel's sampling rate.

Parameters:

  [in] | channelIndex | the index of the channel to be queried

Returns:
  the channel's sampling rate

MTime getChannelStartTime | ( | unsigned int | channelIndex | ) | const

Search for all occurrences

Get a channel's start time.

Parameters:

  [in] | channelIndex | the index of the channel to be queried

Returns:
  the channel's start time

MTime getChannelEndTime | ( | unsigned int | channelIndex | ) | const

Search for all occurrences

Get a channel's end time.

Parameters:

  [in] | channelIndex | the index of the channel to be queried

Returns:
  the channel's end time

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

Search for all occurrences

Returns the name of this class.

Returns:
  The name of this class.

MCacheFormatDescription MCacheFormatDescription MCacheFormatDescription MCacheFormatDescription MCacheFormatDescription MCacheFormatDescription MCacheFormatDescription MCacheFormatDescription MCacheFormatDescription MCacheFormatDescription
MCacheFormatDescription MCacheFormatDescription MCacheFormatDescription MCacheFormatDescription MCacheFormatDescription MCacheFormatDescription MCacheFormatDescription MCacheFormatDescription MCacheFormatDescription MCacheFormatDescription