Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 29, 2009, 10:27:10 PM (15 years ago)
Author:
rgrieder
Message:

Derived all singletons implemented in a usual manner from orxonox::Singleton<T>.
This resolves inconsistencies with the singletonPtr_s variable in case of exceptions (asserts were being triggered then).
And while at it replaced singletonRef_s with singletonPtr_s for it to be less misleading (as fabian has already pointed out).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource/src/core/TclThreadManager.h

    r3361 r3366  
    3737#include <string>
    3838
     39#include "util/Singleton.h"
    3940#include "OrxonoxClass.h"
    4041
     
    4344namespace orxonox
    4445{
    45     class _CoreExport TclThreadManager : public OrxonoxClass
     46    class _CoreExport TclThreadManager : public Singleton<TclThreadManager>, public OrxonoxClass
    4647    {
     48        friend class Singleton<TclThreadManager>;
    4749        friend class TclBind;
    4850        friend _CoreExport void tclThread(TclInterpreterBundle* bundle, std::string command);
     
    5355            TclThreadManager(Tcl::interpreter* interpreter);
    5456            virtual ~TclThreadManager();
    55 
    56             static TclThreadManager& getInstance() { assert(TclThreadManager::singletonPtr_s); return *TclThreadManager::singletonPtr_s; }
    5757
    5858            static unsigned int      create();
Note: See TracChangeset for help on using the changeset viewer.