Cmd Class Reference

#include <command.h>

Inheritance diagram for Cmd:

MacroCmd SelectCmd SlowUndoCmd SlowUndoSelectCmd PluginCmd BrushCmd GrayScaleCmd InvertCmd PlacementCmd TextCmd CircleCmd EllipseCmd LineCmd RectCmd List of all members.

Public Member Functions

virtual ~Cmd ()
 All Cmd based classes will have virtual destructor.
virtual void exec ()=0
 Command execution. This should save undo informations.
virtual void unExec ()=0
 Revert command execution using undo informations.
virtual std::string name ()=0
 Command identification. This will appear in config file.
virtual std::string args ()=0
 Command export to text string. Needed for macro saving.

Protected Member Functions

 Cmd (FrameBuffer *pFB)

Protected Attributes

FrameBuffer_fb

Friends

class CmdHistory

Detailed Description

Virtual class command. This class is base for all drawing commands and operation. This is needed especially for undo/redo support and macros support. For more information see the CmdHistory class. Design pattern command.

Definition at line 25 of file command.h.


Constructor & Destructor Documentation

virtual Cmd::~Cmd (  )  [inline, virtual]

All Cmd based classes will have virtual destructor.

Definition at line 27 of file command.h.

Cmd::Cmd ( FrameBuffer pFB  )  [inline, protected]

Initialize base.

Parameters:
pFB Pointer to frame buffer to work with.

Definition at line 38 of file command.h.


Member Function Documentation

virtual void Cmd::exec (  )  [pure virtual]

Command execution. This should save undo informations.

Implemented in SlowUndoCmd, SlowUndoSelectCmd, PluginCmd, MacroCmd, BrushCmd, LineCmd, RectCmd, CircleCmd, EllipseCmd, TextCmd, SelectCmd, GrayScaleCmd, and InvertCmd.

Referenced by Image::operator<<().

virtual void Cmd::unExec (  )  [pure virtual]

Revert command execution using undo informations.

Implemented in SlowUndoCmd, SlowUndoSelectCmd, MacroCmd, and SelectCmd.

virtual std::string Cmd::name (  )  [pure virtual]

Command identification. This will appear in config file.

Implemented in SlowUndoCmd, SlowUndoSelectCmd, PluginCmd, MacroCmd, BrushCmd, LineCmd, RectCmd, CircleCmd, EllipseCmd, TextCmd, SelectCmd, GrayScaleCmd, and InvertCmd.

virtual std::string Cmd::args (  )  [pure virtual]

Command export to text string. Needed for macro saving.

Implemented in SlowUndoCmd, SlowUndoSelectCmd, PluginCmd, MacroCmd, BrushCmd, PlacementCmd, TextCmd, SelectCmd, GrayScaleCmd, and InvertCmd.


Friends And Related Function Documentation

friend class CmdHistory [friend]

Needed to obtain Cmd::_fb while creating MacroCmd

Definition at line 48 of file command.h.


Member Data Documentation

FrameBuffer& Cmd::_fb [protected]

Frame buffer reference. All derived class should use this reference.

Definition at line 43 of file command.h.

Referenced by SlowUndoCmd::exec(), and SlowUndoCmd::unExec().


The documentation for this class was generated from the following file:
Generated on Wed Aug 29 00:01:04 2007 for GED 2006 by  doxygen 1.5.2