blob: f4019a5c167f79751834db3f759ddadec07785a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
// -*- C++ -*-
/**
* @file CEC_Event_Loader.h
*
* Define a class to dynamically load the COS Event Service.
*
* @author Priyanka Gontla <pgontla@ece.uci.edu>
*/
#ifndef TAO_CEC_EVENT_LOADER_H
#define TAO_CEC_EVENT_LOADER_H
#include "tao/Object_Loader.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "orbsvcs/CosEvent/CEC_EventChannel.h"
#if defined (TAO_HAS_TYPED_EVENT_CHANNEL)
#include "orbsvcs/CosEvent/CEC_TypedEventChannel.h"
#endif /* TAO_HAS_TYPED_EVENT_CHANNEL */
#include "orbsvcs/CosNamingC.h"
#include "ace/Service_Config.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
/**
* @class TAO_CEC_Event_Loader
*
* @brief Dynamically load an instance of the COS Event Service.
*/
class TAO_Event_Serv_Export TAO_CEC_Event_Loader : public TAO_Object_Loader
{
public:
/// Constructor
TAO_CEC_Event_Loader (void);
/// Destructor
~TAO_CEC_Event_Loader (void);
//@{
/**
* @name Derived from ACE_Service_Object
*/
virtual int init (int argc, ACE_TCHAR *argv[]);
virtual int fini ();
//@}
//@{
/**
* @name Derived from TAO_Object_Loader
*/
virtual CORBA::Object_ptr create_object (CORBA::ORB_ptr orb,
int argc,
ACE_TCHAR *argv[]);
//@}
protected:
/// Keep a pointer to the underlying ORB.
CORBA::ORB_var orb_;
/// Flag to control the event loop
int terminate_flag_;
/// Attributes used to configure the Event Service properties.
TAO_CEC_EventChannel_Attributes *attributes_;
/// Factory used to configure the Event Service strategies.
TAO_CEC_Factory *factory_;
/// The Event Service implementation class.
TAO_CEC_EventChannel *ec_impl_;
#if defined (TAO_HAS_TYPED_EVENT_CHANNEL)
/// Attributes used to configure the Typed Event Service properties.
TAO_CEC_TypedEventChannel_Attributes *typed_attributes_;
/// The Typed Event Service implementation class.
TAO_CEC_TypedEventChannel *typed_ec_impl_;
#endif /* TAO_HAS_TYPED_EVENT_CHANNEL */
/// Naming Context needed if '-x' option is passed
CosNaming::NamingContext_var naming_context_;
/// Flag to check if '-x' option is passed
int bind_to_naming_service_;
/// The name used when binding to the NamingService.
CosNaming::Name channel_name_;
private:
TAO_CEC_Event_Loader (const TAO_CEC_Event_Loader &) = delete;
TAO_CEC_Event_Loader &operator= (const TAO_CEC_Event_Loader &) = delete;
TAO_CEC_Event_Loader (TAO_CEC_Event_Loader &&) = delete;
TAO_CEC_Event_Loader &operator= (TAO_CEC_Event_Loader &&) = delete;
};
TAO_END_VERSIONED_NAMESPACE_DECL
ACE_FACTORY_DECLARE (TAO_Event_Serv, TAO_CEC_Event_Loader)
#endif /* TAO_CEC_EVENT_LOADER_H */
|