The Data Table Class (with DataTableVariable) Clearly, we intended each of the elements of the DataTableData to be one of the variable types defined, but the constraint is not part of the definition.
The IDL structure union can make this explicit, at the cost of making the implentation of the DataTable interface more complicated.
typedef sequence<double> NumericVariable; typedef sequence<long> IntegerVariable; typedef sequence<boolean> BooleanVariable; typedef sequence<string> StringVariable; typedef sequence<short> ShortIntegerVariable; union DataTableVariable switch(short) { case 1: NumericVariable numeric_case; case 2: IntegerVariable integer_case; case 3: BooleanVariable boolean_case case 4: StringVariable string_case; }; typedef sequence<DataTableVariable> DataTableData; interface DataTable { attribute DataTableData data; attribute StringVariable columns; attribute long useForRows; };
Last modified: Sun Jul 5 18:18:46 EDT 1998
Simple Explicit Variables Dates The Whole Thing Why are we doing this? Start
© Lucent Technologies.