2 //=============================================================================
6 * @author Source code used in TAO has been modified and adapted from thecode provided in the book
7 * @author "Advanced CORBA Programming with C++"by Michi Henning and Steve Vinoski. Copyright1999. Addison-Wesley
9 * @author MA. Used with permission ofAddison-Wesley.Modified for TAO by Mike Moran <mm4@cs.wustl.edu>
11 //=============================================================================
14 #pragma prefix
"acme.com"
18 typedef unsigned long AssetType
;
19 typedef string ModelType
;
20 typedef short TempType
;
21 typedef string LocType
;
25 readonly attribute ModelType model
;
26 readonly attribute AssetType asset_num
;
27 readonly attribute TempType temperature
;
28 attribute LocType location
;
33 interface Thermostat
: Thermometer
38 TempType min_permitted
;
39 TempType max_permitted
;
42 exception BadTemp
{ BtData details
; };
44 TempType get_nominal
();
45 TempType set_nominal
(in TempType new_temp
)
51 exception DuplicateAsset
{};
53 Thermometer create_thermometer
(in AssetType anum
,
55 raises
(DuplicateAsset
);
57 Thermostat create_thermostat
(in AssetType anum
,
60 raises
(DuplicateAsset
, Thermostat
::BadTemp
);
62 typedef sequence
<Thermometer
> ThermometerSeq
;
63 typedef sequence
<Thermostat
> ThermostatSeq
;
65 enum SearchCriterion
{ ASSET
, LOCATION
, MODEL
};
67 union KeyType
switch (SearchCriterion
)
83 typedef sequence
<SearchType
> SearchSeq
;
87 Thermostat tmstat_ref
;
88 Thermostat
::BtData info
;
90 typedef sequence
<ErrorDetails
> ErrSeq
;
97 ThermometerSeq list
();
98 void find
(inout SearchSeq slist
);
99 void change
(in ThermostatSeq tlist
, in short delta
)