Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / orbsvcs / examples / LoadBalancing / StockFactory.cpp
blobb224ca9342a068d841c1938cf1887b52965123c4
2 #include "StockFactory.h"
3 #include "ace/streams.h"
5 StockFactory::StockFactory (CORBA::ORB_ptr orb, int number)
6 : orb_ (CORBA::ORB::_duplicate (orb)),
7 rhat_ ("RHAT", "RedHat, Inc.", 210),
8 msft_ ("MSFT", "Microsoft, Inc.", 91),
9 number_ (number)
13 Test::Stock_ptr
14 StockFactory::get_stock (const char *symbol)
16 cout << "Server Number is " << number_ << endl;
17 if (ACE_OS::strcmp (symbol, "RHAT") == 0) {
18 return this->rhat_._this ();
19 } else if (ACE_OS::strcmp (symbol, "MSFT") == 0) {
20 return this->msft_._this ();
22 throw Test::Invalid_Stock_Symbol ();
25 void
26 StockFactory::shutdown ()
28 this->orb_->shutdown (false);