summaryrefslogtreecommitdiff
path: root/TAO/tests/POA/TIE/Foo_i.cpp
blob: fa9602fc63a2032a50325bc863e3837ff64c1a60 (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
// $Id$

//===========================================================================
//
//
// = FILENAME
//     Foo_i.cpp
//
// = DESCRIPTION
//     This is a simple foo servant implementation
//
// = AUTHOR
//     Irfan Pyarali
//
//===========================================================================

#include "Foo_i.h"

ACE_RCSID(TIE, Foo_i, "$Id$")

// Constructor
Simple_Foo_i::Simple_Foo_i (CORBA::Long value)
  : value_ (value)
{
}

// Return this->value
CORBA::Long
Simple_Foo_i::doit (CORBA::Environment &/*env*/)
{
  return this->value_;
}

// Constructor
Foo_i::Foo_i (CORBA::Long value,
              PortableServer::POA_ptr poa)
  : value_ (value),
    poa_ (PortableServer::POA::_duplicate (poa))
{
}

// Return this->value
CORBA::Long
Foo_i::doit (CORBA::Environment &/*env*/)
{
  return this->value_;
}

// Return the Default POA of this Servant
PortableServer::POA_ptr
Foo_i::_default_POA (CORBA::Environment &/*env*/)
{
  return PortableServer::POA::_duplicate (this->poa_.in ());
}

// Constructor
Outer_i::Foo_i::Foo_i (CORBA::Long value,
                       PortableServer::POA_ptr poa)
  : value_ (value),
    poa_ (PortableServer::POA::_duplicate (poa))
{
}

// Return this->value
CORBA::Long
Outer_i::Foo_i::doit (CORBA::Environment &/*env*/)
{
  return this->value_;
}

// Return the Default POA of this Servant
PortableServer::POA_ptr
Outer_i::Foo_i::_default_POA (CORBA::Environment &/*env*/)
{
  return PortableServer::POA::_duplicate (this->poa_.in ());
}

// Constructor
Outer_i::Inner_i::Foo_i::Foo_i (CORBA::Long value,
                                PortableServer::POA_ptr poa)
  : value_ (value),
    poa_ (PortableServer::POA::_duplicate (poa))
{
}

// Return this->value
CORBA::Long
Outer_i::Inner_i::Foo_i::doit (CORBA::Environment &/*env*/)
{
  return this->value_;
}

// Return the Default POA of this Servant
PortableServer::POA_ptr
Outer_i::Inner_i::Foo_i::_default_POA (CORBA::Environment &/*env*/)
{
  return PortableServer::POA::_duplicate (this->poa_.in ());
}