1/* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 20// make sure generated code does not produce name collisions with predefined keywords 21namespace delphi System 22 23include "ReservedIncluded.thrift" 24 25 26typedef i32 Cardinal 27typedef string message 28typedef list< map< Cardinal, message>> program 29 30struct unit { 31 1: Cardinal downto; 32 2: program procedure; 33} 34 35typedef set< unit> units 36 37exception exception1 { 38 1: program message; 39 2: unit array; 40} 41 42service constructor { 43 unit Create(1: Cardinal asm; 2: message inherited) throws (1: exception1 label); 44 units Destroy(); 45} 46 47const Cardinal downto = +1 48const Cardinal published = -1 49 50enum keywords { 51 record = 1, 52 repeat = 2, 53 deprecated = 3 54} 55 56 57struct Struct_lists { 58 1: list<Struct_simple> init; 59 2: list<Struct_simple> struc; 60 3: list<Struct_simple> field; 61 4: list<Struct_simple> field_; 62 5: list<Struct_simple> tracker; 63 6: list<Struct_simple> Self; 64} 65 66struct Struct_structs { 67 1: Struct_simple init; 68 2: Struct_simple struc; 69 3: Struct_simple field; 70 4: Struct_simple field_; 71 5: Struct_simple tracker; 72 6: Struct_simple Self; 73} 74 75struct Struct_simple { 76 1: bool init; 77 2: bool struc; 78 3: bool field; 79 4: bool field_; 80 5: bool tracker; 81 6: bool Self; 82} 83 84struct Struct_strings { 85 1: string init; 86 2: string struc; 87 3: string field; 88 4: string field_; 89 5: string tracker; 90 6: string Self; 91} 92 93struct Struct_binary { 94 1: binary init; 95 2: binary struc; 96 3: binary field; 97 4: binary field_; 98 5: binary tracker; 99 6: binary Self; 100} 101 102 103typedef i32 IProtocol 104typedef i32 ITransport 105typedef i32 IFace 106typedef i32 IAsync 107typedef i32 System 108typedef i32 SysUtils 109typedef i32 Generics 110typedef i32 Thrift 111 112struct Struct_Thrift_Names { 113 1: IProtocol IProtocol 114 2: ITransport ITransport 115 3: IFace IFace 116 4: IAsync IAsync 117 5: System System 118 6: SysUtils SysUtils 119 7: Generics Generics 120 8: Thrift Thrift 121} 122 123 124enum Thrift4554_Enum { 125 Foo = 0, 126 Bar = 1, 127 Baz = 2, 128} 129 130struct Thrift4554_Struct { 131 1 : optional double MinValue 132 2 : optional double MaxValue 133 3 : optional bool Integer // causes issue 134 4 : optional Thrift4554_Enum Foo 135} 136 137service deprecate_included_outer extends ReservedIncluded.deprecate_included_inner { 138 void FooBarBaz() 139} 140 141 142// EOF 143