Index: src/Actions/ParserAction/LoadXyzAction.cpp
===================================================================
--- src/Actions/ParserAction/LoadXyzAction.cpp	(revision 0b2ce98def2d6ab9548ba5ac25acbb2ab5bc233c)
+++ src/Actions/ParserAction/LoadXyzAction.cpp	(revision c6653745c7e2c1a9d5510ee8ec11e0b97d5951ef)
@@ -20,77 +20,31 @@
 #include "Helpers/MemDebug.hpp"
 
+#include "Helpers/Log.hpp"
+#include "Helpers/Verbose.hpp"
+#include "Parser/XyzParser.hpp"
+
+#include <iostream>
+
 using namespace std;
 
 #include "Actions/ParserAction/LoadXyzAction.hpp"
-#include "Actions/ActionRegistry.hpp"
-#include "Parser/XyzParser.hpp"
-#include "atom.hpp"
-#include "Helpers/Log.hpp"
-#include "molecule.hpp"
-#include "Helpers/Verbose.hpp"
-#include "World.hpp"
 
-#include <iostream>
-#include <set>
-#include <string>
-#include <vector>
-
-#include "UIElements/UIFactory.hpp"
-#include "UIElements/Dialog.hpp"
-#include "Actions/ValueStorage.hpp"
-
-/****** ParserLoadXyzAction *****/
-
-//// memento to remember the state when undoing
-//
-//class ParserLoadXyzState : public ActionState {
-//public:
-//  ParserLoadXyzState(molecule* _mol,std::string _lastName) :
-//    mol(_mol),
-//    lastName(_lastName)
-//  {}
-//  molecule* mol;
-//  std::string lastName;
-//};
-
-const char ParserLoadXyzAction::NAME[] = "parse-xyz";
-
-ParserLoadXyzAction::ParserLoadXyzAction() :
-  Action(NAME)
-{}
-
-ParserLoadXyzAction::~ParserLoadXyzAction()
-{}
-
-void ParserLoadXyz(std::string &filename) {
-  ValueStorage::getInstance().setCurrentValue(ParserLoadXyzAction::NAME, filename);
-  ActionRegistry::getInstance().getActionByName(ParserLoadXyzAction::NAME)->call(Action::NonInteractive);
-};
-
-void ParserLoadXyzAction::getParametersfromValueStorage()
-{};
-
-Dialog* ParserLoadXyzAction::fillDialog(Dialog *dialog) {
-  ASSERT(dialog,"No Dialog given when filling action dialog");
-
-  dialog->queryString(NAME, ValueStorage::getInstance().getDescription(NAME));
-
-  return dialog;
-}
-
+// and construct the stuff
+#include "LoadXyzAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
 Action::state_ptr ParserLoadXyzAction::performCall() {
-  string filename;
-
-  ValueStorage::getInstance().queryCurrentValue(NAME, filename);
+  // obtain information
+  getParametersfromValueStorage();
 
   DoLog(1) && (Log() << Verbose(1) << "Parsing xyz file for new atoms." << endl);
   // parse xyz file
   ifstream input;
-  input.open(filename.c_str());
+  input.open(params.filename.c_str());
   if (!input.fail()) {
     XyzParser parser; // briefly instantiate a parser which is removed at end of focus
     parser.load(&input);
   } else {
-    DoeLog(1) && (eLog() << Verbose(1) << "Could not open file " << filename << "." << endl);
+    DoeLog(1) && (eLog() << Verbose(1) << "Could not open file " << params.filename << "." << endl);
   }
   input.close();
@@ -123,2 +77,3 @@
   return NAME;
 }
+/** =========== end of function ====================== */
Index: src/Actions/ParserAction/LoadXyzAction.def
===================================================================
--- src/Actions/ParserAction/LoadXyzAction.def	(revision c6653745c7e2c1a9d5510ee8ec11e0b97d5951ef)
+++ src/Actions/ParserAction/LoadXyzAction.def	(revision c6653745c7e2c1a9d5510ee8ec11e0b97d5951ef)
@@ -0,0 +1,25 @@
+/*
+ * LoadXyzAction.def
+ *
+ *  Created on: Aug 26, 2010
+ *      Author: heber
+ */
+
+// all includes and forward declarations necessary for non-integral types below
+
+
+// i.e. there is an integer with variable name Z that can be found in
+// ValueStorage by the token "Z" -> first column: int, Z, "Z"
+// "undefine" if no parameters are required
+#define paramtypes (std::string)
+#define paramtokens (ParserLoadXyzAction::NAME)
+#define paramreferences (filename)
+
+#undef statetypes
+#undef statereferences
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Parser
+#define ACTIONNAME LoadXyz
+#define TOKEN "parse-xyz"
+
Index: src/Actions/ParserAction/LoadXyzAction.hpp
===================================================================
--- src/Actions/ParserAction/LoadXyzAction.hpp	(revision 0b2ce98def2d6ab9548ba5ac25acbb2ab5bc233c)
+++ src/Actions/ParserAction/LoadXyzAction.hpp	(revision c6653745c7e2c1a9d5510ee8ec11e0b97d5951ef)
@@ -11,28 +11,6 @@
 #include "Actions/Action.hpp"
 
-
-void ParserLoadXyz(std::string &filename);
-
-class ParserLoadXyzAction : public Action {
-  friend void ParserLoadXyz(std::string &filename);
-
-public:
-  ParserLoadXyzAction();
-  virtual ~ParserLoadXyzAction();
-
-  bool canUndo();
-  bool shouldUndo();
-
-  virtual const std::string getName();
-protected:
-  virtual Dialog * fillDialog(Dialog *dialog);
-private:
-  virtual void getParametersfromValueStorage();
-  virtual Action::state_ptr performCall();
-  virtual Action::state_ptr performUndo(Action::state_ptr);
-  virtual Action::state_ptr performRedo(Action::state_ptr);
-
-  static const char NAME[];
-};
+#include "LoadXyzAction.def"
+#include "Action_impl_header.hpp"
 
 #endif /* LOADXYZACTION_HPP_ */
