1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
|
.TH ACE_Base_Thread_Adapter 3 "1 Dec 2001" "ACE" \" -*- nroff -*-
.ad l
.nh
.SH NAME
ACE_Base_Thread_Adapter \- Base class for all the Thread_Adapters.
.SH SYNOPSIS
.br
.PP
\fC#include <Base_Thread_Adapter.h>\fR
.PP
Inherited by \fBACE_OS_Thread_Adapter\fR, and \fBACE_Thread_Adapter\fR.
.PP
.SS Public Methods
.in +1c
.ti -1c
.RI "\fBACE_Base_Thread_Adapter\fR (ACE_THR_FUNC user_func, void *arg, ACE_THR_C_FUNC entry_point = (ACE_THR_C_FUNC) ace_thread_adapter, \fBACE_OS_Thread_Descriptor\fR *td = 0 )"
.br
.ti -1c
.RI "virtual void* \fBinvoke\fR (void) = 0"
.br
.RI "\fIVirtual method invoked by the thread entry point.\fR"
.ti -1c
.RI "ACE_THR_C_FUNC \fBentry_point\fR (void)"
.br
.RI "\fIAccessor for the C entry point function to the OS thread creation routine.\fR"
.in -1c
.SS Static Public Methods
.in +1c
.ti -1c
.RI "void \fBclose_log_msg\fR (void)"
.br
.RI "\fIInvoke the close_log_msg_hook, if it is present.\fR"
.ti -1c
.RI "void \fBsync_log_msg\fR (const \fBACE_TCHAR\fR *prog_name)"
.br
.RI "\fIInvoke the sync_log_msg_hook, if it is present.\fR"
.ti -1c
.RI "\fBACE_OS_Thread_Descriptor\fR* \fBthr_desc_log_msg\fR (void)"
.br
.RI "\fIInvoke the thr_desc_log_msg_hook, if it is present.\fR"
.in -1c
.SS Protected Methods
.in +1c
.ti -1c
.RI "virtual \fB~ACE_Base_Thread_Adapter\fR (void)"
.br
.RI "\fIDestructor, making it private ensures that objects of this class are allocated on the heap.\fR"
.ti -1c
.RI "void \fBinherit_log_msg\fR (void)"
.br
.RI "\fIInherit the logging features if the parent thread has an .\fR"
.in -1c
.SS Protected Attributes
.in +1c
.ti -1c
.RI "ACE_THR_FUNC \fBuser_func_\fR"
.br
.RI "\fIThread startup function passed in by the user (C++ linkage).\fR"
.ti -1c
.RI "void* \fBarg_\fR"
.br
.RI "\fIArgument to thread startup function.\fR"
.ti -1c
.RI "ACE_THR_C_FUNC \fBentry_point_\fR"
.br
.RI "\fIEntry point to the underlying OS thread creation call (C linkage).\fR"
.ti -1c
.RI "\fBACE_OS_Thread_Descriptor\fR* \fBthr_desc_\fR"
.br
.ti -1c
.RI "\fBACE_OS_Log_Msg_Attributes\fR \fBlog_msg_attributes_\fR"
.br
.RI "\fIThe \fBACE_Log_Msg\fR attributes.\fR"
.in -1c
.SS Static Private Methods
.in +1c
.ti -1c
.RI "void \fBset_log_msg_hooks\fR (ACE_INIT_LOG_MSG_HOOK init_hook, ACE_INHERIT_LOG_MSG_HOOK inherit_hook, ACE_CLOSE_LOG_MSG_HOOK close_hook, ACE_SYNC_LOG_MSG_HOOK sync_hook, ACE_THR_DESC_LOG_MSG_HOOK thr_desc)"
.br
.RI "\fISet the Log_Msg hooks.\fR"
.in -1c
.SS Static Private Attributes
.in +1c
.ti -1c
.RI "ACE_INIT_LOG_MSG_HOOK \fBinit_log_msg_hook_\fR"
.br
.RI "\fIThe hooks to inherit and cleanup the Log_Msg attributes.\fR"
.ti -1c
.RI "ACE_INHERIT_LOG_MSG_HOOK \fBinherit_log_msg_hook_\fR"
.br
.ti -1c
.RI "ACE_CLOSE_LOG_MSG_HOOK \fBclose_log_msg_hook_\fR"
.br
.ti -1c
.RI "ACE_SYNC_LOG_MSG_HOOK \fBsync_log_msg_hook_\fR"
.br
.ti -1c
.RI "ACE_THR_DESC_LOG_MSG_HOOK \fBthr_desc_log_msg_hook_\fR"
.br
.in -1c
.SS Friends
.in +1c
.ti -1c
.RI "class \fBACE_Log_Msg\fR"
.br
.ti -1c
.RI "class \fBACE_Thread_Adapter_Has_Private_Destructor\fR"
.br
.in -1c
.SH DETAILED DESCRIPTION
.PP
Base class for all the Thread_Adapters.
.PP
.PP
Converts a C++ function into a function function that can be called from a thread creation routine (e.g., <pthread_create> or <_beginthreadex>) that expects an extern "C" entry point. This class also makes it possible to transparently provide hooks to register a thread with an . This class is used in . In general, the thread that creates an object of this class is different from the thread that calls <invoke> on this object. Therefore, the <invoke> method is responsible for deleting itself.
.PP
.SH CONSTRUCTOR & DESTRUCTOR DOCUMENTATION
.PP
.SS ACE_Base_Thread_Adapter::ACE_Base_Thread_Adapter (ACE_THR_FUNC user_func, void * arg, ACE_THR_C_FUNC entry_point = (ACE_THR_C_FUNC) ace_thread_adapter, \fBACE_OS_Thread_Descriptor\fR * td = 0)
.PP
\fBParameters: \fR
.in +1c
.TP
\fB\fItd\fR\fRConstructor.
.SS ACE_Base_Thread_Adapter::~ACE_Base_Thread_Adapter (void)\fC [protected, virtual]\fR
.PP
Destructor, making it private ensures that objects of this class are allocated on the heap.
.PP
.SH MEMBER FUNCTION DOCUMENTATION
.PP
.SS void ACE_Base_Thread_Adapter::close_log_msg (void)\fC [static]\fR
.PP
Invoke the close_log_msg_hook, if it is present.
.PP
.SS ACE_THR_C_FUNC ACE_Base_Thread_Adapter::entry_point (void)
.PP
Accessor for the C entry point function to the OS thread creation routine.
.PP
.SS void ACE_Base_Thread_Adapter::inherit_log_msg (void)\fC [protected]\fR
.PP
Inherit the logging features if the parent thread has an .
.PP
.SS void * ACE_Base_Thread_Adapter::invoke (void)\fC [pure virtual]\fR
.PP
Virtual method invoked by the thread entry point.
.PP
Reimplemented in \fBACE_OS_Thread_Adapter\fR, and \fBACE_Thread_Adapter\fR.
.SS void ACE_Base_Thread_Adapter::set_log_msg_hooks (ACE_INIT_LOG_MSG_HOOK init_hook, ACE_INHERIT_LOG_MSG_HOOK inherit_hook, ACE_CLOSE_LOG_MSG_HOOK close_hook, ACE_SYNC_LOG_MSG_HOOK sync_hook, ACE_THR_DESC_LOG_MSG_HOOK thr_desc)\fC [static, private]\fR
.PP
Set the Log_Msg hooks.
.PP
.SS void ACE_Base_Thread_Adapter::sync_log_msg (const \fBACE_TCHAR\fR * prog_name)\fC [static]\fR
.PP
Invoke the sync_log_msg_hook, if it is present.
.PP
.SS \fBACE_OS_Thread_Descriptor\fR * ACE_Base_Thread_Adapter::thr_desc_log_msg (void)\fC [static]\fR
.PP
Invoke the thr_desc_log_msg_hook, if it is present.
.PP
.SH FRIENDS AND RELATED FUNCTION DOCUMENTATION
.PP
.SS class ACE_Log_Msg\fC [friend]\fR
.PP
Allow the \fBACE_Log_Msg\fR class to set its hooks.
.PP
.SS class ACE_Thread_Adapter_Has_Private_Destructor\fC [friend]\fR
.PP
Friend declaration to avoid compiler warning: only defines a private destructor and has no friends.
.PP
Reimplemented in \fBACE_OS_Thread_Adapter\fR, and \fBACE_Thread_Adapter\fR.
.SH MEMBER DATA DOCUMENTATION
.PP
.SS void * ACE_Base_Thread_Adapter::arg_\fC [protected]\fR
.PP
Argument to thread startup function.
.PP
.SS ACE_CLOSE_LOG_MSG_HOOK ACE_Base_Thread_Adapter::close_log_msg_hook_\fC [static, private]\fR
.PP
.SS ACE_THR_C_FUNC ACE_Base_Thread_Adapter::entry_point_\fC [protected]\fR
.PP
Entry point to the underlying OS thread creation call (C linkage).
.PP
.SS ACE_INHERIT_LOG_MSG_HOOK ACE_Base_Thread_Adapter::inherit_log_msg_hook_\fC [static, private]\fR
.PP
.SS ACE_INIT_LOG_MSG_HOOK ACE_Base_Thread_Adapter::init_log_msg_hook_\fC [static, private]\fR
.PP
The hooks to inherit and cleanup the Log_Msg attributes.
.PP
.SS \fBACE_OS_Log_Msg_Attributes\fR ACE_Base_Thread_Adapter::log_msg_attributes_\fC [protected]\fR
.PP
The \fBACE_Log_Msg\fR attributes.
.PP
.SS ACE_SYNC_LOG_MSG_HOOK ACE_Base_Thread_Adapter::sync_log_msg_hook_\fC [static, private]\fR
.PP
.SS \fBACE_OS_Thread_Descriptor\fR * ACE_Base_Thread_Adapter::thr_desc_\fC [protected]\fR
.PP
Optional thread descriptor. Passing this pointer in will force the spawned thread to cache this location in <Log_Msg> and wait until <Thread_Manager> fills in all information in thread descriptor.
.SS ACE_THR_DESC_LOG_MSG_HOOK ACE_Base_Thread_Adapter::thr_desc_log_msg_hook_\fC [static, private]\fR
.PP
.SS ACE_THR_FUNC ACE_Base_Thread_Adapter::user_func_\fC [protected]\fR
.PP
Thread startup function passed in by the user (C++ linkage).
.PP
.SH AUTHOR
.PP
Generated automatically by Doxygen for ACE from the source code.
|