All plug-ins need to implement the initializePlugin(), uninitializePlugin(), and creator() functions.
The DeclareSimpleCommand() macro replaces initializePlugin(), uninitializePlugin(), and creator() in simple plug-ins so you do not have to implement these functions yourself.
DeclareSimpleCommand() takes three arguments: the plug-in class, the owner of the plug-in, and the version.
DeclareSimpleCommand( helloWorld, "Autodesk", "2019");
DeclareSimpleCommand() can only be used to create an undoable command. Because undoable commands cannot be undone, they should only query the scene. They should not modify the scene in any way.
Important: If you create an undoable command that does modify the scene, it will break Maya's undo capability.
You need to include MSimple.h to use DeclareSimpleCommand().
Note: Plug-ins that implements several features, such as dependency graph nodes and commands, cannot use DeclareSimpleCommand().