AppBase::Command< StringType > Class Template Reference

Base class for all panorama commands. More...

#include <Command.h>

Inheritance diagram for AppBase::Command< StringType >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Command ()
 Command (const StringType &commandName)
virtual ~Command ()
virtual void execute ()=0
 execute the command.
virtual void undo ()=0
 undo execute() [pure virtual]
virtual void redo ()
 redo execute() [pure virtual]
virtual StringType getName () const
virtual void setName (const StringType &newName)
virtual bool wasSuccessful ()

Protected Member Functions

virtual void setSuccessful (bool success=true)

Private Attributes

bool m_successful
StringType m_name

Detailed Description

template<class StringType = std::string>
class AppBase::Command< StringType >

Base class for all panorama commands.

see command pattern.

Definition at line 38 of file Command.h.


Constructor & Destructor Documentation

template<class StringType = std::string>
AppBase::Command< StringType >::Command (  )  [inline]

Definition at line 43 of file Command.h.

template<class StringType = std::string>
AppBase::Command< StringType >::Command ( const StringType &  commandName  )  [inline]

Definition at line 48 of file Command.h.

template<class StringType = std::string>
virtual AppBase::Command< StringType >::~Command (  )  [inline, virtual]

Definition at line 53 of file Command.h.


Member Function Documentation

template<class StringType = std::string>
virtual void AppBase::Command< StringType >::execute (  )  [pure virtual]

execute the command.

[pure virtual]

should save information for undo().

Implemented in HuginBase::PanoCommand< StringType >, and HuginBase::PanoCommand< std::string >.

Referenced by CommandHistory::addCommand(), and AppBase::Command< std::string >::redo().

template<class StringType = std::string>
virtual StringType AppBase::Command< StringType >::getName (  )  const [inline, virtual]

Reimplemented in PT::wxAddImagesCmd, PT::wxLoadPTProjectCmd, PT::wxNewProjectCmd, PT::wxApplyTemplateCmd, PT::wxAddCtrlPointGridCmd, PT::CombinedPanoCommand, PT::NewPanoCmd, PT::AddImagesCmd, PT::RemoveImageCmd, PT::RemoveImagesCmd, PT::UpdateVariablesCmd, PT::UpdateCPsCmd, PT::UpdateVariablesCPCmd, PT::UpdateVariablesCPSetCmd, PT::UpdateImageVariablesCmd, PT::UpdateImagesVariablesCmd, PT::UpdateOptimizeVectorCmd, PT::UpdateOptimizerSwitchCmd, PT::UpdatePhotometricOptimizerSwitchCmd, PT::SetVariableCmd, PT::CenterPanoCmd, PT::StraightenPanoCmd, PT::AddCtrlPointCmd, PT::AddCtrlPointsCmd, PT::RemoveCtrlPointCmd, PT::RemoveCtrlPointsCmd, PT::ChangeCtrlPointCmd, PT::SetActiveImagesCmd, PT::SwapImagesCmd, PT::MoveImageCmd, PT::MergePanoCmd, PT::UpdateSrcImageCmd, PT::UpdateSrcImagesCmd, PT::SetPanoOptionsCmd, PT::LoadPTProjectCmd, PT::RotatePanoCmd, PT::TranslatePanoCmd, PT::UpdateFocalLengthCmd, PT::UpdateCropFactorCmd, PT::ChangePartNumberCmd, PT::ChangePartImagesLinkingCmd, PT::LinkLensVarsCmd, PT::ChangeImageFilenameCmd, PT::ChangeImageSizeCmd, PT::ChangeImageProjectionCmd, PT::ChangeImageHFOVCmd, PT::ChangeImageResponseTypeCmd, PT::ChangeImageEMoRParamsCmd, PT::ChangeImageExposureValueCmd, PT::ChangeImageGammaCmd, PT::ChangeImageWhiteBalanceRedCmd, PT::ChangeImageWhiteBalanceBlueCmd, PT::ChangeImageRollCmd, PT::ChangeImagePitchCmd, PT::ChangeImageYawCmd, PT::ChangeImageXCmd, PT::ChangeImageYCmd, PT::ChangeImageZCmd, PT::ChangeImageTranslationPlaneYawCmd, PT::ChangeImageTranslationPlanePitchCmd, PT::ChangeImageStackCmd, PT::ChangeImageRadialDistortionCmd, PT::ChangeImageRadialDistortionRedCmd, PT::ChangeImageRadialDistortionBlueCmd, PT::ChangeImageRadialDistortionCenterShiftCmd, PT::ChangeImageShearCmd, PT::ChangeImageCropModeCmd, PT::ChangeImageCropRectCmd, PT::ChangeImageAutoCenterCropCmd, PT::ChangeImageVigCorrModeCmd, PT::ChangeImageFlatfieldFilenameCmd, PT::ChangeImageRadialVigCorrCoeffCmd, PT::ChangeImageRadialVigCorrCenterShiftCmd, PT::ChangeImageExifModelCmd, PT::ChangeImageExifMakeCmd, PT::ChangeImageExifLensCmd, PT::ChangeImageExifCropFactorCmd, PT::ChangeImageExifFocalLengthCmd, PT::ChangeImageExifOrientationCmd, PT::ChangeImageExifApertureCmd, PT::ChangeImageExifISOCmd, PT::ChangeImageExifDistanceCmd, PT::ChangeImageExifFocalLength35Cmd, PT::ChangeImageExifExposureTimeCmd, PT::ChangeImageExifDateCmd, PT::ChangeImageExifExposureModeCmd, PT::ChangeImageMasksCmd, PT::ChangeImageActiveMasksCmd, PT::ChangeImageActiveCmd, PT::NewPartCmd, PT::UpdateMaskForImgCmd, PT::UpdateWhiteBalance, PT::ResetToMeanExposure, and PT::DistributeImagesCmd.

