=default for generated implementation copy ctor
[ACE_TAO.git] / TAO / tests / Bug_3547_Regression / Stock_Quoter_i.cpp
blob17cdb2bfd72a3fb7402452f15182ef89d64d66da
1 #include "Stock_Quoter_i.h"
2 #include "ace/Log_Msg.h"
4 Stock_Quoter_i::Stock_Quoter_i (CORBA::ORB_ptr orb)
5 : orb_ (CORBA::ORB::_duplicate (orb))
9 Stock_Quoter_i::~Stock_Quoter_i ()
13 void
14 Stock_Quoter_i::shutdown ()
16 this->orb_->shutdown (false);
19 CORBA::Float Stock_Quoter_i::get_quote (const char* stock_id)
21 ACE_DEBUG ((LM_DEBUG, "Stock_Quoter_i::get_quote\n"));
22 CORBA::Float price = 0.0;
23 if (ACE_OS::strcmp(stock_id, "BA") == 0)
25 price = 54.25;
27 else if (ACE_OS::strcmp(stock_id, "OCI") == 0)
29 price = 100.00;
31 else
33 ACE_DEBUG ((LM_DEBUG, "Bad ticker symbol, Stock Id: %s\n", stock_id));
34 throw Bad_Ticker_Symbol(stock_id);
36 ACE_DEBUG ((LM_DEBUG,"Stock Id: %s, Price = %6.2f\n", stock_id, price));
37 return price;