next up previous contents
Next: Constructors Up: Command Previous: Command

Description

This is a base class for all the objects used in VMD to peform actions (commands) on the molecules or program state. Each time a request is to be made to do some command (i.e. rotate the current scene, load a new molecule, change a color, etc), an instance of a class derived from Command is created, and given to a CommandQueue object. The queue will then call virtual routines within Command to perform the action it knows how to do. There are a large number of relatively small classes derived from Command, each one used to perform a particular type of action. These objects are all in the files with names starting with 'Cmd', for example CmdDisplay.h and .C.

Each class derived from Command has these characteristics and abilities:

The basic philosophy behind the use of Command is that each action that the user may possibly request to do should be encapsulated within a class derived from Command. Each subclass should know also how to create a text equivalent of the command. User interface objects in VMD (those derived from UIObject must use these Command's to do the actions requested by the user, by creating new Command instances and giving them to a CommandQueue object to execute.


next up previous contents
Next: Constructors Up: Command Previous: Command

Justin Gullingsrud
Tue Apr 6 09:26:48 CDT 1999