zeroc-ice 3.7.0 → 3.7.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (691) hide show
  1. checksums.yaml +5 -5
  2. data/ICE_LICENSE +1 -1
  3. data/bin/slice2rb +1 -6
  4. data/ext/Communicator.cpp +78 -10
  5. data/ext/Communicator.h +1 -6
  6. data/ext/Config.h +35 -6
  7. data/ext/Connection.cpp +22 -11
  8. data/ext/Connection.h +4 -6
  9. data/ext/Endpoint.cpp +1 -10
  10. data/ext/Endpoint.h +1 -6
  11. data/ext/ImplicitContext.cpp +1 -6
  12. data/ext/ImplicitContext.h +1 -6
  13. data/ext/Init.cpp +1 -6
  14. data/ext/Logger.cpp +1 -6
  15. data/ext/Logger.h +1 -6
  16. data/ext/Operation.cpp +6 -11
  17. data/ext/Operation.h +1 -6
  18. data/ext/Properties.cpp +3 -8
  19. data/ext/Properties.h +1 -6
  20. data/ext/Proxy.cpp +90 -14
  21. data/ext/Proxy.h +1 -6
  22. data/ext/Slice.cpp +3 -18
  23. data/ext/Slice.h +1 -6
  24. data/ext/Types.cpp +92 -60
  25. data/ext/Types.h +1 -6
  26. data/ext/Util.cpp +61 -32
  27. data/ext/Util.h +108 -33
  28. data/ext/ValueFactoryManager.cpp +2 -7
  29. data/ext/ValueFactoryManager.h +2 -7
  30. data/ext/extconf.rb +5 -3
  31. data/ext/ice/cpp/include/Ice/Application.h +234 -81
  32. data/ext/ice/cpp/include/Ice/AsyncResult.h +77 -6
  33. data/ext/ice/cpp/include/Ice/AsyncResultF.h +1 -6
  34. data/ext/ice/cpp/include/Ice/BatchRequestInterceptor.h +35 -7
  35. data/ext/ice/cpp/include/Ice/BatchRequestQueueF.h +1 -6
  36. data/ext/ice/cpp/include/Ice/Buffer.h +1 -6
  37. data/ext/ice/cpp/include/Ice/CommunicatorAsync.h +43 -6
  38. data/ext/ice/cpp/include/Ice/Comparable.h +81 -6
  39. data/ext/ice/cpp/include/Ice/Config.h +12 -6
  40. data/ext/ice/cpp/include/Ice/ConnectionAsync.h +97 -6
  41. data/ext/ice/cpp/include/Ice/ConnectionIF.h +3 -6
  42. data/ext/ice/cpp/include/Ice/ConsoleUtil.h +1 -6
  43. data/ext/ice/cpp/include/Ice/DefaultValueFactory.h +1 -6
  44. data/ext/ice/cpp/include/Ice/DispatchInterceptor.h +17 -7
  45. data/ext/ice/cpp/include/Ice/Dispatcher.h +22 -7
  46. data/ext/ice/cpp/include/Ice/DynamicLibrary.h +1 -6
  47. data/ext/ice/cpp/include/Ice/DynamicLibraryF.h +1 -6
  48. data/ext/ice/cpp/include/Ice/Exception.h +57 -20
  49. data/ext/ice/cpp/include/Ice/ExceptionHelpers.h +11 -6
  50. data/ext/ice/cpp/include/Ice/FactoryTable.h +12 -7
  51. data/ext/ice/cpp/include/Ice/FactoryTableInit.h +2 -7
  52. data/ext/ice/cpp/include/Ice/Format.h +13 -19
  53. data/ext/ice/cpp/include/Ice/Functional.h +6 -6
  54. data/ext/ice/cpp/include/Ice/GCObject.h +1 -6
  55. data/ext/ice/cpp/include/Ice/Handle.h +1 -6
  56. data/ext/ice/cpp/include/Ice/Ice.h +1 -6
  57. data/ext/ice/cpp/include/Ice/IconvStringConverter.h +47 -18
  58. data/ext/ice/cpp/include/Ice/Incoming.h +27 -9
  59. data/ext/ice/cpp/include/Ice/IncomingAsync.h +47 -9
  60. data/ext/ice/cpp/include/Ice/IncomingAsyncF.h +1 -6
  61. data/ext/ice/cpp/include/Ice/Initialize.h +775 -103
  62. data/ext/ice/cpp/include/Ice/InputStream.h +642 -122
  63. data/ext/ice/cpp/include/Ice/InstanceF.h +1 -6
  64. data/ext/ice/cpp/include/Ice/InterfaceByValue.h +17 -6
  65. data/ext/ice/cpp/include/Ice/LocalObject.h +5 -6
  66. data/ext/ice/cpp/include/Ice/LocalObjectF.h +1 -6
  67. data/ext/ice/cpp/include/Ice/LoggerUtil.h +37 -11
  68. data/ext/ice/cpp/include/Ice/MetricsAdminI.h +11 -7
  69. data/ext/ice/cpp/include/Ice/MetricsFunctional.h +3 -6
  70. data/ext/ice/cpp/include/Ice/MetricsObserverI.h +18 -7
  71. data/ext/ice/cpp/include/Ice/NativePropertiesAdmin.h +46 -28
  72. data/ext/ice/cpp/include/Ice/Object.h +338 -52
  73. data/ext/ice/cpp/include/Ice/ObjectF.h +5 -6
  74. data/ext/ice/cpp/include/Ice/ObserverHelper.h +1 -6
  75. data/ext/ice/cpp/include/Ice/Optional.h +42 -12
  76. data/ext/ice/cpp/include/Ice/OutgoingAsync.h +32 -8
  77. data/ext/ice/cpp/include/Ice/OutgoingAsyncF.h +1 -6
  78. data/ext/ice/cpp/include/Ice/OutputStream.h +441 -102
  79. data/ext/ice/cpp/include/Ice/Protocol.h +31 -6
  80. data/ext/ice/cpp/include/Ice/Proxy.h +2288 -207
  81. data/ext/ice/cpp/include/Ice/ProxyF.h +3 -6
  82. data/ext/ice/cpp/include/Ice/ProxyFactoryF.h +1 -6
  83. data/ext/ice/cpp/include/Ice/ProxyHandle.h +10 -6
  84. data/ext/ice/cpp/include/Ice/ReferenceF.h +1 -6
  85. data/ext/ice/cpp/include/Ice/RegisterPlugins.h +67 -14
  86. data/ext/ice/cpp/include/Ice/RequestHandlerF.h +1 -6
  87. data/ext/ice/cpp/include/Ice/ResponseHandlerF.h +1 -6
  88. data/ext/ice/cpp/include/Ice/SHA1.h +1 -6
  89. data/ext/ice/cpp/include/Ice/ServantManagerF.h +1 -6
  90. data/ext/ice/cpp/include/Ice/Service.h +267 -143
  91. data/ext/ice/cpp/include/Ice/SliceChecksums.h +5 -6
  92. data/ext/ice/cpp/include/Ice/SlicedData.h +80 -38
  93. data/ext/ice/cpp/include/Ice/SlicedDataF.h +4 -6
  94. data/ext/ice/cpp/include/Ice/StreamHelpers.h +325 -122
  95. data/ext/ice/cpp/include/Ice/StringConverter.h +32 -6
  96. data/ext/ice/cpp/include/Ice/ThreadPoolF.h +1 -6
  97. data/ext/ice/cpp/include/Ice/UUID.h +2 -6
  98. data/ext/ice/cpp/include/Ice/UniquePtr.h +2 -7
  99. data/ext/ice/cpp/include/Ice/UniqueRef.h +6 -7
  100. data/ext/ice/cpp/include/Ice/UserExceptionFactory.h +6 -6
  101. data/ext/ice/cpp/include/Ice/Value.h +41 -6
  102. data/ext/ice/cpp/include/Ice/ValueF.h +3 -6
  103. data/ext/ice/cpp/include/IceSSL/Config.h +1 -6
  104. data/ext/ice/cpp/include/IceSSL/IceSSL.h +1 -6
  105. data/ext/ice/cpp/include/IceSSL/OpenSSL.h +75 -58
  106. data/ext/ice/cpp/include/IceSSL/Plugin.h +323 -223
  107. data/ext/ice/cpp/include/IceSSL/SChannel.h +41 -35
  108. data/ext/ice/cpp/include/IceSSL/SecureTransport.h +39 -33
  109. data/ext/ice/cpp/include/IceSSL/UWP.h +33 -29
  110. data/ext/ice/cpp/include/IceUtil/Atomic.h +2 -7
  111. data/ext/ice/cpp/include/IceUtil/Cond.h +1 -6
  112. data/ext/ice/cpp/include/IceUtil/Config.h +35 -14
  113. data/ext/ice/cpp/include/IceUtil/ConsoleUtil.h +5 -10
  114. data/ext/ice/cpp/include/IceUtil/CountDownLatch.h +1 -6
  115. data/ext/ice/cpp/include/IceUtil/CtrlCHandler.h +52 -36
  116. data/ext/ice/cpp/include/IceUtil/DisableWarnings.h +5 -11
  117. data/ext/ice/cpp/include/IceUtil/Exception.h +130 -11
  118. data/ext/ice/cpp/include/IceUtil/FileUtil.h +1 -6
  119. data/ext/ice/cpp/include/IceUtil/Functional.h +5 -6
  120. data/ext/ice/cpp/include/IceUtil/Handle.h +1 -6
  121. data/ext/ice/cpp/include/IceUtil/IceUtil.h +1 -6
  122. data/ext/ice/cpp/include/IceUtil/InputUtil.h +1 -6
  123. data/ext/ice/cpp/include/IceUtil/Iterator.h +1 -6
  124. data/ext/ice/cpp/include/IceUtil/Lock.h +1 -6
  125. data/ext/ice/cpp/include/IceUtil/Monitor.h +1 -6
  126. data/ext/ice/cpp/include/IceUtil/Mutex.h +3 -13
  127. data/ext/ice/cpp/include/IceUtil/MutexProtocol.h +1 -6
  128. data/ext/ice/cpp/include/IceUtil/MutexPtrLock.h +1 -6
  129. data/ext/ice/cpp/include/IceUtil/MutexPtrTryLock.h +1 -6
  130. data/ext/ice/cpp/include/IceUtil/Optional.h +103 -6
  131. data/ext/ice/cpp/include/IceUtil/Options.h +1 -6
  132. data/ext/ice/cpp/include/IceUtil/OutputUtil.h +18 -20
  133. data/ext/ice/cpp/include/IceUtil/PopDisableWarnings.h +1 -6
  134. data/ext/ice/cpp/include/IceUtil/PushDisableWarnings.h +8 -6
  135. data/ext/ice/cpp/include/IceUtil/Random.h +37 -6
  136. data/ext/ice/cpp/include/IceUtil/RecMutex.h +1 -6
  137. data/ext/ice/cpp/include/IceUtil/ResourceConfig.h +4 -9
  138. data/ext/ice/cpp/include/IceUtil/ScannerConfig.h +12 -9
  139. data/ext/ice/cpp/include/IceUtil/ScopedArray.h +1 -6
  140. data/ext/ice/cpp/include/IceUtil/Shared.h +1 -6
  141. data/ext/ice/cpp/include/IceUtil/StopWatch.h +1 -6
  142. data/ext/ice/cpp/include/IceUtil/StringConverter.h +107 -92
  143. data/ext/ice/cpp/include/IceUtil/StringUtil.h +1 -6
  144. data/ext/ice/cpp/include/IceUtil/Thread.h +1 -6
  145. data/ext/ice/cpp/include/IceUtil/ThreadException.h +1 -6
  146. data/ext/ice/cpp/include/IceUtil/Time.h +1 -6
  147. data/ext/ice/cpp/include/IceUtil/Timer.h +5 -6
  148. data/ext/ice/cpp/include/IceUtil/UUID.h +5 -6
  149. data/ext/ice/cpp/include/IceUtil/UndefSysMacros.h +1 -6
  150. data/ext/ice/cpp/include/generated/Ice/BuiltinSequences.h +81 -26
  151. data/ext/ice/cpp/include/generated/Ice/Communicator.h +928 -136
  152. data/ext/ice/cpp/include/generated/Ice/CommunicatorF.h +14 -11
  153. data/ext/ice/cpp/include/generated/Ice/Connection.h +968 -180
  154. data/ext/ice/cpp/include/generated/Ice/ConnectionF.h +22 -15
  155. data/ext/ice/cpp/include/generated/Ice/Current.h +166 -9
  156. data/ext/ice/cpp/include/generated/Ice/Endpoint.h +476 -115
  157. data/ext/ice/cpp/include/generated/Ice/EndpointF.h +42 -23
  158. data/ext/ice/cpp/include/generated/Ice/EndpointTypes.h +30 -9
  159. data/ext/ice/cpp/include/generated/Ice/FacetMap.h +12 -11
  160. data/ext/ice/cpp/include/generated/Ice/Identity.h +56 -13
  161. data/ext/ice/cpp/include/generated/Ice/ImplicitContext.h +151 -34
  162. data/ext/ice/cpp/include/generated/Ice/ImplicitContextF.h +14 -11
  163. data/ext/ice/cpp/include/generated/Ice/Instrumentation.h +630 -89
  164. data/ext/ice/cpp/include/generated/Ice/InstrumentationF.h +20 -13
  165. data/ext/ice/cpp/include/generated/Ice/LocalException.h +5009 -770
  166. data/ext/ice/cpp/include/generated/Ice/Locator.h +2255 -441
  167. data/ext/ice/cpp/include/generated/Ice/LocatorF.h +32 -19
  168. data/ext/ice/cpp/include/generated/Ice/Logger.h +105 -32
  169. data/ext/ice/cpp/include/generated/Ice/LoggerF.h +14 -11
  170. data/ext/ice/cpp/include/generated/Ice/Metrics.h +2539 -471
  171. data/ext/ice/cpp/include/generated/Ice/ObjectAdapter.h +1005 -132
  172. data/ext/ice/cpp/include/generated/Ice/ObjectAdapterF.h +14 -11
  173. data/ext/ice/cpp/include/generated/Ice/ObjectFactory.h +73 -18
  174. data/ext/ice/cpp/include/generated/Ice/Plugin.h +143 -34
  175. data/ext/ice/cpp/include/generated/Ice/PluginF.h +18 -13
  176. data/ext/ice/cpp/include/generated/Ice/Process.h +514 -79
  177. data/ext/ice/cpp/include/generated/Ice/ProcessF.h +21 -14
  178. data/ext/ice/cpp/include/generated/Ice/Properties.h +307 -64
  179. data/ext/ice/cpp/include/generated/Ice/PropertiesAdmin.h +738 -127
  180. data/ext/ice/cpp/include/generated/Ice/PropertiesF.h +25 -16
  181. data/ext/ice/cpp/include/generated/Ice/RemoteLogger.h +1524 -284
  182. data/ext/ice/cpp/include/generated/Ice/Router.h +1007 -201
  183. data/ext/ice/cpp/include/generated/Ice/RouterF.h +21 -14
  184. data/ext/ice/cpp/include/generated/Ice/ServantLocator.h +175 -24
  185. data/ext/ice/cpp/include/generated/Ice/ServantLocatorF.h +14 -11
  186. data/ext/ice/cpp/include/generated/Ice/SliceChecksumDict.h +14 -9
  187. data/ext/ice/cpp/include/generated/Ice/ValueFactory.h +178 -29
  188. data/ext/ice/cpp/include/generated/Ice/Version.h +32 -9
  189. data/ext/ice/cpp/include/generated/IceSSL/ConnectionInfo.h +72 -21
  190. data/ext/ice/cpp/include/generated/IceSSL/ConnectionInfoF.h +14 -11
  191. data/ext/ice/cpp/include/generated/IceSSL/EndpointInfo.h +40 -15
  192. data/ext/ice/cpp/src/Ice/ACM.cpp +21 -14
  193. data/ext/ice/cpp/src/Ice/ACM.h +1 -6
  194. data/ext/ice/cpp/src/Ice/ACMF.h +1 -6
  195. data/ext/ice/cpp/src/Ice/Acceptor.cpp +1 -6
  196. data/ext/ice/cpp/src/Ice/Acceptor.h +1 -6
  197. data/ext/ice/cpp/src/Ice/AcceptorF.h +1 -6
  198. data/ext/ice/cpp/src/Ice/ArgVector.cpp +8 -13
  199. data/ext/ice/cpp/src/Ice/ArgVector.h +1 -6
  200. data/ext/ice/cpp/src/Ice/AsyncResult.cpp +1 -7
  201. data/ext/ice/cpp/src/Ice/Base64.cpp +12 -18
  202. data/ext/ice/cpp/src/Ice/Base64.h +1 -6
  203. data/ext/ice/cpp/src/Ice/BatchRequestQueue.cpp +2 -7
  204. data/ext/ice/cpp/src/Ice/BatchRequestQueue.h +1 -6
  205. data/ext/ice/cpp/src/Ice/Buffer.cpp +3 -8
  206. data/ext/ice/cpp/src/Ice/BuiltinSequences.cpp +4 -9
  207. data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +2 -8
  208. data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.h +1 -6
  209. data/ext/ice/cpp/src/Ice/Communicator.cpp +7 -10
  210. data/ext/ice/cpp/src/Ice/CommunicatorF.cpp +4 -9
  211. data/ext/ice/cpp/src/Ice/CommunicatorI.cpp +56 -22
  212. data/ext/ice/cpp/src/Ice/CommunicatorI.h +15 -16
  213. data/ext/ice/cpp/src/Ice/Cond.cpp +1 -6
  214. data/ext/ice/cpp/src/Ice/ConnectRequestHandler.cpp +11 -11
  215. data/ext/ice/cpp/src/Ice/ConnectRequestHandler.h +5 -10
  216. data/ext/ice/cpp/src/Ice/ConnectRequestHandlerF.h +1 -6
  217. data/ext/ice/cpp/src/Ice/Connection.cpp +28 -17
  218. data/ext/ice/cpp/src/Ice/ConnectionF.cpp +4 -9
  219. data/ext/ice/cpp/src/Ice/ConnectionFactory.cpp +167 -52
  220. data/ext/ice/cpp/src/Ice/ConnectionFactory.h +4 -6
  221. data/ext/ice/cpp/src/Ice/ConnectionFactoryF.h +1 -6
  222. data/ext/ice/cpp/src/Ice/ConnectionI.cpp +78 -60
  223. data/ext/ice/cpp/src/Ice/ConnectionI.h +10 -13
  224. data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.cpp +1 -6
  225. data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.h +2 -7
  226. data/ext/ice/cpp/src/Ice/Connector.cpp +1 -6
  227. data/ext/ice/cpp/src/Ice/Connector.h +1 -6
  228. data/ext/ice/cpp/src/Ice/ConnectorF.h +1 -6
  229. data/ext/ice/cpp/src/Ice/CountDownLatch.cpp +1 -6
  230. data/ext/ice/cpp/src/Ice/Current.cpp +4 -9
  231. data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +5 -12
  232. data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.h +1 -6
  233. data/ext/ice/cpp/src/Ice/DefaultsAndOverridesF.h +1 -6
  234. data/ext/ice/cpp/src/Ice/DispatchInterceptor.cpp +14 -6
  235. data/ext/ice/cpp/src/Ice/DynamicLibrary.cpp +7 -11
  236. data/ext/ice/cpp/src/Ice/Endpoint.cpp +25 -16
  237. data/ext/ice/cpp/src/Ice/EndpointF.cpp +4 -9
  238. data/ext/ice/cpp/src/Ice/EndpointFactory.cpp +1 -6
  239. data/ext/ice/cpp/src/Ice/EndpointFactory.h +1 -6
  240. data/ext/ice/cpp/src/Ice/EndpointFactoryF.h +1 -6
  241. data/ext/ice/cpp/src/Ice/EndpointFactoryManager.cpp +7 -18
  242. data/ext/ice/cpp/src/Ice/EndpointFactoryManager.h +1 -6
  243. data/ext/ice/cpp/src/Ice/EndpointFactoryManagerF.h +1 -6
  244. data/ext/ice/cpp/src/Ice/EndpointI.cpp +2 -7
  245. data/ext/ice/cpp/src/Ice/EndpointI.h +5 -10
  246. data/ext/ice/cpp/src/Ice/EndpointIF.h +1 -6
  247. data/ext/ice/cpp/src/Ice/EndpointTypes.cpp +4 -9
  248. data/ext/ice/cpp/src/Ice/EventHandler.cpp +1 -6
  249. data/ext/ice/cpp/src/Ice/EventHandler.h +1 -6
  250. data/ext/ice/cpp/src/Ice/EventHandlerF.h +1 -6
  251. data/ext/ice/cpp/src/Ice/Exception.cpp +8 -13
  252. data/ext/ice/cpp/src/Ice/FacetMap.cpp +4 -9
  253. data/ext/ice/cpp/src/Ice/FactoryTable.cpp +1 -6
  254. data/ext/ice/cpp/src/Ice/FactoryTableInit.cpp +1 -6
  255. data/ext/ice/cpp/src/Ice/GCObject.cpp +2 -7
  256. data/ext/ice/cpp/src/Ice/HashUtil.h +2 -7
  257. data/ext/ice/cpp/src/Ice/HttpParser.cpp +1 -6
  258. data/ext/ice/cpp/src/Ice/HttpParser.h +1 -6
  259. data/ext/ice/cpp/src/Ice/IPEndpointI.cpp +37 -59
  260. data/ext/ice/cpp/src/Ice/IPEndpointI.h +5 -10
  261. data/ext/ice/cpp/src/Ice/IPEndpointIF.h +1 -6
  262. data/ext/ice/cpp/src/Ice/IconvStringConverter.cpp +1 -6
  263. data/ext/ice/cpp/src/Ice/Identity.cpp +4 -9
  264. data/ext/ice/cpp/src/Ice/ImplicitContext.cpp +7 -10
  265. data/ext/ice/cpp/src/Ice/ImplicitContextF.cpp +4 -9
  266. data/ext/ice/cpp/src/Ice/ImplicitContextI.cpp +3 -20
  267. data/ext/ice/cpp/src/Ice/ImplicitContextI.h +1 -6
  268. data/ext/ice/cpp/src/Ice/Incoming.cpp +11 -13
  269. data/ext/ice/cpp/src/Ice/IncomingAsync.cpp +1 -6
  270. data/ext/ice/cpp/src/Ice/IncomingRequest.h +1 -6
  271. data/ext/ice/cpp/src/Ice/Initialize.cpp +15 -26
  272. data/ext/ice/cpp/src/Ice/InputStream.cpp +45 -77
  273. data/ext/ice/cpp/src/Ice/Instance.cpp +70 -46
  274. data/ext/ice/cpp/src/Ice/Instance.h +3 -6
  275. data/ext/ice/cpp/src/Ice/Instrumentation.cpp +34 -19
  276. data/ext/ice/cpp/src/Ice/InstrumentationF.cpp +4 -9
  277. data/ext/ice/cpp/src/Ice/InstrumentationI.cpp +2 -7
  278. data/ext/ice/cpp/src/Ice/InstrumentationI.h +1 -6
  279. data/ext/ice/cpp/src/Ice/LocalException.cpp +280 -285
  280. data/ext/ice/cpp/src/Ice/LocalObject.cpp +1 -6
  281. data/ext/ice/cpp/src/Ice/Locator.cpp +274 -166
  282. data/ext/ice/cpp/src/Ice/LocatorF.cpp +4 -9
  283. data/ext/ice/cpp/src/Ice/LocatorInfo.cpp +28 -30
  284. data/ext/ice/cpp/src/Ice/LocatorInfo.h +3 -8
  285. data/ext/ice/cpp/src/Ice/LocatorInfoF.h +1 -6
  286. data/ext/ice/cpp/src/Ice/Logger.cpp +7 -10
  287. data/ext/ice/cpp/src/Ice/LoggerAdminI.cpp +8 -19
  288. data/ext/ice/cpp/src/Ice/LoggerAdminI.h +1 -6
  289. data/ext/ice/cpp/src/Ice/LoggerF.cpp +4 -9
  290. data/ext/ice/cpp/src/Ice/LoggerI.cpp +13 -12
  291. data/ext/ice/cpp/src/Ice/LoggerI.h +1 -6
  292. data/ext/ice/cpp/src/Ice/LoggerUtil.cpp +1 -6
  293. data/ext/ice/cpp/src/Ice/Metrics.cpp +296 -113
  294. data/ext/ice/cpp/src/Ice/MetricsAdminI.cpp +10 -15
  295. data/ext/ice/cpp/src/Ice/MetricsObserverI.cpp +1 -6
  296. data/ext/ice/cpp/src/Ice/Network.cpp +252 -271
  297. data/ext/ice/cpp/src/Ice/Network.h +6 -20
  298. data/ext/ice/cpp/src/Ice/NetworkF.h +1 -6
  299. data/ext/ice/cpp/src/Ice/NetworkProxy.cpp +2 -8
  300. data/ext/ice/cpp/src/Ice/NetworkProxy.h +1 -6
  301. data/ext/ice/cpp/src/Ice/NetworkProxyF.h +1 -6
  302. data/ext/ice/cpp/src/Ice/OSLogLoggerI.cpp +57 -0
  303. data/ext/ice/cpp/src/Ice/OSLogLoggerI.h +40 -0
  304. data/ext/ice/cpp/src/Ice/Object.cpp +16 -17
  305. data/ext/ice/cpp/src/Ice/ObjectAdapter.cpp +7 -10
  306. data/ext/ice/cpp/src/Ice/ObjectAdapterF.cpp +4 -9
  307. data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.cpp +53 -24
  308. data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.h +1 -6
  309. data/ext/ice/cpp/src/Ice/ObjectAdapterFactoryF.h +1 -6
  310. data/ext/ice/cpp/src/Ice/ObjectAdapterI.cpp +137 -156
  311. data/ext/ice/cpp/src/Ice/ObjectAdapterI.h +15 -16
  312. data/ext/ice/cpp/src/Ice/ObjectFactory.cpp +7 -10
  313. data/ext/ice/cpp/src/Ice/ObserverHelper.cpp +1 -6
  314. data/ext/ice/cpp/src/Ice/OpaqueEndpointI.cpp +29 -51
  315. data/ext/ice/cpp/src/Ice/OpaqueEndpointI.h +2 -7
  316. data/ext/ice/cpp/src/Ice/OutgoingAsync.cpp +6 -9
  317. data/ext/ice/cpp/src/Ice/OutputStream.cpp +29 -61
  318. data/ext/ice/cpp/src/Ice/Plugin.cpp +10 -11
  319. data/ext/ice/cpp/src/Ice/PluginF.cpp +4 -9
  320. data/ext/ice/cpp/src/Ice/PluginManagerI.cpp +15 -39
  321. data/ext/ice/cpp/src/Ice/PluginManagerI.h +3 -8
  322. data/ext/ice/cpp/src/Ice/Process.cpp +66 -42
  323. data/ext/ice/cpp/src/Ice/ProcessF.cpp +4 -9
  324. data/ext/ice/cpp/src/Ice/Properties.cpp +7 -10
  325. data/ext/ice/cpp/src/Ice/PropertiesAdmin.cpp +84 -54
  326. data/ext/ice/cpp/src/Ice/PropertiesAdminI.cpp +3 -8
  327. data/ext/ice/cpp/src/Ice/PropertiesAdminI.h +1 -6
  328. data/ext/ice/cpp/src/Ice/PropertiesF.cpp +4 -9
  329. data/ext/ice/cpp/src/Ice/PropertiesI.cpp +25 -35
  330. data/ext/ice/cpp/src/Ice/PropertiesI.h +10 -15
  331. data/ext/ice/cpp/src/Ice/PropertyNames.cpp +45 -8
  332. data/ext/ice/cpp/src/Ice/PropertyNames.h +2 -7
  333. data/ext/ice/cpp/src/Ice/Protocol.cpp +5 -18
  334. data/ext/ice/cpp/src/Ice/ProtocolInstance.cpp +1 -6
  335. data/ext/ice/cpp/src/Ice/ProtocolInstance.h +1 -6
  336. data/ext/ice/cpp/src/Ice/ProtocolInstanceF.h +1 -6
  337. data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.cpp +1 -6
  338. data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.h +1 -6
  339. data/ext/ice/cpp/src/Ice/ProtocolPluginFacadeF.h +1 -6
  340. data/ext/ice/cpp/src/Ice/Proxy.cpp +54 -8
  341. data/ext/ice/cpp/src/Ice/ProxyFactory.cpp +11 -7
  342. data/ext/ice/cpp/src/Ice/ProxyFactory.h +1 -6
  343. data/ext/ice/cpp/src/Ice/Reference.cpp +116 -38
  344. data/ext/ice/cpp/src/Ice/Reference.h +13 -7
  345. data/ext/ice/cpp/src/Ice/ReferenceFactory.cpp +52 -98
  346. data/ext/ice/cpp/src/Ice/ReferenceFactory.h +1 -6
  347. data/ext/ice/cpp/src/Ice/ReferenceFactoryF.h +1 -6
  348. data/ext/ice/cpp/src/Ice/RegisterPluginsInit.cpp +4 -8
  349. data/ext/ice/cpp/src/Ice/RegisterPluginsInit.h +1 -6
  350. data/ext/ice/cpp/src/Ice/RemoteLogger.cpp +194 -113
  351. data/ext/ice/cpp/src/Ice/ReplyStatus.h +1 -6
  352. data/ext/ice/cpp/src/Ice/RequestHandler.cpp +1 -6
  353. data/ext/ice/cpp/src/Ice/RequestHandler.h +1 -6
  354. data/ext/ice/cpp/src/Ice/RequestHandlerFactory.cpp +1 -6
  355. data/ext/ice/cpp/src/Ice/RequestHandlerFactory.h +1 -6
  356. data/ext/ice/cpp/src/Ice/ResponseHandler.cpp +1 -6
  357. data/ext/ice/cpp/src/Ice/ResponseHandler.h +1 -6
  358. data/ext/ice/cpp/src/Ice/RetryQueue.cpp +7 -9
  359. data/ext/ice/cpp/src/Ice/RetryQueue.h +1 -6
  360. data/ext/ice/cpp/src/Ice/RetryQueueF.h +1 -6
  361. data/ext/ice/cpp/src/Ice/Router.cpp +160 -87
  362. data/ext/ice/cpp/src/Ice/RouterF.cpp +4 -9
  363. data/ext/ice/cpp/src/Ice/RouterInfo.cpp +8 -35
  364. data/ext/ice/cpp/src/Ice/RouterInfo.h +1 -8
  365. data/ext/ice/cpp/src/Ice/RouterInfoF.h +1 -6
  366. data/ext/ice/cpp/src/Ice/SHA1.cpp +3 -8
  367. data/ext/ice/cpp/src/Ice/Selector.cpp +76 -49
  368. data/ext/ice/cpp/src/Ice/Selector.h +1 -6
  369. data/ext/ice/cpp/src/Ice/ServantLocator.cpp +7 -10
  370. data/ext/ice/cpp/src/Ice/ServantLocatorF.cpp +4 -9
  371. data/ext/ice/cpp/src/Ice/ServantManager.cpp +21 -42
  372. data/ext/ice/cpp/src/Ice/ServantManager.h +1 -6
  373. data/ext/ice/cpp/src/Ice/SharedContext.h +1 -6
  374. data/ext/ice/cpp/src/Ice/SliceChecksumDict.cpp +4 -9
  375. data/ext/ice/cpp/src/Ice/SliceChecksums.cpp +1 -6
  376. data/ext/ice/cpp/src/Ice/SlicedData.cpp +1 -6
  377. data/ext/ice/cpp/src/Ice/StreamSocket.cpp +46 -69
  378. data/ext/ice/cpp/src/Ice/StreamSocket.h +1 -6
  379. data/ext/ice/cpp/src/Ice/StringConverterPlugin.cpp +10 -6
  380. data/ext/ice/cpp/src/Ice/StringUtil.h +1 -6
  381. data/ext/ice/cpp/src/Ice/SysLoggerI.cpp +3 -8
  382. data/ext/ice/cpp/src/Ice/SysLoggerI.h +1 -6
  383. data/ext/ice/cpp/src/Ice/SystemdJournalI.cpp +66 -0
  384. data/ext/ice/cpp/src/Ice/SystemdJournalI.h +39 -0
  385. data/ext/ice/cpp/src/Ice/TcpAcceptor.cpp +13 -19
  386. data/ext/ice/cpp/src/Ice/TcpAcceptor.h +1 -6
  387. data/ext/ice/cpp/src/Ice/TcpConnector.cpp +6 -6
  388. data/ext/ice/cpp/src/Ice/TcpConnector.h +1 -6
  389. data/ext/ice/cpp/src/Ice/TcpEndpointI.cpp +13 -16
  390. data/ext/ice/cpp/src/Ice/TcpEndpointI.h +2 -7
  391. data/ext/ice/cpp/src/Ice/TcpTransceiver.cpp +6 -6
  392. data/ext/ice/cpp/src/Ice/TcpTransceiver.h +1 -6
  393. data/ext/ice/cpp/src/Ice/Thread.cpp +18 -14
  394. data/ext/ice/cpp/src/Ice/ThreadPool.cpp +79 -19
  395. data/ext/ice/cpp/src/Ice/ThreadPool.h +11 -12
  396. data/ext/ice/cpp/src/Ice/Timer.cpp +11 -6
  397. data/ext/ice/cpp/src/Ice/TraceLevels.cpp +1 -6
  398. data/ext/ice/cpp/src/Ice/TraceLevels.h +1 -6
  399. data/ext/ice/cpp/src/Ice/TraceLevelsF.h +1 -6
  400. data/ext/ice/cpp/src/Ice/TraceUtil.cpp +1 -6
  401. data/ext/ice/cpp/src/Ice/TraceUtil.h +1 -6
  402. data/ext/ice/cpp/src/Ice/Transceiver.cpp +1 -6
  403. data/ext/ice/cpp/src/Ice/Transceiver.h +1 -6
  404. data/ext/ice/cpp/src/Ice/TransceiverF.h +3 -8
  405. data/ext/ice/cpp/src/Ice/UdpConnector.cpp +4 -6
  406. data/ext/ice/cpp/src/Ice/UdpConnector.h +1 -6
  407. data/ext/ice/cpp/src/Ice/UdpEndpointI.cpp +30 -33
  408. data/ext/ice/cpp/src/Ice/UdpEndpointI.h +2 -7
  409. data/ext/ice/cpp/src/Ice/UdpTransceiver.cpp +49 -79
  410. data/ext/ice/cpp/src/Ice/UdpTransceiver.h +1 -6
  411. data/ext/ice/cpp/src/Ice/Value.cpp +1 -6
  412. data/ext/ice/cpp/src/Ice/ValueFactory.cpp +10 -11
  413. data/ext/ice/cpp/src/Ice/ValueFactoryManagerI.cpp +3 -12
  414. data/ext/ice/cpp/src/Ice/ValueFactoryManagerI.h +2 -7
  415. data/ext/ice/cpp/src/Ice/Version.cpp +4 -9
  416. data/ext/ice/cpp/src/Ice/VirtualShared.h +1 -6
  417. data/ext/ice/cpp/src/Ice/WSAcceptor.cpp +1 -6
  418. data/ext/ice/cpp/src/Ice/WSAcceptor.h +1 -6
  419. data/ext/ice/cpp/src/Ice/WSConnector.cpp +1 -6
  420. data/ext/ice/cpp/src/Ice/WSConnector.h +1 -6
  421. data/ext/ice/cpp/src/Ice/WSEndpoint.cpp +4 -10
  422. data/ext/ice/cpp/src/Ice/WSEndpoint.h +2 -7
  423. data/ext/ice/cpp/src/Ice/WSTransceiver.cpp +25 -30
  424. data/ext/ice/cpp/src/Ice/WSTransceiver.h +1 -7
  425. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.cpp +86 -33
  426. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.h +1083 -129
  427. data/ext/ice/cpp/src/IceDiscovery/LocatorI.cpp +4 -7
  428. data/ext/ice/cpp/src/IceDiscovery/LocatorI.h +1 -6
  429. data/ext/ice/cpp/src/IceDiscovery/LookupI.cpp +5 -10
  430. data/ext/ice/cpp/src/IceDiscovery/LookupI.h +1 -6
  431. data/ext/ice/cpp/src/IceDiscovery/PluginI.cpp +1 -6
  432. data/ext/ice/cpp/src/IceDiscovery/PluginI.h +1 -6
  433. data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.cpp +71 -30
  434. data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.h +640 -79
  435. data/ext/ice/cpp/src/IceLocatorDiscovery/Plugin.h +1 -6
  436. data/ext/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +122 -25
  437. data/ext/ice/cpp/src/IceSSL/AcceptorI.cpp +2 -9
  438. data/ext/ice/cpp/src/IceSSL/AcceptorI.h +1 -6
  439. data/ext/ice/cpp/src/IceSSL/CertificateI.cpp +4 -9
  440. data/ext/ice/cpp/src/IceSSL/CertificateI.h +1 -6
  441. data/ext/ice/cpp/src/IceSSL/ConnectionInfo.cpp +7 -10
  442. data/ext/ice/cpp/src/IceSSL/ConnectionInfoF.cpp +4 -9
  443. data/ext/ice/cpp/src/IceSSL/ConnectorI.cpp +2 -9
  444. data/ext/ice/cpp/src/IceSSL/ConnectorI.h +1 -6
  445. data/ext/ice/cpp/src/IceSSL/EndpointI.cpp +9 -14
  446. data/ext/ice/cpp/src/IceSSL/EndpointI.h +3 -8
  447. data/ext/ice/cpp/src/IceSSL/EndpointInfo.cpp +7 -10
  448. data/ext/ice/cpp/src/IceSSL/Instance.cpp +1 -6
  449. data/ext/ice/cpp/src/IceSSL/Instance.h +1 -6
  450. data/ext/ice/cpp/src/IceSSL/InstanceF.h +1 -6
  451. data/ext/ice/cpp/src/IceSSL/OpenSSLCertificateI.cpp +11 -19
  452. data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +100 -46
  453. data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.h +3 -8
  454. data/ext/ice/cpp/src/IceSSL/OpenSSLEngineF.h +1 -6
  455. data/ext/ice/cpp/src/IceSSL/OpenSSLPluginI.cpp +1 -6
  456. data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +190 -206
  457. data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.h +2 -11
  458. data/ext/ice/cpp/src/IceSSL/OpenSSLUtil.cpp +1 -6
  459. data/ext/ice/cpp/src/IceSSL/OpenSSLUtil.h +1 -6
  460. data/ext/ice/cpp/src/IceSSL/PluginI.cpp +1 -6
  461. data/ext/ice/cpp/src/IceSSL/PluginI.h +1 -6
  462. data/ext/ice/cpp/src/IceSSL/RFC2253.cpp +1 -7
  463. data/ext/ice/cpp/src/IceSSL/RFC2253.h +1 -6
  464. data/ext/ice/cpp/src/IceSSL/SChannelCertificateI.cpp +5 -10
  465. data/ext/ice/cpp/src/IceSSL/SChannelEngine.cpp +69 -36
  466. data/ext/ice/cpp/src/IceSSL/SChannelEngine.h +5 -8
  467. data/ext/ice/cpp/src/IceSSL/SChannelEngineF.h +5 -6
  468. data/ext/ice/cpp/src/IceSSL/SChannelPluginI.cpp +1 -6
  469. data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.cpp +71 -62
  470. data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.h +7 -6
  471. data/ext/ice/cpp/src/IceSSL/SSLEngine.cpp +26 -28
  472. data/ext/ice/cpp/src/IceSSL/SSLEngine.h +3 -6
  473. data/ext/ice/cpp/src/IceSSL/SSLEngineF.h +1 -6
  474. data/ext/ice/cpp/src/IceSSL/SecureTransportCertificateI.cpp +37 -31
  475. data/ext/ice/cpp/src/IceSSL/SecureTransportEngine.cpp +44 -18
  476. data/ext/ice/cpp/src/IceSSL/SecureTransportEngine.h +5 -6
  477. data/ext/ice/cpp/src/IceSSL/SecureTransportEngineF.h +4 -6
  478. data/ext/ice/cpp/src/IceSSL/SecureTransportPluginI.cpp +1 -6
  479. data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +47 -27
  480. data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.h +6 -7
  481. data/ext/ice/cpp/src/IceSSL/SecureTransportUtil.cpp +41 -34
  482. data/ext/ice/cpp/src/IceSSL/SecureTransportUtil.h +5 -6
  483. data/ext/ice/cpp/src/IceSSL/TrustManager.cpp +4 -10
  484. data/ext/ice/cpp/src/IceSSL/TrustManager.h +1 -6
  485. data/ext/ice/cpp/src/IceSSL/TrustManagerF.h +1 -6
  486. data/ext/ice/cpp/src/IceSSL/UWPCertificateI.cpp +4 -9
  487. data/ext/ice/cpp/src/IceSSL/UWPEngine.cpp +4 -9
  488. data/ext/ice/cpp/src/IceSSL/UWPEngine.h +1 -6
  489. data/ext/ice/cpp/src/IceSSL/UWPEngineF.h +1 -6
  490. data/ext/ice/cpp/src/IceSSL/UWPPluginI.cpp +1 -6
  491. data/ext/ice/cpp/src/IceSSL/UWPTransceiverI.cpp +5 -10
  492. data/ext/ice/cpp/src/IceSSL/UWPTransceiverI.h +1 -6
  493. data/ext/ice/cpp/src/IceSSL/Util.cpp +12 -11
  494. data/ext/ice/cpp/src/IceSSL/Util.h +1 -6
  495. data/ext/ice/cpp/src/IceUtil/ConsoleUtil.cpp +1 -6
  496. data/ext/ice/cpp/src/IceUtil/ConvertUTF.cpp +1 -6
  497. data/ext/ice/cpp/src/IceUtil/ConvertUTF.h +1 -6
  498. data/ext/ice/cpp/src/IceUtil/CtrlCHandler.cpp +3 -6
  499. data/ext/ice/cpp/src/IceUtil/FileUtil.cpp +6 -11
  500. data/ext/ice/cpp/src/IceUtil/InputUtil.cpp +1 -6
  501. data/ext/ice/cpp/src/IceUtil/MutexProtocol.cpp +1 -6
  502. data/ext/ice/cpp/src/IceUtil/Options.cpp +25 -15
  503. data/ext/ice/cpp/src/IceUtil/OutputUtil.cpp +41 -16
  504. data/ext/ice/cpp/src/IceUtil/Random.cpp +3 -8
  505. data/ext/ice/cpp/src/IceUtil/RecMutex.cpp +2 -11
  506. data/ext/ice/cpp/src/IceUtil/Shared.cpp +1 -6
  507. data/ext/ice/cpp/src/IceUtil/StringConverter.cpp +6 -11
  508. data/ext/ice/cpp/src/IceUtil/StringUtil.cpp +45 -12
  509. data/ext/ice/cpp/src/IceUtil/ThreadException.cpp +1 -6
  510. data/ext/ice/cpp/src/IceUtil/Time.cpp +10 -17
  511. data/ext/ice/cpp/src/IceUtil/UUID.cpp +8 -13
  512. data/ext/ice/cpp/src/IceUtil/Unicode.cpp +1 -6
  513. data/ext/ice/cpp/src/IceUtil/Unicode.h +1 -6
  514. data/ext/ice/cpp/src/IceUtil/UtilException.cpp +17 -16
  515. data/ext/ice/cpp/src/Slice/CPlusPlusUtil.cpp +178 -170
  516. data/ext/ice/cpp/src/Slice/CPlusPlusUtil.h +8 -12
  517. data/ext/ice/cpp/src/Slice/Checksum.cpp +1 -6
  518. data/ext/ice/cpp/src/Slice/Checksum.h +1 -6
  519. data/ext/ice/cpp/src/Slice/FileTracker.cpp +1 -6
  520. data/ext/ice/cpp/src/Slice/FileTracker.h +1 -6
  521. data/ext/ice/cpp/src/Slice/Grammar.cpp +424 -438
  522. data/ext/ice/cpp/src/Slice/Grammar.h +7 -7
  523. data/ext/ice/cpp/src/Slice/GrammarUtil.h +1 -7
  524. data/ext/ice/cpp/src/Slice/JavaUtil.cpp +195 -122
  525. data/ext/ice/cpp/src/Slice/JavaUtil.h +12 -12
  526. data/ext/ice/cpp/src/Slice/MD5.cpp +1 -6
  527. data/ext/ice/cpp/src/Slice/MD5.h +1 -6
  528. data/ext/ice/cpp/src/Slice/MD5I.cpp +8 -0
  529. data/ext/ice/cpp/src/Slice/PHPUtil.cpp +6 -6
  530. data/ext/ice/cpp/src/Slice/PHPUtil.h +1 -6
  531. data/ext/ice/cpp/src/Slice/Parser.cpp +535 -266
  532. data/ext/ice/cpp/src/Slice/Parser.h +72 -12
  533. data/ext/ice/cpp/src/Slice/Preprocessor.cpp +26 -17
  534. data/ext/ice/cpp/src/Slice/Preprocessor.h +2 -7
  535. data/ext/ice/cpp/src/Slice/Python.cpp +28 -42
  536. data/ext/ice/cpp/src/Slice/PythonUtil.cpp +137 -53
  537. data/ext/ice/cpp/src/Slice/PythonUtil.h +2 -7
  538. data/ext/ice/cpp/src/Slice/Ruby.cpp +5 -10
  539. data/ext/ice/cpp/src/Slice/RubyUtil.cpp +13 -15
  540. data/ext/ice/cpp/src/Slice/RubyUtil.h +1 -6
  541. data/ext/ice/cpp/src/Slice/Scanner.cpp +296 -217
  542. data/ext/ice/cpp/src/Slice/SliceUtil.cpp +2 -8
  543. data/ext/ice/cpp/src/Slice/StringLiteralUtil.cpp +109 -27
  544. data/ext/ice/cpp/src/Slice/Util.h +5 -9
  545. data/ext/ice/mcpp/Makefile +2 -5
  546. data/ice.gemspec +3 -5
  547. data/lib/Glacier2.rb +1 -6
  548. data/lib/Glacier2/Metrics.rb +3 -8
  549. data/lib/Glacier2/PermissionsVerifier.rb +3 -8
  550. data/lib/Glacier2/PermissionsVerifierF.rb +3 -8
  551. data/lib/Glacier2/Router.rb +3 -8
  552. data/lib/Glacier2/RouterF.rb +3 -8
  553. data/lib/Glacier2/SSLInfo.rb +3 -8
  554. data/lib/Glacier2/Session.rb +3 -8
  555. data/lib/Ice.rb +2 -7
  556. data/lib/Ice/BuiltinSequences.rb +3 -8
  557. data/lib/Ice/Communicator.rb +3 -8
  558. data/lib/Ice/CommunicatorF.rb +3 -8
  559. data/lib/Ice/Connection.rb +3 -8
  560. data/lib/Ice/ConnectionF.rb +3 -8
  561. data/lib/Ice/Current.rb +3 -8
  562. data/lib/Ice/Endpoint.rb +3 -8
  563. data/lib/Ice/EndpointF.rb +3 -8
  564. data/lib/Ice/EndpointTypes.rb +3 -8
  565. data/lib/Ice/FacetMap.rb +3 -8
  566. data/lib/Ice/Identity.rb +3 -8
  567. data/lib/Ice/ImplicitContext.rb +3 -8
  568. data/lib/Ice/ImplicitContextF.rb +3 -8
  569. data/lib/Ice/Instrumentation.rb +3 -8
  570. data/lib/Ice/InstrumentationF.rb +3 -8
  571. data/lib/Ice/LocalException.rb +3 -8
  572. data/lib/Ice/Locator.rb +3 -8
  573. data/lib/Ice/LocatorF.rb +3 -8
  574. data/lib/Ice/Logger.rb +3 -8
  575. data/lib/Ice/LoggerF.rb +3 -8
  576. data/lib/Ice/Metrics.rb +3 -8
  577. data/lib/Ice/ObjectAdapter.rb +3 -8
  578. data/lib/Ice/ObjectAdapterF.rb +3 -8
  579. data/lib/Ice/ObjectFactory.rb +3 -8
  580. data/lib/Ice/Plugin.rb +3 -8
  581. data/lib/Ice/PluginF.rb +3 -8
  582. data/lib/Ice/Process.rb +3 -8
  583. data/lib/Ice/ProcessF.rb +3 -8
  584. data/lib/Ice/Properties.rb +3 -8
  585. data/lib/Ice/PropertiesAdmin.rb +3 -8
  586. data/lib/Ice/PropertiesF.rb +3 -8
  587. data/lib/Ice/RemoteLogger.rb +3 -8
  588. data/lib/Ice/Router.rb +3 -8
  589. data/lib/Ice/RouterF.rb +3 -8
  590. data/lib/Ice/ServantLocator.rb +3 -8
  591. data/lib/Ice/ServantLocatorF.rb +3 -8
  592. data/lib/Ice/SliceChecksumDict.rb +3 -8
  593. data/lib/Ice/ValueFactory.rb +3 -8
  594. data/lib/Ice/Version.rb +3 -8
  595. data/lib/IceBox.rb +1 -6
  596. data/lib/IceBox/IceBox.rb +3 -8
  597. data/lib/IceGrid.rb +1 -6
  598. data/lib/IceGrid/Admin.rb +3 -8
  599. data/lib/IceGrid/Descriptor.rb +3 -8
  600. data/lib/IceGrid/Exception.rb +3 -8
  601. data/lib/IceGrid/FileParser.rb +3 -8
  602. data/lib/IceGrid/PluginFacade.rb +3 -8
  603. data/lib/IceGrid/Registry.rb +3 -8
  604. data/lib/IceGrid/Session.rb +3 -8
  605. data/lib/IceGrid/UserAccountMapper.rb +3 -8
  606. data/lib/IcePatch2.rb +1 -6
  607. data/lib/IcePatch2/FileInfo.rb +3 -8
  608. data/lib/IcePatch2/FileServer.rb +3 -8
  609. data/lib/IceStorm.rb +1 -6
  610. data/lib/IceStorm/IceStorm.rb +3 -8
  611. data/lib/IceStorm/Metrics.rb +3 -8
  612. data/slice/Glacier2/Metrics.ice +14 -8
  613. data/slice/Glacier2/PermissionsVerifier.ice +11 -7
  614. data/slice/Glacier2/PermissionsVerifierF.ice +11 -7
  615. data/slice/Glacier2/Router.ice +12 -8
  616. data/slice/Glacier2/RouterF.ice +11 -7
  617. data/slice/Glacier2/SSLInfo.ice +11 -7
  618. data/slice/Glacier2/Session.ice +11 -7
  619. data/slice/Ice/BuiltinSequences.ice +13 -7
  620. data/slice/Ice/Communicator.ice +143 -102
  621. data/slice/Ice/CommunicatorF.ice +13 -7
  622. data/slice/Ice/Connection.ice +65 -29
  623. data/slice/Ice/ConnectionF.ice +13 -7
  624. data/slice/Ice/Current.ice +31 -26
  625. data/slice/Ice/Endpoint.ice +24 -21
  626. data/slice/Ice/EndpointF.ice +14 -8
  627. data/slice/Ice/EndpointTypes.ice +15 -9
  628. data/slice/Ice/FacetMap.ice +14 -8
  629. data/slice/Ice/Identity.ice +13 -7
  630. data/slice/Ice/ImplicitContext.ice +31 -25
  631. data/slice/Ice/ImplicitContextF.ice +12 -7
  632. data/slice/Ice/Instrumentation.ice +19 -13
  633. data/slice/Ice/InstrumentationF.ice +13 -7
  634. data/slice/Ice/LocalException.ice +35 -29
  635. data/slice/Ice/Locator.ice +14 -8
  636. data/slice/Ice/LocatorF.ice +13 -7
  637. data/slice/Ice/Logger.ice +19 -13
  638. data/slice/Ice/LoggerF.ice +13 -7
  639. data/slice/Ice/Metrics.ice +26 -18
  640. data/slice/Ice/ObjectAdapter.ice +63 -45
  641. data/slice/Ice/ObjectAdapterF.ice +13 -7
  642. data/slice/Ice/ObjectFactory.ice +20 -12
  643. data/slice/Ice/Plugin.ice +19 -10
  644. data/slice/Ice/PluginF.ice +17 -7
  645. data/slice/Ice/Process.ice +13 -7
  646. data/slice/Ice/ProcessF.ice +13 -7
  647. data/slice/Ice/Properties.ice +35 -24
  648. data/slice/Ice/PropertiesAdmin.ice +13 -7
  649. data/slice/Ice/PropertiesF.ice +13 -7
  650. data/slice/Ice/RemoteLogger.ice +23 -28
  651. data/slice/Ice/Router.ice +14 -8
  652. data/slice/Ice/RouterF.ice +13 -7
  653. data/slice/Ice/ServantLocator.ice +31 -23
  654. data/slice/Ice/ServantLocatorF.ice +13 -7
  655. data/slice/Ice/SliceChecksumDict.ice +13 -7
  656. data/slice/Ice/ValueFactory.ice +31 -26
  657. data/slice/Ice/Version.ice +13 -7
  658. data/slice/IceBT/ConnectionInfo.ice +12 -7
  659. data/slice/IceBT/EndpointInfo.ice +13 -8
  660. data/slice/IceBT/Types.ice +12 -7
  661. data/slice/IceBox/IceBox.ice +30 -11
  662. data/slice/IceDiscovery/IceDiscovery.ice +68 -7
  663. data/slice/IceGrid/Admin.ice +41 -35
  664. data/slice/IceGrid/Descriptor.ice +15 -10
  665. data/slice/IceGrid/Exception.ice +15 -10
  666. data/slice/IceGrid/FileParser.ice +14 -8
  667. data/slice/IceGrid/PluginFacade.ice +17 -11
  668. data/slice/IceGrid/Registry.ice +13 -7
  669. data/slice/IceGrid/Session.ice +18 -12
  670. data/slice/IceGrid/UserAccountMapper.ice +16 -10
  671. data/slice/IceIAP/ConnectionInfo.ice +11 -8
  672. data/slice/IceIAP/EndpointInfo.ice +11 -8
  673. data/slice/IceLocatorDiscovery/IceLocatorDiscovery.ice +12 -7
  674. data/slice/IcePatch2/FileInfo.ice +12 -7
  675. data/slice/IcePatch2/FileServer.ice +13 -8
  676. data/slice/IceSSL/ConnectionInfo.ice +16 -9
  677. data/slice/IceSSL/ConnectionInfoF.ice +14 -8
  678. data/slice/IceSSL/EndpointInfo.ice +14 -8
  679. data/slice/IceStorm/IceStorm.ice +20 -15
  680. data/slice/IceStorm/Metrics.ice +12 -8
  681. metadata +7 -13
  682. data/BZIP2_LICENSE +0 -42
  683. data/ext/ice/bzip2/blocksort.c +0 -1094
  684. data/ext/ice/bzip2/bzlib.c +0 -1572
  685. data/ext/ice/bzip2/bzlib.h +0 -282
  686. data/ext/ice/bzip2/bzlib_private.h +0 -509
  687. data/ext/ice/bzip2/compress.c +0 -672
  688. data/ext/ice/bzip2/crctable.c +0 -104
  689. data/ext/ice/bzip2/decompress.c +0 -646
  690. data/ext/ice/bzip2/huffman.c +0 -205
  691. data/ext/ice/bzip2/randtable.c +0 -84
