Index: src/Actions/FragmentationAction/DepthFirstSearchAction.cpp
===================================================================
--- src/Actions/FragmentationAction/DepthFirstSearchAction.cpp	(revision 0b2ce98def2d6ab9548ba5ac25acbb2ab5bc233c)
+++ src/Actions/FragmentationAction/DepthFirstSearchAction.cpp	(revision 1fd67574a5cc6c07a5638d5d343eae3b6bbdb9bf)
@@ -20,6 +20,4 @@
 #include "Helpers/MemDebug.hpp"
 
-#include "Actions/FragmentationAction/DepthFirstSearchAction.hpp"
-#include "Actions/ActionRegistry.hpp"
 #include "atom.hpp"
 #include "bondgraph.hpp"
@@ -38,37 +36,13 @@
 using namespace std;
 
-#include "UIElements/UIFactory.hpp"
-#include "UIElements/Dialog.hpp"
-#include "Actions/ValueStorage.hpp"
+#include "Actions/FragmentationAction/DepthFirstSearchAction.hpp"
 
-const char FragmentationDepthFirstSearchAction::NAME[] = "depth-first-search";
-
-FragmentationDepthFirstSearchAction::FragmentationDepthFirstSearchAction() :
-  Action(NAME)
-{}
-
-FragmentationDepthFirstSearchAction::~FragmentationDepthFirstSearchAction()
-{}
-
-void FragmentationDepthFirstSearch(double distance) {
-  ValueStorage::getInstance().setCurrentValue(FragmentationDepthFirstSearchAction::NAME, distance);
-  ActionRegistry::getInstance().getActionByName(FragmentationDepthFirstSearchAction::NAME)->call(Action::NonInteractive);
-};
-
-void FragmentationDepthFirstSearchAction::getParametersfromValueStorage()
-{};
-
-Dialog* FragmentationDepthFirstSearchAction::fillDialog(Dialog *dialog) {
-  ASSERT(dialog,"No Dialog given when filling action dialog");
-
-  dialog->queryDouble(NAME, ValueStorage::getInstance().getDescription(NAME));
-
-  return dialog;
-}
-
+// and construct the stuff
+#include "DepthFirstSearchAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
 Action::state_ptr FragmentationDepthFirstSearchAction::performCall() {
-  double distance;
-
-  ValueStorage::getInstance().queryCurrentValue(NAME, distance);
+  // obtain information
+  getParametersfromValueStorage();
 
   DoLog(1) && (Log() << Verbose(1) << "Depth-First-Search Analysis." << endl);
@@ -79,5 +53,5 @@
   class StackClass<bond *> *BackEdgeStack = NULL;
   class StackClass<bond *> *LocalBackEdgeStack = NULL;
-  mol->CreateAdjacencyList(distance, World::getInstance().getConfig()->GetIsAngstroem(), &BondGraph::CovalentMinMaxDistance, NULL);
+  mol->CreateAdjacencyList(params.distance, World::getInstance().getConfig()->GetIsAngstroem(), &BondGraph::CovalentMinMaxDistance, NULL);
   Subgraphs = mol->DepthFirstSearchAnalysis(BackEdgeStack);
   if (Subgraphs != NULL) {
@@ -121,2 +95,3 @@
   return NAME;
 }
+/** =========== end of function ====================== */
Index: src/Actions/FragmentationAction/DepthFirstSearchAction.def
===================================================================
--- src/Actions/FragmentationAction/DepthFirstSearchAction.def	(revision 1fd67574a5cc6c07a5638d5d343eae3b6bbdb9bf)
+++ src/Actions/FragmentationAction/DepthFirstSearchAction.def	(revision 1fd67574a5cc6c07a5638d5d343eae3b6bbdb9bf)
@@ -0,0 +1,25 @@
+/*
+ * DepthFirstSearchAction.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 (double)
+#define paramtokens (FragmentationDepthFirstSearchAction::NAME)
+#define paramreferences (distance)
+
+#undef statetypes
+#undef statereferences
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Fragmentation
+#define ACTIONNAME DepthFirstSearch
+#define TOKEN "depth-first-search"
+
Index: src/Actions/FragmentationAction/DepthFirstSearchAction.hpp
===================================================================
--- src/Actions/FragmentationAction/DepthFirstSearchAction.hpp	(revision 0b2ce98def2d6ab9548ba5ac25acbb2ab5bc233c)
+++ src/Actions/FragmentationAction/DepthFirstSearchAction.hpp	(revision 1fd67574a5cc6c07a5638d5d343eae3b6bbdb9bf)
@@ -11,27 +11,6 @@
 #include "Actions/Action.hpp"
 
-void FragmentationDepthFirstSearch(double distance);
-
-class FragmentationDepthFirstSearchAction : public Action {
-  friend void FragmentationDepthFirstSearch(double distance);
-
-public:
-  FragmentationDepthFirstSearchAction();
-  virtual ~FragmentationDepthFirstSearchAction();
-
-  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 "DepthFirstSearchAction.def"
+#include "Action_impl_header.hpp"
 
 #endif /* DEPTHFIRSTSEARCHACTION_HPP_ */
Index: src/Actions/FragmentationAction/FragmentationAction.cpp
===================================================================
--- src/Actions/FragmentationAction/FragmentationAction.cpp	(revision 0b2ce98def2d6ab9548ba5ac25acbb2ab5bc233c)
+++ src/Actions/FragmentationAction/FragmentationAction.cpp	(revision 1fd67574a5cc6c07a5638d5d343eae3b6bbdb9bf)
@@ -20,6 +20,4 @@
 #include "Helpers/MemDebug.hpp"
 
-#include "Actions/FragmentationAction/FragmentationAction.hpp"
-#include "Actions/ActionRegistry.hpp"
 #include "atom.hpp"
 #include "bondgraph.hpp"
@@ -36,60 +34,29 @@
 using namespace std;
 
-#include "UIElements/UIFactory.hpp"
-#include "UIElements/Dialog.hpp"
-#include "Actions/ValueStorage.hpp"
+#include "Actions/FragmentationAction/FragmentationAction.hpp"
 
-const char FragmentationFragmentationAction::NAME[] = "fragment-mol";
-
-FragmentationFragmentationAction::FragmentationFragmentationAction() :
-  Action(NAME)
-{}
-
-FragmentationFragmentationAction::~FragmentationFragmentationAction()
-{}
-
-void FragmentationFragmentation(std::string &path, double distance, int order) {
-  ValueStorage::getInstance().setCurrentValue(FragmentationFragmentationAction::NAME, path);
-  ValueStorage::getInstance().setCurrentValue("distance", distance);
-  ValueStorage::getInstance().setCurrentValue("order", order);
-  ActionRegistry::getInstance().getActionByName(FragmentationFragmentationAction::NAME)->call(Action::NonInteractive);
-};
-
-void FragmentationFragmentationAction::getParametersfromValueStorage()
-{};
-
-Dialog* FragmentationFragmentationAction::fillDialog(Dialog *dialog) {
-  ASSERT(dialog,"No Dialog given when filling action dialog");
-
-  dialog->queryString(NAME, ValueStorage::getInstance().getDescription(NAME));
-  dialog->queryDouble("distance", ValueStorage::getInstance().getDescription("distance"));
-  dialog->queryInt("order", ValueStorage::getInstance().getDescription("order"));
-
-  return dialog;
-}
-
+// and construct the stuff
+#include "FragmentationAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
 Action::state_ptr FragmentationFragmentationAction::performCall() {
   clock_t start,end;
   molecule *mol = NULL;
-  double distance = -1.;
-  int order = 0;
-  std::string path;
   config *configuration = World::getInstance().getConfig();
   int ExitFlag = 0;
 
-  ValueStorage::getInstance().queryCurrentValue(NAME, path);
-  ValueStorage::getInstance().queryCurrentValue("distance", distance);
-  ValueStorage::getInstance().queryCurrentValue("order", order);
+  // obtain information
+  getParametersfromValueStorage();
 
   for (World::MoleculeSelectionIterator iter = World::getInstance().beginMoleculeSelection(); iter != World::getInstance().endMoleculeSelection(); ++iter) {
     mol = iter->second;
     ASSERT(mol != NULL, "No molecule has been picked for fragmentation.");
-    DoLog(0) && (Log() << Verbose(0) << "Fragmenting molecule with bond distance " << distance << " angstroem, order of " << order << "." << endl);
+    DoLog(0) && (Log() << Verbose(0) << "Fragmenting molecule with bond distance " << params.distance << " angstroem, order of " << params.order << "." << endl);
     DoLog(0) && (Log() << Verbose(0) << "Creating connection matrix..." << endl);
     start = clock();
-    mol->CreateAdjacencyList(distance, configuration->GetIsAngstroem(), &BondGraph::CovalentMinMaxDistance, NULL);
+    mol->CreateAdjacencyList(params.distance, configuration->GetIsAngstroem(), &BondGraph::CovalentMinMaxDistance, NULL);
     DoLog(0) && (Log() << Verbose(0) << "Fragmenting molecule with current connection matrix ..." << endl);
     if (mol->hasBondStructure()) {
-      ExitFlag = mol->FragmentMolecule(order, path);
+      ExitFlag = mol->FragmentMolecule(params.order, params.path);
     }
     World::getInstance().setExitFlag(ExitFlag);
@@ -119,2 +86,3 @@
   return NAME;
 }
+/** =========== end of function ====================== */
Index: src/Actions/FragmentationAction/FragmentationAction.def
===================================================================
--- src/Actions/FragmentationAction/FragmentationAction.def	(revision 1fd67574a5cc6c07a5638d5d343eae3b6bbdb9bf)
+++ src/Actions/FragmentationAction/FragmentationAction.def	(revision 1fd67574a5cc6c07a5638d5d343eae3b6bbdb9bf)
@@ -0,0 +1,25 @@
+/*
+ * FragmentationAction.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) (double) (int)
+#define paramtokens (FragmentationFragmentationAction::NAME) ("distance") ("order")
+#define paramreferences (path) (distance) (order)
+
+#undef statetypes
+#undef statereferences
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Fragmentation
+#define ACTIONNAME Fragmentation
+#define TOKEN "fragment-mol"
+
Index: src/Actions/FragmentationAction/FragmentationAction.hpp
===================================================================
--- src/Actions/FragmentationAction/FragmentationAction.hpp	(revision 0b2ce98def2d6ab9548ba5ac25acbb2ab5bc233c)
+++ src/Actions/FragmentationAction/FragmentationAction.hpp	(revision 1fd67574a5cc6c07a5638d5d343eae3b6bbdb9bf)
@@ -11,27 +11,6 @@
 #include "Actions/Action.hpp"
 
-void FragmentationFragmentation(std::string &path, double distance, int order);
-
-class FragmentationFragmentationAction : public Action {
-  friend void FragmentationFragmentation(std::string &path, double distance, int order);
-
-public:
-  FragmentationFragmentationAction();
-  virtual ~FragmentationFragmentationAction();
-
-  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 "FragmentationAction.def"
+#include "Action_impl_header.hpp"
 
 #endif /* FRAGMENTATIONACTION_HPP_ */
Index: src/Actions/FragmentationAction/SubgraphDissectionAction.cpp
===================================================================
--- src/Actions/FragmentationAction/SubgraphDissectionAction.cpp	(revision 0b2ce98def2d6ab9548ba5ac25acbb2ab5bc233c)
+++ src/Actions/FragmentationAction/SubgraphDissectionAction.cpp	(revision 1fd67574a5cc6c07a5638d5d343eae3b6bbdb9bf)
@@ -20,6 +20,4 @@
 #include "Helpers/MemDebug.hpp"
 
-#include "Actions/FragmentationAction/SubgraphDissectionAction.hpp"
-#include "Actions/ActionRegistry.hpp"
 #include "Descriptors/AtomIdDescriptor.hpp"
 #include "Descriptors/MoleculeDescriptor.hpp"
@@ -38,50 +36,18 @@
 #include <string>
 
+typedef std::map< moleculeId_t, std::vector<atomId_t> > MolAtomList;
+
 using namespace std;
 
-#include "UIElements/UIFactory.hpp"
-#include "UIElements/Dialog.hpp"
-#include "Actions/ValueStorage.hpp"
+#include "Actions/FragmentationAction/SubgraphDissectionAction.hpp"
 
-// memento to remember the state when undoing
+// and construct the stuff
+#include "SubgraphDissectionAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
+Action::state_ptr FragmentationSubgraphDissectionAction::performCall() {
+  // obtain information
+  getParametersfromValueStorage();
 
-typedef std::map< moleculeId_t, std::vector<atomId_t> > MolAtomList;
-
-class FragmentationSubgraphDissectionState : public ActionState {
-public:
-  FragmentationSubgraphDissectionState(const MolAtomList &_moleculelist) :
-   moleculelist(_moleculelist)
-  {}
-  MolAtomList moleculelist;
-};
-
-const char FragmentationSubgraphDissectionAction::NAME[] = "subgraph-dissect";
-
-FragmentationSubgraphDissectionAction::FragmentationSubgraphDissectionAction() :
-  Action(NAME)
-{}
-
-FragmentationSubgraphDissectionAction::~FragmentationSubgraphDissectionAction()
-{}
-
-/** Dissects given \a *mol into connected subgraphs and inserts them as new molecules but with old atoms into \a this.
- */
-void FragmentationSubgraphDissection() {
-  ActionRegistry::getInstance().getActionByName(FragmentationSubgraphDissectionAction::NAME)->call(Action::NonInteractive);
-};
-
-void FragmentationSubgraphDissectionAction::getParametersfromValueStorage()
-{};
-
-Dialog* FragmentationSubgraphDissectionAction::fillDialog(Dialog *dialog) {
-  ASSERT(dialog,"No Dialog given when filling action dialog");
-
-  dialog->queryEmpty(NAME, MapOfActions::getInstance().getDescription(NAME));
-
-  return dialog;
-}
-
-
-Action::state_ptr FragmentationSubgraphDissectionAction::performCall() {
   DoLog(1) && (Log() << Verbose(1) << "Dissecting molecular system into a set of disconnected subgraphs ... " << endl);
 
@@ -97,5 +63,5 @@
     moleculelist.insert( std::pair< moleculeId_t, std::vector<atomId_t> > ((*moliter)->getId(), atomlist));
   }
-  FragmentationSubgraphDissectionState *UndoState = new FragmentationSubgraphDissectionState(moleculelist);
+  FragmentationSubgraphDissectionState *UndoState = new FragmentationSubgraphDissectionState(moleculelist, params);
 
   MoleculeListClass *molecules = World::getInstance().getMolecules();
@@ -213,2 +179,3 @@
   return NAME;
 }
+/** =========== end of function ====================== */
Index: src/Actions/FragmentationAction/SubgraphDissectionAction.def
===================================================================
--- src/Actions/FragmentationAction/SubgraphDissectionAction.def	(revision 1fd67574a5cc6c07a5638d5d343eae3b6bbdb9bf)
+++ src/Actions/FragmentationAction/SubgraphDissectionAction.def	(revision 1fd67574a5cc6c07a5638d5d343eae3b6bbdb9bf)
@@ -0,0 +1,25 @@
+/*
+ * SubgraphDissectionAction.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
+#undef paramtypes
+#undef paramtokens
+#undef paramreferences
+
+#define statetypes (MolAtomList)
+#define statereferences (moleculelist)
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Fragmentation
+#define ACTIONNAME SubgraphDissection
+#define TOKEN "subgraph-dissect"
+
Index: src/Actions/FragmentationAction/SubgraphDissectionAction.hpp
===================================================================
--- src/Actions/FragmentationAction/SubgraphDissectionAction.hpp	(revision 0b2ce98def2d6ab9548ba5ac25acbb2ab5bc233c)
+++ src/Actions/FragmentationAction/SubgraphDissectionAction.hpp	(revision 1fd67574a5cc6c07a5638d5d343eae3b6bbdb9bf)
@@ -11,27 +11,6 @@
 #include "Actions/Action.hpp"
 
-void FragmentationSubgraphDissection();
-
-class FragmentationSubgraphDissectionAction : public Action {
-  friend void FragmentationSubgraphDissection();
-
-public:
-  FragmentationSubgraphDissectionAction();
-  virtual ~FragmentationSubgraphDissectionAction();
-
-  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 "SubgraphDissectionAction.def"
+#include "Action_impl_header.hpp"
 
 #endif /* SUBGRAPHDISSECTIONACTION_HPP_ */
