blob: 9f6914e2ab3c9a3afbae277276643d60067aa526 (
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
|
#include "Hello.h"
#include "HelloWorld.h"
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 ()
{
HelloWorld *hello_world;
ACE_NEW_THROW_EX (hello_world,
HelloWorld,
CORBA::NO_MEMORY ());
PortableServer::ObjectId_var id =
this->poa_->activate_object (hello_world);
CORBA::Object_var object = this->poa_->id_to_reference (id.in ());
Test::HelloWorld_var hw = Test::HelloWorld::_narrow (object.in ());
return hw._retn ();
}
void
Hello::shutdown ()
{
this->orb_->shutdown (false);
}
|