summaryrefslogtreecommitdiff
path: root/TAO/docs/tutorials/Quoter/AMI/Quoter.idl
blob: 42adab03d664078c87c7c0b2a4b47406cb540086 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// $Id$
//

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);
  };
};