MTemplateAction< ActionClass, CommandName, CommandSyntax > Class Template Reference
[OpenMaya - API module for common classes]

#include <MTemplateCommand.h>
Inheritance diagram for MTemplateAction< ActionClass, CommandName, CommandSyntax >:
Inheritance graph
[legend]
Collaboration diagram for MTemplateAction< ActionClass, CommandName, CommandSyntax >:
Collaboration graph
[legend]

List of all members.


Detailed Description

template<class ActionClass, const char * CommandName, MCreateSyntaxFunction CommandSyntax>
class MTemplateAction< ActionClass, CommandName, CommandSyntax >

Template class for non undoable actions.

Helper template class which make writing not undoable actions easier.

Parameters:
  • ActionClass : derived from MPxCommand and used in the creator() method
  • CommandName : name of the command
  • CommandSyntax : function pointer to syntax creator

Public Member Functions

  MTemplateAction ()
  Default constructor.
virtual MStatus  doIt (const MArgList &)
  Execution of the action. Default behaviour is failure.

Static Public Member Functions

static void *  creator ()
  Method called by Maya to create an instance of this class.
static MStatus  registerCommand (MObject obj)
static MStatus  deregisterCommand (MObject obj)

Member Function Documentation

template<class ActionClass, const char * CommandName, MCreateSyntaxFunction CommandSyntax>
static MStatus MTemplateAction< ActionClass, CommandName, CommandSyntax >::registerCommand ( MObject  obj  )  [inline, static]

Plug-in registration method.

Parameters:
[in]  obj  Plug-in object taken from the initializePlugin() entry point.

template<class ActionClass, const char * CommandName, MCreateSyntaxFunction CommandSyntax>
static MStatus MTemplateAction< ActionClass, CommandName, CommandSyntax >::deregisterCommand ( MObject  obj  )  [inline, static]

Plug-in dregistration method.

Parameters:
[in]  obj  Plug-in object taken from the initializePlugin() entry point.

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