3 * @file Command_Builder.h
5 * @author Pradeep Gore <pradeep@oomworks.com>
8 #ifndef TAO_Notify_Tests_COMMAND_BUILDER_H
9 #define TAO_Notify_Tests_COMMAND_BUILDER_H
10 #include /**/ "ace/pre.h"
12 #include "notify_test_export.h"
14 #if !defined (ACE_LACKS_PRAGMA_ONCE)
16 #endif /* ACE_LACKS_PRAGMA_ONCE */
18 #include "ace/Service_Config.h"
19 #include "ace/Service_Object.h"
20 #include "ace/Unbounded_Queue.h"
21 #include "ace/SString.h"
22 #include "ace/CORBA_macros.h"
23 #include "ace/Hash_Map_Manager.h"
26 class TAO_Notify_Tests_Command_Factory
;
27 class TAO_Notify_Tests_Command
;
30 * @class TAO_Notify_Tests_Command_Builder
32 * @brief Class for collating and serially executing command objects.
34 class TAO_NOTIFY_TEST_Export TAO_Notify_Tests_Command_Builder
: public ACE_Service_Object
38 TAO_Notify_Tests_Command_Builder ();
41 ~TAO_Notify_Tests_Command_Builder ();
43 /// = Service_Object virtual method overloads.
44 virtual int init (int argc
, ACE_TCHAR
*argv
[]);
47 /// Register the factory against the name of the factory.
48 void _register (ACE_CString command_factory_name
, TAO_Notify_Tests_Command_Factory
* command_factory
);
50 /// Execute the <start_command_>.
54 /// The starting command. each command executes the next one when done.
55 TAO_Notify_Tests_Command
* start_command_
;
57 /// Last command initialized.
58 TAO_Notify_Tests_Command
* last_command_
;
61 ACE_Hash_Map_Manager
<ACE_CString
, TAO_Notify_Tests_Command_Factory
*, TAO_SYNCH_MUTEX
> factory_map_
;
64 ACE_STATIC_SVC_DECLARE_EXPORT (TAO_NOTIFY_TEST
, TAO_Notify_Tests_Command_Builder
)
66 ACE_FACTORY_DECLARE (TAO_NOTIFY_TEST
, TAO_Notify_Tests_Command_Builder
)
68 #include /**/ "ace/post.h"
69 #endif /* TAO_Notify_Tests_COMMAND_BUILDER_H */