summaryrefslogtreecommitdiff
path: root/TAO/CIAO/docs/templates/CIAO_Glue_Session_Template.inl
blob: cff99446301f622c1d140d86c3f4b831b9dc2884 (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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
// $Id$ -*- C++ -*-

//    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.
/// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

//////////////////////////////////////////////////////////////////
// Facet Glue Code implementation
// @@ We are assuming that these facets are declared under the same
//    module as the component (thus, we are placing this glue code
//    here under the same namespace.  If they are not, we will
//    either be generating them in separate namespaces, or include
//    some other CIDL generated files to get the glue code
//    implementation.
//////////////////////////////////////////////////////////////////

##foreach [facet type] in (all facet interface types in the original IDL)
// Constructor and destructor.
ACE_INLINE
[ciao module name]::[facet type]_Servant::[facet type]_Servant (CCM_[facet type]_ptr executor,
                                                                ::Components::CCMContext_ptr c)
  : executor_ (CCM_[facet type]::_duplicate (executor)),
    ctx_ (c)
{
}

ACE_INLINE
[ciao module name]::[facet type]_Servant::~[facet tyep]_Servant ()
{
}


##  foreach [operation] in (all facet operations)

// This is only a guideline...  we always relay the operation to underlying
// executor.

ACE_INLINE [operation return_type]
[ciao module name]::[facet type]_Servant::[operation] ([operation args])
{
  // Simply relay to executor.  May not need to return the result...
  return this->executor_->operation ([operation args]);
}
##  end foreach [operation]

##end foreach [facet type]


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

ACE_INLINE
[ciao module name]::[component name]_Context::[component name]_Context (::Components::CCMHome_ptr home,
                                                                        ::CIAO::Session_Container *c,
                                                                        [component name]_Servant *sv)
  : home_ (::Components::CCMHome::_duplicate (h)),
    container_ (c),
    servant_ (sv)
{

}

ACE_INLINE
[ciao module name]::[component name]_Context::~[component name]_Context ()
{
}

##foreach [receptacle name] with [uses type] in (list of all 'uses' interfaces) generate:

##  if [receptacle name] is a simplex receptacle ('uses')

ACE_INLINE [uses type]_ptr
[ciao module name]::[component name]_Context::get_connection_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  return [uses type]::_duplicate (this->ciao_uses_[receptacle name]_.in ());
}

// Simplex [receptacle name] connection management operations
ACE_INLINE void
[ciao module name]::[component name]_Context::connect_[receptacle name] ([uses type]_ptr c
                                                                         ACE_ENV_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::AlreadyConnected,
                   ::Components::InvalidConnection))
{
  if (! CORBA::is_nil (this->ciao_uses_[receptacle name]_.in ()))
    ACE_THROW (::Components::AlreadyConnected ());

  if (CORBA::is_nil (c))
    ACE_THROW (::Components::InvalidConnection ());

  // When do we throw InvalidConnection exception?
  this->ciao_uses_[receptacle name]_ = [uses type]::_duplicate (c);
}

ACE_INLINE [uses type]_ptr
[ciao module name]::[component name]_Context::disconnect_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::NoConnection))
{
  if (CORBA::is_nil (this->ciao_uses_[receptacle name]_.in ()))
    ACE_THROW (::Components::NoConnection ());

  return this->ciao_uses_[receptacle name]_.retn ();
}

##  else ([receptacle name] is a multiplex ('uses multiple') receptacle)
// Multiplex [receptacle name] connection management operations
ACE_INLINE ::Components::Cookie_ptr
[ciao module name]::[component name]_Context::connect_[receptacle name] ([uses type]_ptr c
                                                                         ACE_ENV_ARG_DECL)
      ACE_THROW_SPEC ((CORBA::SystemException,
                       ::Components::ExceedConnectionLimit,
                       ::Components::InvalidConnection))
{
  if (CORBA::is_nil (c))
    ACE_THROW_RETURN (::Components::InvalidConnection (), 0);

  ACE_Active_Map_Manager_Key key;
  this->ciao_muses_[receptacle name]_.bind (c,
                                            key);

  ::Components::Cookie_var retv = new CIAO::Map_Key_Cookie (key);
  return retv._retn ();
}

ACE_INLINE [uses type]_ptr
[ciao module name]::[component name]_Context::disconnect_[receptacle name] (::Components::Cookie_ptr ck
                                                                            ACE_ENV_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::InvalidConnection))
{
  [uses type]_var retv;

  if (ck == 0 ||
      this->ciao_muses_[receptacle name]_.unbind (*ck,
                                                  retv) != 0)
    ACE_THROW_RETURN (::Components::InvalidConnection (), 0);

  return retv._retn ();
}

