#include <Stream_Modules.h>
Inheritance diagram for ACE_Stream_Tail:


Public Methods | |
| ACE_Stream_Tail (void) | |
| Construction. More... | |
| ~ACE_Stream_Tail (void) | |
| Destruction. More... | |
| virtual int | open (void *a=0) |
| Hook called to open a Task. <args> can be used to pass arbitrary information into <open>. More... | |
| virtual int | close (u_long flags=0) |
| virtual int | put (ACE_Message_Block *msg, ACE_Time_Value *=0) |
| A hook method that can be used to pass a message to a task, where it can be processed immediately or queued for subsequent processing in the <svc> hook method. More... | |
| virtual int | svc (void) |
| Run by a daemon thread to handle deferred processing. More... | |
| virtual int | init (int argc, ACE_TCHAR *argv[]) |
| Initializes object when dynamic linking occurs. More... | |
| virtual int | info (ACE_TCHAR **info_string, size_t length) const |
| Returns information on a service object. More... | |
| virtual int | fini (void) |
| Terminates object when dynamic unlinking occurs. More... | |
| void | dump (void) const |
| Dump the state of an object. More... | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. More... | |
Private Methods | |
| int | control (ACE_Message_Block *) |
| Performs canonical flushing at the ACE_Stream tail. More... | |
| int | canonical_flush (ACE_Message_Block *) |
Definition at line 68 of file Stream_Modules.h.
|
||||||||||
|
Construction.
Definition at line 157 of file Stream_Modules.cpp. References ACE_TRACE.
00158 {
00159 ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::ACE_Stream_Tail");
00160 }
|
|
||||||||||
|
Destruction.
Definition at line 163 of file Stream_Modules.cpp. References ACE_TRACE.
00164 {
00165 ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::~ACE_Stream_Tail");
00166 }
|
|
||||||||||
|
Definition at line 223 of file Stream_Modules.cpp. References ACE_BIT_ENABLED, ACE_CLR_BITS, ACE_Task_Flags::ACE_FLUSHALL, ACE_Task_Flags::ACE_FLUSHR, ACE_Task_Flags::ACE_FLUSHW, ACE_TRACE, ACE_Task< ACE_SYNCH_USE >::flush, ACE_Message_Block::rd_ptr, ACE_Message_Block::release, ACE_Task< ACE_SYNCH_USE >::reply, and ACE_Task< ACE_SYNCH_USE >::sibling.
00224 {
00225 ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::canonical_flush");
00226 char *cp = mb->rd_ptr ();
00227
00228 if (ACE_BIT_ENABLED (*cp, ACE_Task_Flags::ACE_FLUSHW))
00229 {
00230 this->flush (ACE_Task_Flags::ACE_FLUSHALL);
00231 ACE_CLR_BITS (*cp, ACE_Task_Flags::ACE_FLUSHW);
00232 }
00233
00234 if (ACE_BIT_ENABLED (*cp, ACE_Task_Flags::ACE_FLUSHR))
00235 {
00236 this->sibling ()->flush (ACE_Task_Flags::ACE_FLUSHALL);
00237 return this->reply (mb);
00238 }
00239 else
00240 mb->release ();
00241
00242 return 0;
00243 }
|
|
||||||||||
|
Hook called from <ACE_Thread_Exit> when during thread exit and from the default implementation of <module_closed>. In general, this method shouldn't be called directly by an application, particularly if the <Task> is running as an Active Object. Instead, a special message should be passed into the <Task> via the <put> method defined below, and the <svc> method should interpret this as a flag to shut down the <Task>. Reimplemented from ACE_Task_Base. Definition at line 182 of file Stream_Modules.cpp. References ACE_TRACE.
00183 {
00184 ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::close");
00185 return 0;
00186 }
|
|
||||||||||
|
||||||||||
|
Dump the state of an object.
Reimplemented from ACE_Task< ACE_SYNCH_USE >. Definition at line 169 of file Stream_Modules.cpp. References ACE_TRACE.
00170 {
00171 ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::dump");
00172 }
|
|
||||||||||
|
Terminates object when dynamic unlinking occurs.
Reimplemented from ACE_Shared_Object. Definition at line 289 of file Stream_Modules.cpp. References ACE_TRACE.
00290 {
00291 ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::fini");
00292 return 0;
00293 }
|
|
||||||||||||||||
|
Returns information on a service object.
Reimplemented from ACE_Shared_Object. Definition at line 276 of file Stream_Modules.cpp. References ACE_TCHAR, ACE_TRACE, ACE_Task< ACE_SYNCH_USE >::name, ACE_OS_String::strdup, ACE_OS_String::strlen, and ACE_OS_String::strsncpy.
00277 {
00278 ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::info");
00279 const ACE_TCHAR *name = this->name ();
00280
00281 if (*strp == 0 && (*strp = ACE_OS::strdup (name)) == 0)
00282 return -1;
00283 else
00284 ACE_OS::strsncpy (*strp, name, length);
00285 return ACE_static_cast (int, ACE_OS_String::strlen (name));
00286 }
|
|
||||||||||||||||
|
Initializes object when dynamic linking occurs.
Reimplemented from ACE_Shared_Object. Definition at line 269 of file Stream_Modules.cpp. References ACE_TCHAR, and ACE_TRACE.
00270 {
00271 ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::init");
00272 return 0;
00273 }
|
|
||||||||||
|
Hook called to open a Task. <args> can be used to pass arbitrary information into <open>.
Reimplemented from ACE_Task_Base. Definition at line 175 of file Stream_Modules.cpp. References ACE_TRACE.
00176 {
00177 ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::open");
00178 return 0;
00179 }
|
|
||||||||||||||||
|
A hook method that can be used to pass a message to a task, where it can be processed immediately or queued for subsequent processing in the <svc> hook method.
Reimplemented from ACE_Task_Base. Definition at line 246 of file Stream_Modules.cpp. References ACE_TRACE, control, ACE_Task_Base::is_writer, ACE_Message_Block::MB_IOCTL, ACE_Message_Block::msg_type, and ACE_Message_Block::release.
00248 {
00249 ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::put");
00250
00251 if (this->is_writer ())
00252 {
00253 switch (mb->msg_type ())
00254 {
00255 case ACE_Message_Block::MB_IOCTL:
00256 return this->control (mb);
00257 /* NOTREACHED */
00258 default:
00259 mb->release ();
00260 return 0;
00261 /* NOTREACHED */
00262 }
00263 }
00264
00265 return -1;
00266 }
|
|
||||||||||
|
Run by a daemon thread to handle deferred processing.
Reimplemented from ACE_Task_Base. Definition at line 189 of file Stream_Modules.cpp. References ACE_TRACE.
00190 {
00191 ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::svc");
00192 return -1;
00193 }
|
|
|||||
|
Declare the dynamic allocation hooks.
Reimplemented from ACE_Task< ACE_SYNCH_USE >. Definition at line 92 of file Stream_Modules.h. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002