@@ -1,11 +1,6 @@
1
- // **********************************************************************
2
1
  //
3
- // Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
2
+ // Copyright (c) ZeroC, Inc. All rights reserved.
4
3
  //
5
- // This copy of Ice is licensed to you under the terms described in the
6
- // ICE_LICENSE file included in this distribution.
7
- //
8
- // **********************************************************************
9
4
 
10
5
  #ifndef JAVA_UTIL_H
11
6
  #define JAVA_UTIL_H
@@ -98,7 +93,7 @@ protected:
98
93
  const std::string& = std::string()) const;
99
94
 
100
95
  //
101
- // Returns the package prefix for a give Slice file.
96
+ // Returns the package prefix of a Contained entity.
102
97
  //
103
98
  std::string getPackagePrefix(const ContainedPtr&) const;
104
99
 
@@ -107,12 +102,13 @@ protected:
107
102
  //
108
103
  std::string getPackage(const ContainedPtr&) const;
109
104
 
105
+ std::string getUnqualified(const std::string&, const std::string&) const;
110
106
  //
111
107
  // Returns the Java name for a Contained entity. If the optional
112
108
  // package argument matches the entity's package name, then the
113
109
  // package is removed from the result.
114
110
  //
115
- std::string getAbsolute(const ContainedPtr&,
111
+ std::string getUnqualified(const ContainedPtr&,
116
112
  const std::string& = std::string(),
117
113
  const std::string& = std::string(),
118
114
  const std::string& = std::string()) const;
@@ -222,7 +218,6 @@ private:
222
218
 
223
219
  std::string _dir;
224
220
  ::IceUtilInternal::Output* _out;
225
- mutable std::map<std::string, std::string> _filePackagePrefix;
226
221
  };
