summaryrefslogtreecommitdiff
path: root/TAO/tests/ICMG_Any_Bug/Hello.cpp
blob: 19e8544dde15f1442a8145f64630e74a6e19e110 (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
//
// $Id$
//
#include "Hello.h"
#include "HelloWorld.h"

ACE_RCSID(ICMG_Any_Bug, Hello, "$Id")

Hello::Hello (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa)
  : poa_ (PortableServer::POA::_duplicate (poa)),
    orb_ (CORBA::ORB::_duplicate (orb))
{
}

Test::HelloWorld_ptr
Hello::get_helloworld (void)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  HelloWorld *hello_world;
  ACE_NEW_THROW_EX (hello_world,
          HelloWorld,
		    CORBA::NO_MEMORY ());

  PortableServer::ObjectId_var oid =
    poa_->activate_object (hello_world);

  Test::HelloWorld_var hw = hello_world->_this ();
  return hw._retn ();
}

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