Definition at line 80 of file Command.h.

template<class StringType = std::string>
virtual void AppBase::Command< StringType >::redo (  )  [inline, virtual]

redo execute() [pure virtual]

for special optimisation; the default implementation calls execute();

Reimplemented in HuginBase::PanoCommand< StringType >, and HuginBase::PanoCommand< std::string >.

Definition at line 74 of file Command.h.

template<class StringType = std::string>
virtual void AppBase::Command< StringType >::setName ( const StringType &  newName  )  [inline, virtual]

Definition at line 84 of file Command.h.

template<class StringType = std::string>
virtual void AppBase::Command< StringType >::setSuccessful ( bool  success = true  )  [inline, protected, virtual]

Definition at line 95 of file Command.h.

Referenced by HuginBase::PanoCommand< std::string >::execute().

template<class StringType = std::string>
virtual void AppBase::Command< StringType >::undo (  )  [pure virtual]

undo execute() [pure virtual]

must restore the model to the state before execute(). execute() may be called later to redo the undo.

Implemented in HuginBase::PanoCommand< StringType >, and HuginBase::PanoCommand< std::string >.

template<class StringType = std::string>
virtual bool AppBase::Command< StringType >::wasSuccessful (  )  [inline, virtual]

Definition at line 90 of file Command.h.


Member Data Documentation

template<class StringType = std::string>
StringType AppBase::Command< StringType >::m_name [private]

Definition at line 101 of file Command.h.

Referenced by AppBase::Command< std::string >::getName(), and AppBase::Command< std::string >::setName().

template<class StringType = std::string>
bool AppBase::Command< StringType >::m_successful [private]

Definition at line 100 of file Command.h.

Referenced by AppBase::Command< std::string >::setSuccessful(), and AppBase::Command< std::string >::wasSuccessful().


The documentation for this class was generated from the following file:
Generated on 5 Dec 2014 for Hugintrunk by  doxygen 1.4.7