227
222
 
228
223
  class JavaGenerator : private ::IceUtil::noncopyable
@@ -264,7 +259,7 @@ protected:
264
259
  const std::string& = std::string()) const;
265
260
 
266
261
  //
267
- // Returns the package prefix for a give Slice file.
262
+ // Returns the package prefix of a Contained entity.
268
263
  //
269
264
  std::string getPackagePrefix(const ContainedPtr&) const;
270
265
 
@@ -273,12 +268,18 @@ protected:
273
268
  //
274
269
  std::string getPackage(const ContainedPtr&) const;
275
270
 
271
+ //
272
+ // Returns the Java type without a package if the package
273
+ // matches the current package
274
+ //
275
+ std::string getUnqualified(const std::string&, const std::string&) const;
276
+
276
277
  //
277
278
  // Returns the Java name for a Contained entity. If the optional
278
279
  // package argument matches the entity's package name, then the
279
280
  // package is removed from the result.
280
281
  //
281
- std::string getAbsolute(const ContainedPtr&,
282
+ std::string getUnqualified(const ContainedPtr&,
282
283
  const std::string& = std::string(),
283
284
  const std::string& = std::string(),
284
285
  const std::string& = std::string()) const;
@@ -390,7 +391,6 @@ private:
390
391
 
391
392
  std::string _dir;
392
393
  ::IceUtilInternal::Output* _out;
393
- mutable std::map<std::string, std::string> _filePackagePrefix;
394
394
  };
