summaryrefslogtreecommitdiff
path: root/TAO/examples/Advanced/ch_8_and_10/CCS.idl
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/examples/Advanced/ch_8_and_10/CCS.idl')
-rw-r--r--TAO/examples/Advanced/ch_8_and_10/CCS.idl88
1 files changed, 88 insertions, 0 deletions
diff --git a/TAO/examples/Advanced/ch_8_and_10/CCS.idl b/TAO/examples/Advanced/ch_8_and_10/CCS.idl
new file mode 100644
index 00000000000..7ab254d6eec
--- /dev/null
+++ b/TAO/examples/Advanced/ch_8_and_10/CCS.idl
@@ -0,0 +1,88 @@
+// $Id$
+// ============================================================================
+//
+// = LIBRARY
+// TAO/examples/Advanced/ch_8_and_10
+//
+// = FILENAME
+// CCS.idl
+//
+// = AUTHORS
+// Source code used in TAO has been modified and adapted from the code
+// provided in the book, "Advanced CORBA Programming with C++" by Michi
+// Henning and Steve Vinoski. Copyright 1999. Addison-Wesley, Reading,
+// MA.
+//
+// Modified for TAO by Mike Moran <mm4@cs.wustl.edu>
+//
+// ============================================================================
+
+
+
+#pragma prefix "acme.com"
+
+module CCS {
+ typedef unsigned long AssetType;
+ typedef string ModelType;
+ typedef short TempType;
+ typedef string LocType;
+
+ interface Thermometer {
+ readonly attribute ModelType model;
+ readonly attribute AssetType asset_num;
+ readonly attribute TempType temperature;
+ attribute LocType location;
+ };
+
+ interface Thermostat : Thermometer {
+ struct BtData {
+ TempType requested;
+ TempType min_permitted;
+ TempType max_permitted;
+ string error_msg;
+ };
+ exception BadTemp { BtData details; };
+
+ TempType get_nominal();
+ TempType set_nominal(in TempType new_temp)
+ raises(BadTemp);
+ };
+
+ interface Controller {
+ typedef sequence<Thermometer> ThermometerSeq;
+ typedef sequence<Thermostat> ThermostatSeq;
+
+ enum SearchCriterion { ASSET, LOCATION, MODEL };
+
+ union KeyType switch(SearchCriterion) {
+ case ASSET:
+ AssetType asset_num;
+ case LOCATION:
+ LocType loc;
+ case MODEL:
+ ModelType model_desc;
+ };
+
+ struct SearchType {
+ KeyType key;
+ Thermometer device;
+ };
+ typedef sequence<SearchType> SearchSeq;
+
+ struct ErrorDetails {
+ Thermostat tmstat_ref;
+ Thermostat::BtData info;
+ };
+ typedef sequence<ErrorDetails> ErrSeq;
+
+ exception EChange {
+ ErrSeq errors;
+ };
+
+ ThermometerSeq list();
+ void find(inout SearchSeq slist);
+ void change(
+ in ThermostatSeq tlist, in short delta
+ ) raises(EChange);
+ };
+};