##  endif [receptacle name]
##end foreach [receptacle name] with [uses type]

// Operations for emits interfaces.
##foreach [emit name] with [eventtype] in (list of all emitters) generate:

ACE_INLINE void
[ciao module name]::[component name]_Context::connect_[emit name] ([eventtype]Consumer_ptr c
                                                                   ACE_ENV_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::AlreadyConnected))
{
  if (CORBA::is_nil (c))
    ACE_THROW (CORBA::BAD_PARAM ());

  if (! CORBA::is_nil (this->ciao_emits_[emit name]_consumer_.in ()))
    ACE_THROW (::Components::AlreadyConnected ());

  this->ciao_emits_[emit name]_consumer_ = c;
}

ACE_INLINE [eventtype]Consumer_ptr
[ciao module name]::[component name]_Context::disconnect_[emit name] (ACE_ENV_SINGLE_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::NoConnection))
{
  if (CORBA::is_nil (this->ciao_emits_[emit name]_consumer_.in ()))
    ACE_THROW (::Components::NoConnection ());

  return this->ciao_emits_[emit name]_consumer_._retn ();
}

##end foreach [emit name] with [eventtype]

    // Operations for publishes interfaces.
##foreach [publish name] with [eventtype] in (list of all publishers) generate:
ACE_INLINE ::Components::Cookie_ptr
[ciao module name]::[component name]_Context::subscribe_[publish name] ([eventtype]Consumer_ptr c
                                                                        ACE_ENV_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::ExceededConnectionLimit))
{
  if (CORBA::is_nil (c))
    ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0);

  CIAO::Active_Objref_Map::key_type key;
  this->ciao_publishes_[publish name]_map_.bind (c,
                                                 key);

  ::Components::Cookie_var retv = new CIAO::Map_Key_Cookie (key);
  return retv._retn ();
}

ACE_INLINE [eventtype]Consumer_ptr
[ciao module name]::[component name]_Context::unsubscribe_[publish name] (::Components::Cookie_ptr ck
                            ACE_ENV_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::InvalidConnection));
{
  [eventtype]Consumer_var retv;

  if (ck == 0 ||
      this->ciao_publishes_[publish name]_map_.unbind (ck,
                                                       retv) != 0)
    ACE_THROW_RETURN (::Components::InvalidConnection (), 0);

  return retv._retn ();
}

##end foreach [publish name] with [eventtype]

// Operations for ::Components::CCMContext
ACE_INLINE ::Components::Principal_ptr
[ciao module name]::[component name]_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 module name]::[component name]_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 module name]::[component name]_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 module name]::[component name]_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 module name]::[component name]_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 module name]::[component name]_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
//////////////////////////////////////////////////////////////////

ACE_INLINE
[ciao module name]::[component name]_Servant::[component name]_Servant (CCM_[component name]_ptr exe,
                                                                        ::Components::CCMHome_ptr h,
                                                                        ::CIAO::Session_Container *c)
  : executor_ (CCM_[component name]::_duplicate (exe)),
    container_ (c)
{
  this->context_ = new [component name]_Context (h, c, this);
}

ACE_INLINE
[ciao module name]::[component name]_Servant::~[component name]_Servant (void)
{
}

##foreach [operation] in all supported interfaces of own component and all inherited components

// This is only a guideline...  we always relay the operation to underlying
// executor.

ACE_INLINE [operation return_type]
[ciao module name]::[component name]_Servant::[operation] ([operation args])
{
  // Simply relay to executor.  May not need to return the result...
  return this->executor_->operation ([operation args]);
}

##end

##foreach [receptacle name] with [uses type] in (list of all 'uses' interfaces) generate:
##  if [receptacle name] is a simplex receptacle ('uses')
    // Simplex [receptacle name] connection management operations
ACE_INLINE void
[ciao module name]::[component name]_Servant::connect_[receptacle name] ([uses type]_ptr c
                                                                         ACE_ENV_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::AlreadyConnected,
                   ::Components::InvalidConnection))
{
  this->context_->connect_[receptacle name] (c ACE_ENV_ARG_PARAMETER);
}

ACE_INLINE [uses type]_ptr
[ciao module name]::[component name]_Servant::disconnect_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::NoConnection))
{
  return this->context_->disconnect_[receptacle name] (ACE_ENV_SINGLE_ARG_PARAMETER);
}

