1 #ifndef perthreadrepos_h 2 #define perthreadrepos_h 42 #define _mDeclStaticString(nm) \ 43 mDefineStaticLocalObject( StaticStringManager, nm##_ssm, ); \ 44 BufferString& nm = nm##_ssm.getObject() 47 #define mDeclStaticString(nm) \ 48 _mDeclStaticString(nm); \ 49 addToStaticStringRepos( &nm ) 51 #define mDeclStaticString(nm) \ 52 _mDeclStaticString(nm) 68 int idx = threadids_.indexOf( threadid );
71 idx = threadids_.size();
72 threadids_ += threadid;
76 return *objects_[idx];
Locks the lock, shutting out access from other threads if needed.
Definition: threadlock.h:85
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:53
#define mGlobal(module)
Definition: commondefs.h:163
Threads::Lock lock_
Definition: perthreadrepos.h:36
PerThreadObjectRepository< BufferString > StaticStringManager
Definition: perthreadrepos.h:40
bool isStaticString(const OD::String *)
Class that keeps one object per thread. This enables temporary passing of objects (such as strings) w...
Definition: perthreadrepos.h:28
ManagedObjectSet< T > objects_
Definition: perthreadrepos.h:34
void addToStaticStringRepos(const OD::String *)
OpendTect.
Definition: commontypes.h:29
ObjectSet< const void > threadids_
Definition: perthreadrepos.h:35
#define mClass(module)
Definition: commondefs.h:164
const void * currentThread()
ObjectSet where the objects contained are owned by this set.
Definition: manobjectset.h:23