Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_Thru_Task Class Template Reference

Standard module that acts as a "no op", simply passing on all data to its adjacent neighbor. More...

#include <Stream_Modules.h>

Inheritance diagram for ACE_Thru_Task:

Inheritance graph
[legend]
Collaboration diagram for ACE_Thru_Task:

Collaboration graph
[legend]
List of all members.

Public Methods

 ACE_Thru_Task (void)
 Construction. More...

 ~ACE_Thru_Task (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...


Detailed Description

template<ACE_SYNCH_DECL>
class ACE_Thru_Task<>

Standard module that acts as a "no op", simply passing on all data to its adjacent neighbor.

Definition at line 107 of file Stream_Modules.h.


Constructor & Destructor Documentation

template<ACE_SYNCH_DECL >
ACE_Thru_Task<>::ACE_Thru_Task void   
 

Construction.

Definition at line 298 of file Stream_Modules.cpp.

References ACE_TRACE.

00299 {
00300   ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::ACE_Thru_Task");
00301 }

template<ACE_SYNCH_DECL >
ACE_Thru_Task<>::~ACE_Thru_Task void   
 

Destruction.

Definition at line 304 of file Stream_Modules.cpp.

References ACE_TRACE.

00305 {
00306   ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::~ACE_Thru_Task");
00307 }


Member Function Documentation

template<ACE_SYNCH_DECL >
int ACE_Thru_Task<>::close u_long    flags = 0 [virtual]
 

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 323 of file Stream_Modules.cpp.

References ACE_TRACE.

00324 {
00325   ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::close");
00326   return 0;
00327 }

template<ACE_SYNCH_DECL >
void ACE_Thru_Task<>::dump void    const
 

Dump the state of an object.

Reimplemented from ACE_Task< ACE_SYNCH_USE >.

Definition at line 310 of file Stream_Modules.cpp.

References ACE_TRACE.

00311 {
00312   ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::dump");
00313 }

template<ACE_SYNCH_DECL >
int ACE_Thru_Task<>::fini void    [virtual]
 

Terminates object when dynamic unlinking occurs.

Reimplemented from ACE_Shared_Object.

Definition at line 366 of file Stream_Modules.cpp.

References ACE_TRACE.

00367 {
00368   ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::fini");
00369   return 0;
00370 }

template<ACE_SYNCH_DECL >
int ACE_Thru_Task<>::info ACE_TCHAR **    info_string,
size_t    length
const [virtual]
 

Returns information on a service object.

Reimplemented from ACE_Shared_Object.

Definition at line 352 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.

00354 {
00355   ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::info");
00356   const ACE_TCHAR *name = this->name ();
00357 
00358   if (*strp == 0 && (*strp = ACE_OS::strdup (name)) == 0)
00359     return -1;
00360   else
00361     ACE_OS::strsncpy (*strp, name, length);
00362   return ACE_static_cast (int, ACE_OS_String::strlen (name));
00363 }

template<ACE_SYNCH_DECL >
int ACE_Thru_Task<>::init int    argc,
ACE_TCHAR   argv[]
[virtual]
 

Initializes object when dynamic linking occurs.

Reimplemented from ACE_Shared_Object.

Definition at line 345 of file Stream_Modules.cpp.

References ACE_TCHAR, and ACE_TRACE.

00346 {
00347   ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::init");
00348   return 0;
00349 }

template<ACE_SYNCH_DECL >
int ACE_Thru_Task<>::open void *    a = 0 [virtual]
 

Hook called to open a Task. <args> can be used to pass arbitrary information into <open>.

Reimplemented from ACE_Task_Base.

Definition at line 316 of file Stream_Modules.cpp.

References ACE_TRACE.

00317 {
00318   ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::open");
00319   return 0;
00320 }

template<ACE_SYNCH_DECL >
int ACE_Thru_Task<>::put ACE_Message_Block   msg,
ACE_Time_Value   = 0
[virtual]
 

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 337 of file Stream_Modules.cpp.

References ACE_TRACE, and ACE_Task< ACE_SYNCH_USE >::put_next.

00339 {
00340   ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::put");
00341   return this->put_next (msg, tv);
00342 }

template<ACE_SYNCH_DECL >
int ACE_Thru_Task<>::svc void    [virtual]
 

Run by a daemon thread to handle deferred processing.

Reimplemented from ACE_Task_Base.

Definition at line 330 of file Stream_Modules.cpp.

References ACE_TRACE.

00331 {
00332   ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::svc");
00333   return -1;
00334 }


Member Data Documentation

template<ACE_SYNCH_DECL >
ACE_Thru_Task::ACE_ALLOC_HOOK_DECLARE
 

Declare the dynamic allocation hooks.

Reimplemented from ACE_Task< ACE_SYNCH_USE >.

Definition at line 131 of file Stream_Modules.h.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:57:50 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002