summaryrefslogtreecommitdiff
path: root/TAO/tests/Multiple/Multiple_Impl.cpp
blob: f24fa6be53b83201e9b7198054b60d8be52c0dcf (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
//$Id$

#include "Multiple_Impl.h"
#include "Collocation_Tester.h"

ACE_RCSID (tests, Multiple_Impl, "$Id$")

///////////////////////////////////////////////////////////
//     Bottom_Impl Implementation
//

Bottom_Impl::Bottom_Impl (CORBA::ORB_ptr orb)
{
  this->orb_ = CORBA::ORB::_duplicate (orb);
}

Bottom_Impl::~Bottom_Impl (void)
{
  // No-Op.
}

char *
Bottom_Impl::top_quote ( )
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  return CORBA::string_dup(Quote::top);
}

char *
Bottom_Impl::left_quote ( )
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  return CORBA::string_dup(Quote::left);
}

char *
Bottom_Impl::right_quote ( )
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  return CORBA::string_dup(Quote::right);
}

char *
Bottom_Impl::bottom_quote ( )
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  return CORBA::string_dup(Quote::bottom);
}

void
Bottom_Impl::shutdown (void)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  this->orb_->shutdown (0);
}

///////////////////////////////////////////////////////////
//     Delegated_Bottom_Impl Implementation
//
Delegated_Bottom_Impl::Delegated_Bottom_Impl (Multiple::Bottom_ptr delegate,
                                              CORBA::ORB_ptr orb)
  : delegate_ (delegate)
{
  this->orb_ = CORBA::ORB::_duplicate (orb);
}

Delegated_Bottom_Impl::~Delegated_Bottom_Impl (void)
{
  // No-Op.
}

char *
Delegated_Bottom_Impl::top_quote (void)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  ACE_DEBUG ((LM_DEBUG,
              ACE_TEXT ("Delegating the call: <top_quote>\n")));

  CORBA::String_var msg =
    this->delegate_->top_quote ();
  return msg._retn ();
}

char *
Delegated_Bottom_Impl::left_quote (void)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
    ACE_DEBUG ((LM_DEBUG,
              ACE_TEXT ("Delegating the call: <left_quote>\n")));

  CORBA::String_var msg =
    this->delegate_->left_quote ();
  return msg._retn ();
}

char *
Delegated_Bottom_Impl::right_quote (void)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  ACE_DEBUG ((LM_DEBUG,
              ACE_TEXT ("Delegating the call: <right_quote>\n")));

  CORBA::String_var msg =
    this->delegate_->right_quote ();
  return msg._retn ();
}

char *
Delegated_Bottom_Impl::bottom_quote (void)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  ACE_DEBUG ((LM_DEBUG,
              ACE_TEXT ("Delegating the call: <bottom_quote>\n")));

  CORBA::String_var msg =
    this->delegate_->bottom_quote ();
  return msg._retn ();
}

void
Delegated_Bottom_Impl::shutdown (void)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  ACE_DEBUG ((LM_DEBUG,
              ACE_TEXT ("Delegating Shut-Down.\n")));
  this->delegate_->shutdown ();
  //this->orb_->shutdown (0);
}