Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 16, 2008, 8:45:13 PM (16 years ago)
Author:
rgrieder
Message:

Changed initialisation of TclThreadManager, TclBind and Shell to match the simple singleton concept (runtime assert in the c'tor).
That simplifies things a lot. The instances now 'belong' to GSRoot.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/core/TclBind.h

    r1505 r1792  
    3939    {
    4040        public:
    41             static TclBind& getInstance();
     41            TclBind(const std::string& datapath);
     42            ~TclBind();
     43
     44            static TclBind& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
    4245
    4346            static std::string tcl(const std::string& tclcode);
     
    5659
    5760        private:
    58             TclBind();
    5961            TclBind(const TclBind& other);
    60             ~TclBind();
    6162
    6263            Tcl::interpreter* interpreter_;
    6364            std::string tclLibPath_;
    6465            bool bSetTclLibPath_;
     66
     67            static TclBind* singletonRef_s;
    6568    };
    6669}
Note: See TracChangeset for help on using the changeset viewer.