Changeset 3e8325 for molecuilder/src/Actions
- Timestamp:
- Jan 7, 2010, 2:46:34 PM (16 years ago)
- Children:
- d97af9
- Parents:
- 34ff5e6
- Location:
- molecuilder/src/Actions
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/Actions/Action.cpp
r34ff5e6 r3e8325 6 6 */ 7 7 8 #include "Action.hpp"8 #include <string> 9 9 10 Action::Action() 11 {} 10 #include "Actions/Action.hpp" 11 #include "Actions/ActionRegistry.hpp" 12 13 using namespace std; 14 15 Action::Action(std::string _name,bool _doRegister) : 16 name(_name) 17 { 18 if(_doRegister){ 19 ActionRegistry::getRegistry()->registerAction(this); 20 } 21 } 12 22 13 23 Action::~Action() 14 24 {} 25 26 const string Action::getName(){ 27 return name; 28 } -
molecuilder/src/Actions/Action.hpp
r34ff5e6 r3e8325 8 8 #ifndef ACTION_H_ 9 9 #define ACTION_H_ 10 11 #include <string> 10 12 11 13 /** … … 21 23 protected: 22 24 public: 23 Action( );25 Action(std::string _name,bool _doRegister=true); 24 26 virtual ~Action(); 25 27 … … 28 30 virtual bool canUndo()=0; 29 31 32 virtual const std::string getName(); 33 34 private: 35 std::string name; 30 36 }; 31 37 -
molecuilder/src/Actions/ErrorAction.cpp
r34ff5e6 r3e8325 14 14 using namespace std; 15 15 16 ErrorAction::ErrorAction(const char * _errorMsg) : 16 ErrorAction::ErrorAction(string _name,const char * _errorMsg,bool _doRegister) : 17 Action(_name,_doRegister), 17 18 errorMsg(_errorMsg) 18 19 { -
molecuilder/src/Actions/ErrorAction.hpp
r34ff5e6 r3e8325 15 15 { 16 16 public: 17 ErrorAction( const char *);17 ErrorAction(std::string _name,const char * _errorMsg,bool _doRegister=true); 18 18 virtual ~ErrorAction(); 19 19 -
molecuilder/src/Actions/MakroAction.cpp
r34ff5e6 r3e8325 6 6 */ 7 7 8 #include <string> 9 8 10 #include "Actions/MakroAction.hpp" 9 11 #include "Actions/Action.hpp" 10 12 #include "Actions/ActionSequence.hpp" 11 13 12 MakroAction::MakroAction(ActionSequence* _actions) : 14 using namespace std; 15 16 MakroAction::MakroAction(string _name,ActionSequence* _actions,bool _doRegister) : 17 Action(_name,_doRegister), 13 18 actions(_actions) 14 19 { -
molecuilder/src/Actions/MakroAction.hpp
r34ff5e6 r3e8325 8 8 #ifndef MAKROACTION_HPP_ 9 9 #define MAKROACTION_HPP_ 10 11 #include <string> 10 12 11 13 #include "Actions/Action.hpp" … … 21 23 { 22 24 public: 23 MakroAction( ActionSequence*);25 MakroAction(std::string _name,ActionSequence* _actions,bool _doRegister=true); 24 26 virtual ~MakroAction(); 25 27 -
molecuilder/src/Actions/MethodAction.cpp
r34ff5e6 r3e8325 8 8 #include <iostream> 9 9 #include <boost/function.hpp> 10 #include <string> 10 11 11 12 #include "MethodAction.hpp" … … 13 14 using namespace std; 14 15 15 MethodAction::MethodAction(boost::function<void()> _executeMethod) : 16 MethodAction::MethodAction(string _name,boost::function<void()> _executeMethod,bool _doRegister) : 17 Action(_name,_doRegister), 16 18 executeMethod(_executeMethod) 17 19 { -
molecuilder/src/Actions/MethodAction.hpp
r34ff5e6 r3e8325 10 10 11 11 #include <boost/function.hpp> 12 #include <string> 12 13 13 14 #include "Actions/Action.hpp" … … 19 20 { 20 21 public: 21 MethodAction( boost::function<void()>);22 MethodAction(std::string _name,boost::function<void()> _executeMethod,bool _doRegister=true); 22 23 virtual ~MethodAction(); 23 24
Note:
See TracChangeset
for help on using the changeset viewer.