395
395
 
396
396
  }
@@ -1,11 +1,6 @@
1
- // **********************************************************************
2
1
  //
3
- // Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
2
+ // Copyright (c) ZeroC, Inc. All rights reserved.
4
3
  //
5
- // This copy of Ice is licensed to you under the terms described in the
6
- // ICE_LICENSE file included in this distribution.
7
- //
8
- // **********************************************************************
9
4
 
10
5
  #include <Slice/MD5.h>
11
6
  #include <Slice/MD5I.h>
@@ -1,11 +1,6 @@
1
- // **********************************************************************
2
1
  //
3
- // Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
2
+ // Copyright (c) ZeroC, Inc. All rights reserved.
4
3
  //
5
- // This copy of Ice is licensed to you under the terms described in the
6
- // ICE_LICENSE file included in this distribution.
7
- //
8
- // **********************************************************************
9
4
 
10
5
  #ifndef SLICE_MD5_H
11
6
  #define SLICE_MD5_H
@@ -58,6 +58,14 @@
58
58
  # pragma GCC diagnostic ignored "-Wold-style-cast"
59
59
  #endif
60
60
 
61
+ //
62
+ // Avoid clang conversion warnings
63
+ //
64
+ #if defined(__clang__)
65
+ # pragma clang diagnostic ignored "-Wconversion"
66
+ # pragma clang diagnostic ignored "-Wsign-conversion"
67
+ #endif
68
+
61
69
  #undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */
