Index: src/Descriptors/AtomDescriptor.cpp
===================================================================
--- src/Descriptors/AtomDescriptor.cpp	(revision 4ef9b7aecfb5daae2edf520a3935241c1540f1ca)
+++ src/Descriptors/AtomDescriptor.cpp	(revision b99bf3363a6a508d1a23884aaa7720f0f9124c92)
@@ -13,5 +13,5 @@
 #include "World.hpp"
 #include "atom.hpp"
-#include "AtomSet_impl.hpp"
+#include "Patterns/ObservedContainer_impl.hpp"
 
 #include <boost/bind.hpp>
Index: src/Descriptors/AtomIdDescriptor.cpp
===================================================================
--- src/Descriptors/AtomIdDescriptor.cpp	(revision 4ef9b7aecfb5daae2edf520a3935241c1540f1ca)
+++ src/Descriptors/AtomIdDescriptor.cpp	(revision b99bf3363a6a508d1a23884aaa7720f0f9124c92)
@@ -12,5 +12,5 @@
 
 #include "atom.hpp"
-#include "AtomSet_impl.hpp"
+#include "Patterns/ObservedContainer_impl.hpp"
 
 using namespace std;
Index: src/Patterns/ObservedContainer.hpp
===================================================================
--- src/Patterns/ObservedContainer.hpp	(revision b99bf3363a6a508d1a23884aaa7720f0f9124c92)
+++ src/Patterns/ObservedContainer.hpp	(revision b99bf3363a6a508d1a23884aaa7720f0f9124c92)
@@ -0,0 +1,95 @@
+/*
+ * AtomSet.hpp
+ *
+ *  Created on: Jul 8, 2010
+ *      Author: crueger
+ */
+
+#ifndef OBSERVEDCONTAINER_HPP_
+#define OBSERVEDCONTAINER_HPP_
+
+#include "types.hpp"
+
+#include <utility>
+#include "Patterns/ObservedIterator.hpp"
+#include "Descriptors/SelectiveIterator.hpp"
+
+class World;
+class atom;
+class AtomDescriptor;
+
+/**
+ * Forward to std::map<atomId_t,atom*> that allows production of observed and
+ * unobserved iterators to all atoms.
+ *
+ * Imported via typedef into class World. Defined here to avoid bloating of the
+ * World class
+ */
+template <class Container>
+class ObservedContainer
+{
+  friend class World;
+  typedef Container set_t;
+public:
+  // this iterator can be used for internal purposes...
+  // no lock used here
+  typedef typename set_t::iterator                              internal_iterator;
+  typedef typename std::reverse_iterator<internal_iterator>     reverse_internal_iterator;
+  typedef SelectiveIterator<atom*,set_t,AtomDescriptor>         selective_internal_iterator;
+
+  // typedefs for iterator structure
+  typedef ObservedIterator<set_t>                               iterator;
+  typedef typename set_t::const_iterator                        const_iterator;
+  typedef std::reverse_iterator<iterator>                       reverse_iterator;
+  typedef typename std::reverse_iterator<const_iterator>        const_reverse_iterator;
+
+  // some more typedefs for STL-Structure
+  typedef typename set_t::key_type               key_type;
+  typedef typename set_t::mapped_type            mapped_type;
+  typedef typename set_t::value_type             value_type;
+  typedef typename set_t::key_compare            key_compare;
+  typedef typename set_t::allocator_type         allocator_type;
+
+  ObservedContainer(Observable*);
+  ObservedContainer(const ObservedContainer&);
+  virtual ~ObservedContainer();
+
+  // all the functions from STL-map (forwards to content)
+  ObservedContainer& operator=(const ObservedContainer&);
+
+  iterator                      begin();
+  const_iterator                begin()         const;
+  iterator                      end();
+  const_iterator                end()           const;
+  reverse_iterator              rbegin();
+  const_reverse_iterator        rbegin()        const;
+  reverse_iterator              rend();
+  const_reverse_iterator        rend()          const;
+
+  bool empty() const;
+  size_t size() const;
+  size_t max_size() const;
+
+  mapped_type &operator[](const key_type&);
+
+  std::pair<iterator,bool> insert (const value_type&);
+
+  size_t erase ( const key_type& x );
+  void clear();
+
+  iterator              find ( const key_type& x );
+  const_iterator        find ( const key_type& x ) const;
+
+  size_t count ( const key_type& x ) const;
+  internal_iterator             begin_internal();
+  internal_iterator             end_internal();
+  reverse_internal_iterator     rbegin_internal();
+  reverse_internal_iterator     rend_internal();
+
+  set_t &getContent();
+private:
+  set_t content;
+  Observable *obs;
+};
+
+#endif /* OBSERVEDCONTAINER_HPP_ */
Index: src/Patterns/ObservedContainer_impl.hpp
===================================================================
--- src/Patterns/ObservedContainer_impl.hpp	(revision b99bf3363a6a508d1a23884aaa7720f0f9124c92)
+++ src/Patterns/ObservedContainer_impl.hpp	(revision b99bf3363a6a508d1a23884aaa7720f0f9124c92)
@@ -0,0 +1,188 @@
+/*
+ * AtomSet_impl.hpp
+ *
+ *  Created on: Jul 8, 2010
+ *      Author: crueger
+ */
+
+#ifndef OBSERVEDCONTAINER_IMPL_HPP_
+#define OBSERVEDCONTAINER_IMPL_HPP_
+
+#include "Patterns/ObservedContainer.hpp"
+
+template <class Container>
+inline ObservedContainer<Container>::ObservedContainer(Observable* _obs) :
+  obs(_obs)
+{}
+
+template <class Container>
+inline ObservedContainer<Container>::ObservedContainer(const ObservedContainer &src) :
+  content(src.content),
+  obs(src.obs)
+{}
+
+template <class Container>
+inline ObservedContainer<Container>::~ObservedContainer()
+{}
+
+template <class Container>
+inline
+ObservedContainer<Container>&
+ObservedContainer<Container>::operator=(const ObservedContainer &rhs){
+  content=rhs.content;
+  return *this;
+}
+
+template <class Container>
+inline
+typename ObservedContainer<Container>::iterator
+ObservedContainer<Container>::begin(){
+  return ObservedContainer<Container>::iterator(content.begin(),obs);
+}
+
+template <class Container>
+inline
+typename ObservedContainer<Container>::const_iterator
+ObservedContainer<Container>::begin() const{
+  return content.begin();
+}
+
+template <class Container>
+inline
+typename ObservedContainer<Container>::iterator
+ObservedContainer<Container>::end(){
+  return ObservedContainer<Container>::iterator(content.end(),obs);
+}
+
+template <class Container>
+inline
+typename ObservedContainer<Container>::const_iterator
+ObservedContainer<Container>::end() const{
+  return content.end();
+}
+
+template <class Container>
+inline
+typename ObservedContainer<Container>::reverse_iterator
+ObservedContainer<Container>::rbegin(){
+  return reverse_iterator(begin());
+}
+
+template <class Container>
+inline
+typename ObservedContainer<Container>::const_reverse_iterator
+ObservedContainer<Container>::rbegin() const{
+  return const_reverse_iterator(begin());
+}
+
+template <class Container>
+inline
+typename ObservedContainer<Container>::reverse_iterator
+ObservedContainer<Container>::rend(){
+  return reverse_iterator(end());
+}
+
+template <class Container>
+inline
+typename ObservedContainer<Container>::const_reverse_iterator
+ObservedContainer<Container>::rend() const{
+  return const_reverse_iterator(end());
+}
+
+template <class Container>
+inline bool ObservedContainer<Container>::empty() const{
+  return content.empty();
+}
+
+template <class Container>
+inline size_t ObservedContainer<Container>::size() const{
+  return content.size();
+}
+
+template <class Container>
+inline size_t ObservedContainer<Container>::max_size() const{
+  return content.max_size();
+}
+
+template <class Container>
+inline
+typename ObservedContainer<Container>::mapped_type &
+ObservedContainer<Container>::operator[](const key_type &key){
+  return content[key];
+}
+
+template <class Container>
+inline
+std::pair<typename ObservedContainer<Container>::iterator,bool>
+ObservedContainer<Container>::insert (const value_type &value){
+  std::pair<typename set_t::iterator,bool> res = content.insert(value);
+  return std::make_pair(iterator(res.first,obs),res.second);
+}
+
+template <class Container>
+inline size_t ObservedContainer<Container>::erase ( const key_type& x ){
+  return content.erase(x);
+}
+
+template <class Container>
+inline void ObservedContainer<Container>::clear(){
+  content.clear();
+}
+
+template <class Container>
+inline
+typename ObservedContainer<Container>::iterator
+ObservedContainer<Container>::find ( const key_type& x ){
+  return iterator(content.find(x),obs);
+}
+
+template <class Container>
+inline
+typename ObservedContainer<Container>::const_iterator
+ObservedContainer<Container>::find ( const key_type& x ) const{
+  return content.find(x);
+}
+
+template <class Container>
+inline size_t ObservedContainer<Container>::count ( const key_type& x ) const{
+  return content.count(x);
+}
+
+/************ Unprotected access ***************/
+
+template <class Container>
+inline
+typename ObservedContainer<Container>::internal_iterator
+ObservedContainer<Container>::begin_internal(){
+  return content.begin();
+}
+
+template <class Container>
+inline
+typename ObservedContainer<Container>::internal_iterator
+ObservedContainer<Container>::end_internal(){
+  return content.end();
+}
+
+template <class Container>
+inline
+typename ObservedContainer<Container>::reverse_internal_iterator
+ObservedContainer<Container>::rbegin_internal(){
+  return content.rbegin();
+}
+
+template <class Container>
+inline
+typename ObservedContainer<Container>::reverse_internal_iterator
+ObservedContainer<Container>::rend_internal(){
+  return content.rend();
+}
+
+template <class Container>
+inline
+typename ObservedContainer<Container>::set_t &
+ObservedContainer<Container>::getContent(){
+  return content;
+}
+
+#endif /* OBSERVEDCONTAINER_IMPL_HPP_ */
Index: src/World.cpp
===================================================================
--- src/World.cpp	(revision 4ef9b7aecfb5daae2edf520a3935241c1540f1ca)
+++ src/World.cpp	(revision b99bf3363a6a508d1a23884aaa7720f0f9124c92)
@@ -9,5 +9,5 @@
 
 #include "World.hpp"
-#include "AtomSet_impl.hpp"
+#include "Patterns/ObservedContainer_impl.hpp"
 
 #include "atom.hpp"
Index: src/World.hpp
===================================================================
--- src/World.hpp	(revision 4ef9b7aecfb5daae2edf520a3935241c1540f1ca)
+++ src/World.hpp	(revision b99bf3363a6a508d1a23884aaa7720f0f9124c92)
@@ -23,5 +23,5 @@
 #include "Patterns/Cacheable.hpp"
 #include "Patterns/Singleton.hpp"
-#include "AtomSet.hpp"
+#include "Patterns/ObservedContainer.hpp"
 
 // include config.h
