Compile fixes
[ACE_TAO.git] / ACE / Kokyu / Dispatcher_Impl.h
blob91322358a459c55354c9a624ad62ada24c6ed5b5
1 /* -*- C++ -*- */
2 /**
3 * @file Dispatcher_Impl.h
5 * @author Venkita Subramonian (venkita@cs.wustl.edu)
7 * Based on previous work by Tim Harrison (harrison@cs.wustl.edu),
8 * Chris Gill, Carlos O'Ryan and other members of the DOC group.
9 */
11 #ifndef DISPATCHER_IMPL_H
12 #define DISPATCHER_IMPL_H
13 #include /**/ "ace/pre.h"
15 #include "Kokyu_defs.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 # pragma once
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #include "kokyu_export.h"
23 namespace Kokyu
25 /**
26 * @class Dispatcher
28 * @brief Base class for EC dispatcher implementations
30 * The responsibility of this class is to act as a common base class
31 * for different EC dispatcher implementations. This is an
32 * abstract base class and cannot be instantiated.
34 class Kokyu_Export Dispatcher_Impl
36 public:
37 /// Configure the dispatcher.
38 int init (const Dispatcher_Attributes&);
40 int activate ();
42 /// dispatch a command (eg. event) based on the QoS supplied.
43 int dispatch (const Dispatch_Command*,
44 const QoSDescriptor&);
46 /// shutdown the dispatcher.
47 int shutdown ();
49 virtual ~Dispatcher_Impl();
51 private:
52 //following an idiom to avoid public virtual functions.
53 //instead make them private and use the template method
54 //pattern - "Virtually Yours" article in CUJ Experts Forum
56 virtual int init_i (const Dispatcher_Attributes&) =0;
57 virtual int dispatch_i (const Dispatch_Command*,
58 const QoSDescriptor&) =0;
59 virtual int shutdown_i () =0;
60 virtual int activate_i () =0;
62 protected:
63 int thr_creation_flags_;
65 } //end of namespace
67 #if defined (__ACE_INLINE__)
68 #include "Dispatcher_Impl.inl"
69 #endif /* __ACE_INLINE__ */
71 #include /**/ "ace/post.h"
72 #endif /* DISPATCHER_IMPL_H */