62
70
  #ifdef ARCH_IS_BIG_ENDIAN
63
71
  # define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1)
@@ -1,11 +1,6 @@
1
- // **********************************************************************
2
1
  //
3
- // Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
2
+ // Copyright (c) ZeroC, Inc. All rights reserved.
4
3
  //
5
- // This copy of Ice is licensed to you under the terms described in the
6
- // ICE_LICENSE file included in this distribution.
7
- //
8
- // **********************************************************************
9
4
 
10
5
  #include <Slice/PHPUtil.h>
11
6
  #include <functional>
@@ -19,7 +14,12 @@ static string
19
14
  lowerCase(const string& s)
20
15
  {
21
16
  string result(s);
17
+ #ifdef ICE_CPP11_COMPILER
18
+ transform(result.begin(), result.end(), result.begin(),
19
+ [](char c){ return static_cast<char>(::tolower(static_cast<unsigned char>(c))); });
20
+ #else
22
21
  transform(result.begin(), result.end(), result.begin(), ::tolower);
22
+ #endif
23
23
  return result;
24
24
  }
25
25
 
@@ -1,11 +1,6 @@
1
- // **********************************************************************
2
1
  //
3
- // Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
2
+ // Copyright (c) ZeroC, Inc. All rights reserved.
4
3
  //
5
- // This copy of Ice is licensed to you under the terms described in the
6
- // ICE_LICENSE file included in this distribution.
7
- //
8
- // **********************************************************************
9
4
 
10
5
  #ifndef SLICE_PHP_UTIL_H
11
6
  #define SLICE_PHP_UTIL_H
@@ -1,11 +1,6 @@
1
- // **********************************************************************
2
1
  //
3
- // Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
2
+ // Copyright (c) ZeroC, Inc. All rights reserved.
4
3
  //
5
- // This copy of Ice is licensed to you under the terms described in the
6
- // ICE_LICENSE file included in this distribution.
7
- //
8
- // **********************************************************************
9
4
 
10
5
  #include <IceUtil/Functional.h>
11
6
  #include <IceUtil/InputUtil.h>
@@ -16,16 +11,64 @@
16
11
  #include <cstring>
17
12
  #include <iterator>
18
13
 
19
- #ifdef _WIN32
20
- # include <io.h>
14
+ // TODO: fix this warning once we no longer support VS2013 and earlier
15
+ #if defined(_MSC_VER) && (_MSC_VER >= 1900)
16
+ # pragma warning(disable:4589) // Constructor of abstract class 'Slice::Type' ignores initializer...
21
17
  #endif
22
18
 
23
19
  using namespace std;
24
20
  using namespace Slice;
25
21
 
22
+ Slice::CompilerException::CompilerException(const char* file, int line, const string& r) :
23
+ IceUtil::Exception(file, line),
24
+ _reason(r)
25
+ {
26
+ }
27
+
28
+ #ifndef ICE_CPP11_COMPILER
29
+ Slice::CompilerException::~CompilerException() throw()
30
+ {
31
+ }
32
+ #endif
33
+
34
+ string
35
+ Slice::CompilerException::ice_id() const
36
+ {
37
+ return "::Slice::CompilerException";
38
+ }
39
+
40
+ void
41
+ Slice::CompilerException::ice_print(ostream& out) const
42
+ {
43
+ IceUtil::Exception::ice_print(out);
44
+ out << ": " << _reason;
45
+ }
46
+
47
+ #ifndef ICE_CPP11_MAPPING
48
+ Slice::CompilerException*
49
+ Slice::CompilerException::ice_clone() const
50
+ {
51
+ return new CompilerException(*this);
52
+ }
53
+ #endif
54
+
55
+ void
56
+ Slice::CompilerException::ice_throw() const
57
+ {
58
+ throw *this;
59
+ }
60
+
61
+ string
62
+ Slice::CompilerException::reason() const
63
+ {
64
+ return _reason;
65
+ }
66
+
26
67
  extern FILE* slice_in;
27
68
  extern int slice_debug;
28
69
 
70
+ int slice_parse();
71
+
29
72
  //
30
73
  // Operation attributes
31
74
  //
@@ -114,18 +157,18 @@ isMutableAfterReturnType(const TypePtr& type)
114
157
  }
115
158
 
116
159
  void
117
- checkDeprecatedType(const UnitPtr& unit, const TypePtr& type)
160
+ checkDeprecatedType(const UnitPtr& unt, const TypePtr& type)
118
161
  {
119
162
  ClassDeclPtr decl = ClassDeclPtr::dynamicCast(type);
120
163
  if(decl && !decl->isLocal() && decl->isInterface())
121
164
  {
122
- unit->warning(Deprecated, "interface by value is deprecated");
165
+ unt->warning(Deprecated, "interface by value is deprecated");
123
166
  }
124
167
 
125
168
  ProxyPtr proxy = ProxyPtr::dynamicCast(type);
126
169
  if(proxy && !proxy->_class()->isInterface())
127
170
  {
128
- unit->warning(Deprecated, "proxy for a class is deprecated");
171
+ unt->warning(Deprecated, "proxy for a class is deprecated");
129
172
  }
130
173
  }
131
174
 
@@ -229,6 +272,20 @@ Slice::DefinitionContext::warning(WarningCategory category, const string& file,
229
272
  }
230
273
  }
231
274
 
275
+ void
276
+ Slice::DefinitionContext::error(const string& file, int line, const string& msg) const
277
+ {
278
+ emitError(file, line, msg);
279
+ throw CompilerException(__FILE__, __LINE__, msg);
280
+ }
281
+
282
+ void
283
+ Slice::DefinitionContext::error(const string& file, const string& line, const string& msg) const
284
+ {
285
+ emitError(file, line, msg);
286
+ throw CompilerException(__FILE__, __LINE__, msg);
287
+ }
288
+
232
289
  bool
233
290
  Slice::DefinitionContext::suppressWarning(WarningCategory category) const
234
291
  {
@@ -272,13 +329,69 @@ Slice::DefinitionContext::initSuppressedWarnings()
272
329
  else
273
330
  {
274
331
  warning(InvalidMetaData, "", "", string("invalid category `") + s +
275
- "' in global metadata suppress-warning");
332
+ "' in file metadata suppress-warning");
276
333
  }
277
334
  }
278
335
  }
279
336
  }
280
337
  }
281
338
 
339
+ // ----------------------------------------------------------------------
340
+ // Comment
341
+ // ----------------------------------------------------------------------
342
+
343
+ bool
344
+ Slice::Comment::isDeprecated() const
345
+ {
346
+ return _isDeprecated;
347
+ }
348
+
349
+ StringList
350
+ Slice::Comment::deprecated() const
351
+ {
352
+ return _deprecated;
353
+ }
354
+
355
+ StringList
356
+ Slice::Comment::overview() const
357
+ {
358
+ return _overview;
359
+ }
360
+
361
+ StringList
362
+ Slice::Comment::misc() const
363
+ {
364
+ return _misc;
365
+ }
366
+
367
+ StringList
368
+ Slice::Comment::seeAlso() const
369
+ {
370
+ return _seeAlso;
371
+ }
372
+
373
+ StringList
374
+ Slice::Comment::returns() const
375
+ {
376
+ return _returns;
377
+ }
378
+
379
+ map<string, StringList>
380
+ Slice::Comment::parameters() const
381
+ {
382
+ return _parameters;
383
+ }
384
+
385
+ map<string, StringList>
386
+ Slice::Comment::exceptions() const
387
+ {
388
+ return _exceptions;
389
+ }
390
+
391
+ Slice::Comment::Comment()
392
+ {
393
+ }
394
+
282
395
  // ----------------------------------------------------------------------
