File: CosQueryCollection.idl

package info (click to toggle)
omniorb-dfsg 4.3.3%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,172 kB
  • sloc: cpp: 115,843; python: 24,962; ansic: 13,414; sh: 2,665; makefile: 40
file content (104 lines) | stat: -rw-r--r-- 3,325 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
//File: CosQueryCollection.idl
//Part of the Query Service
// Note: if your IDL compiler does not yet support the 
//   CORBA 2.3 Feature "Escaped Identifiers" (which provides 
//   for the addition of new keywords to IDL, compile this 
//   module with the preprocessor definition 
//   "NO_ESCAPED_IDENTIFIERS". With many compilers this 
//   would be done a qualifier on the command line, 
//   something like -DNO_ESCAPED_IDENTIFIERS

#ifndef _COS_QUERY_COLLECTION_IDL_
#define _COS_QUERY_COLLECTION_IDL_

// omniORB specific pragmas to insert extra includes into the stub header.
#pragma hh #include "COS_sysdep.h"

#pragma prefix "omg.org"

module CosQueryCollection {

	exception ElementInvalid {};
	exception IteratorInvalid {};
	exception PositionInvalid {};

#ifdef NO_ESCAPED_IDENTIFIERS
	enum ValueType {TypeBoolean, TypeChar, TypeOctet, TypeShort, TypeUShort, TypeLong, TypeULong, TypeFloat, TypeDouble, TypeString, TypeObject, TypeAny, TypeSmallInt, TypeInteger, TypeReal, TypeDoublePrecision, TypeCharacter, TypeDecimal, TypeNumeric};
#else
	enum _ValueType {TypeBoolean, TypeChar, TypeOctet, TypeShort, TypeUShort, TypeLong, TypeULong, TypeFloat, TypeDouble, TypeString, TypeObject, TypeAny, TypeSmallInt, TypeInteger, TypeReal, TypeDoublePrecision, TypeCharacter, TypeDecimal, TypeNumeric};
#endif
	struct Decimal {
		long precision; 
		long scale; 
		sequence<octet> value;
	};

#ifdef NO_ESCAPED_IDENTIFIERS
	union Value switch(ValueType) {
#else
	union _Value switch(ValueType) {
#endif
		case TypeBoolean : boolean b;
		case TypeChar	 : char c;
		case TypeOctet   : octet o;
		case TypeShort   : short s;
		case TypeUShort  : unsigned short us;
		case TypeLong    : long l;
		case TypeULong   : unsigned long ul;
		case TypeFloat   : float f;
		case TypeDouble  : double d;
		case TypeString  : string str;
		case TypeObject  : Object obj;
		case TypeAny     : any a;
		case TypeSmallInt : short si;
		case TypeInteger : long i;
		case TypeReal    : float r;
		case TypeDoublePrecision : double dp;
		case TypeCharacter : string ch;
		case TypeDecimal  : Decimal dec;
		case TypeNumeric  : Decimal n;
	};
	typedef boolean Null;
	union FieldValue switch(Null) {
		case FALSE : Value v;
	};
	typedef sequence<FieldValue> Record;
	
	typedef string Istring;
	struct NVPair {Istring name; any value;};
	typedef sequence<NVPair> ParameterList;

	interface Collection;
	interface Iterator;

	interface CollectionFactory {
		Collection create (in ParameterList params);
	};

	interface Collection {
		readonly attribute long cardinality;
	
		void add_element (in any element) raises(ElementInvalid);
		void add_all_elements (in Collection elements) raises(ElementInvalid);

		void insert_element_at (in any element, in Iterator where) raises(IteratorInvalid, ElementInvalid);

		void replace_element_at (in any element, in Iterator where) raises(IteratorInvalid, PositionInvalid, ElementInvalid);

		void remove_element_at (in Iterator where) raises(IteratorInvalid, PositionInvalid);
		void remove_all_elements ();

		any retrieve_element_at (in Iterator where) raises(IteratorInvalid, PositionInvalid);

		Iterator create_iterator ();
	};


	interface Iterator {
		any next () raises(IteratorInvalid, PositionInvalid);

		void reset ();
		boolean more ();
	};
};
#endif /* ifndef _COS_QUERY_COLLECTION_IDL_ */