summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/IFRService/EventDef_i.cpp
blob: 5e96026a120334ebcaa7d8ed6007e44f03a12fbb (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
// $Id$

#include "orbsvcs/IFRService/Repository_i.h"
#include "orbsvcs/IFRService/EventDef_i.h"

ACE_RCSID (IFRService,
           EventDef_i,
           "$Id$")


TAO_BEGIN_VERSIONED_NAMESPACE_DECL

TAO_EventDef_i::TAO_EventDef_i (TAO_Repository_i *repo)
  : TAO_IRObject_i (repo),
    TAO_Container_i (repo),
    TAO_Contained_i (repo),
    TAO_IDLType_i (repo),
    TAO_ValueDef_i (repo),
    TAO_ExtValueDef_i (repo)
{
}

TAO_EventDef_i::~TAO_EventDef_i (void)
{
}

CORBA::DefinitionKind
TAO_EventDef_i::def_kind (void)
{
  return CORBA::dk_Event;
}

void
TAO_EventDef_i::destroy (void)
{
  TAO_IFR_WRITE_GUARD;

  this->update_key ();

  this->destroy_i ();
}

void
TAO_EventDef_i::destroy_i (void)
{
  // An event type is a restriction of a value type, not an extension.
  this->TAO_ExtValueDef_i::destroy_i ();
}

CORBA::Contained::Description *
TAO_EventDef_i::describe (void)
{
  TAO_IFR_READ_GUARD_RETURN (0);

  this->update_key ();

  return this->describe_i ();
}

CORBA::Contained::Description *
TAO_EventDef_i::describe_i (void)
{
  return this->TAO_ValueDef_i::describe_i ();
}

CORBA::Boolean
TAO_EventDef_i::is_a (const char *event_id)
{
  TAO_IFR_READ_GUARD_RETURN (0);

  this->update_key ();

  return this->is_a_i (event_id);
}

CORBA::Boolean
TAO_EventDef_i::is_a_i (const char *event_id)
{
  if (ACE_OS::strcmp (event_id, "IDL:omg.org/CORBA/EventBase:1.0") == 0)
    {
      return 1;
    }

  return this->TAO_ValueDef_i::is_a_i (event_id);
}

TAO_END_VERSIONED_NAMESPACE_DECL