283
396
  // SyntaxTreeBase
284
397
  // ----------------------------------------------------------------------
@@ -306,12 +419,13 @@ Slice::SyntaxTreeBase::visit(ParserVisitor*, bool)
306
419
  {
307
420
  }
308
421
 
309
- Slice::SyntaxTreeBase::SyntaxTreeBase(const UnitPtr& unit) :
310
- _unit(unit)
422
+ Slice::SyntaxTreeBase::SyntaxTreeBase(const UnitPtr& unt, const DefinitionContextPtr& definitionContext) :
423
+ _unit(unt),
424
+ _definitionContext(definitionContext)
311
425
  {
312
- if(_unit)
426
+ if(!_definitionContext && _unit)
313
427
  {
314
- _definitionContext = unit->currentDefinitionContext();
428
+ _definitionContext = unt->currentDefinitionContext();
315
429
  }
316
430
  }
317
431
 
@@ -319,8 +433,8 @@ Slice::SyntaxTreeBase::SyntaxTreeBase(const UnitPtr& unit) :
319
433
  // Type
320
434
  // ----------------------------------------------------------------------
321
435
 
322
- Slice::Type::Type(const UnitPtr& unit) :
323
- SyntaxTreeBase(unit)
436
+ Slice::Type::Type(const UnitPtr& unt) :
437
+ SyntaxTreeBase(unt)
324
438
  {
325
439
  }
326
440
 
@@ -425,6 +539,7 @@ Slice::Builtin::minWireSize() const
425
539
  1, // KindString: at least one byte for an empty string.
426
540
  1, // KindObject: at least one byte (to marshal an index instead of an instance).
427
541
  2, // KindObjectProxy: at least an empty identity for a nil proxy, that is, 2 bytes.
542
+ 0, // KindLocalObject: unused
428
543
  1 // KindValue: at least one byte (to marshal an index instead of an instance).
429
544
  };
430
545
 
@@ -466,9 +581,9 @@ const char* Slice::Builtin::builtinTable[] =
466
581
  "Value"
467
582
  };
468
583
 
469
- Slice::Builtin::Builtin(const UnitPtr& unit, Kind kind) :
470
- SyntaxTreeBase(unit),
471
- Type(unit),
584
+ Slice::Builtin::Builtin(const UnitPtr& ut, Kind kind) :
585
+ SyntaxTreeBase(ut),
586
+ Type(ut),
472
587
  _kind(kind)
473
588
  {
474
589
  //
@@ -538,6 +653,330 @@ Slice::Contained::comment() const
538
653
  return _comment;
539
654
  }
540
655
 
656
+ namespace
657
+ {
658
+
659
+ void
660
+ trimLines(StringList& l)
661
+ {
662
+ //
663
+ // Remove empty trailing lines.
664
+ //
665
+ while(!l.empty() && l.back().empty())
666
+ {
667
+ l.pop_back();
668
+ }
669
+ }
670
+
671
+ StringList
672
+ splitComment(const string& c, bool stripMarkup)
673
+ {
674
+ string comment = c;
675
+
676
+ if(stripMarkup)
677
+ {
678
+ //
679
+ // Strip HTML markup and javadoc links.
680
+ //
681
+ string::size_type pos = 0;
682
+ do
683
+ {
684
+ pos = comment.find('<', pos);
685
+ if(pos != string::npos)
686
+ {
687
+ string::size_type endpos = comment.find('>', pos);
688
+ if(endpos == string::npos)
689
+ {
690
+ break;
691
+ }
692
+ comment.erase(pos, endpos - pos + 1);
693
+ }
694
+ }
695
+ while(pos != string::npos);
696
+
697
+ const string link = "{@link";
698
+ pos = 0;
699
+ do
700
+ {
701
+ pos = comment.find(link, pos);
702
+ if(pos != string::npos)
703
+ {
704
+ comment.erase(pos, link.size() + 1); // Erase trailing white space too.
705
+ string::size_type endpos = comment.find('}', pos);
706
+ if(endpos != string::npos)
707
+ {
708
+ string ident = comment.substr(pos, endpos - pos);
709
+ comment.erase(pos, endpos - pos + 1);
710
+
711
+ //
712
+ // Replace links of the form {@link Type#member} with "Type.member".
713
+ //
714
+ string::size_type hash = ident.find('#');
715
+ string rest;
716
+ if(hash != string::npos)
717
+ {
718
+ rest = ident.substr(hash + 1);
719
+ ident = ident.substr(0, hash);
720
+ if(!ident.empty())
721
+ {
722
+ if(!rest.empty())
723
+ {
724
+ ident += "." + rest;
725
+ }
726
+ }
727
+ else if(!rest.empty())
728
+ {
729
+ ident = rest;
730
+ }
731
+ }
732
+
733
+ comment.insert(pos, ident);
734
+ }
735
+ }
736
+ }
737
+ while(pos != string::npos);
738
+ }
739
+
740
+ StringList result;
741
+
742
+ string::size_type pos = 0;
743
+ string::size_type nextPos;
744
+ while((nextPos = comment.find_first_of('\n', pos)) != string::npos)
745
+ {
746
+ result.push_back(IceUtilInternal::trim(string(comment, pos, nextPos - pos)));
747
+ pos = nextPos + 1;
748
+ }
749
+ string lastLine = IceUtilInternal::trim(string(comment, pos));
750
+ if(!lastLine.empty())
751
+ {
752
+ result.push_back(lastLine);
753
+ }
754
+
755
+ trimLines(result);
756
+
757
+ return result;
758
+ }
759
+
760
+ bool
761
+ parseCommentLine(const string& l, const string& tag, bool namedTag, string& name, string& doc)
762
+ {
763
+ doc.clear();
764
+
765
+ if(l.find(tag) == 0)
766
+ {
767
+ const string ws = " \t";
768
+
769
+ if(namedTag)
770
+ {
771
+ string::size_type n = l.find_first_not_of(ws, tag.size());
772
+ if(n == string::npos)
773
+ {
774
+ return false; // Malformed line, ignore it.
775
+ }
776
+ string::size_type end = l.find_first_of(ws, n);
777
+ if(end == string::npos)
778
+ {
779
+ return false; // Malformed line, ignore it.
780
+ }
781
+ name = l.substr(n, end - n);
782
+ n = l.find_first_not_of(ws, end);
783
+ if(n != string::npos)
784
+ {
785
+ doc = l.substr(n);
786
+ }
787
+ }
788
+ else
789
+ {
790
+ name.clear();
791
+
792
+ string::size_type n = l.find_first_not_of(ws, tag.size());
793
+ if(n == string::npos)
794
+ {
795
+ return false; // Malformed line, ignore it.
796
+ }
797
+ doc = l.substr(n);
798
+ }
799
+
800
+ return true;
801
+ }
802
+
803
+ return false;
804
+ }
805
+
806
+ }
807
+
808
+ CommentPtr
809
+ Slice::Contained::parseComment(bool stripMarkup) const
810
+ {
811
+ CommentPtr comment = new Comment;
812
+
813
+ comment->_isDeprecated = false;
814
+
815
+ //
816
+ // First check metadata for a deprecated tag.
817
+ //
818
+ string deprecateMetadata;
819
+ if(findMetaData("deprecate", deprecateMetadata))
820
+ {
821
+ comment->_isDeprecated = true;
822
+ if(deprecateMetadata.find("deprecate:") == 0 && deprecateMetadata.size() > 10)
823
+ {
824
+ comment->_deprecated.push_back(IceUtilInternal::trim(deprecateMetadata.substr(10)));
825
+ }
826
+ }
827
+
828
+ if(!comment->_isDeprecated && _comment.empty())
829
+ {
830
+ return 0;
831
+ }
832
+
833
+ //
834
+ // Split up the comment into lines.
835
+ //
836
+ StringList lines = splitComment(_comment, stripMarkup);
837
+
838
+ StringList::const_iterator i;
839
+ for(i = lines.begin(); i != lines.end(); ++i)
840
+ {
841
+ const string l = *i;
842
+ if(l[0] == '@')
843
+ {
844
+ break;
845
+ }
846
+ comment->_overview.push_back(l);
847
+ }
848
+
849
+ enum State { StateMisc, StateParam, StateThrows, StateReturn, StateDeprecated };
850
+ State state = StateMisc;
851
+ string name;
852
+ const string ws = " \t";
853
+ const string paramTag = "@param";
854
+ const string throwsTag = "@throws";
855
+ const string exceptionTag = "@exception";
856
+ const string returnTag = "@return";
857
+ const string deprecatedTag = "@deprecated";
858
+ const string seeTag = "@see";
859
+ for(; i != lines.end(); ++i)
860
+ {
861
+ const string l = IceUtilInternal::trim(*i);
862
+ string line;
863
+ if(parseCommentLine(l, paramTag, true, name, line))
864
+ {
865
+ if(!line.empty())
866
+ {
867
+ state = StateParam;
868
+ StringList sl;
869
+ sl.push_back(line); // The first line of the description.
870
+ comment->_parameters[name] = sl;
871
+ }
872
+ }
873
+ else if(parseCommentLine(l, throwsTag, true, name, line))
874
+ {
875
+ if(!line.empty())
876
+ {
877
+ state = StateThrows;
878
+ StringList sl;
879
+ sl.push_back(line); // The first line of the description.
880
+ comment->_exceptions[name] = sl;
881
+ }
882
+ }
883
+ else if(parseCommentLine(l, exceptionTag, true, name, line))
884
+ {
885
+ if(!line.empty())
886
+ {
887
+ state = StateThrows;
888
+ StringList sl;
889
+ sl.push_back(line); // The first line of the description.
890
+ comment->_exceptions[name] = sl;
891
+ }
892
+ }
893
+ else if(parseCommentLine(l, seeTag, false, name, line))
894
+ {
895
+ if(!line.empty())
896
+ {
897
+ comment->_seeAlso.push_back(line);
898
+ }
899
+ }
900
+ else if(parseCommentLine(l, returnTag, false, name, line))
901
+ {
902
+ if(!line.empty())
903
+ {
904
+ state = StateReturn;
905
+ comment->_returns.push_back(line); // The first line of the description.
906
+ }
907
+ }
908
+ else if(parseCommentLine(l, deprecatedTag, false, name, line))
909
+ {
910
+ comment->_isDeprecated = true;
911
+ if(!line.empty())
912
+ {
913
+ state = StateDeprecated;
914
+ comment->_deprecated.push_back(line); // The first line of the description.
915
+ }
916
+ }
917
+ else if(!l.empty())
918
+ {
919
+ if(l[0] == '@')
920
+ {
921
+ //
922
+ // Treat all other tags as miscellaneous comments.
923
+ //
924
+ state = StateMisc;
925
+ }
926
+
927
+ switch(state)
928
+ {
929
+ case StateMisc:
930
+ {
931
+ comment->_misc.push_back(l);
932
+ break;
933
+ }
934
+ case StateParam:
935
+ {
936
+ assert(!name.empty());
937
+ StringList sl;
938
+ if(comment->_parameters.find(name) != comment->_parameters.end())
939
+ {
940
+ sl = comment->_parameters[name];
941
+ }
942
+ sl.push_back(l);
943
+ comment->_parameters[name] = sl;
944
+ break;
945
+ }
946
+ case StateThrows:
947
+ {
948
+ assert(!name.empty());
949
+ StringList sl;
950
+ if(comment->_exceptions.find(name) != comment->_exceptions.end())
951
+ {
952
+ sl = comment->_exceptions[name];
953
+ }
954
+ sl.push_back(l);
955
+ comment->_exceptions[name] = sl;
956
+ break;
957
+ }
958
+ case StateReturn:
959
+ {
960
+ comment->_returns.push_back(l);
961
+ break;
962
+ }
963
+ case StateDeprecated:
964
+ {
965
+ comment->_deprecated.push_back(l);
966
+ break;
967
+ }
968
+ }
969
+ }
970
+ }
971
+
972
+ trimLines(comment->_overview);
973
+ trimLines(comment->_deprecated);
974
+ trimLines(comment->_misc);
975
+ trimLines(comment->_returns);
976
+
977
+ return comment;
978
+ }
979
+
541
980
  int
542
981
  Slice::Contained::includeLevel() const
