Index: src/Actions/Action.cpp
===================================================================
--- src/Actions/Action.cpp	(revision 0430e3120648e3906f33481ea1869d1cb3df52a9)
+++ src/Actions/Action.cpp	(revision 2ad48247b6f9de9eea8821024e501debd95f776e)
@@ -34,5 +34,5 @@
 {
   if(_doRegister){
-    ActionRegistry::getInstance().registerAction(this);
+    ActionRegistry::getInstance().registerInstance(this);
   }
 }
Index: src/Actions/ActionRegistry.cpp
===================================================================
--- src/Actions/ActionRegistry.cpp	(revision 0430e3120648e3906f33481ea1869d1cb3df52a9)
+++ src/Actions/ActionRegistry.cpp	(revision 2ad48247b6f9de9eea8821024e501debd95f776e)
@@ -1,4 +1,4 @@
 /*
- * ActionRegistry.cpp
+ * Registry<Action>.cpp
  *
  *  Created on: Jan 7, 2010
@@ -9,118 +9,35 @@
 
 #include "Actions/ActionRegistry.hpp"
-#include "Actions/Action.hpp"
-
 #include "Patterns/Singleton_impl.hpp"
-
-#include <string>
-#include "Helpers/Assert.hpp"
-#include <iostream>
-
-using namespace std;
+#include "Patterns/Registry_impl.hpp"
 
 /** Constructor for class ActionRegistry.
  */
 ActionRegistry::ActionRegistry()
-{
-}
+{}
 
 /** Destructor for class ActionRegistry.
  */
 ActionRegistry::~ActionRegistry()
+{}
+
+/** Just passes on call to Registry<Action>::getByName().
+ * \param name name of Action
+ * \return pointer to Action
+ */
+Action* ActionRegistry::getActionByName(const std::string name)
 {
-  map<const string,Action*>::iterator iter;
-  for(iter=actionMap.begin();iter!=actionMap.end();++iter) {
-    delete iter->second;
-  }
-  actionMap.clear();
+  return getByName(name);
 }
 
-/** Returns pointer to an action named by \a name.
- * \param name name of action
- * \return pointer to Action
+/** Just passes on call to Registry<Action>::isPresentByName().
+ * \param name name of Action
+ * \return true - Action instance present, false - not
  */
-Action* ActionRegistry::getActionByName(const std::string name){
-  map<const string,Action*>::iterator iter;
-  iter = actionMap.find(name);
-  ASSERT(iter!=actionMap.end(),"Query for an action not stored in registry");
-  return iter->second;
+bool ActionRegistry::isActionPresentByName(const std::string name)
+{
+  return isPresentByName(name);
 }
 
-/** States whether action is present or not.
- * \note This iss needed as ActionRegistry::getActionByName() ASSERT()s that action is in map.
- * \param name name of action
- * \return true - Action present, false - Action absent
- */
-bool ActionRegistry::isActionByNamePresent(const std::string name){
-  map<const string,Action*>::iterator iter;
-  iter = actionMap.find(name);
-  return iter!=actionMap.end();
-}
-
-/** Registers an Action with the ActionRegistry.
- * \param *action pointer to Action.
- */
-void ActionRegistry::registerAction(Action* action){
-  pair<map<const string,Action*>::iterator,bool> ret;
-  //cout << "Trying to register action with name " << action->getName() << "." << endl;
-  ret = actionMap.insert(pair<const string,Action*>(action->getName(),action));
-  ASSERT(ret.second,"Two actions with the same name added to registry");
-}
-
-/** Unregisters an Action.
- * \param *action pointer to Action.
- */
-void ActionRegistry::unregisterAction(Action* action){
-  //cout << "Unregistering action with name " << action->getName() << "." << endl;
-  actionMap.erase(action->getName());
-}
-
-/** Returns an iterator pointing to the start of the map of Action's.
- * \return begin iterator
- */
-std::map<const std::string,Action*>::iterator ActionRegistry::getBeginIter()
-{
-  return actionMap.begin();
-}
-
-/** Returns an iterator pointing to the end of the map of Action's.
- * \return end iterator
- */
-std::map<const std::string,Action*>::iterator ActionRegistry::getEndIter()
-{
-  return actionMap.end();
-}
-
-/** Returns a const iterator pointing to the start of the map of Action's.
- * \return constant begin iterator
- */
-std::map<const std::string,Action*>::const_iterator ActionRegistry::getBeginIter() const
-{
-  return actionMap.begin();
-}
-
-/** Returns a const iterator pointing to the end of the map of Action's.
- * \return constant end iterator
- */
-std::map<const std::string,Action*>::const_iterator ActionRegistry::getEndIter() const
-{
-  return actionMap.end();
-}
-
-/** Prints the contents of the ActionRegistry \a &m to \a &ost.
- * \param &ost output stream
- * \param &m reference to ActionRegistry
- * \return reference to the above out stream for concatenation
- */
-ostream& operator<<(ostream& ost, const ActionRegistry& m)
-{
-  ost << "ActionRegistry contains:" << endl;
-  for (std::map<const std::string,Action*>::const_iterator iter = m.getBeginIter(); iter != m.getEndIter(); ++iter) {
-    ost << "\t" << iter->first << " with pointer " << iter->second << endl;
-  }
-  return ost;
-};
-
-
-
 CONSTRUCT_SINGLETON(ActionRegistry)
+CONSTRUCT_REGISTRY(Action)
Index: src/Actions/ActionRegistry.hpp
===================================================================
--- src/Actions/ActionRegistry.hpp	(revision 0430e3120648e3906f33481ea1869d1cb3df52a9)
+++ src/Actions/ActionRegistry.hpp	(revision 2ad48247b6f9de9eea8821024e501debd95f776e)
@@ -1,4 +1,4 @@
 /*
- * ActionRegistry.hpp
+ * Registry<Action>.hpp
  *
  *  Created on: Jan 7, 2010
@@ -13,31 +13,27 @@
 #include <map>
 
+#include "Patterns/Registry.hpp"
 #include "Patterns/Singleton.hpp"
+#include "Actions/Action.hpp"
 
-class Action;
-
-class ActionRegistry : public Singleton<ActionRegistry>
+/** Action Registry.
+ *
+ * The Action registry is a storage for any Action instance to retrieved by name.
+ * It is a singleton and can be called from anywhere.
+ *
+ */
+class ActionRegistry : public Singleton<ActionRegistry>, public Registry<Action>
 {
   friend class Singleton<ActionRegistry>;
+  //friend class Registry<Action>;
+
 public:
-  Action* getActionByName(const std::string);
-  bool isActionByNamePresent(const std::string name);
-  void registerAction(Action*);
-  void unregisterAction(Action*);
-
-  std::map<const std::string,Action*>::iterator getBeginIter();
-  std::map<const std::string,Action*>::const_iterator getBeginIter() const;
-  std::map<const std::string,Action*>::iterator getEndIter();
-  std::map<const std::string,Action*>::const_iterator getEndIter() const;
-
-private:
-  std::map<const std::string,Action*> actionMap;
+  Action* getActionByName(const std::string name);
+  bool isActionPresentByName(const std::string name);
 
 private:
   ActionRegistry();
-  virtual ~ActionRegistry();
+  ~ActionRegistry();
 };
 
-std::ostream& operator<<(std::ostream& ost, const ActionRegistry& m);
-
 #endif /* ACTIONREGISTRY_HPP_ */
