Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / examples / Advanced / ch_18 / CCS.idl
blobb38c775545b39d8529144bca66cc7d786fdd09ee
1 //=============================================================================
2 /**
3 * @file CCS.idl
5 * @author Source code used in TAO has been modified and adapted from the codeprovided in the book
6 * @author "Advanced CORBA Programming with C++" by MichiHenning and Steve Vinoski. Copyright 1999. Addison-Wesley
7 * @author Reading
8 * @author MA.Modified for TAO by Mike Moran <mm4@cs.wustl.edu>
9 */
10 //=============================================================================
15 #pragma prefix "acme.com"
17 module CCS {
18 typedef unsigned long AssetType;
19 typedef string ModelType;
20 typedef short TempType;
21 typedef string LocType;
23 interface Thermometer {
24 readonly attribute ModelType model;
25 readonly attribute AssetType asset_num;
26 readonly attribute TempType temperature;
27 attribute LocType location;
29 void remove();
32 interface Thermostat : Thermometer {
33 struct BtData {
34 TempType requested;
35 TempType min_permitted;
36 TempType max_permitted;
37 string error_msg;
39 exception BadTemp { BtData details; };
41 TempType get_nominal();
42 TempType set_nominal(in TempType new_temp)
43 raises(BadTemp);
46 interface Controller {
47 exception DuplicateAsset {};
49 Thermometer create_thermometer(
50 in AssetType anum,
51 in LocType loc
52 ) raises(DuplicateAsset);
53 Thermostat create_thermostat(
54 in AssetType anum,
55 in LocType loc,
56 in TempType temp
57 ) raises(DuplicateAsset, Thermostat::BadTemp);
59 typedef sequence<Thermometer> ThermometerSeq;
60 typedef sequence<Thermostat> ThermostatSeq;
62 enum SearchCriterion { ASSET, LOCATION, MODEL };
64 union KeyType switch(SearchCriterion) {
65 case ASSET:
66 AssetType asset_num;
67 case LOCATION:
68 LocType loc;
69 case MODEL:
70 ModelType model_desc;
73 struct SearchType {
74 KeyType key;
75 Thermometer device;
77 typedef sequence<SearchType> SearchSeq;
79 struct ErrorDetails {
80 Thermostat tmstat_ref;
81 Thermostat::BtData info;
83 typedef sequence<ErrorDetails> ErrSeq;
85 exception EChange {
86 ErrSeq errors;
89 ThermometerSeq list();
90 void find(inout SearchSeq slist);
91 void change(
92 in ThermostatSeq tlist, in short delta
93 ) raises(EChange);