Index: code/trunk/src/libraries/core/Core.h
===================================================================
--- code/trunk/src/libraries/core/Core.h	(revision 7226)
+++ code/trunk/src/libraries/core/Core.h	(revision 7266)
@@ -36,5 +36,6 @@
 #include <string>
 #include <boost/scoped_ptr.hpp>
-#include "util/ScopeGuard.h"
+#include <loki/ScopeGuard.h>
+
 #include "util/Singleton.h"
 #include "OrxonoxClass.h"
Index: code/trunk/src/libraries/core/CorePrecompiledHeaders.h
===================================================================
--- code/trunk/src/libraries/core/CorePrecompiledHeaders.h	(revision 7226)
+++ code/trunk/src/libraries/core/CorePrecompiledHeaders.h	(revision 7266)
@@ -57,5 +57,5 @@
 #include <cmath>    // 42
 
-#include "util/ScopeGuard.h" // 38
+#include <loki/ScopeGuard.h> // 38
 
 #include <OgreMath.h>        // 36
Index: code/trunk/src/libraries/core/Game.cc
===================================================================
--- code/trunk/src/libraries/core/Game.cc	(revision 7226)
+++ code/trunk/src/libraries/core/Game.cc	(revision 7266)
@@ -37,9 +37,9 @@
 #include <exception>
 #include <boost/weak_ptr.hpp>
+#include <loki/ScopeGuard.h>
 
 #include "util/Clock.h"
 #include "util/Debug.h"
 #include "util/Exception.h"
-#include "util/ScopeGuard.h"
 #include "util/Sleep.h"
 #include "util/SubString.h"
Index: code/trunk/src/libraries/core/Game.h
===================================================================
--- code/trunk/src/libraries/core/Game.h	(revision 7226)
+++ code/trunk/src/libraries/core/Game.h	(revision 7266)
@@ -46,7 +46,7 @@
 #include <boost/scoped_ptr.hpp>
 #include <boost/preprocessor/cat.hpp>
+#include <loki/ScopeGuard.h>
 
 #include "util/Debug.h"
-#include "util/ScopeGuard.h"
 #include "util/Singleton.h"
 #include "OrxonoxClass.h"
Index: code/trunk/src/libraries/core/Identifier.h
===================================================================
--- code/trunk/src/libraries/core/Identifier.h	(revision 7226)
+++ code/trunk/src/libraries/core/Identifier.h	(revision 7266)
@@ -57,7 +57,7 @@
 #include <string>
 #include <typeinfo>
+#include <loki/TypeTraits.h>
 
 #include "util/Debug.h"
-#include "util/TypeTraits.h"
 #include "MetaObjectList.h"
 #include "ObjectList.h"
Index: code/trunk/src/libraries/core/LuaState.cc
===================================================================
--- code/trunk/src/libraries/core/LuaState.cc	(revision 7226)
+++ code/trunk/src/libraries/core/LuaState.cc	(revision 7266)
@@ -35,8 +35,8 @@
 #include <lualib.h>
 }
+#include <loki/ScopeGuard.h>
 
 #include "util/Debug.h"
 #include "util/Exception.h"
-#include "util/ScopeGuard.h"
 #include "IOConsole.h"
 #include "Resource.h"
Index: code/trunk/src/libraries/core/LuaState.h
===================================================================
--- code/trunk/src/libraries/core/LuaState.h	(revision 7226)
+++ code/trunk/src/libraries/core/LuaState.h	(revision 7266)
@@ -38,6 +38,6 @@
 #include <vector>
 #include <boost/shared_ptr.hpp>
+#include <loki/ScopeGuard.h>
 
-#include "util/ScopeGuard.h"
 #include "Functor.h"
 #include "ToluaInterface.h"
Index: code/trunk/src/libraries/core/input/InputManager.cc
===================================================================
--- code/trunk/src/libraries/core/input/InputManager.cc	(revision 7226)
+++ code/trunk/src/libraries/core/input/InputManager.cc	(revision 7266)
@@ -40,9 +40,9 @@
 #include <ois/OISInputManager.h>
 #include <boost/foreach.hpp>
+#include <loki/ScopeGuard.h>
 
 #include "util/Clock.h"
 #include "util/Convert.h"
 #include "util/Exception.h"
-#include "util/ScopeGuard.h"
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
Index: code/trunk/src/libraries/network/NetworkPrecompiledHeaders.h
===================================================================
--- code/trunk/src/libraries/network/NetworkPrecompiledHeaders.h	(revision 7226)
+++ code/trunk/src/libraries/network/NetworkPrecompiledHeaders.h	(revision 7266)
@@ -53,5 +53,5 @@
 
 #include "util/Debug.h"      // 20
-#include "util/TypeTraits.h" // 18
+#include <loki/TypeTraits.h> // 18
 
 #ifdef ORXONOX_COMPILER_MSVC
Index: code/trunk/src/libraries/network/synchronisable/Serialise.h
===================================================================
--- code/trunk/src/libraries/network/synchronisable/Serialise.h	(revision 7226)
+++ code/trunk/src/libraries/network/synchronisable/Serialise.h	(revision 7266)
@@ -35,6 +35,9 @@
 #define _NetworkSerialise_H__
 
+#include "network/NetworkPrereqs.h"
+
+#include <loki/TypeTraits.h>
+
 #include "util/Serialise.h"
-#include "util/TypeTraits.h"
 #include "core/CorePrereqs.h"
 #include "core/CoreIncludes.h"
Index: code/trunk/src/libraries/network/synchronisable/SynchronisableVariable.h
===================================================================
--- code/trunk/src/libraries/network/synchronisable/SynchronisableVariable.h	(revision 7226)
+++ code/trunk/src/libraries/network/synchronisable/SynchronisableVariable.h	(revision 7266)
@@ -35,6 +35,7 @@
 #include <cassert>
 #include <cstring>
+#include <loki/TypeTraits.h>
+
 #include "Serialise.h"
