Index: code/branches/presentation3/src/libraries/core/BaseObject.cc
===================================================================
--- code/branches/presentation3/src/libraries/core/BaseObject.cc	(revision 7073)
+++ 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 7073)
+++ 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 7073)
+++ 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 7073)
+++ 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 7073)
+++ 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;
+    }
 }
 
