3 //=============================================================================
5 * @file CSD_Strategy_Repository.h
7 * @author Yan Dai <dai_y@ociweb.com>
9 //=============================================================================
11 #ifndef TAO_CSD_STRATEGY_FACTORY_H
12 #define TAO_CSD_STRATEGY_FACTORY_H
14 #include /**/ "ace/pre.h"
16 #include "tao/CSD_Framework/CSD_FW_Export.h"
17 #include "tao/CSD_Framework/CSD_FrameworkC.h"
18 #include "ace/Service_Object.h"
19 #include "ace/Service_Config.h"
20 #include "ace/Synch.h"
22 #if !defined (ACE_LACKS_PRAGMA_ONCE)
24 #endif /* ACE_LACKS_PRAGMA_ONCE */
26 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
29 * @class TAO_CSD_Strategy_Factory
31 * @brief An ACE_Service_Object capable of creating TP_Strategy objects.
33 * TBD - Explain in more detail.
36 class TAO_CSD_FW_Export TAO_CSD_Strategy_Repository
: public ACE_Service_Object
40 TAO_CSD_Strategy_Repository();
42 /// Virtual Destructor.
43 virtual ~TAO_CSD_Strategy_Repository();
45 int init (int argc
, ACE_TCHAR
** argv
);
47 /// Factory method used to create a CSD_Strategy object.
48 CSD_Framework::Strategy_ptr
find (const ACE_CString
& poa_name
);
50 int add_strategy (const ACE_CString
& poa_name
,
51 CSD_Framework::Strategy_ptr strategy
);
54 struct Strategy_Node
{
55 Strategy_Node(const ACE_CString
& poa_name
,
56 CSD_Framework::Strategy_ptr strategy
);
58 void add_node (Strategy_Node
*);
59 Strategy_Node
*find(const ACE_CString
& name
);
61 ACE_CString poa_name_
;
62 CSD_Framework::Strategy_var strategy_
;
63 Strategy_Node
* next_
;
65 Strategy_Node
* strategy_list_head_
;
69 ACE_STATIC_SVC_DECLARE_EXPORT (TAO_CSD_FW
, TAO_CSD_Strategy_Repository
)
70 ACE_FACTORY_DECLARE (TAO_CSD_FW
, TAO_CSD_Strategy_Repository
)
72 TAO_END_VERSIONED_NAMESPACE_DECL
74 #include /**/ "ace/post.h"
76 #endif /* TAO_CSD_STRATEGY_FACTORY_H */