MPxCacheFormat Class Reference
[OpenMaya - API module for common classesProxy classes]

#include <MPxCacheFormat.h>

List of all members.


Detailed Description

CacheFormat definition.

The MPxCacheFormat class can be used to implement support for new cache file formats in Maya.

Examples:

XmlGeometryCache.cpp.


Public Types

enum   FileAccessMode { kRead, kWrite, kReadWrite }
  Cache file access modes. More...

Public Member Functions

virtual MStatus  open (const MString &fileName, FileAccessMode mode)
virtual void  close ()
  Close the current current cache file.
virtual MStatus  isValid ()
  Confirm wether the current cache file is valid.
virtual MStatus  rewind ()
  Rewind to the beginning of the cache.
virtual MString  extension ()
virtual MStatus  readHeader ()
virtual MStatus  writeHeader (const MString &version, MTime &startTime, MTime &endTime)
virtual void  beginWriteChunk ()
virtual void  endWriteChunk ()
virtual MStatus  beginReadChunk ()
virtual void  endReadChunk ()
virtual MStatus  writeTime (MTime &time)
virtual MStatus  readTime (MTime &time)
virtual MStatus  findTime (MTime &time, MTime &foundTime)
  Find a specific time in the cache.
virtual MStatus  readNextTime (MTime &foundTime)
  Find the next time in the cache.
virtual unsigned  readArraySize ()
  Extract size information from the cache.
virtual MStatus  writeDoubleArray (const MDoubleArray &)
  Write data to the cache.
virtual MStatus  readDoubleArray (MDoubleArray &, unsigned size)
  Read data from the cache.
virtual MStatus  writeChannelName (const MString &name)
  Write a channel's name to the cache. Each cached object is contained within a separate channel.
virtual MStatus  findChannelName (const MString &name)
  Seek to a specific channel name in the cache.
virtual MStatus  readChannelName (MString &name)
  Read the next channel name in the cache.

Member Enumeration Documentation

Cache file access modes.

Enumerator:
kRead  read only
kWrite  write only
kReadWrite  read and write (e.g. append, edit, etc.)

Member Function Documentation

virtual MStatus MPxCacheFormat::open ( const MString fileName,
FileAccessMode  mode  
) [virtual]

Attempt to open the specified cache format. It is important that this function only return success if the cache file is definitely supported by this implementation.

Parameters:
[in]  fileName  Name of the cache file to open
[in]  mode  Access mode for the cache file
Returns:
success if the cache file is supported.
Examples:

virtual MString MPxCacheFormat::extension (  )  [virtual]

Provide the disk file extension for this format. This is not the same as the format's key, which is used by the plugin to identify itself.

Examples:

virtual MStatus MPxCacheFormat::readHeader (  )  [virtual]

Read the header from the current cache data file, and store any data that may be required.

Examples:

virtual MStatus MPxCacheFormat::writeHeader ( const MString version,
MTime startTime,
MTime endTime  
) [virtual]

Write the header for the current cache.

Examples:

virtual void MPxCacheFormat::beginWriteChunk (  )  [virtual]

Perform any actions required prior to writing a chunk's information. A chunk contains the cache information for a specfic time, and may contain multiple channels.

Examples:

virtual void MPxCacheFormat::endWriteChunk (  )  [virtual]

Perform any actions required after writing a chunk's information. A chunk contains the cache information for a specfic time, and may contain multiple channels.

Examples:

virtual MStatus MPxCacheFormat::beginReadChunk (  )  [virtual]

Perform any actions required prior to reading a chunk's information. A chunk contains the cache information for a specfic time, and may contain multiple channels.

Examples:

virtual void MPxCacheFormat::endReadChunk (  )  [virtual]

Perform any actions required after reading a chunk's information. A chunk contains the cache information for a specfic time, and may contain multiple channels.

Examples:

virtual MStatus MPxCacheFormat::writeTime ( MTime time  )  [virtual]

Write the current time to the cache.

Parameters:
[in]  time  Time to write.
Examples:

virtual MStatus MPxCacheFormat::readTime ( MTime time  )  [virtual]

Read the current time from the cache.

Parameters:
[out]  time  Variable to read the time value into.
Examples:

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