![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
00001 /******************************************************************************** 00002 * * 00003 * T h r e a d - L o c a l S t o r a g e C l a s s * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 2004,2012 by Jeroen van der Zijp. All Rights Reserved. * 00007 ********************************************************************************* 00008 * This library is free software; you can redistribute it and/or modify * 00009 * it under the terms of the GNU Lesser General Public License as published by * 00010 * the Free Software Foundation; either version 3 of the License, or * 00011 * (at your option) any later version. * 00012 * * 00013 * This library is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00016 * GNU Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public License * 00019 * along with this program. If not, see <http://www.gnu.org/licenses/> * 00020 ********************************************************************************/ 00021 #ifndef FXAUTOTHREADSTORAGEKEY_H 00022 #define FXAUTOTHREADSTORAGEKEY_H 00023 00024 namespace FX { 00025 00026 00039 class FXAPI FXAutoThreadStorageKey { 00040 private: 00041 FXThreadStorageKey value; 00042 private: 00043 FXAutoThreadStorageKey(const FXAutoThreadStorageKey&); 00044 FXAutoThreadStorageKey &operator=(const FXAutoThreadStorageKey&); 00045 public: 00046 00048 FXAutoThreadStorageKey(); 00049 00051 operator FXThreadStorageKey() const { return value; } 00052 00054 void set(void* ptr) const; 00055 00057 void* get() const; 00058 00060 ~FXAutoThreadStorageKey(); 00061 }; 00062 00063 } 00064 00065 #endif 00066
|
|