blob: d2b1849e3ac87f4eb5658587b7de1c0ac898a7ee (
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
|
/* -*- C++ -*- */
#include "Test_i.h"
#include "ace/Log_Msg.h"
Test_i::Test_i (CORBA::ORB_ptr orb)
: orb_ (CORBA::ORB::_duplicate (orb))
, armed_ (false)
, exit_code_ (0)
{
}
Test_i::~Test_i ()
{
}
void
Test_i::arm ()
{
this->armed_ = true;
}
void
Test_i::trigger ()
{
if (this->armed_)
{
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P) BOOM!\n")));
// ACE_OS::exit (1);
this->exit_code_ = 2;
this->orb_->shutdown (false);
}
else
{
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%P) Click! not armed, returning\n")));
}
}
int
Test_i::exit_code () const
{
return exit_code_;
}
|