543
982
  {
@@ -677,7 +1116,6 @@ Slice::Container::destroy()
677
1116
  ModulePtr
678
1117
  Slice::Container::createModule(const string& name)
679
1118
  {
680
- checkIdentifier(name);
681
1119
  ContainedList matches = _unit->findContents(thisScope() + name);
682
1120
  matches.sort(); // Modules can occur many times...
683
1121
  matches.unique(); // ... but we only want one instance of each.
@@ -730,8 +1168,6 @@ Slice::Container::createModule(const string& name)
730
1168
  ClassDefPtr
731
1169
  Slice::Container::createClassDef(const string& name, int id, bool intf, const ClassList& bases, bool local)
732
1170
  {
733
- checkIdentifier(name);
734
-
735
1171
  ContainedList matches = _unit->findContents(thisScope() + name);
736
1172
  for(ContainedList::const_iterator p = matches.begin(); p != matches.end(); ++p)
737
1173
  {
@@ -812,20 +1248,15 @@ Slice::Container::createClassDef(const string& name, int id, bool intf, const Cl
812
1248
  // definition. This way the code generator can rely on always
813
1249
  // having a class declaration available for lookup.
814
1250
  //
815
- ClassDeclPtr decl = createClassDecl(name, intf, local, false);
1251
+ ClassDeclPtr decl = createClassDecl(name, intf, local);
816
1252
  def->_declaration = decl;
817
1253
 
818
1254
  return def;
819
1255
  }
820
1256
 
821
1257
  ClassDeclPtr
822
- Slice::Container::createClassDecl(const string& name, bool intf, bool local, bool checkName)
1258
+ Slice::Container::createClassDecl(const string& name, bool intf, bool local)
823
1259
  {
824
- if (checkName)
825
- {
826
- checkIdentifier(name);
827
- }
828
-
829
1260
  ClassDefPtr def;
830
1261
 
831
1262
  ContainedList matches = _unit->findContents(thisScope() + name);
@@ -915,8 +1346,6 @@ Slice::Container::createClassDecl(const string& name, bool intf, bool local, boo
915
1346
  ExceptionPtr
916
1347
  Slice::Container::createException(const string& name, const ExceptionPtr& base, bool local, NodeType nt)
917
1348
  {
918
- checkIdentifier(name);
919
-
920
1349
  ContainedList matches = _unit->findContents(thisScope() + name);
921
1350
  if(!matches.empty())
922
1351
  {
@@ -967,8 +1396,6 @@ Slice::Container::createException(const string& name, const ExceptionPtr& base,
967
1396
  StructPtr
968
1397
  Slice::Container::createStruct(const string& name, bool local, NodeType nt)
969
1398
  {
970
- checkIdentifier(name);
971
-
972
1399
  ContainedList matches = _unit->findContents(thisScope() + name);
973
1400
  if(!matches.empty())
974
1401
  {
@@ -1012,8 +1439,6 @@ SequencePtr
1012
1439
  Slice::Container::createSequence(const string& name, const TypePtr& type, const StringList& metaData, bool local,
1013
1440
  NodeType nt)
1014
1441
  {
1015
- checkIdentifier(name);
1016
-
1017
1442
  ContainedList matches = _unit->findContents(thisScope() + name);
1018
1443
  if(!matches.empty())
1019
1444
  {
@@ -1069,8 +1494,6 @@ Slice::Container::createDictionary(const string& name, const TypePtr& keyType, c
1069
1494
  const TypePtr& valueType, const StringList& valueMetaData, bool local,
1070
1495
  NodeType nt)
1071
1496
  {
1072
- checkIdentifier(name);
1073
-
1074
1497
  ContainedList matches = _unit->findContents(thisScope() + name);
1075
1498
  if(!matches.empty())
1076
1499
  {
@@ -1143,8 +1566,6 @@ Slice::Container::createDictionary(const string& name, const TypePtr& keyType, c
1143
1566
  EnumPtr
1144
1567
  Slice::Container::createEnum(const string& name, bool local, NodeType nt)
1145
1568
  {
1146
- checkIdentifier(name);
1147
-
1148
1569
  ContainedList matches = _unit->findContents(thisScope() + name);
1149
1570
  if(!matches.empty())
1150
1571
  {
@@ -1213,8 +1634,6 @@ Slice::Container::createConst(const string name, const TypePtr& constType, const
1213
1634
  const SyntaxTreeBasePtr& valueType, const string& value, const string& literal,
1214
1635
  NodeType nt)
1215
1636
  {
1216
- checkIdentifier(name);
1217
-
1218
1637
  ContainedList matches = _unit->findContents(thisScope() + name);
1219
1638
  if(!matches.empty())
1220
1639
  {
@@ -1710,10 +2129,10 @@ Slice::Container::enumerators(const string& scoped) const
1710
2129
  string name = scoped.substr(lastColon + 1);
1711
2130
  for(EnumList::iterator p = enums.begin(); p != enums.end(); ++p)
1712
2131
  {
1713
- ContainedList cl = (*p)->lookupContained(name, false);
1714
- if(!cl.empty())
2132
+ ContainedList cl2 = (*p)->lookupContained(name, false);
2133
+ if(!cl2.empty())
1715
2134
  {
1716
- result.push_back(EnumeratorPtr::dynamicCast(cl.front()));
2135
+ result.push_back(EnumeratorPtr::dynamicCast(cl2.front()));
1717
2136
  }
1718
2137
  }
1719
2138
  }
@@ -2081,18 +2500,39 @@ Slice::Container::hasOnlyClassDecls() const
2081
2500
  }
2082
2501
 
2083
2502
  bool
2084
- Slice::Container::hasAbstractClassDefs() const
2503
+ Slice::Container::hasOperations() const
2504
+ {
2505
+ for(ContainedList::const_iterator p = _contents.begin(); p != _contents.end(); ++p)
2506
+ {
2507
+ ClassDefPtr cl = ClassDefPtr::dynamicCast(*p);
2508
+ if(cl && cl->hasOperations())
2509
+ {
2510
+ return true;
2511
+ }
2512
+
2513
+ ContainerPtr container = ContainerPtr::dynamicCast(*p);
2514
+ if(container && container->hasOperations())
2515
+ {
2516
+ return true;
2517
+ }
2518
+ }
2519
+
2520
+ return false;
2521
+ }
2522
+
2523
+ bool
2524
+ Slice::Container::hasNonLocalAbstractClassDefs() const
2085
2525
  {
2086
2526
  for(ContainedList::const_iterator p = _contents.begin(); p != _contents.end(); ++p)
2087
2527
  {
2088
2528
  ClassDefPtr cl = ClassDefPtr::dynamicCast(*p);
2089
- if(cl && cl->isAbstract())
2529
+ if(cl && cl->isAbstract() && !cl->isLocal())
2090
2530
  {
2091
2531
  return true;
2092
2532
  }
2093
2533
 
2094
2534
  ContainerPtr container = ContainerPtr::dynamicCast(*p);
2095
- if(container && container->hasAbstractClassDefs())
2535
+ if(container && container->hasNonLocalAbstractClassDefs())
2096
2536
  {
2097
2537
  return true;
2098
2538
  }
@@ -2276,7 +2716,7 @@ Slice::Container::mergeModules()
2276
2716
  }
2277
2717
 
2278
2718
  //
2279
- // Compare the global metadata of the two modules being merged.
2719
+ // Compare the file metadata of the two modules being merged.
2280
2720
  //
2281
2721
  DefinitionContextPtr dc2 = mod2->definitionContext();
2282
2722
  assert(dc2);
@@ -2285,7 +2725,7 @@ Slice::Container::mergeModules()
2285
2725
  metaData2.unique();
2286
2726
  if(!checkGlobalMetaData(metaData1, metaData2))
2287
2727
  {
2288
- unit()->warning(All, "global metadata mismatch for module `" + mod1->name() + "' in files " +
2728
+ unit()->warning(All, "file metadata mismatch for module `" + mod1->name() + "' in files " +
2289
2729
  dc1->filename() + " and " + dc2->filename());
2290
2730
  }
2291
2731
 
@@ -2559,74 +2999,6 @@ Slice::Container::Container(const UnitPtr& unit) :
2559
2999
  {
2560
3000
  }
2561
3001
 
2562
- void
2563
- Slice::Container::checkIdentifier(const string& name) const
2564
- {
2565
- //
2566
- // Weed out identifiers with reserved suffixes.
2567
- //
2568
- static const string suffixBlacklist[] = { "Helper", "Holder", "Prx", "Ptr" };
2569
- for(size_t i = 0; i < sizeof(suffixBlacklist) / sizeof(*suffixBlacklist); ++i)
2570
- {
2571
- if(name.find(suffixBlacklist[i], name.size() - suffixBlacklist[i].size()) != string::npos)
2572
- {
2573
- _unit->error("illegal identifier `" + name + "': `" + suffixBlacklist[i] + "' suffix is reserved");
2574
- }
2575
- }
2576
-
2577
- //
2578
- // Check for illegal underscores.
2579
- //
2580
- if(name.find('_') == 0)
2581
- {
2582
- _unit->error("illegal leading underscore in identifier `" + name + "'");
2583
- }
2584
- else if(name.rfind('_') == name.size() - 1)
2585
- {
2586
- _unit->error("illegal trailing underscore in identifier `" + name + "'");
2587
- }
2588
- else if(name.find("__") != string::npos)
2589
- {
2590
- _unit->error("illegal double underscore in identifier `" + name + "'");
2591
- }
2592
- else if(_unit->currentIncludeLevel() == 0 && !_unit->allowUnderscore() && name.find('_') != string::npos)
2593
- {
2594
- //
2595
- // For rules controlled by a translator option, we don't complain about included files.
2596
- //
2597
-
2598
- DefinitionContextPtr dc = _unit->currentDefinitionContext();
2599
- assert(dc);
2600
- if(dc->findMetaData("underscore") != "underscore") // no "underscore" global metadata
2601
- {
2602
- _unit->error("illegal underscore in identifier `" + name + "'");
2603
- }
2604
- }
2605
-
2606
- //
2607
- // For rules controlled by a translator option, we don't complain about included files.
2608
- //
2609
- if(_unit->currentIncludeLevel() == 0 && !_unit->allowIcePrefix())
2610
- {
2611
- DefinitionContextPtr dc = _unit->currentDefinitionContext();
2612
- assert(dc);
2613
- if(dc->findMetaData("ice-prefix") != "ice-prefix") // no "ice-prefix" global metadata
2614
- {
2615
- if(name.size() >= 3)
2616
- {
2617
- string prefix3;
2618
- prefix3 += ::tolower(static_cast<unsigned char>(name[0]));
2619
- prefix3 += ::tolower(static_cast<unsigned char>(name[1]));
2620
- prefix3 += ::tolower(static_cast<unsigned char>(name[2]));
2621
- if(prefix3 == "ice")
2622
- {
2623
- _unit->error("illegal identifier `" + name + "': `" + name.substr(0, 3) + "' prefix is reserved");
2624
- }
2625
- }
2626
- }
2627
- }
2628
- }
2629
-
2630
3002
  bool
2631
3003
  Slice::Container::checkInterfaceAndLocal(const string& name, bool defined,
2632
3004
  bool intf, bool intfOther,
@@ -2693,7 +3065,7 @@ bool
2693
3065
  Slice::Container::checkGlobalMetaData(const StringList& m1, const StringList& m2)
2694
3066
  {
2695
3067
  //
2696
- // Not all global metadata mismatches represent actual problems. We are only concerned about
3068
+ // Not all file metadata mismatches represent actual problems. We are only concerned about
2697
3069
  // the prefixes listed below (also see bug 2766).
2698
3070
  //
2699
3071
  static const char* prefixes[] =
@@ -3014,8 +3386,6 @@ Slice::Container::validateConstant(const string& name, const TypePtr& type, Synt
3014
3386
  EnumeratorPtr
3015
3387
  Slice::Container::validateEnumerator(const string& name)
3016
3388
  {
3017
- checkIdentifier(name);
3018
-
3019
3389
  ContainedList matches = _unit->findContents(thisScope() + name);
3020
3390
  if(!matches.empty())
3021
3391
  {
@@ -3214,7 +3584,7 @@ Slice::ClassDecl::recDependencies(set<ConstructedPtr>& dependencies)
3214
3584
 
3215
3585
  void
3216
3586
  Slice::ClassDecl::checkBasesAreLegal(const string& name, bool intf, bool local, const ClassList& bases,
3217
- const UnitPtr& unit)
3587
+ const UnitPtr& ut)
3218
3588
  {
3219
3589
  //
3220
3590
  // Local definitions cannot have non-local bases, and vice versa.
@@ -3227,7 +3597,7 @@ Slice::ClassDecl::checkBasesAreLegal(const string& name, bool intf, bool local,
3227
3597
  msg << (local ? "local" : "non-local") << " " << (intf ? "interface" : "class") << " `"
3228
3598
  << name << "' cannot have " << ((*p)->isLocal() ? "local" : "non-local") << " base "
3229
3599
  << ((*p)->isInterface() ? "interface" : "class") << " `" << (*p)->name() << "'";
3230
- unit->error(msg.str());
3600
+ ut->error(msg.str());
3231
3601
  }
3232
3602
  }
3233
3603
 
@@ -3264,7 +3634,7 @@ Slice::ClassDecl::checkBasesAreLegal(const string& name, bool intf, bool local,
3264
3634
  // name (that is, if the union of the intersections of all possible pairs
3265
3635
  // of partitions is empty).
3266
3636
  //
3267
- checkPairIntersections(spl, name, unit);
3637
+ checkPairIntersections(spl, name, ut);
3268
3638
  }
3269
3639
  }
3270
3640
 
@@ -3366,7 +3736,7 @@ Slice::ClassDecl::toStringPartitionList(const GraphPartitionList& gpl)
3366
3736
  // in the other and, if so, complain.
3367
3737
  //
3368
3738
  void
3369
- Slice::ClassDecl::checkPairIntersections(const StringPartitionList& l, const string& name, const UnitPtr& unit)
3739
+ Slice::ClassDecl::checkPairIntersections(const StringPartitionList& l, const string& name, const UnitPtr& ut)
3370
3740
  {
3371
3741
  set<string> reported;
3372
3742
  for(StringPartitionList::const_iterator i = l.begin(); i != l.end(); ++i)
@@ -3383,7 +3753,7 @@ Slice::ClassDecl::checkPairIntersections(const StringPartitionList& l, const str
3383
3753
  {
3384
3754
  string msg = "ambiguous multiple inheritance: `" + name;
3385
3755
  msg += "' inherits operation `" + *s1 + "' from two or more unrelated base interfaces";
3386
- unit->error(msg);
3756
+ ut->error(msg);
3387
3757
  reported.insert(*s1);
3388
3758
  }
3389
3759
  else if(!CICompare()(*s1, *s2) && !CICompare()(*s2, *s1) &&
@@ -3392,7 +3762,7 @@ Slice::ClassDecl::checkPairIntersections(const StringPartitionList& l, const str
3392
3762
  string msg = "ambiguous multiple inheritance: `" + name;
3393
3763
  msg += "' inherits operations `" + *s1 + "' and `" + *s2;
3394
3764
  msg += "', which differ only in capitalization, from unrelated base interfaces";
3395
- unit->error(msg);
3765
+ ut->error(msg);
3396
3766
  reported.insert(*s1);
3397
3767
  reported.insert(*s2);
3398
3768
  }
@@ -3410,7 +3780,7 @@ void
3410
3780
  Slice::ClassDef::destroy()
3411
3781
  {
3412
3782
  _declaration = 0;
3413
- _bases.empty();
3783
+ _bases.clear();
3414
3784
  Container::destroy();
3415
3785
  }
3416
3786
 
@@ -3421,8 +3791,6 @@ Slice::ClassDef::createOperation(const string& name,
3421
3791
  int tag,
3422
3792
  Operation::Mode mode)
3423
3793
  {
3424
- checkIdentifier(name);
3425
-
3426
3794
  ContainedList matches = _unit->findContents(thisScope() + name);
3427
3795
  if(!matches.empty())
3428
3796
  {
@@ -3496,8 +3864,8 @@ Slice::ClassDef::createOperation(const string& name,
3496
3864
  }
3497
3865
 
3498
3866
  string baseName = IceUtilInternal::toLower((*q)->name());
3499
- string newName = IceUtilInternal::toLower(name);
3500
- if(baseName == newName)
3867
+ string newName2 = IceUtilInternal::toLower(name);
3868
+ if(baseName == newName2)
3501
3869
  {
3502
3870
  string msg = "operation `" + name + "' differs only in capitalization from " + (*q)->kindOf();
3503
3871
  msg += " `" + (*q)->name() + "', which is defined in a base interface or class";
@@ -3533,8 +3901,6 @@ Slice::ClassDef::createDataMember(const string& name, const TypePtr& type, bool
3533
3901
  const SyntaxTreeBasePtr& defaultValueType, const string& defaultValue,
3534
3902
  const string& defaultLiteral)
3535
3903
  {
3536
- checkIdentifier(name);
3537
-
3538
3904
  assert(!isInterface());
3539
3905
  ContainedList matches = _unit->findContents(thisScope() + name);
3540
3906
  if(!matches.empty())
@@ -3594,8 +3960,8 @@ Slice::ClassDef::createDataMember(const string& name, const TypePtr& type, bool
3594
3960
  }
3595
3961
 
3596
3962
  string baseName = IceUtilInternal::toLower((*q)->name());
3597
- string newName = IceUtilInternal::toLower(name);
3598
- if(baseName == newName)
3963
+ string newName2 = IceUtilInternal::toLower(name);
3964
+ if(baseName == newName2)
3599
3965
  {
3600
3966
  string msg = "data member `" + name + "' differs only in capitalization from " + (*q)->kindOf();
3601
3967
  msg += " `" + (*q)->name() + "', which is defined in a base interface or class";
@@ -3703,14 +4069,26 @@ Slice::ClassDef::operations() const
3703
4069
  OperationList
3704
4070
  Slice::ClassDef::allOperations() const
3705
4071
  {
3706
- OperationList result = operations();
3707
- result.sort();
3708
- result.unique();
4072
+ OperationList result;
3709
4073
  for(ClassList::const_iterator p = _bases.begin(); p != _bases.end(); ++p)
3710
4074
  {
3711
4075
  OperationList li = (*p)->allOperations();
3712
- result.merge(li);
3713
- result.unique();
4076
+ for(OperationList::const_iterator q = li.begin(); q != li.end(); ++q)
4077
+ {
4078
+ if(find(result.begin(), result.end(), *q) == result.end())
4079
+ {
4080
+ result.push_back(*q);
4081
+ }
4082
+ }
4083
+ }
4084
+
4085
+ OperationList li = operations();
4086
+ for(OperationList::const_iterator q = li.begin(); q != li.end(); ++q)
4087
+ {
4088
+ if(find(result.begin(), result.end(), *q) == result.end())
4089
+ {
4090
+ result.push_back(*q);
4091
+ }
3714
4092
  }
3715
4093
  return result;
3716
4094
  }
@@ -3979,6 +4357,7 @@ Slice::ClassDef::isDelegate() const
3979
4357
  {
3980
4358
  return isLocal() && isInterface() && hasMetaData("delegate") && allOperations().size() == 1;
3981
4359
  }
4360
+
3982
4361
  Slice::ClassDef::ClassDef(const ContainerPtr& container, const string& name, int id, bool intf, const ClassList& bases,
3983
4362
  bool local) :
3984
4363
  SyntaxTreeBase(container->unit()),
@@ -4060,8 +4439,8 @@ Slice::Proxy::_class() const
4060
4439
  }
4061
4440
 
4062
4441
  Slice::Proxy::Proxy(const ClassDeclPtr& cl) :
4063
- SyntaxTreeBase(cl->unit()),
4064
- Type(cl->unit()),
4442
+ SyntaxTreeBase(cl->unit(), cl->definitionContext()),
4443
+ Type(cl->unit()),
4065
4444
  _classDecl(cl)
4066
4445
  {
4067
4446
  }
@@ -4082,8 +4461,6 @@ Slice::Exception::createDataMember(const string& name, const TypePtr& type, bool
4082
4461
  const SyntaxTreeBasePtr& defaultValueType, const string& defaultValue,
4083
4462
  const string& defaultLiteral)
4084
4463
  {
4085
- checkIdentifier(name);
4086
-
4087
4464
  ContainedList matches = _unit->findContents(thisScope() + name);
4088
4465
  if(!matches.empty())
4089
4466
  {
@@ -4130,8 +4507,8 @@ Slice::Exception::createDataMember(const string& name, const TypePtr& type, bool
4130
4507
  }
4131
4508
 
4132
4509
  string baseName = IceUtilInternal::toLower((*r)->name());
4133
- string newName = IceUtilInternal::toLower(name);
4134
- if(baseName == newName)
4510
+ string newName2 = IceUtilInternal::toLower(name);
4511
+ if(baseName == newName2)
4135
4512
  {
4136
4513
  string msg = "exception member `" + name + "' differs only in capitalization from exception member `";
4137
4514
  msg += (*r)->name() + "', which is defined in a base exception";
@@ -5289,8 +5666,6 @@ Slice::Operation::hasMarshaledResult() const
5289
5666
  ParamDeclPtr
5290
5667
  Slice::Operation::createParamDecl(const string& name, const TypePtr& type, bool isOutParam, bool optional, int tag)
5291
5668
  {
5292
- checkIdentifier(name);
5293
-
5294
5669
  ContainedList matches = _unit->findContents(thisScope() + name);
5295
5670
  if(!matches.empty())
5296
5671
  {
@@ -5685,7 +6060,7 @@ Slice::Operation::attributes() const
5685
6060
  //
5686
6061
  freezeMD = freezeMD.substr(1);
5687
6062
 
5688
- int i = 0;
6063
+ i = 0;
5689
6064
  while(i < 4)
5690
6065
  {
5691
6066
  if(freezeMD.find(txAttribute[i]) == 0)
@@ -6171,12 +6546,12 @@ Slice::Unit::addGlobalMetaData(const StringList& metaData)
6171
6546
  assert(dc);
6172
6547
  if(dc->seenDefinition())
6173
6548
  {
6174
- error("global metadata must appear before any definitions");
6549
+ error("file metadata must appear before any definitions");
6175
6550
  }
6176
6551
  else
6177
6552
  {
6178
6553
  //
6179
- // Append the global metadata to any existing metadata (e.g., default global metadata).
6554
+ // Append the file metadata to any existing metadata (e.g., default file metadata).
6180
6555
  //
6181
6556
  StringList l = dc->getMetaData();
6182
6557
  copy(metaData.begin(), metaData.end(), back_inserter(l));
@@ -6383,7 +6758,7 @@ Slice::Unit::addTypeId(int compactId, const std::string& typeId)
6383
6758
  }
6384
6759
 
6385
6760
  std::string
6386
- Slice::Unit::getTypeId(int compactId)
6761
+ Slice::Unit::getTypeId(int compactId) const
6387
6762
  {
6388
6763
  map<int, string>::const_iterator p = _typeIds.find(compactId);
6389
6764
  if(p != _typeIds.end())
@@ -6393,6 +6768,12 @@ Slice::Unit::getTypeId(int compactId)
6393
6768
  return string();
6394
6769
  }
6395
6770
 
6771
+ bool
6772
+ Slice::Unit::hasCompactTypeId() const
6773
+ {
6774
+ return _typeIds.size() > 0;
6775
+ }
6776
+
6396
6777
  bool
6397
6778
  Slice::Unit::usesNonLocals() const
6398
6779
  {
@@ -6514,11 +6895,6 @@ Slice::Unit::parse(const string& filename, FILE* file, bool debug)
6514
6895
  popContainer();
6515
6896
  assert(_definitionContextStack.size() == 1);
6516
6897
  popDefinitionContext();
6517
-
6518
- if(!checkUndefinedTypes())
6519
- {
6520
- status = EXIT_FAILURE;
6521
- }
6522
6898
  }
6523
6899
 
6524
6900
  Slice::unit = 0;
@@ -6617,113 +6993,6 @@ Slice::Unit::eraseWhiteSpace(string& s)
6617
6993
  }
6618
6994
  }
6619
6995
 
6620
- bool
6621
- Slice::Unit::checkUndefinedTypes()
6622
- {
6623
- class Visitor : public ParserVisitor
6624
- {
6625
- public:
6626
-
6627
- Visitor(int& errors) :
6628
- _errors(errors),
6629
- _local(false)
6630
- {
6631
- }
6632
-
6633
- virtual bool visitClassDefStart(const ClassDefPtr& p)
6634
- {
6635
- _local = p->isLocal();
6636
- return true;
6637
- }
6638
-
6639
- virtual bool visitExceptionStart(const ExceptionPtr& p)
6640
- {
6641
- _local = p->isLocal();
6642
- return true;
6643
- }
6644
-
6645
- virtual bool visitStructStart(const StructPtr& p)
6646
- {
6647
- _local = p->isLocal();
6648
- return true;
6649
- }
6650
-
6651
- virtual void visitOperation(const OperationPtr& p)
6652
- {
6653
- if(p->returnType())
6654
- {
6655
- checkUndefined(p->returnType(), "return type", p->file(), p->line());
6656
- }
6657
- ParamDeclList params = p->parameters();
6658
- for(ParamDeclList::const_iterator q = params.begin(); q != params.end(); ++q)
6659
- {
6660
- checkUndefined((*q)->type(), "parameter " + (*q)->name(), (*q)->file(), (*q)->line());
6661
- }
6662
- }
6663
-
6664
- virtual void visitParamDecl(const ParamDeclPtr& p)
6665
- {
6666
- checkUndefined(p->type(), "parameter " + p->name(), p->file(), p->line());
6667
- }
6668
-
6669
- virtual void visitDataMember(const DataMemberPtr& p)
6670
- {
6671
- checkUndefined(p->type(), "member " + p->name(), p->file(), p->line());
6672
- }
6673
-
6674
- virtual void visitSequence(const SequencePtr& p)
6675
- {
6676
- _local = p->isLocal();
6677
- checkUndefined(p->type(), "element type", p->file(), p->line());
6678
- }
6679
-
6680
- virtual void visitDictionary(const DictionaryPtr& p)
6681
- {
6682
- _local = p->isLocal();
6683
- checkUndefined(p->keyType(), "key type", p->file(), p->line());
6684
- checkUndefined(p->valueType(), "value type", p->file(), p->line());
6685
- }
6686
-
6687
- private:
6688
-
6689
- void checkUndefined(const TypePtr& type, const string& desc, const string& file, const string& line)
6690
- {
6691
- //
6692
- // See ICE-6867. Any use of a proxy requires the full type definition, as does any
6693
- // use of a class in a non-local context.
6694
- //
6695
- ProxyPtr p = ProxyPtr::dynamicCast(type);
6696
- if(p)
6697
- {
6698
- const ClassDeclPtr cl = p->_class();
6699
- if(!cl->definition())
6700
- {
6701
- ostringstream ostr;
6702
- ostr << desc << " uses a proxy for undefined type `" << cl->scoped() << "'";
6703
- emitError(file, line, ostr.str());
6704
- _errors++;
6705
- }
6706
- }
6707
-
6708
- ClassDeclPtr cl = ClassDeclPtr::dynamicCast(type);
6709
- if(cl && !cl->definition() && !_local)
6710
- {
6711
- ostringstream ostr;
6712
- ostr << desc << " refers to undefined type `" << cl->scoped() << "'";
6713
- emitError(file, line, ostr.str());
6714
- _errors++;
6715
- }
6716
- }
6717
-
6718
- int& _errors;
6719
- bool _local;
6720
- };
6721
-
6722
- Visitor v(_errors);
6723
- visit(&v, true);
6724
- return _errors == 0;
6725
- }
6726
-
6727
6996
  // ----------------------------------------------------------------------
6728
6997
  // CICompare
6729
6998
  // ----------------------------------------------------------------------