-#include "util/TypeTraits.h"
 #include "core/GameMode.h"
 #include "network/synchronisable/NetworkCallbackManager.h"
Index: code/trunk/src/libraries/util/Convert.h
===================================================================
--- code/trunk/src/libraries/util/Convert.h	(revision 7226)
+++ code/trunk/src/libraries/util/Convert.h	(revision 7266)
@@ -41,4 +41,5 @@
 #include <sstream>
 #include <typeinfo>
+#include <loki/TypeManip.h>
 
 #include "Debug.h"
@@ -76,12 +77,4 @@
 namespace orxonox
 {
-    namespace detail
-    {
-        //! Little template that maps integers to entire types (Alexandrescu 2001)
-        template <int I>
-        struct Int2Type { };
-    }
-
-
     ///////////////////
     // No Conversion //
@@ -215,5 +208,5 @@
     // implicit cast not possible, try stringstream conversion next
     template <class FromType, class ToType>
-    FORCEINLINE bool convertImplicitely(ToType* output, const FromType& input, detail::Int2Type<false>)
+    FORCEINLINE bool convertImplicitely(ToType* output, const FromType& input, Loki::Int2Type<false>)
     {
         return ConverterStringStream<FromType, ToType>::convert(output, input);
@@ -222,5 +215,5 @@
     // We can cast implicitely
     template <class FromType, class ToType>
-    FORCEINLINE bool convertImplicitely(ToType* output, const FromType& input, detail::Int2Type<true>)
+    FORCEINLINE bool convertImplicitely(ToType* output, const FromType& input, Loki::Int2Type<true>)
     {
         (*output) = static_cast<ToType>(input);
@@ -242,5 +235,5 @@
             // Try implict cast and probe first. If a simple cast is not possible, it will not compile
             // We therefore have to out source it into another template function
-            return convertImplicitely(output, input, detail::Int2Type<probe>());
+            return convertImplicitely(output, input, Loki::Int2Type<probe>());
         }
     };
Index: code/trunk/src/libraries/util/MultiType.h
===================================================================
--- code/trunk/src/libraries/util/MultiType.h	(revision 7226)
+++ code/trunk/src/libraries/util/MultiType.h	(revision 7266)
@@ -76,6 +76,5 @@
 #include <OgreQuaternion.h>
 #include <OgreColourValue.h>
-
-#include "TypeTraits.h"
+#include <loki/TypeTraits.h>
 
 namespace orxonox
Index: code/trunk/src/libraries/util/RefToValue.h
===================================================================
--- code/trunk/src/libraries/util/RefToValue.h	(revision 7226)
+++ 	(revision )
@@ -1,70 +1,0 @@
-////////////////////////////////////////////////////////////////////////////////
-// The Loki Library
-// Copyright (c) 2006 Richard Sposato
-// Copyright (c) 2006 Peter Kümmel
-// Permission to use, copy, modify, distribute and sell this software for any 
-//     purpose is hereby granted without fee, provided that the above copyright 
-//     notice appear in all copies and that both that copyright notice and this 
-//     permission notice appear in supporting documentation.
-// The authors make no representations about the 
-//     suitability of this software for any purpose. It is provided "as is" 
-//     without express or implied warranty.
-////////////////////////////////////////////////////////////////////////////////
-#ifndef LOKI_REFTOVALUE_INC_
-#define LOKI_REFTOVALUE_INC_
-
-// $Id: RefToValue.h 751 2006-10-17 19:50:37Z syntheticpp $
-
-
-namespace Loki
-{
-
-    ////////////////////////////////////////////////////////////////////////////////
-    ///  \class RefToValue
-    ///
-    ///  \ingroup SmartPointerGroup 
-    ///  Transports a reference as a value
-    ///  Serves to implement the Colvin/Gibbons trick for SmartPtr/ScopeGuard
-    ////////////////////////////////////////////////////////////////////////////////
-
-    template <class T>
-    class RefToValue
-    {   
-    public:
-    
-        RefToValue(T& ref) : ref_(ref) 
-        {}
-
-        RefToValue(const RefToValue& rhs) : ref_(rhs.ref_)
-        {}
-
-        operator T& () const 
-        {
-            return ref_;
-        }
-
-    private:
-        // Disable - not implemented
-        RefToValue();
-        RefToValue& operator=(const RefToValue&);
-        
-        T& ref_;
-    };
-
-
-    ////////////////////////////////////////////////////////////////////////////////
-    ///  \ingroup ExceptionGroup 
-    ///  RefToValue creator.
-    ////////////////////////////////////////////////////////////////////////////////
-
-    template <class T>
-    inline RefToValue<T> ByRef(T& t)
-    {
-        return RefToValue<T>(t);
-    }    
-    
-}
-
-
-#endif // end file guardian
-
Index: code/trunk/src/libraries/util/Scope.h
===================================================================
--- code/trunk/src/libraries/util/Scope.h	(revision 7226)
+++ code/trunk/src/libraries/util/Scope.h	(revision 7266)
@@ -35,7 +35,7 @@
 #include <map>
 #include <set>
+#include <loki/ScopeGuard.h>
 
 #include "Debug.h"
-#include "ScopeGuard.h"
 
 namespace orxonox
Index: code/trunk/src/libraries/util/ScopeGuard.h
===================================================================
--- code/trunk/src/libraries/util/ScopeGuard.h	(revision 7226)
+++ 	(revision )
@@ -1,666 +1,0 @@
-////////////////////////////////////////////////////////////////////////////////
-// The Loki Library
-// Copyright (c) 2000 Andrei Alexandrescu
-// Copyright (c) 2000 Petru Marginean
-// Copyright (c) 2005 Joshua Lehrer
-//
-// Permission to use, copy, modify, distribute and sell this software for any 
-//     purpose is hereby granted without fee, provided that the above copyright 
-//     notice appear in all copies and that both that copyright notice and this 
-//     permission notice appear in supporting documentation.
-// The author makes no representations about the 
-//     suitability of this software for any purpose. It is provided "as is" 
-//     without express or implied warranty.
-////////////////////////////////////////////////////////////////////////////////
-#ifndef LOKI_SCOPEGUARD_INC_
-#define LOKI_SCOPEGUARD_INC_
-
-// $Id: ScopeGuard.h 799 2006-12-20 00:37:13Z rich_sposato $
-
-
-#include "RefToValue.h"
-
-/// \defgroup ExceptionGroup Exception-safe code
-
-namespace Loki
-{
-
-    ////////////////////////////////////////////////////////////////
-    ///
-    /// \class ScopeGuardImplBase
-    /// \ingroup ExceptionGroup
-    ///
-    /// Base class used by all ScopeGuard implementations.  All commonly used
-    /// functions are in this class (e.g. - Dismiss and SafeExecute).
-    ///
-    /// See Andrei's and Petru Marginean's CUJ article
-    /// http://www.cuj.com/documents/s=8000/cujcexp1812alexandr/alexandr.htm
-    ///
-    /// Changes to the original code by Joshua Lehrer:
-    /// http://www.lehrerfamily.com/scopeguard.html
-    ////////////////////////////////////////////////////////////////
-
-    class ScopeGuardImplBase
-    {
-        /// Copy-assignment operator is not implemented and private.
-        ScopeGuardImplBase& operator =(const ScopeGuardImplBase&);
-
-    protected:
-
-        ~ScopeGuardImplBase()
-        {}
-
-        /// Copy-constructor takes over responsibility from other ScopeGuard.
-        ScopeGuardImplBase(const ScopeGuardImplBase& other) throw() 
-            : dismissed_(other.dismissed_)
-        {
-            other.Dismiss();
-        }
-
-        template <typename J>
-        static void SafeExecute(J& j) throw() 
-        {
-            if (!j.dismissed_)
-                try
-                {
-                    j.Execute();
-                }
-                catch(...)
-                {}
-        }
-        
-        mutable bool dismissed_;
-
-    public:
-        ScopeGuardImplBase() throw() : dismissed_(false) 
-        {}
-
-        void Dismiss() const throw() 
-        {
-            dismissed_ = true;
-        }
-    };
-
-    ////////////////////////////////////////////////////////////////
-    ///
-    /// \typedef typedef const ScopeGuardImplBase& ScopeGuard
-    /// \ingroup ExceptionGroup
-    ///
-    ////////////////////////////////////////////////////////////////
-
-    typedef const ScopeGuardImplBase& ScopeGuard;
-
-    ////////////////////////////////////////////////////////////////
-    ///
-    /// \class ScopeGuardImpl0
-    /// \ingroup ExceptionGroup
-    ///
-    /// Implementation class for a standalone function or class static function
-    /// with no parameters.  ScopeGuard ignores any value returned from the
-    /// call within the Execute function.
-    ///
-    /// This class has a single standalone helper function, MakeGuard which
-    /// creates and returns a ScopeGuard.
-    ///
-    ////////////////////////////////////////////////////////////////
-
-    template <typename F>
-    class ScopeGuardImpl0 : public ScopeGuardImplBase
-    {
-    public:
-        static ScopeGuardImpl0<F> MakeGuard(F fun)
-        {
-            return ScopeGuardImpl0<F>(fun);
-        }
-
-        ~ScopeGuardImpl0() throw() 
-        {
-            SafeExecute(*this);
-        }
-
-        void Execute() 
-        {
-            fun_();
-        }
-
-        ScopeGuardImpl0(F fun) : fun_(fun) 
-        {}
-
-    protected:
-        F fun_;
-    };
-
-    template <typename F> 
-    inline ScopeGuardImpl0<F> MakeGuard(F fun)
-    {
-        return ScopeGuardImpl0<F>::MakeGuard(fun);
-    }
-
-    ////////////////////////////////////////////////////////////////
-    ///
-    /// \class ScopeGuardImpl1
-    /// \ingroup ExceptionGroup
-    ///
-    /// Implementation class for a standalone function or class static function
-    /// with one parameter.  Each parameter is copied by value - use
-    /// ::Loki::ByRef if you must use a reference instead.  ScopeGuard ignores
-    /// any value returned from the call within the Execute function.
-    ///
-    /// This class has a single standalone helper function, MakeGuard which
-    /// creates and returns a ScopeGuard.
-    ///
-    ////////////////////////////////////////////////////////////////
-
-    template <typename F, typename P1>
-    class ScopeGuardImpl1 : public ScopeGuardImplBase
-    {
-    public:
-        static ScopeGuardImpl1<F, P1> MakeGuard(F fun, P1 p1)
-        {
-            return ScopeGuardImpl1<F, P1>(fun, p1);
-        }
-
-        ~ScopeGuardImpl1() throw() 
-        {
-            SafeExecute(*this);
-        }
-
-        void Execute()
-        {
-            fun_(p1_);
-        }
-
-        ScopeGuardImpl1(F fun, P1 p1) : fun_(fun), p1_(p1) 
-        {}
-
-    protected:
-        F fun_;
-        const P1 p1_;
-    };
-
-    template <typename F, typename P1> 
-    inline ScopeGuardImpl1<F, P1> MakeGuard(F fun, P1 p1)
-    {
-        return ScopeGuardImpl1<F, P1>::MakeGuard(fun, p1);
-    }
-
-    ////////////////////////////////////////////////////////////////
-    ///
-    /// \class ScopeGuardImpl2
-    /// \ingroup ExceptionGroup
-    ///
-    /// Implementation class for a standalone function or class static function
-    /// with two parameters.  Each parameter is copied by value - use
-    /// ::Loki::ByRef if you must use a reference instead.  ScopeGuard ignores
-    /// any value returned from the call within the Execute function.
-    ///
-    /// This class has a single standalone helper function, MakeGuard which
-    /// creates and returns a ScopeGuard.
-    ///
-    ////////////////////////////////////////////////////////////////
-
-    template <typename F, typename P1, typename P2>
-    class ScopeGuardImpl2: public ScopeGuardImplBase
-    {
-    public:
-        static ScopeGuardImpl2<F, P1, P2> MakeGuard(F fun, P1 p1, P2 p2)
-        {
-            return ScopeGuardImpl2<F, P1, P2>(fun, p1, p2);
-        }
-
-        ~ScopeGuardImpl2() throw() 
-        {
-            SafeExecute(*this);
-        }
-
-        void Execute()
-        {
-            fun_(p1_, p2_);
-        }
-
-        ScopeGuardImpl2(F fun, P1 p1, P2 p2) : fun_(fun), p1_(p1), p2_(p2) 
-        {}
-
-    protected:
-        F fun_;
-        const P1 p1_;
-        const P2 p2_;
-    };
-
-    template <typename F, typename P1, typename P2>
-    inline ScopeGuardImpl2<F, P1, P2> MakeGuard(F fun, P1 p1, P2 p2)
-    {
-        return ScopeGuardImpl2<F, P1, P2>::MakeGuard(fun, p1, p2);
-    }
-
-    ////////////////////////////////////////////////////////////////
-    ///
-    /// \class ScopeGuardImpl3
-    /// \ingroup ExceptionGroup
-    ///
-    /// Implementation class for a standalone function or class static function
-    /// with three parameters.  Each parameter is copied by value - use
-    /// ::Loki::ByRef if you must use a reference instead.  ScopeGuard ignores
-    /// any value returned from the call within the Execute function.
-    ///
-    /// This class has a single standalone helper function, MakeGuard which
-    /// creates and returns a ScopeGuard.
-    ///
-    ////////////////////////////////////////////////////////////////
-
-    template <typename F, typename P1, typename P2, typename P3>
-    class ScopeGuardImpl3 : public ScopeGuardImplBase
-    {
-    public:
-        static ScopeGuardImpl3<F, P1, P2, P3> MakeGuard(F fun, P1 p1, P2 p2, P3 p3)
-        {
-            return ScopeGuardImpl3<F, P1, P2, P3>(fun, p1, p2, p3);
-        }
-
-        ~ScopeGuardImpl3() throw() 
-        {
-            SafeExecute(*this);
-        }
-
-        void Execute()
-        {
-            fun_(p1_, p2_, p3_);
-        }
-
-        ScopeGuardImpl3(F fun, P1 p1, P2 p2, P3 p3) : fun_(fun), p1_(p1), p2_(p2), p3_(p3) 
-        {}
-
-    protected:
-        F fun_;
-        const P1 p1_;
-        const P2 p2_;
-        const P3 p3_;
-    };
-
-    template <typename F, typename P1, typename P2, typename P3>
-    inline ScopeGuardImpl3<F, P1, P2, P3> MakeGuard(F fun, P1 p1, P2 p2, P3 p3)
-    {
-        return ScopeGuardImpl3<F, P1, P2, P3>::MakeGuard(fun, p1, p2, p3);
-    }
-
-    ////////////////////////////////////////////////////////////////
-    ///
-    /// \class ScopeGuardImpl4
-    /// \ingroup ExceptionGroup
-    ///
-    /// Implementation class for a standalone function or class static function
-    /// with four parameters.  Each parameter is copied by value - use
-    /// ::Loki::ByRef if you must use a reference instead.  ScopeGuard ignores
-    /// any value returned from the call within the Execute function.
-    ///
-    /// This class has a single standalone helper function, MakeGuard which
-    /// creates and returns a ScopeGuard.
-    ///
-    ////////////////////////////////////////////////////////////////
-
-    template < typename F, typename P1, typename P2, typename P3, typename P4 >
-    class ScopeGuardImpl4 : public ScopeGuardImplBase
-    {
-    public:
-        static ScopeGuardImpl4< F, P1, P2, P3, P4 > MakeGuard(
-            F fun, P1 p1, P2 p2, P3 p3, P4 p4 )
-        {
-            return ScopeGuardImpl4< F, P1, P2, P3, P4 >( fun, p1, p2, p3, p4 );
-        }
-
-        ~ScopeGuardImpl4() throw() 
-        {
-            SafeExecute( *this );
-        }
-
-        void Execute()
-        {
-            fun_( p1_, p2_, p3_, p4_ );
-        }
-
-        ScopeGuardImpl4( F fun, P1 p1, P2 p2, P3 p3, P4 p4 ) :
-             fun_( fun ), p1_( p1 ), p2_( p2 ), p3_( p3 ), p4_( p4 )
-        {}
-
-    protected:
-        F fun_;
-        const P1 p1_;
-        const P2 p2_;
-        const P3 p3_;
-        const P4 p4_;
-    };
-
-    template < typename F, typename P1, typename P2, typename P3, typename P4 >
-    inline ScopeGuardImpl4< F, P1, P2, P3, P4 > MakeGuard( F fun, P1 p1, P2 p2, P3 p3, P4 p4 )
-    {
-        return ScopeGuardImpl4< F, P1, P2, P3, P4 >::MakeGuard( fun, p1, p2, p3, p4 );
-    }
-
-    ////////////////////////////////////////////////////////////////
-    ///
-    /// \class ScopeGuardImpl5
-    /// \ingroup ExceptionGroup
-    ///
-    /// Implementation class for a standalone function or class static function
-    /// with five parameters.  Each parameter is copied by value - use
-    /// ::Loki::ByRef if you must use a reference instead.  ScopeGuard ignores
-    /// any value returned from the call within the Execute function.
-    ///
-    /// This class has a single standalone helper function, MakeGuard which
-    /// creates and returns a ScopeGuard.
-    ///
-    ////////////////////////////////////////////////////////////////
-
-    template < typename F, typename P1, typename P2, typename P3, typename P4, typename P5 >
-    class ScopeGuardImpl5 : public ScopeGuardImplBase
-    {
-    public:
-        static ScopeGuardImpl5< F, P1, P2, P3, P4, P5 > MakeGuard(
-            F fun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5 )
-        {
-            return ScopeGuardImpl5< F, P1, P2, P3, P4, P5 >( fun, p1, p2, p3, p4, p5 );
-        }
-
-        ~ScopeGuardImpl5() throw() 
-        {
-            SafeExecute( *this );
-        }
-
-        void Execute()
-        {
-            fun_( p1_, p2_, p3_, p4_, p5_ );
-        }
-
-        ScopeGuardImpl5( F fun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5 ) :
-             fun_( fun ), p1_( p1 ), p2_( p2 ), p3_( p3 ), p4_( p4 ), p5_( p5 )
-        {}
-
-    protected:
-        F fun_;
-        const P1 p1_;
-        const P2 p2_;
-        const P3 p3_;
-        const P4 p4_;
-        const P5 p5_;
-    };
-
-    template < typename F, typename P1, typename P2, typename P3, typename P4, typename P5 >
-    inline ScopeGuardImpl5< F, P1, P2, P3, P4, P5 > MakeGuard( F fun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5 )
-    {
-        return ScopeGuardImpl5< F, P1, P2, P3, P4, P5 >::MakeGuard( fun, p1, p2, p3, p4, p5 );
-    }
-
-    ////////////////////////////////////////////////////////////////
-    ///
-    /// \class ObjScopeGuardImpl0
-    /// \ingroup ExceptionGroup
-    ///
-    /// Implementation class for a class per-instance member function with no
-    /// parameters.  ScopeGuard ignores any value returned from the call within
-    /// the Execute function.
-    ///
-    /// This class has 3 standalone helper functions which create a ScopeGuard.
-    /// One is MakeObjGuard, which is deprecated but provided for older code.
-    /// The other two are MakeGuard overloads, one which takes a pointer to an
-    /// object, and the other which takes a reference.
-    ///
-    ////////////////////////////////////////////////////////////////
-
-    template <class Obj, typename MemFun>
-    class ObjScopeGuardImpl0 : public ScopeGuardImplBase
-    {
-    public:
-        static ObjScopeGuardImpl0<Obj, MemFun> MakeObjGuard(Obj& obj, MemFun memFun)
-        {
-            return ObjScopeGuardImpl0<Obj, MemFun>(obj, memFun);
-        }
-
-        ~ObjScopeGuardImpl0() throw() 
-        {
-            SafeExecute(*this);
-        }
-
-        void Execute() 
-        {
-            (obj_.*memFun_)();
-        }
-
-        ObjScopeGuardImpl0(Obj& obj, MemFun memFun) : obj_(obj), memFun_(memFun) 
-        {}
-
-    protected:
-        Obj& obj_;
-        MemFun memFun_;
-    };
-
-    template <class Obj, typename MemFun>
-    inline ObjScopeGuardImpl0<Obj, MemFun> MakeObjGuard(Obj& obj, MemFun memFun)
-    {
-        return ObjScopeGuardImpl0<Obj, MemFun>::MakeObjGuard(obj, memFun);
-    }
-
-    template <typename Ret, class Obj1, class Obj2>
-    inline ObjScopeGuardImpl0<Obj1,Ret(Obj2::*)()> MakeGuard(Ret(Obj2::*memFun)(), Obj1 &obj) 
-    {
-      return ObjScopeGuardImpl0<Obj1,Ret(Obj2::*)()>::MakeObjGuard(obj,memFun);
-    }
-
-    template <typename Ret, class Obj1, class Obj2>
-    inline ObjScopeGuardImpl0<Obj1,Ret(Obj2::*)()> MakeGuard(Ret(Obj2::*memFun)(), Obj1 *obj) 
-    {
-      return ObjScopeGuardImpl0<Obj1,Ret(Obj2::*)()>::MakeObjGuard(*obj,memFun);
-    }
-
-    ////////////////////////////////////////////////////////////////
-    ///
-    /// \class ObjScopeGuardImpl1
-    /// \ingroup ExceptionGroup
-    ///
-    /// Implementation class for a class per-instance member function with one
-    /// parameter.  The parameter is copied by value - use ::Loki::ByRef if you
-    /// must use a reference instead.  ScopeGuard ignores any value returned
-    /// from the call within the Execute function.
-    ///
-    /// This class has 3 standalone helper functions which create a ScopeGuard.
-    /// One is MakeObjGuard, which is deprecated but provided for older code.
-    /// The other two are MakeGuard overloads, one which takes a pointer to an
-    /// object, and the other which takes a reference.
-    ///
-    ////////////////////////////////////////////////////////////////
-
-    template <class Obj, typename MemFun, typename P1>
-    class ObjScopeGuardImpl1 : public ScopeGuardImplBase
-    {
-    public:
-        static ObjScopeGuardImpl1<Obj, MemFun, P1> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1)
-        {
-            return ObjScopeGuardImpl1<Obj, MemFun, P1>(obj, memFun, p1);
-        }
-
-        ~ObjScopeGuardImpl1() throw() 
-        {
-            SafeExecute(*this);
-        }
-
-        void Execute() 
-        {
-            (obj_.*memFun_)(p1_);
-        }
-
-        ObjScopeGuardImpl1(Obj& obj, MemFun memFun, P1 p1) : obj_(obj), memFun_(memFun), p1_(p1) 
-        {}
-        
-    protected:
-        Obj& obj_;
-        MemFun memFun_;
-        const P1 p1_;
-    };
-
-    template <class Obj, typename MemFun, typename P1>
-    inline ObjScopeGuardImpl1<Obj, MemFun, P1> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1)
-    {
-        return ObjScopeGuardImpl1<Obj, MemFun, P1>::MakeObjGuard(obj, memFun, p1);
-    }
-
-    template <typename Ret, class Obj1, class Obj2, typename P1a, typename P1b>
-    inline ObjScopeGuardImpl1<Obj1,Ret(Obj2::*)(P1a),P1b> MakeGuard(Ret(Obj2::*memFun)(P1a), Obj1 &obj, P1b p1) 
-    {
-      return ObjScopeGuardImpl1<Obj1,Ret(Obj2::*)(P1a),P1b>::MakeObjGuard(obj,memFun,p1);
-    }
-
-    template <typename Ret, class Obj1, class Obj2, typename P1a, typename P1b>
-    inline ObjScopeGuardImpl1<Obj1,Ret(Obj2::*)(P1a),P1b> MakeGuard(Ret(Obj2::*memFun)(P1a), Obj1 *obj, P1b p1) 
-    {
-      return ObjScopeGuardImpl1<Obj1,Ret(Obj2::*)(P1a),P1b>::MakeObjGuard(*obj,memFun,p1);
-    }
-
-    ////////////////////////////////////////////////////////////////
-    ///
-    /// \class ObjScopeGuardImpl2
-    /// \ingroup ExceptionGroup
-    ///
-    /// Implementation class for a class per-instance member function with two
-    /// parameters.  Each parameter is copied by value - use ::Loki::ByRef if you
-    /// must use a reference instead.  ScopeGuard ignores any value returned
-    /// from the call within the Execute function.
-    ///
-    /// This class has 3 standalone helper functions which create a ScopeGuard.
-    /// One is MakeObjGuard, which is deprecated but provided for older code.
-    /// The other two are MakeGuard overloads, one which takes a pointer to an
-    /// object, and the other which takes a reference.
-    ///
-    ////////////////////////////////////////////////////////////////
-
-    template <class Obj, typename MemFun, typename P1, typename P2>
-    class ObjScopeGuardImpl2 : public ScopeGuardImplBase
-    {
-    public:
-        static ObjScopeGuardImpl2<Obj, MemFun, P1, P2> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2)
-        {
-            return ObjScopeGuardImpl2<Obj, MemFun, P1, P2>(obj, memFun, p1, p2);
-        }
-
-        ~ObjScopeGuardImpl2() throw() 
-        {
-            SafeExecute(*this);
-        }
-
-        void Execute() 
-        {
-            (obj_.*memFun_)(p1_, p2_);
-        }
-
-        ObjScopeGuardImpl2(Obj& obj, MemFun memFun, P1 p1, P2 p2) : obj_(obj), memFun_(memFun), p1_(p1), p2_(p2) 
-        {}
-
-    protected:
-        Obj& obj_;
-        MemFun memFun_;
-        const P1 p1_;
-        const P2 p2_;
-    };
-
-    template <class Obj, typename MemFun, typename P1, typename P2>
-    inline ObjScopeGuardImpl2<Obj, MemFun, P1, P2> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2)
-    {
-        return ObjScopeGuardImpl2<Obj, MemFun, P1, P2>::MakeObjGuard(obj, memFun, p1, p2);
-    }
-
-    template <typename Ret, class Obj1, class Obj2, typename P1a, typename P1b, typename P2a, typename P2b>
-    inline ObjScopeGuardImpl2<Obj1,Ret(Obj2::*)(P1a,P2a),P1b,P2b> MakeGuard(Ret(Obj2::*memFun)(P1a,P2a), Obj1 &obj, P1b p1, P2b p2) 
-    {
-      return ObjScopeGuardImpl2<Obj1,Ret(Obj2::*)(P1a,P2a),P1b,P2b>::MakeObjGuard(obj,memFun,p1,p2);
-    }
-
-    template <typename Ret, class Obj1, class Obj2, typename P1a, typename P1b, typename P2a, typename P2b>
-    inline ObjScopeGuardImpl2<Obj1,Ret(Obj2::*)(P1a,P2a),P1b,P2b> MakeGuard(Ret(Obj2::*memFun)(P1a,P2a), Obj1 *obj, P1b p1, P2b p2) 
-    {
-      return ObjScopeGuardImpl2<Obj1,Ret(Obj2::*)(P1a,P2a),P1b,P2b>::MakeObjGuard(*obj,memFun,p1,p2);
-    }
-
-    ////////////////////////////////////////////////////////////////
-    ///
-    /// \class ObjScopeGuardImpl3
-    /// \ingroup ExceptionGroup
-    ///
-    /// Implementation class for a class per-instance member function with three
-    /// parameters.  Each parameter is copied by value - use ::Loki::ByRef if you
-    /// must use a reference instead.  ScopeGuard ignores any value returned
-    /// from the call within the Execute function.
-    ///
-    /// This class has 3 standalone helper functions which create a ScopeGuard.
-    /// One is MakeObjGuard, which is deprecated but provided for older code.
-    /// The other two are MakeGuard overloads, one which takes a pointer to an
-    /// object, and the other which takes a reference.
-    ///
-    ////////////////////////////////////////////////////////////////
-
-    template < class Obj, typename MemFun, typename P1, typename P2, typename P3 >
-    class ObjScopeGuardImpl3 : public ScopeGuardImplBase
-    {
-    public:
-        static ObjScopeGuardImpl3< Obj, MemFun, P1, P2, P3 > MakeObjGuard(
-            Obj & obj, MemFun memFun, P1 p1, P2 p2, P3 p3 )
-        {
-            return ObjScopeGuardImpl3< Obj, MemFun, P1, P2, P3 >( obj, memFun, p1, p2, p3 );
-        }
-
-        ~ObjScopeGuardImpl3() throw() 
-        {
-            SafeExecute( *this );
-        }
-
-        void Execute() 
-        {
-            ( obj_.*memFun_ )( p1_, p2_, p3_ );
-        }
-
-        ObjScopeGuardImpl3( Obj & obj, MemFun memFun, P1 p1, P2 p2, P3 p3 ) :
-             obj_( obj ), memFun_( memFun ), p1_( p1 ), p2_( p2 ), p3_( p3 )
-        {}
-
-    protected:
-        Obj& obj_;
-        MemFun memFun_;
-        const P1 p1_;
-        const P2 p2_;
-        const P3 p3_;
-    };
-
-    template < class Obj, typename MemFun, typename P1, typename P2, typename P3 >
-    inline ObjScopeGuardImpl3< Obj, MemFun, P1, P2, P3 > MakeObjGuard(
-        Obj & obj, MemFun memFun, P1 p1, P2 p2, P3 p3 )
-    {
-        return ObjScopeGuardImpl3< Obj, MemFun, P1, P2, P3 >::MakeObjGuard(
-            obj, memFun, p1, p2, p3 );
-    }
-
-    template < typename Ret, class Obj1, class Obj2, typename P1a, typename P1b,
-        typename P2a, typename P2b, typename P3a, typename P3b >
-    inline ObjScopeGuardImpl3< Obj1, Ret( Obj2::* )( P1a, P2a, P3a ), P1b, P2b, P3b >
-        MakeGuard( Ret( Obj2::*memFun )( P1a, P2a, P3a ), Obj1 & obj, P1b p1, P2b p2, P3b p3 )
-    {
-      return ObjScopeGuardImpl3< Obj1, Ret( Obj2::* )( P1a, P2a, P3a ), P1b, P2b, P3b >
-          ::MakeObjGuard( obj, memFun, p1, p2, p3 );
-    }
-
-    template < typename Ret, class Obj1, class Obj2, typename P1a, typename P1b,
-        typename P2a, typename P2b, typename P3a, typename P3b >
-    inline ObjScopeGuardImpl3< Obj1, Ret( Obj2::* )( P1a, P2a, P3a ), P1b, P2b, P3b >
-        MakeGuard( Ret( Obj2::*memFun )( P1a, P2a, P3a ), Obj1 * obj, P1b p1, P2b p2, P3b p3 )
-    {
-      return ObjScopeGuardImpl3< Obj1, Ret( Obj2::* )( P1a, P2a, P3a ), P1b, P2b, P3b >
-          ::MakeObjGuard( *obj, memFun, p1, p2, p3 );
-    }
-
-} // namespace Loki
-
-#define LOKI_CONCATENATE_DIRECT(s1, s2)  s1##s2
-#define LOKI_CONCATENATE(s1, s2)         LOKI_CONCATENATE_DIRECT(s1, s2)
-#define LOKI_ANONYMOUS_VARIABLE(str)     LOKI_CONCATENATE(str, __LINE__)
-
-#define LOKI_ON_BLOCK_EXIT      ::Loki::ScopeGuard LOKI_ANONYMOUS_VARIABLE(scopeGuard) = ::Loki::MakeGuard
-#define LOKI_ON_BLOCK_EXIT_OBJ  ::Loki::ScopeGuard LOKI_ANONYMOUS_VARIABLE(scopeGuard) = ::Loki::MakeObjGuard
-
-#endif // end file guardian
-
Index: code/trunk/src/libraries/util/TypeTraits.h
===================================================================
--- code/trunk/src/libraries/util/TypeTraits.h	(revision 7226)
+++ 	(revision )
@@ -1,285 +1,0 @@
-////////////////////////////////////////////////////////////////////////////////
-// The Loki Library
-// Copyright (c) 2001 by Andrei Alexandrescu
-// This code accompanies the book:
-// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
-//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
-// Permission to use, copy, modify, distribute and sell this software for any 
-//     purpose is hereby granted without fee, provided that the above copyright 
-//     notice appear in all copies and that both that copyright notice and this 
-//     permission notice appear in supporting documentation.
-// The author or Addison-Wesley Longman make no representations about the 
-//     suitability of this software for any purpose. It is provided "as is" 
-//     without express or implied warranty.
-//
-// Changes by Orxonox (Reto)
-//     Removed all stdInt, etc. type traits and function pointer traits
-//     and added UnqualifiedReferredType.
-////////////////////////////////////////////////////////////////////////////////
-#ifndef LOKI_TYPETRAITS_INC_
-#define LOKI_TYPETRAITS_INC_
-
-// $Id: TypeTraits.h 835 2007-08-02 19:39:02Z syntheticpp $
-
-
-#if (defined _MSC_VER) && (_MSC_VER < 1400)
-#include <string>
-#endif
-
-
-#ifdef _MSC_VER
-#pragma warning( push ) 
-#pragma warning( disable : 4180 ) //qualifier applied to function type has no meaning; ignored
-#endif
-
-namespace Loki
-{
-////////////////////////////////////////////////////////////////////////////////
-// class NullType
-// Used as a placeholder for "no type here"
-// Useful as an end marker in typelists 
-////////////////////////////////////////////////////////////////////////////////
-
-    class NullType {};
-
-////////////////////////////////////////////////////////////////////////////////
-// class template IsCustomUnsignedInt
-// Offers a means to integrate nonstandard built-in unsigned integral types
-// (such as unsigned __int64 or unsigned long long int) with the TypeTraits 
-//     class template defined below.
-// Invocation: IsCustomUnsignedInt<T> where T is any type
-// Defines 'value', an enum that is 1 iff T is a custom built-in unsigned
-//     integral type
-// Specialize this class template for nonstandard unsigned integral types
-//     and define value = 1 in those specializations
-////////////////////////////////////////////////////////////////////////////////
-
-    template <typename T>
-    struct IsCustomUnsignedInt
-    {
-        enum { value = 0 };
-    };        
-
-////////////////////////////////////////////////////////////////////////////////
-// class template IsCustomSignedInt
-// Offers a means to integrate nonstandard built-in unsigned integral types
-// (such as unsigned __int64 or unsigned long long int) with the TypeTraits 
-//     class template defined below.
-// Invocation: IsCustomSignedInt<T> where T is any type
-// Defines 'value', an enum that is 1 iff T is a custom built-in signed
-//     integral type
-// Specialize this class template for nonstandard unsigned integral types
-//     and define value = 1 in those specializations
-////////////////////////////////////////////////////////////////////////////////
-
-    template <typename T>
-    struct IsCustomSignedInt
-    {
-        enum { value = 0 };
-    };        
-
-////////////////////////////////////////////////////////////////////////////////
-// class template IsCustomFloat
-// Offers a means to integrate nonstandard floating point types with the
-//     TypeTraits class template defined below.
-// Invocation: IsCustomFloat<T> where T is any type
-// Defines 'value', an enum that is 1 iff T is a custom built-in
-//     floating point type
-// Specialize this class template for nonstandard unsigned integral types
-//     and define value = 1 in those specializations
-////////////////////////////////////////////////////////////////////////////////
-
-    template <typename T>
-    struct IsCustomFloat
-    {
-        enum { value = 0 };
-    };        
-
-////////////////////////////////////////////////////////////////////////////////
-// Helper types for class template TypeTraits defined below
-////////////////////////////////////////////////////////////////////////////////
-
-    namespace Private
-    {
-        template <typename U> struct AddPointer
-        {
-            typedef U* Result;
-        };
-
-        template <typename U> struct AddPointer<U&>
-        {
-            typedef U* Result;
-        };
-
-        template <class U> struct AddReference
-        {
-            typedef U & Result;
-        };
-
-        template <class U> struct AddReference<U &>
-        {
-            typedef U & Result;
-        };
-
-        template <> struct AddReference<void>
-        {
-            typedef NullType Result;
-        };
-
-        template <class U> struct AddParameterType
-        {
-            typedef const U & Result;
-        };
-
-        template <class U> struct AddParameterType<U &>
-        {
-            typedef U & Result;
-        };
-
-        template <> struct AddParameterType<void>
-        {
-            typedef NullType Result;
-        };
-    }// namespace Private
-        
-////////////////////////////////////////////////////////////////////////////////
-// class template TypeTraits
-//
-// Figures out at compile time various properties of any given type
-// Invocations (T is a type, TypeTraits<T>::Property):
-//
-// - isPointer       : returns true if T is a pointer type
-// - PointeeType     : returns the type to which T points if T is a pointer 
-//                     type, NullType otherwise
-// - isReference     : returns true if T is a reference type
-// - ReferredType    : returns the type to which T refers if T is a reference 
-//                     type, NullType otherwise
-// - ParameterType   : returns the optimal type to be used as a parameter for 
-//                     functions that take Ts
-// - isConst         : returns true if T is a const-qualified type
-// - NonConstType    : Type with removed 'const' qualifier from T, if any
-// - isVolatile      : returns true if T is a volatile-qualified type
-// - NonVolatileType : Type with removed 'volatile' qualifier from T, if any
-// - UnqualifiedType : Type with removed 'const' and 'volatile' qualifiers from 
-//                     T, if any
-// - ParameterType   : returns the optimal type to be used as a parameter 
-//                       for functions that take 'const T's
-//
-////////////////////////////////////////////////////////////////////////////////
-
-    template <typename T>
-    class TypeTraits
-    {
-    private:
-    
-        template <class U> struct ReferenceTraits
-        {
-            enum { result = false };
-            typedef U ReferredType;
-        };
-        
-        template <class U> struct ReferenceTraits<U&>
-        {
-            enum { result = true };
-            typedef U ReferredType;
-        };
-               
-        template <class U> struct PointerTraits
-        {
-            enum { result = false };
-            typedef NullType PointeeType;
-        };
-        
-        template <class U> struct PointerTraits<U*>
-        {
-            enum { result = true };
-            typedef U PointeeType;
-        };
-        
-        template <class U> struct PointerTraits<U*&>
-        {
-            enum { result = true };
-            typedef U PointeeType;
-        };
-          
-        template <class U> struct PToMTraits
-        {
-            enum { result = false };
-        };
-        
-        template <class U, class V> struct PToMTraits<U V::*>
-        {
-            enum { result = true };
-        };
-        
-        template <class U, class V> struct PToMTraits<U V::*&>
-        {
-            enum { result = true };
-        };
-        
-        template <class U> struct UnConst
-        {
-            typedef U Result;
-            enum { isConst = 0 };
-        };
-        
-        template <class U> struct UnConst<const U>
-        {
-            typedef U Result;
-            enum { isConst = 1 };
-        };
-
-        template <class U> struct UnConst<const U&>
-        {
-            typedef U& Result;
-            enum { isConst = 1 };
-        };
-  
-        template <class U> struct UnVolatile
-        {
-            typedef U Result;
-            enum { isVolatile = 0 };
-        };
-       
-        template <class U> struct UnVolatile<volatile U>
-        {
-            typedef U Result;
-            enum { isVolatile = 1 };
-        };
-
-        template <class U> struct UnVolatile<volatile U&>
-        {
-            typedef U& Result;
-            enum { isVolatile = 1 };
-        };
-        
-    public:
-        typedef typename UnConst<T>::Result 
-            NonConstType;
-        typedef typename UnVolatile<T>::Result 
-            NonVolatileType;
-        typedef typename UnVolatile<typename UnConst<T>::Result>::Result 
-            UnqualifiedType;
-        typedef typename PointerTraits<UnqualifiedType>::PointeeType 
-            PointeeType;
-        typedef typename ReferenceTraits<T>::ReferredType 
-            ReferredType;
-        typedef typename ReferenceTraits<typename UnVolatile<typename UnConst<T>::Result>::Result>::ReferredType
-            UnqualifiedReferredType;
-
-        enum { isConst          = UnConst<T>::isConst };
-        enum { isVolatile       = UnVolatile<T>::isVolatile };
-        enum { isReference      = ReferenceTraits<UnqualifiedType>::result };
-        enum { isPointer        = PointerTraits<
-                                        typename ReferenceTraits<UnqualifiedType>::ReferredType >::result};
-                
-    };
-}
-
-#ifdef _MSC_VER
-#pragma warning( pop )
-#endif // _MSC_VER
-
-
-#endif // end file guardian
-