Index: src/Actions/ParserAction/SaveXyzAction.cpp
===================================================================
--- src/Actions/ParserAction/SaveXyzAction.cpp	(revision 0b2ce98def2d6ab9548ba5ac25acbb2ab5bc233c)
+++ src/Actions/ParserAction/SaveXyzAction.cpp	(revision c6653745c7e2c1a9d5510ee8ec11e0b97d5951ef)
@@ -20,6 +20,4 @@
 #include "Helpers/MemDebug.hpp"
 
-#include "Actions/ParserAction/SaveXyzAction.hpp"
-#include "Actions/ActionRegistry.hpp"
 #include "Parser/XyzParser.hpp"
 #include "atom.hpp"
@@ -31,57 +29,19 @@
 using namespace std;
 
-#include "UIElements/UIFactory.hpp"
-#include "UIElements/Dialog.hpp"
-#include "Actions/ValueStorage.hpp"
+#include "Actions/ParserAction/SaveXyzAction.hpp"
 
-
-/****** ParserSaveXyzAction *****/
-
-//// memento to remember the state when undoing
-//
-//class ParserSaveXyzState : public ActionState {
-//public:
-//  ParserSaveXyzState(molecule* _mol,std::string _lastName) :
-//    mol(_mol),
-//    lastName(_lastName)
-//  {}
-//  molecule* mol;
-//  std::string lastName;
-//};
-
-const char ParserSaveXyzAction::NAME[] = "SaveXyz";
-
-ParserSaveXyzAction::ParserSaveXyzAction() :
-  Action(NAME)
-{}
-
-ParserSaveXyzAction::~ParserSaveXyzAction()
-{}
-
-void ParserSaveXyz(std::string &filename) {
-  ValueStorage::getInstance().setCurrentValue(ParserSaveXyzAction::NAME, filename);
-  ActionRegistry::getInstance().getActionByName(ParserSaveXyzAction::NAME)->call(Action::NonInteractive);
-};
-
-void ParserSaveXyzAction::getParametersfromValueStorage()
-{};
-
-Dialog* ParserSaveXyzAction::fillDialog(Dialog *dialog) {
-  ASSERT(dialog,"No Dialog given when filling action dialog");
-
-  dialog->queryString(NAME, ValueStorage::getInstance().getDescription(NAME));
-
-  return dialog;
-}
-
+// and construct the stuff
+#include "SaveXyzAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
 Action::state_ptr ParserSaveXyzAction::performCall() {
-  string filename;
   XyzParser parser;
 
-  ValueStorage::getInstance().queryCurrentValue(NAME, filename);
+  // obtain information
+  getParametersfromValueStorage();
 
   // store xyz file
   ofstream output;
-  output.open(filename.c_str());
+  output.open(params.filename.c_str());
   if (!output.fail())
     parser.save(&output);
@@ -117,2 +77,3 @@
   return NAME;
 }
+/** =========== end of function ====================== */
Index: src/Actions/ParserAction/SaveXyzAction.def
===================================================================
--- src/Actions/ParserAction/SaveXyzAction.def	(revision c6653745c7e2c1a9d5510ee8ec11e0b97d5951ef)
+++ src/Actions/ParserAction/SaveXyzAction.def	(revision c6653745c7e2c1a9d5510ee8ec11e0b97d5951ef)
@@ -0,0 +1,25 @@
+/*
+ * SaveXyzAction.def
+ *
+ *  Created on: Aug 26, 2010
+ *      Author: heber
+ */
+
+// all includes and forward declarations necessary for non-integral types below
+
+
+// i.e. there is an integer with variable name Z that can be found in
+// ValueStorage by the token "Z" -> first column: int, Z, "Z"
+// "undefine" if no parameters are required
+#define paramtypes (std::string)
+#define paramtokens (ParserSaveXyzAction::NAME)
+#define paramreferences (filename)
+
+#undef statetypes
+#undef statereferences
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Parser
+#define ACTIONNAME SaveXyz
+#define TOKEN "SaveXyz"
+
Index: src/Actions/ParserAction/SaveXyzAction.hpp
===================================================================
--- src/Actions/ParserAction/SaveXyzAction.hpp	(revision 0b2ce98def2d6ab9548ba5ac25acbb2ab5bc233c)
+++ src/Actions/ParserAction/SaveXyzAction.hpp	(revision c6653745c7e2c1a9d5510ee8ec11e0b97d5951ef)
@@ -11,28 +11,6 @@
 #include "Actions/Action.hpp"
 
-
-void ParserSaveXyz(std::string &filename);
-
-class ParserSaveXyzAction : public Action {
-  friend void ParserSaveXyz(std::string &filename);
-
-public:
-  ParserSaveXyzAction();
-  virtual ~ParserSaveXyzAction();
-
-  bool canUndo();
-  bool shouldUndo();
-
-  virtual const std::string getName();
-protected:
-  virtual Dialog * fillDialog(Dialog *dialog);
-private:
-  virtual void getParametersfromValueStorage();
-  virtual Action::state_ptr performCall();
-  virtual Action::state_ptr performUndo(Action::state_ptr);
-  virtual Action::state_ptr performRedo(Action::state_ptr);
-
-  static const char NAME[];
-};
+#include "SaveXyzAction.def"
+#include "Action_impl_header.hpp"
 
 #endif /* SAVEXYZACTION_HPP_ */
