summaryrefslogtreecommitdiff
path: root/TAO/tao/PortableServer/IORInfo.h
blob: 4c399535dfb7a6bd9e7c016f01ca0590c19495de (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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
// -*- C++ -*-

// ===================================================================
/**
 *  @file   IORInfo.h
 *
 *  $Id$
 *
 *  @author Ossama Othman <ossama@uci.edu>
 */
// ===================================================================

#ifndef TAO_IOR_INFO_H
#define TAO_IOR_INFO_H

#include "ace/pre.h"

#include "tao/PortableServer/portableserver_export.h"
#include "tao/PortableServer/POA.h"

#include "tao/corbafwd.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "tao/PortableInterceptorC.h"
#include "tao/LocalObject.h"

// This is to remove "inherits via dominance" warnings from MSVC.
// MSVC is being a little too paranoid.
#if defined(_MSC_VER)
#if (_MSC_VER >= 1200)
#pragma warning(push)
#endif /* _MSC_VER >= 1200 */
#pragma warning(disable:4250)
#endif /* _MSC_VER */


/// Forward declarations.
class TAO_Profile;
class TAO_MProfile;


/**
 * @class TAO_IORInfo
 *
 * @brief
 * This class exposes an interface that allows IORInterceptors add
 * tagged components to IORs.
 */
class TAO_PortableServer_Export TAO_IORInfo :
  public virtual PortableInterceptor::IORInfo,
  public virtual TAO_Local_RefCounted_Object
{
  friend class TAO_dummy_friend;
  friend class TAO_POA;

public:

  /// Constructor.
  TAO_IORInfo (TAO_ORB_Core *orb_core,
               TAO_POA *poa);

  /*           TAO_MProfile &mp,
               CORBA::PolicyList *policy_list);
  */

  /// Return the policy matching the given policy type that is in
  /// effect for the object whose IOR is being created.
  virtual CORBA::Policy_ptr get_effective_policy (
      CORBA::PolicyType type
      ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

  /// Add the given tagged component to all profiles.
  virtual void add_ior_component (
      const IOP::TaggedComponent & component
      ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

  /// Add the given tagged component to all profiles matching the given
  /// ProfileId.
  virtual void add_ior_component_to_profile (
      const IOP::TaggedComponent & component,
      IOP::ProfileId profile_id
      ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

  virtual PortableInterceptor::AdapterManagerId manager_id (
      ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

  virtual PortableInterceptor::AdapterState state (
      ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

  virtual PortableInterceptor::ObjectReferenceTemplate * adapter_template (
      ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

  virtual PortableInterceptor::ObjectReferenceFactory * current_factory (
      ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

  virtual void current_factory (
      PortableInterceptor::ObjectReferenceFactory * current_factory
      ACE_ENV_ARG_DECL_WITH_DEFAULTS)
      ACE_THROW_SPEC ((CORBA::SystemException));

protected:

  /// Destructor is protected to force instantiation on the heap since
  /// it is reference counted.
  ~TAO_IORInfo (void);

private:

  /// Prevent copying through the copy constructor and the assignment
  /// operator.
  ACE_UNIMPLEMENTED_FUNC (
    TAO_IORInfo (const TAO_IORInfo &))
  ACE_UNIMPLEMENTED_FUNC (void operator= (const TAO_IORInfo &))

private:

  /// Pointer to the ORB Core of the current ORB.
  TAO_ORB_Core *orb_core_;

  /// Pointer to POA
  TAO_POA *poa_;

  /*
    /// Reference to the profiles corresponding to the servant being
  /// created.
  TAO_MProfile &mp_;

  /// Pointer to the list of policies in effect for the servant
  /// being created.
  CORBA::PolicyList *policy_list_;
  */

  /// The Adapter state
  PortableInterceptor::AdapterState state_;

  /// The AdapterManagerId
  PortableInterceptor::AdapterManagerId manager_id_;

  /// The ObjectReferenceTemplate
  PortableInterceptor::ObjectReferenceTemplate *adapter_template_;

  /// The current factory
  PortableInterceptor::ObjectReferenceFactory *current_factory_;

};

#if defined(_MSC_VER) && (_MSC_VER >= 1200)
#pragma warning(pop)
#endif /* _MSC_VER */

#include "ace/post.h"

#endif /* TAO_IOR_INFO_H */