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 //=============================================================================
15 #pragma prefix
"acme.com"
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
;
32 interface Thermostat
: Thermometer
{
35 TempType min_permitted
;
36 TempType max_permitted
;
39 exception BadTemp
{ BtData details
; };
41 TempType get_nominal
();
42 TempType set_nominal
(in TempType new_temp
)
46 interface Controller
{
47 exception DuplicateAsset
{};
49 Thermometer create_thermometer
(
52 ) raises
(DuplicateAsset
);
53 Thermostat create_thermostat
(
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
) {
77 typedef sequence
<SearchType
> SearchSeq
;
80 Thermostat tmstat_ref
;
81 Thermostat
::BtData info
;
83 typedef sequence
<ErrorDetails
> ErrSeq
;
89 ThermometerSeq list
();
90 void find
(inout SearchSeq slist
);
92 in ThermostatSeq tlist
, in short delta