Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
PanoCommand::CombinedPanoCommand Class Reference

PanoCommand to combine other PanoCommands. More...

#include <PanoCommand.h>

Inheritance diagram for PanoCommand::CombinedPanoCommand:
Inheritance graph

Public Member Functions

 CombinedPanoCommand (HuginBase::Panorama &pano, std::vector< PanoCommand * > &commands)
 Constructor. More...
 
 ~CombinedPanoCommand ()
 
virtual bool processPanorama (HuginBase::Panorama &pano)
 Called by execute(). More...
 
- Public Member Functions inherited from PanoCommand::PanoCommand
 PanoCommand (HuginBase::Panorama &pano)
 constructor More...
 
 PanoCommand (HuginBase::Panorama &pano, const std::string &commandName)
 
virtual ~PanoCommand ()
 destructor More...
 
virtual void execute ()
 execute the command. More...
 
virtual void undo ()
 undo execute() [virtual] More...
 
virtual void redo ()
 redo execute() [virtual] More...
 
virtual std::string getName () const
 returns the name of the command More...
 
virtual void setName (const std::string &newName)
 sets the name for the command More...
 
virtual bool wasSuccessful () const
 

Private Attributes

std::vector< PanoCommand * > commands
 

Additional Inherited Members

- Protected Member Functions inherited from PanoCommand::PanoCommand
virtual void setSuccessful (bool success=true)
 
virtual void saveMemento ()
 saves the state for undo More...
 
virtual void saveRedoMemento ()
 saves the state for redo More...
 
- Protected Attributes inherited from PanoCommand::PanoCommand
HuginBase::Panoramam_pano
 internal variables More...
 
HuginBase::PanoramaDataMementom_memento
 
HuginBase::PanoramaDataMementom_redoMemento
 
bool m_clearDirty
 

Detailed Description

PanoCommand to combine other PanoCommands.

Use to get one Undo step from what would normally be several PanoCommands.

Definition at line 39 of file PanoCommand.h.

Constructor & Destructor Documentation

PanoCommand::CombinedPanoCommand::CombinedPanoCommand ( HuginBase::Panorama pano,
std::vector< PanoCommand * > &  commands 
)
inline

Constructor.

Parameters
commandsList of pointers to commands. They applied from beginning to end. CombinedPanoCommand deletes the commands when it is itself deleted.

Definition at line 46 of file PanoCommand.h.

PanoCommand::CombinedPanoCommand::~CombinedPanoCommand ( )

Definition at line 37 of file PanoCommand.cpp.

References commands.

Member Function Documentation

bool PanoCommand::CombinedPanoCommand::processPanorama ( HuginBase::Panorama pano)
virtual

Called by execute().

The default implementation does nothing and returns true. Should return false when the processing was unsuccessful.

Todo:
Should I revert if processing fails?

Reimplemented from PanoCommand::PanoCommand.

Definition at line 45 of file PanoCommand.cpp.

References commands.

Member Data Documentation

std::vector<PanoCommand*> PanoCommand::CombinedPanoCommand::commands
private

Definition at line 51 of file PanoCommand.h.

Referenced by processPanorama(), and ~CombinedPanoCommand().


The documentation for this class was generated from the following files: