/* * ManipulateAtomsProcess.hpp * * Created on: Feb 18, 2010 * Author: crueger */ #ifndef MANIPULATEATOMSPROCESS_HPP_ #define MANIPULATEATOMSPROCESS_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "Actions/Process.hpp" #include #include "Descriptors/AtomDescriptor.hpp" class manipulateAtomsTest; class World; namespace MoleCuilder { class ActionRegistry; class ManipulateAtomsProcess : public Process { friend class ::manipulateAtomsTest; public: ManipulateAtomsProcess(boost::function _operation, AtomDescriptor descr,const ActionTrait &_trait); virtual ~ManipulateAtomsProcess(); virtual bool canUndo(); virtual bool shouldUndo(); Action* clone(enum QueryOptions flag = Interactive) const; void outputAsCLI(std::ostream &ost) const; void outputAsPython(std::ostream &ost, const std::string &prefix) const; virtual void doManipulate(World *); private: /** Wrap function Action::call() to allow manipulateAtomsTest access. * */ void call() { Process::call(); } protected: virtual Dialog * fillDialog(Dialog*); private: virtual ActionState::ptr performCall(); virtual ActionState::ptr performUndo(ActionState::ptr); virtual ActionState::ptr performRedo(ActionState::ptr); AtomDescriptor descr; boost::function operation; }; } #endif /* MANIPULATEATOMSPROCESS_HPP_ */