Титульная страница | Пространства имен | Алфавитный указатель | Классы | Файлы | Члены пространства имен | Члены классов | Описания | Примеры

threads_1/win32/h/os_thread_id.hpp

См. документацию.
00001 /* 00002 00003 threads_1: Multithreading support library 00004 Yauheni A. Akhotnikau (C) 2002-2003 00005 eao197@yahoo.com 00006 ------------------------------------------------- 00007 00008 Permission is granted to anyone to use this software for any purpose on any 00009 computer system, and to redistribute it freely, subject to the following 00010 restrictions: 00011 00012 1. This software is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00015 00016 2. The origin of this software must not be misrepresented, either by 00017 explicit claim or by omission. 00018 00019 3. Altered versions must be plainly marked as such, and must not be 00020 misrepresented as being the original software. 00021 00022 ------------------------------------------------- 00023 00024 */ 00034 #if !defined( _THREADS_1__WIN32__OS_THREAD_ID_HPP_ ) 00035 #define _THREADS_1__WIN32__OS_THREAD_ID_HPP_ 00036 00037 #define WIN32_LEAN_AND_MEAN 00038 #include <windows.h> 00039 00040 #include <cpp_util_2/h/nocopy.hpp> 00041 00042 #include <threads_1/h/threads.hpp> 00043 00044 namespace threads_1 00045 { 00046 00050 class _os_thread_id_t 00051 { 00052 private : 00053 DWORD m_id; 00054 00055 public : 00057 00060 _os_thread_id_t() 00061 { 00062 m_id = GetCurrentThreadId(); 00063 } 00064 00066 _os_thread_id_t( 00067 const _os_thread_id_t & o ) 00068 { 00069 (*this) = o; 00070 } 00071 00072 ~_os_thread_id_t() 00073 { 00074 } 00075 00077 _os_thread_id_t & 00078 operator=( 00079 const _os_thread_id_t & o ) 00080 { 00081 m_id = o.m_id; 00082 return *this; 00083 } 00084 00086 bool 00087 operator==( const _os_thread_id_t & o ) const 00088 { 00089 return ( m_id == o.m_id ); 00090 } 00091 00093 bool 00094 operator!=( const _os_thread_id_t & o ) const 00095 { 00096 return ( m_id != o.m_id ); 00097 } 00098 00100 bool 00101 operator<( const _os_thread_id_t & o ) const 00102 { 00103 return ( m_id < o.m_id ); 00104 } 00105 }; 00106 00107 00108 } /* namespace threads_1 */ 00109 00110 #endif

Документация по threads_1. Последние изменения: Wed Aug 4 06:46:01 2004. Создано системой doxygen 1.3.7
Hosted by uCoz