ACE_INLINE [uses type]_ptr
[ciao module name]::[component name]_Servant::get_connection_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  return this->context_->get_connection_[receptacle name] (ACE_ENV_SINGLE_ARG_PARAMETER);
}
##  else ([receptacle name] is a multiplex ('uses multiple') receptacle)

    // Multiplex [receptacle name] connection management operations
ACE_INLINE ::Components::Cookie_ptr
[ciao module name]::[component name]_Servant::connect_[receptacle name] ([uses type]_ptr c
                                                                         ACE_ENV_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::ExceedConnectionLimit,
                   ::Components::InvalidConnection))
{
  return this->context_->connect_[receptacle name] (c
                                                    ACE_ENV_ARG_PARAMETER);
}

ACE_INLINE [uses type]_ptr
[ciao module name]::[component name]_Servant::disconnect_[receptacle name] (::Components::Cookie_ptr ck
                                                                            ACE_ENV_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::InvalidConnection))
{
  return this->context_->disconnect_[receptacle name] (ck
                                                       ACE_ENV_ARG_PARAMETER);
}

ACE_INLINE [receptacle name]Connections *
[ciao module name]::[component name]_Servant::get_connections_[receptacle name] (ACE_ENV_SINGLE_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  return this->context_->get_connections_[receptacle name] (ACE_ENV_SINGLE_ARG_PARAMETER);
}

##  endif [receptacle name]
##end foreach [receptacle name] with [uses type]

//////////////////////////////////////////////////////////////////
// EventConsumer Glue Code implementation
// @@ We are assuming that these consumers are declared under the same
//    module as the component (thus, we are placing this glue code
//    here under the same namespace.  If they are not, we will
//    either be generating them in separate namespaces, or include
//    some other CIDL generated files to get the glue code
//    implementation.
//////////////////////////////////////////////////////////////////

##foreach [consumer name] with [eventtype] in (list of all consumers) generate:

// Constructor and destructor.
ACE_INLINE
[ciao module name]::[component name]_Servant::[event type]Consumer_[consumer name]_Servant::[event type]Consumer_[consumer name]_Servant
  (CCM_[component name]_ptr executor,
   CCM_[component name]_Context_ptr c)
  : executor_ (CCM_[event type]Consumer::_duplicate (executor)),
    ctx_ (CCM_[component name]_Context::_duplicate (c))
{
}

ACE_INLINE
[ciao module name]::[component name]_Servant::[event type]Consumer_[consumer name]_Servant::~[event type]Consumer_[consumer name]_Servant ()
{
}

ACE_INLINE CORBA::Object_ptr
[ciao module name]::[component name]_Servant::[event type]Consumer_[consumer name]_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 module name]::[component name]_Servant::[event type]Consumer_[consumer name]_Servant::push_[eventtype]
  ([eventtype]_ptr evt
   ACE_ENV_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  this->executor_->push_[consumer name] (evt ACE_ENV_ARG);
}

##  foreach [type] in (all parents of eventtype, if any, not including EventConsumerBase)
ACE_INLINE void
[ciao module name]::[component name]_Servant::[eventtype]Consumer_[consumer name]_Servant::push_[type]
  ([type]_ptr evt
   ACE_ENV_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  // @@ Problem, there's no way to handle this case.

  //  this->executor_->push_[consumer name] (evt ACE_ENV_ARG);
  ACE_THROW (::CORBA::BAD_PARAM ());
}
##  end [type]

##end foreach [consumer name]

    // Operations for emits interfaces.
##foreach [emit name] with [eventtype] in (list of all emitters) generate:
ACE_INLINE void
[ciao module name]::[component name]_Servant::connect_[emit name] ([eventtype]Consumer_ptr c
                                                                   ACE_ENV_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException
                   ::Components::AlreadyConnected))
{
  this->context_->connect_[emit name] (c
                                       ACE_ENV_ARG_PARAMETER);
}

ACE_INLINE [eventtype]Consumer_ptr
[ciao module name]::[component name]_Servant::disconnect_[emit name] (ACE_ENV_SINGLE_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::NoConnection))
{
  return this->context_->disconnect_[emit name] (ACE_ENV_SINGLE_ARG_PARAMETER);
}
##end foreach [emit name] with [eventtype]

    // Operations for publishes interfaces.
