summaryrefslogtreecommitdiff
path: root/TAO/examples/CSD_Strategy/ThreadPool3/Foo_i.cpp
blob: 426b75936a002877830438d2d47afb3788b3349e (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
// $Id$
#include "Foo_i.h"
#include "OrbShutdownTask.h"


Foo_i::Foo_i(unsigned num_clients)
  : value_(0),
    num_clients_(num_clients)
{
}


Foo_i::~Foo_i()
{
}


void
Foo_i::op1(void)
{
}


void
Foo_i::op2(CORBA::Long value)
{
  this->value_ = value;
}


CORBA::Long
Foo_i::op3(void)
{
  return this->value_;
}



void
Foo_i::op4(CORBA::Long value)
{
  this->value_ = value;
}


void
Foo_i::op5(void)
{
  throw FooException();
}


void
Foo_i::done(void)
{
  unsigned num_left = --this->num_clients_;

  if (num_left == 0)
    {
      if (TheOrbShutdownTask::instance()->open(0) != 0)
        {
          ACE_ERROR((LM_ERROR, "(%P|%t)Foo_i::done: "
            "failed to create orb shutdown thread.\n"));
        }
    }
}