2 #include "Stock_Factory_i.h"
4 Quoter_Stock_Factory_i::Quoter_Stock_Factory_i ()
5 : rhat_ ("RHAT", "RedHat, Inc.", 210),
6 msft_ ("MSFT", "Microsoft, Inc.", 91)
11 Quoter_Stock_Factory_i::get_stock (const char *symbol
)
13 if (ACE_OS::strcmp (symbol
, "RHAT") == 0) {
14 return this->rhat_
._this ();
15 } else if (ACE_OS::strcmp (symbol
, "MSFT") == 0) {
16 return this->msft_
._this ();
18 throw Quoter::Invalid_Stock_Symbol ();