Index: /code/branches/presentation3/src/libraries/core/BaseObject.cc
===================================================================
--- /code/branches/presentation3/src/libraries/core/BaseObject.cc	(revision 7104)
+++ /code/branches/presentation3/src/libraries/core/BaseObject.cc	(revision 7105)
@@ -196,4 +196,11 @@
     {
         this->templates_.insert(temp);
+        if( temp->isLink() )
+        {
+          this->networkTemplateNames_.insert(temp->getLink());
+          assert( !Template::getTemplate(temp->getLink())->isLink() );
+        }
+        else
+          this->networkTemplateNames_.insert(temp->getName());
         temp->applyOn(this);
     }
Index: /code/branches/presentation3/src/libraries/core/BaseObject.h
===================================================================
--- /code/branches/presentation3/src/libraries/core/BaseObject.h	(revision 7104)
+++ /code/branches/presentation3/src/libraries/core/BaseObject.h	(revision 7105)
@@ -191,10 +191,11 @@
             EventState* getEventState(const std::string& name) const;
 
-            std::string name_;                                 //!< The name of the object
-            std::string oldName_;                              //!< The old name of the object
-            mbool       bActive_;                              //!< True = the object is active
-            mbool       bVisible_;                             //!< True = the object is visible
-            std::string mainStateName_;
-            Functor*    mainStateFunctor_;
+            std::string             name_;                     //!< The name of the object
+            std::string             oldName_;                  //!< The old name of the object
+            mbool                   bActive_;                  //!< True = the object is active
+            mbool                   bVisible_;                 //!< True = the object is visible
+            std::string             mainStateName_;
+            Functor*                mainStateFunctor_;
+            std::set<std::string>   networkTemplateNames_;
 
         private:
Index: /code/branches/presentation3/src/libraries/core/Template.h
===================================================================
--- /code/branches/presentation3/src/libraries/core/Template.h	(revision 7104)
+++ /code/branches/presentation3/src/libraries/core/Template.h	(revision 7105)
@@ -51,4 +51,6 @@
             inline const std::string& getLink() const
                 { return this->link_; }
+            inline bool isLink() const
+                { return this->bIsLink_; }
 
             inline void setLoadDefaults(bool bLoadDefaults)
Index: /code/branches/presentation3/src/libraries/network/synchronisable/Synchronisable.h
===================================================================
--- /code/branches/presentation3/src/libraries/network/synchronisable/Synchronisable.h	(revision 7104)
+++ /code/branches/presentation3/src/libraries/network/synchronisable/Synchronisable.h	(revision 7105)
@@ -37,4 +37,5 @@
 #include <map>
 #include <queue>
+#include <set>
 
 #include "util/mbool.h"
@@ -138,4 +139,5 @@
     Synchronisable(BaseObject* creator);
     template <class T> void registerVariable(T& variable, uint8_t mode=0x1, NetworkCallbackBase *cb=0, bool bidirectional=false);
+    template <class T> void registerVariable(std::set<T>& variable, uint8_t mode=0x1, NetworkCallbackBase *cb=0, bool bidirectional=false);
 
     void setPriority(unsigned int freq){ objectFrequency_ = freq; }
@@ -181,6 +183,18 @@
     }
   }
+  
+  template <class T> void Synchronisable::registerVariable( std::set<T>& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
+  {
+    SynchronisableVariableBase* sv;
+    if (bidirectional)
+      sv = new SynchronisableVariableBidirectional<std::set<T> >(variable, mode, cb);
+    else
+      sv = new SynchronisableVariable<std::set<T> >(variable, mode, cb);
+    syncList.push_back(sv);
+    stringList.push_back(sv);
+  }
 
   template <> _NetworkExport void Synchronisable::registerVariable( std::string& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional);
+//   template <class T> _NetworkExport void Synchronisable::registerVariable<std::set<T> >( std::set<T>& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional);
 
 
Index: /code/branches/presentation3/src/libraries/util/Serialise.h
===================================================================
--- /code/branches/presentation3/src/libraries/util/Serialise.h	(revision 7104)
+++ /code/branches/presentation3/src/libraries/util/Serialise.h	(revision 7105)
@@ -38,4 +38,5 @@
 
 #include <cstring>
+#include <set>
 #include "Math.h"
 #include "mbool.h"
@@ -635,4 +636,69 @@
         return checkEquality( (unsigned char&)((mbool&)variable).getMemory(), mem );
     }
