
module Quoter
{
  /// Used to report an invalid stock name
  exception Invalid_Stock_Symbol {};

  /// Forward declare the Stock interface
  interface Stock;

  /// A factory class for the stock quoter interfaces
  interface Stock_Factory
  {
    /// Return the Quoter interfaces based on their names
    Stock get_stock (in string stock_symbol)
      raises (Invalid_Stock_Symbol);
  };

  /// A simple interface to query the name and price of stock
  interface Stock
  {
    /// Get the stock symbol.
    readonly attribute string symbol;

    /// Get the name.
    readonly attribute string full_name;

    /// Get the price
    double price ();
  };

  interface Single_Query_Stock : Stock {
    double get_price_and_names (out string symbol,
                                out string full_name);
  };
};
