OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
WorkProcessor< InputT, SubResultT, ExternalT > Class Template Reference

#include <work_processor-inl.h>

Inheritance diagram for WorkProcessor< InputT, SubResultT, ExternalT >:
Collaboration diagram for WorkProcessor< InputT, SubResultT, ExternalT >:

Public Types

typedef boost::function
< ExternalBase::Efn(uint32_t
inst, const std::vector
< ExternalT * > &exts, const
InputT &inp, SubResultT
&subRes)> 
ExecuteFn
 
- Public Types inherited from ExternalBase
typedef boost::function< bool(ExternalBase *)> Efn
 

Public Member Functions

 WorkProcessor (uint32_t stage, ExecuteFn efn, FinFn finFn, const InputT &inp, uint32_t inst, int tid, int tinst)
 
void Start ()
 
boost::shared_ptr< SubResultT > Result () const
 
void Release ()
 
std::string Key () const
 
- Public Member Functions inherited from ExternalProcIf< ExternalT >
virtual ~ExternalProcIf ()
 

Private Member Functions

void WorkDone (bool ret_code)
 
bool Runner (void)
 
void Response (std::unique_ptr< ExternalT > resp)
 

Private Attributes

uint32_t stage_
 
FinFn finFn_
 
const ExecuteFn efn_
 
const InputT & inp_
 
boost::shared_ptr< SubResultT > res_
 
std::vector< ExternalT * > externals_
 
bool finished_
 
bool running_
 
const uint32_t inst_
 
const int tid_
 
const int tinst_
 
PipelineWorker *const w_
 

Additional Inherited Members

- Static Public Member Functions inherited from ExternalBase
static bool Incomplete (void *)
 

Detailed Description

template<typename InputT, typename SubResultT, typename ExternalT>
class WorkProcessor< InputT, SubResultT, ExternalT >

Definition at line 36 of file work_processor-inl.h.

Member Typedef Documentation

template<typename InputT , typename SubResultT , typename ExternalT >
typedef boost::function<ExternalBase::Efn( uint32_t inst, const std::vector<ExternalT*> & exts, const InputT & inp, SubResultT & subRes )> WorkProcessor< InputT, SubResultT, ExternalT >::ExecuteFn

Definition at line 43 of file work_processor-inl.h.

Constructor & Destructor Documentation

template<typename InputT , typename SubResultT , typename ExternalT >
WorkProcessor< InputT, SubResultT, ExternalT >::WorkProcessor ( uint32_t  stage,
ExecuteFn  efn,
FinFn  finFn,
const InputT &  inp,
uint32_t  inst,
int  tid,
int  tinst 
)
inline

Definition at line 45 of file work_processor-inl.h.

Member Function Documentation

template<typename InputT , typename SubResultT , typename ExternalT >
std::string WorkProcessor< InputT, SubResultT, ExternalT >::Key ( ) const
inlinevirtual

Implements ExternalProcIf< ExternalT >.

Definition at line 77 of file work_processor-inl.h.

template<typename InputT , typename SubResultT , typename ExternalT >
void WorkProcessor< InputT, SubResultT, ExternalT >::Release ( )
inline

Definition at line 72 of file work_processor-inl.h.

template<typename InputT , typename SubResultT , typename ExternalT >
void WorkProcessor< InputT, SubResultT, ExternalT >::Response ( std::unique_ptr< ExternalT >  resp)
inlineprivatevirtual

Implements ExternalProcIf< ExternalT >.

Definition at line 123 of file work_processor-inl.h.

Here is the call graph for this function:

template<typename InputT , typename SubResultT , typename ExternalT >
boost::shared_ptr<SubResultT> WorkProcessor< InputT, SubResultT, ExternalT >::Result ( ) const
inline

Definition at line 67 of file work_processor-inl.h.

template<typename InputT , typename SubResultT , typename ExternalT >
bool WorkProcessor< InputT, SubResultT, ExternalT >::Runner ( void  )
inlineprivate

Definition at line 107 of file work_processor-inl.h.

Here is the call graph for this function:

template<typename InputT , typename SubResultT , typename ExternalT >
void WorkProcessor< InputT, SubResultT, ExternalT >::Start ( )
inline

Definition at line 62 of file work_processor-inl.h.

Here is the call graph for this function:

template<typename InputT , typename SubResultT , typename ExternalT >
void WorkProcessor< InputT, SubResultT, ExternalT >::WorkDone ( bool  ret_code)
inlineprivate

Definition at line 98 of file work_processor-inl.h.

Member Data Documentation

template<typename InputT , typename SubResultT , typename ExternalT >
const ExecuteFn WorkProcessor< InputT, SubResultT, ExternalT >::efn_
private

Definition at line 87 of file work_processor-inl.h.

template<typename InputT , typename SubResultT , typename ExternalT >
std::vector<ExternalT*> WorkProcessor< InputT, SubResultT, ExternalT >::externals_
private

Definition at line 90 of file work_processor-inl.h.

template<typename InputT , typename SubResultT , typename ExternalT >
FinFn WorkProcessor< InputT, SubResultT, ExternalT >::finFn_
private

Definition at line 86 of file work_processor-inl.h.

template<typename InputT , typename SubResultT , typename ExternalT >
bool WorkProcessor< InputT, SubResultT, ExternalT >::finished_
private

Definition at line 91 of file work_processor-inl.h.

template<typename InputT , typename SubResultT , typename ExternalT >
const InputT& WorkProcessor< InputT, SubResultT, ExternalT >::inp_
private

Definition at line 88 of file work_processor-inl.h.

template<typename InputT , typename SubResultT , typename ExternalT >
const uint32_t WorkProcessor< InputT, SubResultT, ExternalT >::inst_
private

Definition at line 93 of file work_processor-inl.h.

template<typename InputT , typename SubResultT , typename ExternalT >
boost::shared_ptr<SubResultT> WorkProcessor< InputT, SubResultT, ExternalT >::res_
private

Definition at line 89 of file work_processor-inl.h.

template<typename InputT , typename SubResultT , typename ExternalT >
bool WorkProcessor< InputT, SubResultT, ExternalT >::running_
private

Definition at line 92 of file work_processor-inl.h.

template<typename InputT , typename SubResultT , typename ExternalT >
uint32_t WorkProcessor< InputT, SubResultT, ExternalT >::stage_
private

Definition at line 85 of file work_processor-inl.h.

template<typename InputT , typename SubResultT , typename ExternalT >
const int WorkProcessor< InputT, SubResultT, ExternalT >::tid_
private

Definition at line 94 of file work_processor-inl.h.

template<typename InputT , typename SubResultT , typename ExternalT >
const int WorkProcessor< InputT, SubResultT, ExternalT >::tinst_
private

Definition at line 95 of file work_processor-inl.h.

template<typename InputT , typename SubResultT , typename ExternalT >
PipelineWorker* const WorkProcessor< InputT, SubResultT, ExternalT >::w_
private

Definition at line 96 of file work_processor-inl.h.


The documentation for this class was generated from the following file: