Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / orbsvcs / tests / Notify / lib / Command_Builder.h
blob728ef7ec27758d234b0ec3a1d89704335807a3c6
1 /* -*- C++ -*- */
2 /**
3 * @file Command_Builder.h
5 * @author Pradeep Gore <pradeep@oomworks.com>
6 */
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)
15 # 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"
24 #include "tao/ORB.h"
26 class TAO_Notify_Tests_Command_Factory;
27 class TAO_Notify_Tests_Command;
29 /**
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
36 public:
37 /// Constructor
38 TAO_Notify_Tests_Command_Builder ();
40 /// Destructor
41 ~TAO_Notify_Tests_Command_Builder ();
43 /// = Service_Object virtual method overloads.
44 virtual int init (int argc, ACE_TCHAR *argv[]);
45 virtual int fini ();
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_>.
51 void execute ();
53 protected:
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_;
60 /// The factory map.
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 */