//
// Test.idl,v 1.1 2003/10/29 23:39:36 jai Exp
//

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

  // Forward declare the Stock interface
  interface Stock;

  interface StockFactory
  {
    // = TITLE
    //   A factory class for the stock interfaces
    //
    // = DESCRIPTION
    //   Return the Stock interfaces based on their names
    //
    Stock get_stock (in string stock_symbol)
      raises (Invalid_Stock_Symbol);

    oneway void shutdown ();
    
  };

  interface Stock
  {
    // = TITLE
    //   A simple interface to query the name and price of stock
    //
    // = DESCRIPTION
    //   Return the price and name of a single stock
    //

    readonly attribute string symbol;
    // Get the stock symbol.

    readonly attribute string full_name;
    // Get the name.

    double price ();
    // Get the price

  };
};
