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 ()
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)
27 else if (ACE_OS::strcmp(stock_id
, "OCI") == 0)
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
));