diff options
author | jxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-02-16 19:25:25 +0000 |
---|---|---|
committer | jxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-02-16 19:25:25 +0000 |
commit | 7a091595e9c4f4e33e53a428988a75fc5fe3b823 (patch) | |
tree | e5e5a3464cc53b58236767323cdd13e58cc894fb | |
parent | 520d72123915951e49fa4e70a5de8e748cc19556 (diff) | |
download | ATCD-7a091595e9c4f4e33e53a428988a75fc5fe3b823.tar.gz |
*** empty log message ***
-rw-r--r-- | apps/JAWS/server/JAWS_Pipeline.cpp | 2 | ||||
-rw-r--r-- | apps/JAWS/server/JAWS_Pipeline.h | 17 | ||||
-rw-r--r-- | apps/JAWS/server/JAWS_Pipeline_Handler.cpp | 21 | ||||
-rw-r--r-- | apps/JAWS/server/JAWS_Pipeline_Handler.h | 29 |
4 files changed, 52 insertions, 17 deletions
diff --git a/apps/JAWS/server/JAWS_Pipeline.cpp b/apps/JAWS/server/JAWS_Pipeline.cpp index c2f53b403d8..25f6039ac50 100644 --- a/apps/JAWS/server/JAWS_Pipeline.cpp +++ b/apps/JAWS/server/JAWS_Pipeline.cpp @@ -29,7 +29,7 @@ JAWS_Pipeline_Handler<TYPE>::JAWS_Pipeline_Handler (void) template <class TYPE> int JAWS_Pipeline_Handler<TYPE>::put (ACE_Message_Block *mb, ACE_Time_Value *tv) { - TYPE *data = (TYPE *) mb->data_block (); + TYPE *data = ACE_dynamic_cast(TYPE *, mb->data_block ()); status = this->handle_input (data, tv); return (status != -1) ? this->put_next (mb, tv) : -1; } diff --git a/apps/JAWS/server/JAWS_Pipeline.h b/apps/JAWS/server/JAWS_Pipeline.h index a8934db1f1f..7867213076f 100644 --- a/apps/JAWS/server/JAWS_Pipeline.h +++ b/apps/JAWS/server/JAWS_Pipeline.h @@ -26,21 +26,6 @@ public: virtual int close (u_long = 0); }; -template <class TYPE> -class JAWS_Pipeline_Handler : public JAWS_Pipeline_Task - // = TITLE - // Methods that are common to pipeline components -{ -public: - JAWS_Pipeline_Handler (void); - // ACE_Task hooks - - virtual int put (ACE_Message_Block *mb, ACE_Time_Value *tv = 0); - // inherited from ACE_Task - - virtual int handle_input (TYPE *data, ACE_Time_Value *tv) = 0; - // Callback hook for specialized data processing -}; - +#include "JAWS_Pipeline_Handler.h" #endif /* !defined (JAWS_PIPELINE_H) */ diff --git a/apps/JAWS/server/JAWS_Pipeline_Handler.cpp b/apps/JAWS/server/JAWS_Pipeline_Handler.cpp new file mode 100644 index 00000000000..397fb5035a5 --- /dev/null +++ b/apps/JAWS/server/JAWS_Pipeline_Handler.cpp @@ -0,0 +1,21 @@ +// $Id$ + +#if !defined (JAWS_PIPELINE_HANDLER_CPP) +#define JAWS_PIPELINE_HANDLER_CPP + +#include "JAWS_Pipeline_Handler.h" + +template <class TYPE> +JAWS_Pipeline_Handler<TYPE>::JAWS_Pipeline_Handler (void) +{ +} + +template <class TYPE> int +JAWS_Pipeline_Handler<TYPE>::put (ACE_Message_Block *mb, ACE_Time_Value *tv) +{ + TYPE *data = ACE_dynamic_cast(TYPE *, mb->data_block ()); + status = this->handle_input (data, tv); + return (status != -1) ? this->put_next (mb, tv) : -1; +} + +#endif /* !defined (JAWS_PIPELINE_HANDLER_CPP) */ diff --git a/apps/JAWS/server/JAWS_Pipeline_Handler.h b/apps/JAWS/server/JAWS_Pipeline_Handler.h new file mode 100644 index 00000000000..30975a99175 --- /dev/null +++ b/apps/JAWS/server/JAWS_Pipeline_Handler.h @@ -0,0 +1,29 @@ +/* -*- c++ -*- */ +// $Id$ + +#if !defined (JAWS_PIPELINE_HANDLER_H) +#define JAWS_PIPELINE_HANDLER_H + +#include "JAWS_Pipeline.h" + +template <class TYPE> +class JAWS_Pipeline_Handler : public JAWS_Pipeline_Task + // = TITLE + // Methods that are common to pipeline components +{ +public: + JAWS_Pipeline_Handler (void) + // ACE_Task hooks + + virtual int put (ACE_Message_Block *mb, ACE_Time_Value *tv = 0); + // inherited from ACE_Task + + virtual int handle_put (TYPE *data, ACE_Time_Value *tv) = 0; + // Callback hook for specialized data processing +}; + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "JAWS_Pipeline_Handler.cpp" +#endif + +#endif /* !defined (JAWS_PIPELINE_HANDLER_H) */ |