2 //=============================================================================
4 * @file Bound_Ptr_Test.h
6 * Define class needed for generating templates.
8 * @author @author Christopher Kohlhoff <chris@kohlhoff.com>
10 //=============================================================================
13 #ifndef ACE_TESTS_BOUND_PTR_TEST_H
14 #define ACE_TESTS_BOUND_PTR_TEST_H
16 #include "ace/Activation_Queue.h"
17 #include "ace/Bound_Ptr.h"
19 #include "ace/Thread_Mutex.h"
23 Printer (const char *message
);
29 static size_t instance_count_
;
32 #if defined (ACE_HAS_THREADS)
34 typedef ACE_Strong_Bound_Ptr
<Printer
, ACE_Thread_Mutex
> Printer_var
;
39 * @brief The scheduler for the Active Object.
41 * This class also plays the role of the Proxy and the Servant
42 * in the Active Object pattern. Naturally, these roles could
43 * be split apart from the Scheduler.
45 class Scheduler
: public ACE_Task
<ACE_SYNCH
>
47 friend class Method_Request_print
;
48 friend class Method_Request_end
;
54 virtual int open (void *args
= 0);
57 virtual int close (u_long flags
= 0);
60 virtual ~Scheduler ();
62 // = These methods are part of the Active Object Proxy interface.
63 void print (Printer_var
&printer
);
67 /// Runs the Scheduler's event loop, which dequeues <Method_Requests>
68 /// and dispatches them.
72 // = These are the <Scheduler> implementation details.
73 ACE_Activation_Queue activation_queue_
;
76 #endif /* ACE_HAS_THREADS */
77 #endif /* ACE_TESTS_BOUND_PTR_TEST_H */