+    
+    // =========== std::set
+    
+    template <class T> inline uint32_t returnSize( const std::set<T>& variable )
+    {
+        uint32_t tempsize = sizeof(uint32_t); // for the number of entries
+        for( typename std::set<T>::iterator it=((std::set<T>*)(&variable))->begin(); it!=((std::set<T>*)(&variable))->end(); ++it)
+            tempsize += returnSize( *it ); 
+        return tempsize; 
+    }
+    
+    template <class T> inline void saveAndIncrease(  const std::set<T>& variable, uint8_t*& mem )
+    {
+        typename std::set<T>::const_iterator it = variable.begin();
+        saveAndIncrease( (uint32_t)variable.size(), mem );
+        for( ; it!=variable.end(); ++it )
+            saveAndIncrease( *it, mem );
+    }
+    
+    template <class T> inline void loadAndIncrease( const std::set<T>& variable, uint8_t*& mem )
+    {
+        uint32_t nrOfElements = 0;
+        loadAndIncrease( nrOfElements, mem );
+        typename std::set<T>::const_iterator it = variable.begin();
+        for( uint32_t i = 0; i<nrOfElements; ++i )
+        {
+            T temp;
+            loadAndIncrease(temp, mem);
+            while( it!=variable.end() && *it!=temp )
+            {
+                ((std::set<T>*)(&variable))->erase(it++);
+                ++it;
+            }
+            if( it==variable.end() )
+            {
+                ((std::set<T>*)(&variable))->insert(temp);
+            }
+        }
+    }
+    
+    template <class T> inline bool checkEquality( const std::set<T>& variable, uint8_t* mem )
+    {
+        uint8_t* temp = mem;
+        uint32_t nrOfElements;
+        loadAndIncrease(nrOfElements, mem);
+        if( variable.size() == nrOfElements )
+        {
+            T tempT;
+            for( uint32_t i=0; i<nrOfElements; ++i )
+            {
+                loadAndIncrease(tempT, mem);
+                if( variable.find(tempT) == variable.end() )
+                {
+                    mem = temp;
+                    return false;
+                }
+            }
+        }
+        else
+        {
+            mem = temp;
+            return false;
+        }
+        return true;
+    }
 }
 
Index: /code/branches/presentation3/src/orxonox/Level.cc
===================================================================
--- /code/branches/presentation3/src/orxonox/Level.cc	(revision 7104)
+++ /code/branches/presentation3/src/orxonox/Level.cc	(revision 7105)
@@ -80,7 +80,8 @@
     void Level::registerVariables()
     {
-        registerVariable(this->xmlfilename_, VariableDirection::ToClient, new NetworkCallback<Level>(this, &Level::networkcallback_applyXMLFile));
-        registerVariable(this->name_,        VariableDirection::ToClient, new NetworkCallback<Level>(this, &Level::changedName));
-        registerVariable(this->description_, VariableDirection::ToClient);
+        registerVariable(this->xmlfilename_,            VariableDirection::ToClient, new NetworkCallback<Level>(this, &Level::networkcallback_applyXMLFile));
+        registerVariable(this->name_,                   VariableDirection::ToClient, new NetworkCallback<Level>(this, &Level::changedName));
+        registerVariable(this->description_,            VariableDirection::ToClient);
+        registerVariable(this->networkTemplateNames_,   VariableDirection::ToClient, new NetworkCallback<Level>(this, &Level::networkCallbackTemplatesChanged));
     }
 
@@ -97,4 +98,13 @@
 
         Loader::open(this->xmlfile_);
+    }
+    
+    void Level::networkCallbackTemplatesChanged()
+    {
+        for( std::set<std::string>::iterator it = this->networkTemplateNames_.begin(); it!=this->networkTemplateNames_.end(); ++it )
+        {
+            assert(Template::getTemplate(*it));
+            Template::getTemplate(*it)->applyOn(this);
+        }
     }
 
Index: /code/branches/presentation3/src/orxonox/Level.h
===================================================================
--- /code/branches/presentation3/src/orxonox/Level.h	(revision 7104)
+++ /code/branches/presentation3/src/orxonox/Level.h	(revision 7105)
@@ -66,4 +66,5 @@
 
             void addLodInfo(MeshLodInformation* object);
