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

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

#include "ace/SString.h"


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

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

TAO_TypedefDef_i::TAO_TypedefDef_i (
    TAO_Repository_i *repo
  )
  : TAO_IRObject_i (repo),
    TAO_Contained_i (repo),
    TAO_IDLType_i (repo)
{
}

TAO_TypedefDef_i::~TAO_TypedefDef_i (void)
{
}

CORBA::Contained::Description *
TAO_TypedefDef_i::describe (void)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  TAO_IFR_READ_GUARD_RETURN (0);

  this->update_key ();

  return this->describe_i ();
}

CORBA::Contained::Description *
TAO_TypedefDef_i::describe_i (void)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  CORBA::Contained::Description *desc_ptr = 0;
  ACE_NEW_THROW_EX (desc_ptr,
                    CORBA::Contained::Description,
                    CORBA::NO_MEMORY ());

  CORBA::Contained::Description_var retval = desc_ptr;

  retval->kind = this->def_kind ();

  CORBA::TypeDescription td;

  td.name = this->name_i ();

  td.id = this->id_i ();

  ACE_TString container_id;

  this->repo_->config ()->get_string_value (this->section_key_,
                                            "container_id",
                                            container_id);

  td.defined_in = container_id.c_str ();

  td.version = this->version_i ();

  td.type = this->type_i ();

  retval->value <<= td;

  return retval._retn ();
}

TAO_END_VERSIONED_NAMESPACE_DECL