summaryrefslogtreecommitdiff
path: root/apps/JAWS/PROTOTYPE/JAWS/Pipeline_Handler.cpp
blob: 64c904c3f96a518164e4d99a730edb9bb2a51b82 (plain)
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
// $Id$

#if !defined (JAWS_PIPELINE_HANDLER_CPP)
#define JAWS_PIPELINE_HANDLER_CPP

#include "JAWS/Pipeline_Handler.h"

template <class TYPE>
JAWS_Pipeline_Abstract_Handler<TYPE>::JAWS_Pipeline_Abstract_Handler (void)
{
}

template <class TYPE>
JAWS_Pipeline_Abstract_Handler<TYPE>::~JAWS_Pipeline_Abstract_Handler (void)
{
}

template <class TYPE> int
JAWS_Pipeline_Abstract_Handler<TYPE>::put (ACE_Message_Block *mb,
                                           ACE_Time_Value *tv)
{
  TYPE *data = ACE_dynamic_cast (TYPE *,
                                 mb->data_block ());

  int status = this->handle_put (data, tv);

  // If handle_put() is successful, we continue to the next stage of the
  // pipeline.  Otherwise, we return.
  return (status != -1) ? this->put_next (mb, tv) : -1;
}

#endif /* !defined (JAWS_PIPELINE_HANDLER_CPP) */