summaryrefslogtreecommitdiff
path: root/TAO/CIAO/examples/handcrafted/Display/NavDisplay/NavDisplay_svnt.inl
blob: 9d575eb8306082df2c51909ea755b9752276dada (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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
// $Id$

//    The generated filename for files using this template shoule be
//       [idl-basename]GS.i        GS --> GlueSession

// @@ Notice: [ciao module name] can expand to either CIAO_GLUE or
//    CIAO_GLUE_[module name] as defined in the header file.

/// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
/// @@@ Notice that all component and interface names need to be
/// fully qualified as we are creating a new namespace for the CIAO's
/// container glue code.
/// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

//////////////////////////////////////////////////////////////////
// Component specific context implementation
//////////////////////////////////////////////////////////////////

ACE_INLINE
CIAO_GLUE_HUDisplay::NavDisplay_Context::NavDisplay_Context (::Components::CCMHome_ptr home,
                                                             ::CIAO::Session_Container *c,
                                                             CIAO_GLUE_HUDisplay::NavDisplay_Servant *sv)
  : home_ (::Components::CCMHome::_duplicate (home)),
    container_ (c),
    servant_ (sv)
{

}

ACE_INLINE
CIAO_GLUE_HUDisplay::NavDisplay_Context::~NavDisplay_Context ()
{
}

// Operations for emits interfaces.

// Operations for ::Components::CCMContext
ACE_INLINE ::Components::Principal_ptr
CIAO_GLUE_HUDisplay::NavDisplay_Context::get_caller_principal (ACE_ENV_SINGLE_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  // @@ We don't support Security in CIAO yet.
  ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
}

ACE_INLINE ::Components::CCMHome_ptr
CIAO_GLUE_HUDisplay::NavDisplay_Context::get_CCM_home (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  return ::Components::CCMHome::_duplicate (this->home_.in ());
}

ACE_INLINE CORBA::Boolean
CIAO_GLUE_HUDisplay::NavDisplay_Context::get_rollback_only (ACE_ENV_SINGLE_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   Components::IllegalState))
{
  // @@ We don't support Transaction in CIAO yet.
  ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
}

ACE_INLINE ::Components::Transaction::UserTransaction_ptr
CIAO_GLUE_HUDisplay::NavDisplay_Context::get_user_transaction (ACE_ENV_SINGLE_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   Components::IllegalState))
{
  // @@ We don't support Transaction in CIAO yet.
  ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
}

ACE_INLINE CORBA::Boolean
CIAO_GLUE_HUDisplay::NavDisplay_Context::is_caller_in_role (const char * role
                                                            ACE_ENV_ARG_DECL)
      ACE_THROW_SPEC ((CORBA::SystemException))
{
  ACE_UNUSED_ARG (role);

  // @@ We don't support Transaction in CIAO yet.
  ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
}

ACE_INLINE void
CIAO_GLUE_HUDisplay::NavDisplay_Context::set_rollback_only (ACE_ENV_SINGLE_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   Components::IllegalState))
{
  // @@ We don't support Transaction in CIAO yet.
  ACE_THROW (CORBA::NO_IMPLEMENT ());
}

//////////////////////////////////////////////////////////////////
// Component Servant Glue code implementation
//////////////////////////////////////////////////////////////////

// Simplex [receptacle name] connection management operations
ACE_INLINE void
CIAO_GLUE_HUDisplay::NavDisplay_Servant::connect_GPSLocation (HUDisplay::position_ptr c
                                                              ACE_ENV_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::AlreadyConnected,
                   ::Components::InvalidConnection))
{
  this->context_->connect_GPSLocation (c
                                       ACE_ENV_ARG_PARAMETER);
}

ACE_INLINE HUDisplay::position_ptr
CIAO_GLUE_HUDisplay::NavDisplay_Servant::disconnect_GPSLocation (ACE_ENV_SINGLE_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::NoConnection))
{
  return this->context_->disconnect_GPSLocation (ACE_ENV_SINGLE_ARG_PARAMETER);
}

ACE_INLINE HUDisplay::position_ptr
CIAO_GLUE_HUDisplay::NavDisplay_Servant::get_connection_GPSLocation (ACE_ENV_SINGLE_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  return this->context_->get_connection_GPSLocation (ACE_ENV_SINGLE_ARG_PARAMETER);
}

// Constructor and destructor.
ACE_INLINE
CIAO_GLUE_HUDisplay::NavDisplay_Servant::tickConsumer_Refresh_Servant::tickConsumer_Refresh_Servant
(HUDisplay::CCM_NavDisplay_ptr executor,
 HUDisplay::CCM_NavDisplay_Context_ptr c)
  : executor_ (HUDisplay::CCM_NavDisplay::_duplicate (executor)),
    ctx_ (HUDisplay::CCM_NavDisplay_Context::_duplicate (c))
{
}

ACE_INLINE
CIAO_GLUE_HUDisplay::NavDisplay_Servant::tickConsumer_Refresh_Servant::~tickConsumer_Refresh_Servant ()
{
}

ACE_INLINE CORBA::Object_ptr
CIAO_GLUE_HUDisplay::NavDisplay_Servant::tickConsumer_Refresh_Servant::_get_component (ACE_ENV_SINGLE_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  return this->ctx_->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER);
}

ACE_INLINE void
CIAO_GLUE_HUDisplay::NavDisplay_Servant::tickConsumer_Refresh_Servant::push_tick
(HUDisplay::tick *evt
 ACE_ENV_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  this->executor_->push_Refresh (evt
                                 ACE_ENV_ARG_PARAMETER);
}

// Operations for emits interfaces.

// Operations for publishes interfaces.

//////////////////////////////////////////////////////////////////
// Component Home Glue code implementation
//////////////////////////////////////////////////////////////////

ACE_INLINE
CIAO_GLUE_HUDisplay::NavDisplayHome_Servant::NavDisplayHome_Servant (HUDisplay::CCM_NavDisplayHome_ptr exe,
                                                                     CIAO::Session_Container *c)
  : executor_ (HUDisplay::CCM_NavDisplayHome::_duplicate (exe)),
    container_ (c)
{
}

ACE_INLINE
CIAO_GLUE_HUDisplay::NavDisplayHome_Servant::~NavDisplayHome_Servant (void)
{
}

// Operations for KeylessHome interface
ACE_INLINE ::Components::CCMObject_ptr
CIAO_GLUE_HUDisplay::NavDisplayHome_Servant::create_component (ACE_ENV_SINGLE_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   Components::CreateFailure))
{
  // Simply forward to the create method.
  return this->create (ACE_ENV_SINGLE_ARG_PARAMETER);
}

// Operations for CCMHome interface
ACE_INLINE ::CORBA::IRObject_ptr
CIAO_GLUE_HUDisplay::NavDisplayHome_Servant::get_component_def (ACE_ENV_SINGLE_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  // @@ TO-DO.  Contact IfR?

  ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
}

ACE_INLINE CORBA::IRObject_ptr
CIAO_GLUE_HUDisplay::NavDisplayHome_Servant::get_home_def (ACE_ENV_SINGLE_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  // @@ TO-DO.  Contact IfR?

  ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
}