Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / Kokyu / Default_Dispatcher_Impl.h
blobec17f76c713e480b5aa0b7753dfdc60d0357ca78
1 /* -*- C++ -*- */
2 /**
3 * @file Default_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 DEFAULT_DISPATCHER_IMPL_H
12 #define DEFAULT_DISPATCHER_IMPL_H
13 #include /**/ "ace/pre.h"
15 #include "ace/Task.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "kokyu_export.h"
23 #include "Kokyu_defs.h"
24 #include "Dispatcher_Impl.h"
25 #include "Dispatcher_Task.h"
26 #include <memory>
28 namespace Kokyu
30 /**
31 * @class Default_Dispatcher_Impl
33 * @brief Default implementation class for EC dispatcher
34 * implementations
37 class Default_Dispatcher_Impl : public Dispatcher_Impl
39 public:
40 Default_Dispatcher_Impl ();
42 private:
43 int activate_i ();
44 int init_i (const Dispatcher_Attributes&);
45 int dispatch_i (const Dispatch_Command*,
46 const QoSDescriptor&);
47 int shutdown_i ();
48 Dispatcher_Task* find_task_with_preemption_prio (Priority_t);
50 private:
51 typedef std::unique_ptr<Dispatcher_Task> Dispatcher_Task_Auto_Ptr;
52 std::unique_ptr<Dispatcher_Task_Auto_Ptr[]> tasks_;
53 int ntasks_;
54 ConfigInfoSet curr_config_info_;
55 int activated_;
58 class Shutdown_Task_Command : public Dispatch_Command
60 public:
61 /// Constructor
62 Shutdown_Task_Command (ACE_Allocator *mb_allocator = 0);
64 /// Command callback
65 int execute ();
67 } //end of namespace
69 #if defined (__ACE_INLINE__)
70 #include "Default_Dispatcher_Impl.inl"
71 #endif /* __ACE_INLINE__ */
73 #include /**/ "ace/post.h"
74 #endif /* DEFAULT_DISPATCHER_IMPL_H */