summaryrefslogtreecommitdiff
path: root/TAO/docs/tutorials/Quoter/RT_Event_Service/Quoter.idl
blob: 34d8117765850a2f9f4808e6ceeaedc31bac59c7 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//
// $Id$
//

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

  // Forward declare the Stock interface
  interface Stock;

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

  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

  };

  struct Event {
    double price;
    string symbol;
    string full_name;
  };

  interface Modify_Stock : Stock {
    void set_price (in double new_price);
  };
};