Changeset 348 for cpp/common


Ignore:
Timestamp:
04/09/15 23:51:28 (10 years ago)
Author:
Maciej Komosinski
Message:
  • explicit c_str() in SString instead of (const char*) cast
  • genetic converters and GenMan? are now thread-local which enables multi-threaded simulator separation
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/common/threads.h

    r346 r348  
    9090};
    9191
    92 #else
     92#else //ifdef MULTITHREADED
    9393
    9494template<class T> class ThreadSingleton
     
    102102};
    103103
    104 #endif
     104template<class T> class ThreadSingletonPtr
     105{
     106T *object;
     107
     108  public:
     109
     110ThreadSingletonPtr():object(NULL) {}
     111T* get() {return object;}
     112T* setptr(T* o) {T* previous=object; object=o; return previous;}
     113};
     114
     115#endif //ifdef MULTITHREADED
    105116
    106117////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.