+            void networkCallbackTemplatesChanged();
 //            const MeshLodInformation* getLodInfo(std::string meshName) const;
 //            MeshLodInformation* getLodInfo(unsigned int index) const;
Index: /code/branches/presentation3/src/orxonox/Test.cc
===================================================================
--- /code/branches/presentation3/src/orxonox/Test.cc	(revision 7104)
+++ /code/branches/presentation3/src/orxonox/Test.cc	(revision 7105)
@@ -88,15 +88,17 @@
     void Test::registerVariables()
     {
-        registerVariable ( u1, VariableDirection::ToClient, new NetworkCallback<Test> ( this, &Test::checkU1 ));
-        registerVariable ( u2, VariableDirection::ToServer, new NetworkCallback<Test> ( this, &Test::checkU2 ));
-        registerVariable ( u3, Bidirectionality::ServerMaster, new NetworkCallback<Test> ( this, &Test::checkU3 ), true );
-        registerVariable ( u4, Bidirectionality::ClientMaster, new NetworkCallback<Test> ( this, &Test::checkU4 ), true );
+        registerVariable ( this->mySet_, VariableDirection::ToClient );
+      
+//         registerVariable ( u1, VariableDirection::ToClient, new NetworkCallback<Test> ( this, &Test::checkU1 ));
+//         registerVariable ( u2, VariableDirection::ToServer, new NetworkCallback<Test> ( this, &Test::checkU2 ));
+//         registerVariable ( u3, Bidirectionality::ServerMaster, new NetworkCallback<Test> ( this, &Test::checkU3 ), true );
+//         registerVariable ( u4, Bidirectionality::ClientMaster, new NetworkCallback<Test> ( this, &Test::checkU4 ), true );
     
-        registerVariable ( s1, VariableDirection::ToClient, new NetworkCallback<Test> ( this, &Test::checkS1 ));
-        registerVariable ( s2, VariableDirection::ToServer, new NetworkCallback<Test> ( this, &Test::checkS2 ));
-        registerVariable ( s3, Bidirectionality::ServerMaster, new NetworkCallback<Test> ( this, &Test::checkS3 ), true );
-        registerVariable ( s4, Bidirectionality::ClientMaster, new NetworkCallback<Test> ( this, &Test::checkS4 ), true );
+//         registerVariable ( s1, VariableDirection::ToClient, new NetworkCallback<Test> ( this, &Test::checkS1 ));
+//         registerVariable ( s2, VariableDirection::ToServer, new NetworkCallback<Test> ( this, &Test::checkS2 ));
+//         registerVariable ( s3, Bidirectionality::ServerMaster, new NetworkCallback<Test> ( this, &Test::checkS3 ), true );
+//         registerVariable ( s4, Bidirectionality::ClientMaster, new NetworkCallback<Test> ( this, &Test::checkS4 ), true );
     
-        registerVariable ( pointer_, VariableDirection::ToClient, new NetworkCallback<Test> ( this, &Test::printPointer ) );
+//         registerVariable ( pointer_, VariableDirection::ToClient, new NetworkCallback<Test> ( this, &Test::printPointer ) );
     }
   
Index: /code/branches/presentation3/src/orxonox/Test.h
===================================================================
--- /code/branches/presentation3/src/orxonox/Test.h	(revision 7104)
+++ /code/branches/presentation3/src/orxonox/Test.h	(revision 7105)
@@ -35,4 +35,5 @@
 #include "tools/interfaces/Tickable.h"
 
+#include <set>
 
 typedef int TYPE;
@@ -78,6 +79,6 @@
       void printPointer();
 
-      static void printV1(){ instance_->checkU1(); }
-      static void printV2(){ instance_->checkU2(); }
+      static void printV1(){ instance_->blub(); }
+      static void printV2(){ instance_->blub2(); }
       static void printV3(){ instance_->checkU3(); }
       static void printV4(){ instance_->checkU4(); }
@@ -97,6 +98,14 @@
 
       Test* pointer_;
+      
+      std::set<uint32_t> mySet_;
 
       static Test* instance_;
+      
+      void blub()
+      { mySet_.insert(2); }
+      
+      void blub2()
+      { for( std::set<uint32_t>::iterator it=mySet_.begin(); it!=mySet_.end(); ++it ) COUT(0) << *it << endl; }
   };
 }