##foreach [publish name] with [eventtype] in (list of all publishers) generate:
ACE_INLINE ::Components::Cookie_ptr
[ciao module name]::[component name]_Servant::subscribe_[publish name] ([eventtype]Consumer_ptr c
                                                                        ACE_ENV_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::ExceededConnectionLimit))
{
  return this->context_->subscribe_[publish name] (c
                                                   ACE_ENV_ARG_PARAMATER);
}

ACE_INLINE [eventtype]Consumer_ptr
[ciao module name]::[component name]_Servant::unsubscribe_[publish name] (::Components::Cookie_ptr ck
                                                                          ACE_ENV_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::InvalidConnection))
{
  return this->context_->unsubscribe_[publish name] (ck
                                                     ACE_ENV_ARG_PARAMETER);
}
##end foreach [publish name] with [eventtype]

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

ACE_INLINE
[ciao module name]::[home name]_Servant::[home name]_Servant (CCM_[home name]_ptr exe,
                                                              CIAO::Session_Container *c)
  : executor_ (CCM_[home name]::_duplicate (exe)),
    container_ (c)
{
}

ACE_INLINE
[ciao module name]::[home name]_Servant::~[home name]_Servant (void)
{
}

##foreach [operation] in (all explicit operations in [home basename] including its parents)

// The operation impl here.  This can simply be relayed to the underlying executor...

## end foreach opeartion

##foreach [factory name]  in (all factory operations in [home basename] including its parents)
// for factory operations inherit from parent home(s), they should return
// the corresponding component types their homes manage
ACE_INLINE [component name]_ptr
[ciao module name]::[home name]_Servant::[factory name] (.... ACE_ENV_ARG_DECL_WITH_DEFAULTS)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::CreateFailure,
                   ....))
{
  Components::EnterpriseComponent_var com =
    this->executor_->[factory name] (.... ACE_ENV_ARG_PARAMETER);
  ACE_CHECK_RETURN (0);

  return this->create_helper (com ACE_ENV_ARG_PARAMETER);
}
##end foreach [factory name]

##foreach [finder name]  in (all finder operations in [home basename] including its parents)
// for finder operations inherit from parent home(s), they should return
// the corresponding component types their homes manage
ACE_INLINE [component name]_ptr
[ciao module name]::[home name]_Servant::[finder name] (.... ACE_ENV_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   Components::FinderFailure,
                   ....))
{
  Components::EnterpriseComponent_var com =
    this->executor_->[finder name] (.... ACE_ENV_ARG_PARAMETER);
  ACE_CHECK_RETURN (0);

  // Do we create a new object reference referring to the same object,
  // or do we try to create a different objref referring to the same object?
  return this->create_helper (com ACE_ENV_ARG_PARAMETER);
}
##end foreach [finder name]

##  if [home name] is a keyless home

    // Operations for KeylessHome interface
ACE_INLINE ::Components::CCMObject_ptr
[ciao module name]::[home name]_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);
}

##  else [home basename] is keyed home with [key type]

    // We do not support key'ed home at the moment but we might
    // as well generate the mapping.
ACE_INLINE [component name]_ptr
[ciao module name]::[home name]_Servant::create ([key type]_ptr key)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::CreationFailure,
                   ::Components::DuplicateKeyValue,
                   ::Components::InvalidKey))
{
  // @@ TO-DO when we suppor keyed home.

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

ACE_INLINE [component name]_ptr
[ciao module name]::[home name]_Servant::find_by_primary_key ([key type]_ptr key)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::FinderFailure,
                   ::Components::UnknownKeyValue,
                   ::Components::InvalidKey))
{
  // @@ TO-DO when we suppor keyed home.

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


ACE_INLINE void
[ciao module name]::[home name]_Servant::remove ([key type]_ptr key)
  ACE_THROW_SPEC ((CORBA::SystemException,
                   ::Components::RemoveFailure,
                   ::Components::UnknownKeyValue,
                   ::Components::InvalidKey))
{
  // @@ TO-DO when we suppor keyed home.

  ACE_THROW (CORBA::NO_IMPLEMENT ());
}

ACE_INLINE [key type]_ptr
[ciao module name]::[home name]_Servant::get_primary_key ([component name]_ptr comp)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  // @@ TO-DO when we suppor keyed home.

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

##  endif (keyed or keyless home)


// Operations for CCMHome interface
ACE_INLINE ::CORBA::IRObject_ptr
[ciao module name]::[home name]_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 get_home_def (ACE_ENV_SINGLE_ARG_DECL)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  // @@ TO-DO.  Contact IfR?

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