2 //=============================================================================
4 * @file Bound_Ptr_Test.h
6 * Define class needed for generating templates. IBM C++ requires this to
7 * be in its own file for auto template instantiation.
9 * @author @author Christopher Kohlhoff <chris@kohlhoff.com>
11 //=============================================================================
14 #ifndef ACE_TESTS_BOUND_PTR_TEST_H
15 #define ACE_TESTS_BOUND_PTR_TEST_H
17 #include "ace/Activation_Queue.h"
18 #include "ace/Bound_Ptr.h"
20 #include "ace/Thread_Mutex.h"
24 Printer (const char *message
);
30 static size_t instance_count_
;
33 #if defined (ACE_HAS_THREADS)
35 typedef ACE_Strong_Bound_Ptr
<Printer
, ACE_Thread_Mutex
> Printer_var
;
40 * @brief The scheduler for the Active Object.
42 * This class also plays the role of the Proxy and the Servant
43 * in the Active Object pattern. Naturally, these roles could
44 * be split apart from the Scheduler.
46 class Scheduler
: public ACE_Task
<ACE_SYNCH
>
48 friend class Method_Request_print
;
49 friend class Method_Request_end
;
55 virtual int open (void *args
= 0);
58 virtual int close (u_long flags
= 0);
61 virtual ~Scheduler (void);
63 // = These methods are part of the Active Object Proxy interface.
64 void print (Printer_var
&printer
);
68 /// Runs the Scheduler's event loop, which dequeues <Method_Requests>
69 /// and dispatches them.
73 // = These are the <Scheduler> implementation details.
74 ACE_Activation_Queue activation_queue_
;
77 #endif /* ACE_HAS_THREADS */
78 #endif /* ACE_TESTS_BOUND_PTR_TEST_H */