codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
class LogId { public: LogId(string id) : id_ (id) { } ~LogId() { } string getId(){ return id_; } private: string id_; }; static boost::thread_specific_ptr<LogId> ptrId_; inline void SetTrLogId(const string& id) { if (ptrId_.get() == NULL) { ptrId_.reset( new LogId(id) ); } } inline string getTrLogId(){ if (ptrId_.get() == NULL) { return string(""); } return ptrId_.get()->getId(); }
Private
[
?
]
Run code
Submit