1 //=============================================================================
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
8 * @author MA.Modified for TAO by Mike Moran <mm4@cs.wustl.edu>
10 //=============================================================================
16 #pragma prefix
"acme.com"
19 typedef unsigned long AssetType
;
20 typedef string ModelType
;
21 typedef short TempType
;
22 typedef string LocType
;
24 interface Thermometer
{
25 readonly attribute ModelType model
;
26 readonly attribute AssetType asset_num
;
27 readonly attribute TempType temperature
;
28 attribute LocType location
;
33 interface Thermostat
: Thermometer
{
36 TempType min_permitted
;
37 TempType max_permitted
;
40 exception BadTemp
{ BtData details
; };
42 TempType get_nominal
();
43 TempType set_nominal
(in TempType new_temp
)
47 interface Controller
{
48 exception DuplicateAsset
{};
50 Thermometer create_thermometer
(
53 ) raises
(DuplicateAsset
);
54 Thermostat create_thermostat
(
58 ) raises
(DuplicateAsset
, Thermostat
::BadTemp
);
60 typedef sequence
<Thermometer
> ThermometerSeq
;
61 typedef sequence
<Thermostat
> ThermostatSeq
;
63 enum SearchCriterion
{ ASSET
, LOCATION
, MODEL
};
65 union KeyType
switch(SearchCriterion
) {
78 typedef sequence
<SearchType
> SearchSeq
;
81 Thermostat tmstat_ref
;
82 Thermostat
::BtData info
;
84 typedef sequence
<ErrorDetails
> ErrSeq
;
90 ThermometerSeq list
();
91 void find
(inout SearchSeq slist
);
93 in ThermostatSeq tlist
, in short delta