blob: 5608424d62b9de8d221d3cdf3a697071c822eb1f (
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
108
109
110
111
|
// -*- C++ -*-
//=============================================================================
/**
* @file ComponentRepository_i.h
*
* ComponentRepository servant class.
*
* @author Jeff Parsons <j.parsons@vanderbiltl.edu>
*/
//=============================================================================
#ifndef TAO_COMPONENTREPOSITORY_I_H
#define TAO_COMPONENTREPOSITORY_I_H
#include "orbsvcs/IFRService/Repository_i.h"
#include "orbsvcs/IFRService/ifr_service_export.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "orbsvcs/IFRService/ComponentContainer_i.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
class TAO_ModuleDef_i;
class TAO_ComponentDef_i;
class TAO_HomeDef_i;
class TAO_FinderDef_i;
class TAO_FactoryDef_i;
class TAO_EventDef_i;
class TAO_EmitsDef_i;
class TAO_PublishesDef_i;
class TAO_ConsumesDef_i;
class TAO_ProvidesDef_i;
class TAO_UsesDef_i;
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4250)
#endif /* _MSC_VER */
/**
* Provides global access to the Interface Repository,
* including access to information related to
* CORBA Components.
*/
class TAO_IFRService_Export TAO_ComponentRepository_i
: public virtual TAO_Repository_i,
public virtual TAO_ComponentContainer_i
{
public:
/// Constructor.
TAO_ComponentRepository_i (CORBA::ORB_ptr orb,
PortableServer::POA_ptr poa,
ACE_Configuration *config);
/// Destructor.
virtual ~TAO_ComponentRepository_i ();
/// We create a default servant servant for each IR Object
/// type and its corresponding POA.
virtual int create_servants_and_poas ();
/// Return one of our servants for internal use.
virtual TAO_IDLType_i *select_idltype (CORBA::DefinitionKind def_kind) const;
virtual TAO_Container_i *select_container (CORBA::DefinitionKind def_kind) const;
virtual TAO_Contained_i *select_contained (CORBA::DefinitionKind def_kind) const;
/// Select the right POA for object creation.
virtual PortableServer::POA_ptr select_poa (CORBA::DefinitionKind def_kind) const;
protected:
#ifdef CONCRETE_IR_OBJECT_TYPES
#undef CONCRETE_IR_OBJECT_TYPES
#endif
#define CONCRETE_IR_OBJECT_TYPES \
GEN_IR_OBJECT (ModuleDef) \
GEN_IR_OBJECT (ComponentDef) \
GEN_IR_OBJECT (HomeDef) \
GEN_IR_OBJECT (FinderDef) \
GEN_IR_OBJECT (FactoryDef) \
GEN_IR_OBJECT (EventDef) \
GEN_IR_OBJECT (EmitsDef) \
GEN_IR_OBJECT (PublishesDef) \
GEN_IR_OBJECT (ConsumesDef) \
GEN_IR_OBJECT (ProvidesDef) \
GEN_IR_OBJECT (UsesDef)
#define GEN_IR_OBJECT(name) \
POA_CORBA::ComponentIR:: name ## _tie<TAO_ ## name ## _i> * name ## _servant_; \
PortableServer::POA_var name ## _poa_;
CONCRETE_IR_OBJECT_TYPES
#undef GEN_IR_OBJECT
// Servants for each IR Object type, created at startup.
};
TAO_END_VERSIONED_NAMESPACE_DECL
#if defined(_MSC_VER)
#pragma warning(pop)
#endif /* _MSC_VER */
#endif /* TAO_COMPONENTREPOSITORY_I_H */
|