summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/examples/CosEC/TypedSimple/Country_i.cpp
blob: deb993c4de86c6a724e6ed31643e77efcde5e8ce (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
// -*- C++ -*-
#include "Country_i.h"

// Implementation skeleton constructor
Country_i::Country_i (CORBA::ORB_ptr orb) :
  orb_ (CORBA::ORB::_duplicate (orb))
{
}

// Implementation skeleton destructor
Country_i::~Country_i (void)
{
}

void Country_i::update_population (const char * country,
                                   CORBA::Long population)

{
  //Add your implementation here
  ACE_DEBUG ((LM_DEBUG, "Country %s has population %d\n",
              country, population));
}

CORBA::Object_ptr
Country_i::get_typed_consumer (void)

{
  //Add your implementation here
  ACE_DEBUG ((LM_DEBUG, "Country_i::get_typed_consumer called...\n"));

  Country_var ret = this->_this ();

  ACE_DEBUG ((LM_DEBUG, "...returning CORBA::Object_ptr for Country_i\n"));

  return Country::_duplicate(ret.in ());
}

void
Country_i::push (const CORBA::Any & /* data */)
{
  //Add your implementation here
}

void
Country_i::disconnect_push_consumer (void)

{
  //Add your implementation here
  ACE_DEBUG ((LM_DEBUG, "Country_i::disconnect_push_consumer called...\n"));

  // Deactivate the impl
  PortableServer::POA_var t_poa =
    this->_default_POA ();

  PortableServer::ObjectId_var t_id =
    t_poa->servant_to_id (this);

  t_poa->deactivate_object (t_id.in ());

  ACE_DEBUG ((LM_DEBUG,
              ACE_TEXT ("Country_i::disconnect_push_consumer, ")
              ACE_TEXT ("calling ORB shutdown...\n")));
  orb_->shutdown (0);
}