AutomationFragmentation_failures
        Candidate_v1.6.1
        Candidate_v1.7.0
        ChemicalSpaceEvaluator
        Enhanced_StructuralOptimization_continued
        Exclude_Hydrogens_annealWithBondGraph
        ForceAnnealing_with_BondGraph
        ForceAnnealing_with_BondGraph_contraction-expansion
        Gui_displays_atomic_force_velocity
        PythonUI_with_named_parameters
        StoppableMakroAction
        TremoloParser_IncreasedPrecision
        stable
      
      
        
          | 
            Last change
 on this file since e21d55 was             a82f61, checked in by Frederik Heber <heber@…>, 10 years ago           | 
        
        
          | 
             
Added Action::setOptionValue() which allows setting the option via a string. 
 
- this is preparatory for allowing the creation of MakroActions inside the
code. We need to set the options without going through dialogs in some
way or another and without being completely inside the Actions as is the
case for the COMMAND variants and the python function calls.
  
           | 
        
        
          
            
              - 
Property                 mode
 set to                 
100644
               
             
           | 
        
        
          | 
            File size:
            1.5 KB
           | 
        
      
      
| Line |   | 
|---|
| 1 | /*
 | 
|---|
| 2 |  * ManipulateAtomsProcess.hpp
 | 
|---|
| 3 |  *
 | 
|---|
| 4 |  *  Created on: Feb 18, 2010
 | 
|---|
| 5 |  *      Author: crueger
 | 
|---|
| 6 |  */
 | 
|---|
| 7 | 
 | 
|---|
| 8 | #ifndef MANIPULATEATOMSPROCESS_HPP_
 | 
|---|
| 9 | #define MANIPULATEATOMSPROCESS_HPP_
 | 
|---|
| 10 | 
 | 
|---|
| 11 | // include config.h
 | 
|---|
| 12 | #ifdef HAVE_CONFIG_H
 | 
|---|
| 13 | #include <config.h>
 | 
|---|
| 14 | #endif
 | 
|---|
| 15 | 
 | 
|---|
| 16 | 
 | 
|---|
| 17 | #include "Actions/Process.hpp"
 | 
|---|
| 18 | 
 | 
|---|
| 19 | #include<boost/function.hpp>
 | 
|---|
| 20 | 
 | 
|---|
| 21 | #include "Descriptors/AtomDescriptor.hpp"
 | 
|---|
| 22 | 
 | 
|---|
| 23 | class manipulateAtomsTest;
 | 
|---|
| 24 | class World;
 | 
|---|
| 25 | 
 | 
|---|
| 26 | namespace MoleCuilder {
 | 
|---|
| 27 | 
 | 
|---|
| 28 | class ActionRegistry;
 | 
|---|
| 29 | 
 | 
|---|
| 30 | class ManipulateAtomsProcess : public Process
 | 
|---|
| 31 | {
 | 
|---|
| 32 |   friend class ::manipulateAtomsTest;
 | 
|---|
| 33 | public:
 | 
|---|
| 34 |   ManipulateAtomsProcess(boost::function<void(atom*)> _operation, AtomDescriptor descr,const ActionTrait &_trait);
 | 
|---|
| 35 |   virtual ~ManipulateAtomsProcess();
 | 
|---|
| 36 | 
 | 
|---|
| 37 |   virtual bool canUndo();
 | 
|---|
| 38 |   virtual bool shouldUndo();
 | 
|---|
| 39 | 
 | 
|---|
| 40 |   Action* clone(enum QueryOptions flag = Interactive) const;
 | 
|---|
| 41 | 
 | 
|---|
| 42 |   void outputAsCLI(std::ostream &ost) const;
 | 
|---|
| 43 |   void outputAsPython(std::ostream &ost, const std::string &prefix) const;
 | 
|---|
| 44 | 
 | 
|---|
| 45 |   void setOptionValue(const std::string &_token, const std::string &_value);
 | 
|---|
| 46 | 
 | 
|---|
| 47 |   virtual void doManipulate(World *);
 | 
|---|
| 48 | 
 | 
|---|
| 49 | private:
 | 
|---|
| 50 |   /** Wrap function Action::call() to allow manipulateAtomsTest access.
 | 
|---|
| 51 |    *
 | 
|---|
| 52 |    */
 | 
|---|
| 53 |   void call()
 | 
|---|
| 54 |   { Process::call(); }
 | 
|---|
| 55 | 
 | 
|---|
| 56 | protected:
 | 
|---|
| 57 |   virtual Dialog * fillDialog(Dialog*);
 | 
|---|
| 58 | private:
 | 
|---|
| 59 |   virtual ActionState::ptr performCall();
 | 
|---|
| 60 |   virtual ActionState::ptr performUndo(ActionState::ptr);
 | 
|---|
| 61 |   virtual ActionState::ptr performRedo(ActionState::ptr);
 | 
|---|
| 62 | 
 | 
|---|
| 63 |   AtomDescriptor descr;
 | 
|---|
| 64 |   boost::function<void(atom*)> operation;
 | 
|---|
| 65 | };
 | 
|---|
| 66 | 
 | 
|---|
| 67 | }
 | 
|---|
| 68 | 
 | 
|---|
| 69 | #endif /* MANIPULATEATOMSPROCESS_HPP_ */
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.