zeroc-ice 3.7.10 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1216) hide show
  1. checksums.yaml +4 -4
  2. data/dist/IceRuby/Communicator.cpp +575 -0
  3. data/dist/IceRuby/Communicator.h +19 -0
  4. data/dist/IceRuby/Config.h +77 -0
  5. data/dist/IceRuby/Connection.cpp +428 -0
  6. data/dist/IceRuby/Connection.h +20 -0
  7. data/dist/IceRuby/DefaultSliceLoader.cpp +45 -0
  8. data/dist/IceRuby/DefaultSliceLoader.h +25 -0
  9. data/dist/IceRuby/Endpoint.cpp +342 -0
  10. data/dist/IceRuby/Endpoint.h +18 -0
  11. data/dist/IceRuby/ImplicitContext.cpp +143 -0
  12. data/dist/IceRuby/ImplicitContext.h +16 -0
  13. data/dist/IceRuby/Init.cpp +36 -0
  14. data/dist/IceRuby/Logger.cpp +146 -0
  15. data/dist/IceRuby/Logger.h +19 -0
  16. data/dist/IceRuby/Operation.cpp +623 -0
  17. data/dist/IceRuby/Operation.h +28 -0
  18. data/dist/IceRuby/Properties.cpp +413 -0
  19. data/dist/IceRuby/Properties.h +16 -0
  20. data/dist/IceRuby/Proxy.cpp +926 -0
  21. data/dist/IceRuby/Proxy.h +21 -0
  22. data/dist/IceRuby/RubySliceLoader.cpp +39 -0
  23. data/dist/IceRuby/RubySliceLoader.h +27 -0
  24. data/dist/IceRuby/Slice.cpp +199 -0
  25. data/dist/IceRuby/Slice.h +13 -0
  26. data/dist/IceRuby/Types.cpp +3133 -0
  27. data/dist/IceRuby/Types.h +533 -0
  28. data/dist/IceRuby/Util.cpp +553 -0
  29. data/dist/IceRuby/Util.h +485 -0
  30. data/dist/ice/cpp/include/Ice/AsyncResponseHandler.h +85 -0
  31. data/dist/ice/cpp/include/Ice/BatchRequest.h +39 -0
  32. data/dist/ice/cpp/include/Ice/BatchRequestQueueF.h +14 -0
  33. data/dist/ice/cpp/include/Ice/Buffer.h +159 -0
  34. data/dist/ice/cpp/include/Ice/Communicator.h +411 -0
  35. data/dist/ice/cpp/include/Ice/CommunicatorF.h +16 -0
  36. data/dist/ice/cpp/include/Ice/Config.h +60 -0
  37. data/dist/ice/cpp/include/Ice/Connection.h +410 -0
  38. data/dist/ice/cpp/include/Ice/ConnectionF.h +36 -0
  39. data/dist/ice/cpp/include/Ice/ConnectionIF.h +16 -0
  40. data/dist/ice/cpp/include/Ice/CtrlCHandler.h +56 -0
  41. data/dist/ice/cpp/include/Ice/Current.h +60 -0
  42. data/dist/ice/cpp/include/Ice/DefaultSliceLoader.h +160 -0
  43. data/dist/ice/cpp/include/Ice/Demangle.h +17 -0
  44. data/dist/ice/cpp/include/Ice/Endpoint.h +298 -0
  45. data/dist/ice/cpp/include/Ice/EndpointF.h +44 -0
  46. data/dist/ice/cpp/include/Ice/EndpointSelectionType.h +21 -0
  47. data/dist/ice/cpp/include/Ice/Exception.h +56 -0
  48. data/dist/ice/cpp/include/Ice/FacetMap.h +16 -0
  49. data/dist/ice/cpp/include/Ice/Format.h +22 -0
  50. data/dist/ice/cpp/include/Ice/Ice.h +60 -0
  51. data/dist/ice/cpp/include/Ice/IconvStringConverter.h +216 -0
  52. data/dist/ice/cpp/include/Ice/ImplicitContext.h +76 -0
  53. data/dist/ice/cpp/include/Ice/IncomingRequest.h +75 -0
  54. data/dist/ice/cpp/include/Ice/Initialize.h +143 -0
  55. data/dist/ice/cpp/include/Ice/InputStream.h +942 -0
  56. data/dist/ice/cpp/include/Ice/InstanceF.h +14 -0
  57. data/dist/ice/cpp/include/Ice/Instrumentation.h +319 -0
  58. data/dist/ice/cpp/include/Ice/LocalException.h +58 -0
  59. data/dist/ice/cpp/include/Ice/LocalExceptions.h +870 -0
  60. data/dist/ice/cpp/include/Ice/Logger.h +62 -0
  61. data/dist/ice/cpp/include/Ice/LoggerUtil.h +162 -0
  62. data/dist/ice/cpp/include/Ice/MarshaledResult.h +50 -0
  63. data/dist/ice/cpp/include/Ice/NativePropertiesAdmin.h +54 -0
  64. data/dist/ice/cpp/include/Ice/Object.h +168 -0
  65. data/dist/ice/cpp/include/Ice/ObjectAdapter.h +324 -0
  66. data/dist/ice/cpp/include/Ice/ObjectAdapterF.h +16 -0
  67. data/dist/ice/cpp/include/Ice/ObjectF.h +16 -0
  68. data/dist/ice/cpp/include/Ice/ObserverHelper.h +164 -0
  69. data/dist/ice/cpp/include/Ice/OutgoingAsync.h +512 -0
  70. data/dist/ice/cpp/include/Ice/OutgoingResponse.h +129 -0
  71. data/dist/ice/cpp/include/Ice/OutputStream.h +872 -0
  72. data/dist/ice/cpp/include/Ice/Plugin.h +73 -0
  73. data/dist/ice/cpp/include/Ice/PluginFactory.h +77 -0
  74. data/dist/ice/cpp/include/Ice/PopDisableWarnings.h +16 -0
  75. data/dist/ice/cpp/include/Ice/Properties.h +307 -0
  76. data/dist/ice/cpp/include/Ice/PropertiesF.h +19 -0
  77. data/dist/ice/cpp/include/Ice/Proxy.h +742 -0
  78. data/dist/ice/cpp/include/Ice/ProxyF.h +11 -0
  79. data/dist/ice/cpp/include/Ice/ProxyFunctions.h +209 -0
  80. data/dist/ice/cpp/include/Ice/PushDisableWarnings.h +29 -0
  81. data/dist/ice/cpp/include/Ice/ReferenceF.h +14 -0
  82. data/dist/ice/cpp/include/Ice/RequestHandlerF.h +20 -0
  83. data/dist/ice/cpp/include/Ice/SSL/ClientAuthenticationOptions.h +268 -0
  84. data/dist/ice/cpp/include/Ice/SSL/Config.h +54 -0
  85. data/dist/ice/cpp/include/Ice/SSL/ConnectionInfo.h +107 -0
  86. data/dist/ice/cpp/include/Ice/SSL/ConnectionInfoF.h +39 -0
  87. data/dist/ice/cpp/include/Ice/SSL/EndpointInfo.h +40 -0
  88. data/dist/ice/cpp/include/Ice/SSL/SSLException.h +32 -0
  89. data/dist/ice/cpp/include/Ice/SSL/ServerAuthenticationOptions.h +278 -0
  90. data/dist/ice/cpp/include/Ice/ServantLocator.h +51 -0
  91. data/dist/ice/cpp/include/Ice/Service.h +219 -0
  92. data/dist/ice/cpp/include/Ice/SliceLoader.h +67 -0
  93. data/dist/ice/cpp/include/Ice/SlicedData.h +125 -0
  94. data/dist/ice/cpp/include/Ice/SlicedDataF.h +30 -0
  95. data/dist/ice/cpp/include/Ice/StreamHelpers.h +652 -0
  96. data/dist/ice/cpp/include/Ice/StreamableTraits.h +291 -0
  97. data/dist/ice/cpp/include/Ice/StringConverter.h +167 -0
  98. data/dist/ice/cpp/include/Ice/StringUtil.h +114 -0
  99. data/dist/ice/cpp/include/Ice/TimerTask.h +24 -0
  100. data/dist/ice/cpp/include/Ice/TupleCompare.h +103 -0
  101. data/dist/ice/cpp/include/Ice/UUID.h +16 -0
  102. data/dist/ice/cpp/include/Ice/UserException.h +46 -0
  103. data/dist/ice/cpp/include/Ice/UserExceptionFactory.h +15 -0
  104. data/dist/ice/cpp/include/Ice/Value.h +127 -0
  105. data/dist/ice/cpp/include/Ice/ValueF.h +16 -0
  106. data/dist/ice/cpp/include/IceDiscovery/IceDiscovery.h +28 -0
  107. data/dist/ice/cpp/include/IceLocatorDiscovery/IceLocatorDiscovery.h +28 -0
  108. data/dist/ice/cpp/include/generated/Ice/BuiltinSequences.h +70 -0
  109. data/dist/ice/cpp/include/generated/Ice/Context.h +40 -0
  110. data/dist/ice/cpp/include/generated/Ice/EndpointTypes.h +74 -0
  111. data/dist/ice/cpp/include/generated/Ice/Identity.h +108 -0
  112. data/dist/ice/cpp/include/generated/Ice/Locator.h +542 -0
  113. data/dist/ice/cpp/include/generated/Ice/LocatorRegistry.h +443 -0
  114. data/dist/ice/cpp/include/generated/Ice/Metrics.h +1103 -0
  115. data/dist/ice/cpp/include/generated/Ice/OperationMode.h +73 -0
  116. data/dist/ice/cpp/include/generated/Ice/Process.h +245 -0
  117. data/dist/ice/cpp/include/generated/Ice/PropertiesAdmin.h +314 -0
  118. data/dist/ice/cpp/include/generated/Ice/PropertyDict.h +39 -0
  119. data/dist/ice/cpp/include/generated/Ice/RemoteLogger.h +724 -0
  120. data/dist/ice/cpp/include/generated/Ice/ReplyStatus.h +94 -0
  121. data/dist/ice/cpp/include/generated/Ice/Router.h +496 -0
  122. data/dist/ice/cpp/include/generated/Ice/SliceChecksumDict.h +37 -0
  123. data/dist/ice/cpp/include/generated/Ice/Version.h +112 -0
  124. data/dist/ice/cpp/include/generated/IceDiscovery/Lookup.h +498 -0
  125. data/dist/ice/cpp/include/generated/IceLocatorDiscovery/Lookup.h +387 -0
  126. data/dist/ice/cpp/src/Ice/Acceptor.h +41 -0
  127. data/dist/ice/cpp/src/Ice/AcceptorF.h +17 -0
  128. data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories.h +16 -0
  129. data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_all.cpp +43 -0
  130. data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_min.cpp +17 -0
  131. data/dist/ice/cpp/src/Ice/ArgVector.cpp +58 -0
  132. data/dist/ice/cpp/src/Ice/ArgVector.h +30 -0
  133. data/dist/ice/cpp/src/Ice/Base64.cpp +263 -0
  134. data/dist/ice/cpp/src/Ice/Base64.h +26 -0
  135. data/dist/ice/cpp/src/Ice/BatchRequestQueue.cpp +199 -0
  136. data/dist/ice/cpp/src/Ice/BatchRequestQueue.h +49 -0
  137. data/dist/ice/cpp/src/Ice/Buffer.cpp +187 -0
  138. data/dist/ice/cpp/src/Ice/CheckIdentity.h +21 -0
  139. data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +373 -0
  140. data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.h +65 -0
  141. data/dist/ice/cpp/src/Ice/Communicator.cpp +399 -0
  142. data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.cpp +140 -0
  143. data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.h +39 -0
  144. data/dist/ice/cpp/src/Ice/ConnectRequestHandler.cpp +227 -0
  145. data/dist/ice/cpp/src/Ice/ConnectRequestHandler.h +51 -0
  146. data/dist/ice/cpp/src/Ice/ConnectRequestHandlerF.h +14 -0
  147. data/dist/ice/cpp/src/Ice/Connection.cpp +44 -0
  148. data/dist/ice/cpp/src/Ice/ConnectionFactory.cpp +1758 -0
  149. data/dist/ice/cpp/src/Ice/ConnectionFactory.h +264 -0
  150. data/dist/ice/cpp/src/Ice/ConnectionFactoryF.h +17 -0
  151. data/dist/ice/cpp/src/Ice/ConnectionI.cpp +3563 -0
  152. data/dist/ice/cpp/src/Ice/ConnectionI.h +429 -0
  153. data/dist/ice/cpp/src/Ice/ConnectionOptions.h +22 -0
  154. data/dist/ice/cpp/src/Ice/Connector.h +38 -0
  155. data/dist/ice/cpp/src/Ice/ConnectorF.h +14 -0
  156. data/dist/ice/cpp/src/Ice/ConsoleUtil.cpp +136 -0
  157. data/dist/ice/cpp/src/Ice/ConsoleUtil.h +79 -0
  158. data/dist/ice/cpp/src/Ice/CtrlCHandler.cpp +189 -0
  159. data/dist/ice/cpp/src/Ice/Current.cpp +29 -0
  160. data/dist/ice/cpp/src/Ice/DLLMain.cpp +40 -0
  161. data/dist/ice/cpp/src/Ice/DefaultSliceLoader.cpp +39 -0
  162. data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +81 -0
  163. data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.h +38 -0
  164. data/dist/ice/cpp/src/Ice/DefaultsAndOverridesF.h +14 -0
  165. data/dist/ice/cpp/src/Ice/Demangle.cpp +25 -0
  166. data/dist/ice/cpp/src/Ice/DisableWarnings.h +31 -0
  167. data/dist/ice/cpp/src/Ice/DynamicLibrary.cpp +216 -0
  168. data/dist/ice/cpp/src/Ice/DynamicLibrary.h +91 -0
  169. data/dist/ice/cpp/src/Ice/Endian.h +40 -0
  170. data/dist/ice/cpp/src/Ice/EndpointFactory.cpp +165 -0
  171. data/dist/ice/cpp/src/Ice/EndpointFactory.h +96 -0
  172. data/dist/ice/cpp/src/Ice/EndpointFactoryF.h +14 -0
  173. data/dist/ice/cpp/src/Ice/EndpointFactoryManager.cpp +180 -0
  174. data/dist/ice/cpp/src/Ice/EndpointFactoryManager.h +42 -0
  175. data/dist/ice/cpp/src/Ice/EndpointFactoryManagerF.h +14 -0
  176. data/dist/ice/cpp/src/Ice/EndpointI.cpp +128 -0
  177. data/dist/ice/cpp/src/Ice/EndpointI.h +150 -0
  178. data/dist/ice/cpp/src/Ice/EndpointIF.h +21 -0
  179. data/dist/ice/cpp/src/Ice/EventHandler.cpp +9 -0
  180. data/dist/ice/cpp/src/Ice/EventHandler.h +71 -0
  181. data/dist/ice/cpp/src/Ice/EventHandlerF.h +14 -0
  182. data/dist/ice/cpp/src/Ice/Exception.cpp +5 -0
  183. data/dist/ice/cpp/src/Ice/FileUtil.cpp +476 -0
  184. data/dist/ice/cpp/src/Ice/FileUtil.h +152 -0
  185. data/dist/ice/cpp/src/Ice/FixedRequestHandler.cpp +34 -0
  186. data/dist/ice/cpp/src/Ice/FixedRequestHandler.h +29 -0
  187. data/dist/ice/cpp/src/Ice/HashUtil.h +67 -0
  188. data/dist/ice/cpp/src/Ice/HttpParser.cpp +684 -0
  189. data/dist/ice/cpp/src/Ice/HttpParser.h +112 -0
  190. data/dist/ice/cpp/src/Ice/IPEndpointI.cpp +593 -0
  191. data/dist/ice/cpp/src/Ice/IPEndpointI.h +106 -0
  192. data/dist/ice/cpp/src/Ice/IPEndpointIF.h +17 -0
  193. data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp +172 -0
  194. data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.h +89 -0
  195. data/dist/ice/cpp/src/Ice/ImplicitContext.cpp +109 -0
  196. data/dist/ice/cpp/src/Ice/IncomingRequest.cpp +66 -0
  197. data/dist/ice/cpp/src/Ice/Initialize.cpp +160 -0
  198. data/dist/ice/cpp/src/Ice/InputStream.cpp +2206 -0
  199. data/dist/ice/cpp/src/Ice/Instance.cpp +1956 -0
  200. data/dist/ice/cpp/src/Ice/Instance.h +225 -0
  201. data/dist/ice/cpp/src/Ice/InstrumentationI.cpp +959 -0
  202. data/dist/ice/cpp/src/Ice/InstrumentationI.h +235 -0
  203. data/dist/ice/cpp/src/Ice/LocalException.cpp +518 -0
  204. data/dist/ice/cpp/src/Ice/LocalExceptions.cpp +577 -0
  205. data/dist/ice/cpp/src/Ice/LocatorInfo.cpp +851 -0
  206. data/dist/ice/cpp/src/Ice/LocatorInfo.h +176 -0
  207. data/dist/ice/cpp/src/Ice/LocatorInfoF.h +20 -0
  208. data/dist/ice/cpp/src/Ice/LoggerAdminI.cpp +774 -0
  209. data/dist/ice/cpp/src/Ice/LoggerAdminI.h +31 -0
  210. data/dist/ice/cpp/src/Ice/LoggerI.cpp +234 -0
  211. data/dist/ice/cpp/src/Ice/LoggerI.h +47 -0
  212. data/dist/ice/cpp/src/Ice/LoggerMiddleware.cpp +176 -0
  213. data/dist/ice/cpp/src/Ice/LoggerMiddleware.h +42 -0
  214. data/dist/ice/cpp/src/Ice/LoggerUtil.cpp +76 -0
  215. data/dist/ice/cpp/src/Ice/MarshaledResult.cpp +20 -0
  216. data/dist/ice/cpp/src/Ice/MetricsAdminI.cpp +608 -0
  217. data/dist/ice/cpp/src/Ice/MetricsAdminI.h +600 -0
  218. data/dist/ice/cpp/src/Ice/MetricsFunctional.h +92 -0
  219. data/dist/ice/cpp/src/Ice/MetricsObserverI.h +587 -0
  220. data/dist/ice/cpp/src/Ice/NativePropertiesAdmin.cpp +185 -0
  221. data/dist/ice/cpp/src/Ice/Network.cpp +1927 -0
  222. data/dist/ice/cpp/src/Ice/Network.h +265 -0
  223. data/dist/ice/cpp/src/Ice/NetworkF.h +11 -0
  224. data/dist/ice/cpp/src/Ice/NetworkProxy.cpp +306 -0
  225. data/dist/ice/cpp/src/Ice/NetworkProxy.h +67 -0
  226. data/dist/ice/cpp/src/Ice/NetworkProxyF.h +14 -0
  227. data/dist/ice/cpp/src/Ice/OSLogLoggerI.cpp +55 -0
  228. data/dist/ice/cpp/src/Ice/OSLogLoggerI.h +35 -0
  229. data/dist/ice/cpp/src/Ice/Object.cpp +249 -0
  230. data/dist/ice/cpp/src/Ice/ObjectAdapterFactory.cpp +348 -0
  231. data/dist/ice/cpp/src/Ice/ObjectAdapterFactory.h +53 -0
  232. data/dist/ice/cpp/src/Ice/ObjectAdapterFactoryF.h +14 -0
  233. data/dist/ice/cpp/src/Ice/ObjectAdapterI.cpp +1383 -0
  234. data/dist/ice/cpp/src/Ice/ObjectAdapterI.h +163 -0
  235. data/dist/ice/cpp/src/Ice/ObserverHelper.cpp +75 -0
  236. data/dist/ice/cpp/src/Ice/ObserverMiddleware.cpp +96 -0
  237. data/dist/ice/cpp/src/Ice/ObserverMiddleware.h +25 -0
  238. data/dist/ice/cpp/src/Ice/OpaqueEndpointI.cpp +368 -0
  239. data/dist/ice/cpp/src/Ice/OpaqueEndpointI.h +66 -0
  240. data/dist/ice/cpp/src/Ice/Options.cpp +980 -0
  241. data/dist/ice/cpp/src/Ice/Options.h +119 -0
  242. data/dist/ice/cpp/src/Ice/OutgoingAsync.cpp +1106 -0
  243. data/dist/ice/cpp/src/Ice/OutgoingResponse.cpp +276 -0
  244. data/dist/ice/cpp/src/Ice/OutputStream.cpp +1454 -0
  245. data/dist/ice/cpp/src/Ice/OutputUtil.cpp +344 -0
  246. data/dist/ice/cpp/src/Ice/OutputUtil.h +173 -0
  247. data/dist/ice/cpp/src/Ice/PluginManagerI.cpp +344 -0
  248. data/dist/ice/cpp/src/Ice/PluginManagerI.h +54 -0
  249. data/dist/ice/cpp/src/Ice/Properties.cpp +931 -0
  250. data/dist/ice/cpp/src/Ice/PropertyNames.cpp +606 -0
  251. data/dist/ice/cpp/src/Ice/PropertyNames.h +63 -0
  252. data/dist/ice/cpp/src/Ice/PropertyUtil.cpp +103 -0
  253. data/dist/ice/cpp/src/Ice/PropertyUtil.h +31 -0
  254. data/dist/ice/cpp/src/Ice/Protocol.cpp +159 -0
  255. data/dist/ice/cpp/src/Ice/Protocol.h +116 -0
  256. data/dist/ice/cpp/src/Ice/ProtocolInstance.cpp +186 -0
  257. data/dist/ice/cpp/src/Ice/ProtocolInstance.h +74 -0
  258. data/dist/ice/cpp/src/Ice/ProtocolInstanceF.h +14 -0
  259. data/dist/ice/cpp/src/Ice/ProtocolPluginFacade.cpp +29 -0
  260. data/dist/ice/cpp/src/Ice/ProtocolPluginFacade.h +35 -0
  261. data/dist/ice/cpp/src/Ice/Proxy.cpp +541 -0
  262. data/dist/ice/cpp/src/Ice/ProxyAsync.cpp +684 -0
  263. data/dist/ice/cpp/src/Ice/ProxyFunctions.cpp +90 -0
  264. data/dist/ice/cpp/src/Ice/PushDisableDeprecatedWarnings.h +15 -0
  265. data/dist/ice/cpp/src/Ice/Random.cpp +29 -0
  266. data/dist/ice/cpp/src/Ice/Random.h +23 -0
  267. data/dist/ice/cpp/src/Ice/Reference.cpp +1584 -0
  268. data/dist/ice/cpp/src/Ice/Reference.h +339 -0
  269. data/dist/ice/cpp/src/Ice/ReferenceFactory.cpp +830 -0
  270. data/dist/ice/cpp/src/Ice/ReferenceFactory.h +58 -0
  271. data/dist/ice/cpp/src/Ice/ReferenceFactoryF.h +14 -0
  272. data/dist/ice/cpp/src/Ice/RequestHandler.cpp +28 -0
  273. data/dist/ice/cpp/src/Ice/RequestHandler.h +53 -0
  274. data/dist/ice/cpp/src/Ice/RequestHandlerCache.cpp +76 -0
  275. data/dist/ice/cpp/src/Ice/RequestHandlerCache.h +33 -0
  276. data/dist/ice/cpp/src/Ice/ResourceConfig.h +27 -0
  277. data/dist/ice/cpp/src/Ice/RetryQueue.cpp +151 -0
  278. data/dist/ice/cpp/src/Ice/RetryQueue.h +59 -0
  279. data/dist/ice/cpp/src/Ice/RetryQueueF.h +14 -0
  280. data/dist/ice/cpp/src/Ice/RouterInfo.cpp +275 -0
  281. data/dist/ice/cpp/src/Ice/RouterInfo.h +95 -0
  282. data/dist/ice/cpp/src/Ice/RouterInfoF.h +17 -0
  283. data/dist/ice/cpp/src/Ice/SHA1.cpp +195 -0
  284. data/dist/ice/cpp/src/Ice/SHA1.h +35 -0
  285. data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.cpp +89 -0
  286. data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.h +87 -0
  287. data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.cpp +513 -0
  288. data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.h +40 -0
  289. data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngineF.h +13 -0
  290. data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.cpp +635 -0
  291. data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.h +80 -0
  292. data/dist/ice/cpp/src/Ice/SSL/RFC2253.cpp +487 -0
  293. data/dist/ice/cpp/src/Ice/SSL/RFC2253.h +58 -0
  294. data/dist/ice/cpp/src/Ice/SSL/SSLAcceptorI.cpp +124 -0
  295. data/dist/ice/cpp/src/Ice/SSL/SSLAcceptorI.h +52 -0
  296. data/dist/ice/cpp/src/Ice/SSL/SSLConnectorI.cpp +92 -0
  297. data/dist/ice/cpp/src/Ice/SSL/SSLConnectorI.h +38 -0
  298. data/dist/ice/cpp/src/Ice/SSL/SSLEndpointI.cpp +377 -0
  299. data/dist/ice/cpp/src/Ice/SSL/SSLEndpointI.h +84 -0
  300. data/dist/ice/cpp/src/Ice/SSL/SSLEngine.cpp +115 -0
  301. data/dist/ice/cpp/src/Ice/SSL/SSLEngine.h +72 -0
  302. data/dist/ice/cpp/src/Ice/SSL/SSLEngineF.h +14 -0
  303. data/dist/ice/cpp/src/Ice/SSL/SSLException.cpp +18 -0
  304. data/dist/ice/cpp/src/Ice/SSL/SSLInstance.cpp +27 -0
  305. data/dist/ice/cpp/src/Ice/SSL/SSLInstance.h +26 -0
  306. data/dist/ice/cpp/src/Ice/SSL/SSLInstanceF.h +19 -0
  307. data/dist/ice/cpp/src/Ice/SSL/SSLUtil.cpp +654 -0
  308. data/dist/ice/cpp/src/Ice/SSL/SSLUtil.h +104 -0
  309. data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.cpp +1437 -0
  310. data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.h +58 -0
  311. data/dist/ice/cpp/src/Ice/SSL/SchannelEngineF.h +18 -0
  312. data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.cpp +1085 -0
  313. data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.h +118 -0
  314. data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.cpp +822 -0
  315. data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.h +44 -0
  316. data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngineF.h +18 -0
  317. data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.cpp +621 -0
  318. data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.h +91 -0
  319. data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.cpp +1061 -0
  320. data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.h +40 -0
  321. data/dist/ice/cpp/src/Ice/SSL/TrustManager.cpp +222 -0
  322. data/dist/ice/cpp/src/Ice/SSL/TrustManager.h +42 -0
  323. data/dist/ice/cpp/src/Ice/SSL/TrustManagerF.h +14 -0
  324. data/dist/ice/cpp/src/Ice/ScannerConfig.h +35 -0
  325. data/dist/ice/cpp/src/Ice/Selector.cpp +1270 -0
  326. data/dist/ice/cpp/src/Ice/Selector.h +235 -0
  327. data/dist/ice/cpp/src/Ice/ServantManager.cpp +547 -0
  328. data/dist/ice/cpp/src/Ice/ServantManager.h +66 -0
  329. data/dist/ice/cpp/src/Ice/ServantManagerF.h +14 -0
  330. data/dist/ice/cpp/src/Ice/Service.cpp +1790 -0
  331. data/dist/ice/cpp/src/Ice/SharedContext.h +33 -0
  332. data/dist/ice/cpp/src/Ice/SliceLoader.cpp +53 -0
  333. data/dist/ice/cpp/src/Ice/SlicedData.cpp +48 -0
  334. data/dist/ice/cpp/src/Ice/StreamSocket.cpp +472 -0
  335. data/dist/ice/cpp/src/Ice/StreamSocket.h +73 -0
  336. data/dist/ice/cpp/src/Ice/StringConverter.cpp +582 -0
  337. data/dist/ice/cpp/src/Ice/StringUtil.cpp +1137 -0
  338. data/dist/ice/cpp/src/Ice/SysLoggerI.cpp +160 -0
  339. data/dist/ice/cpp/src/Ice/SysLoggerI.h +34 -0
  340. data/dist/ice/cpp/src/Ice/SystemdJournalI.cpp +65 -0
  341. data/dist/ice/cpp/src/Ice/SystemdJournalI.h +33 -0
  342. data/dist/ice/cpp/src/Ice/TargetCompare.h +96 -0
  343. data/dist/ice/cpp/src/Ice/TcpAcceptor.cpp +213 -0
  344. data/dist/ice/cpp/src/Ice/TcpAcceptor.h +55 -0
  345. data/dist/ice/cpp/src/Ice/TcpConnector.cpp +128 -0
  346. data/dist/ice/cpp/src/Ice/TcpConnector.h +36 -0
  347. data/dist/ice/cpp/src/Ice/TcpEndpointI.cpp +411 -0
  348. data/dist/ice/cpp/src/Ice/TcpEndpointI.h +86 -0
  349. data/dist/ice/cpp/src/Ice/TcpTransceiver.cpp +147 -0
  350. data/dist/ice/cpp/src/Ice/TcpTransceiver.h +53 -0
  351. data/dist/ice/cpp/src/Ice/ThreadPool.cpp +1110 -0
  352. data/dist/ice/cpp/src/Ice/ThreadPool.h +305 -0
  353. data/dist/ice/cpp/src/Ice/ThreadPoolF.h +14 -0
  354. data/dist/ice/cpp/src/Ice/TimeUtil.cpp +47 -0
  355. data/dist/ice/cpp/src/Ice/TimeUtil.h +21 -0
  356. data/dist/ice/cpp/src/Ice/Timer.cpp +169 -0
  357. data/dist/ice/cpp/src/Ice/Timer.h +212 -0
  358. data/dist/ice/cpp/src/Ice/TraceLevels.cpp +20 -0
  359. data/dist/ice/cpp/src/Ice/TraceLevels.h +39 -0
  360. data/dist/ice/cpp/src/Ice/TraceLevelsF.h +14 -0
  361. data/dist/ice/cpp/src/Ice/TraceUtil.cpp +399 -0
  362. data/dist/ice/cpp/src/Ice/TraceUtil.h +41 -0
  363. data/dist/ice/cpp/src/Ice/Transceiver.cpp +14 -0
  364. data/dist/ice/cpp/src/Ice/Transceiver.h +52 -0
  365. data/dist/ice/cpp/src/Ice/TransceiverF.h +23 -0
  366. data/dist/ice/cpp/src/Ice/UUID.cpp +79 -0
  367. data/dist/ice/cpp/src/Ice/UdpConnector.cpp +131 -0
  368. data/dist/ice/cpp/src/Ice/UdpConnector.h +36 -0
  369. data/dist/ice/cpp/src/Ice/UdpEndpointI.cpp +480 -0
  370. data/dist/ice/cpp/src/Ice/UdpEndpointI.h +92 -0
  371. data/dist/ice/cpp/src/Ice/UdpTransceiver.cpp +786 -0
  372. data/dist/ice/cpp/src/Ice/UdpTransceiver.h +90 -0
  373. data/dist/ice/cpp/src/Ice/UndefSysMacros.h +37 -0
  374. data/dist/ice/cpp/src/Ice/UniqueRef.h +77 -0
  375. data/dist/ice/cpp/src/Ice/UserException.cpp +58 -0
  376. data/dist/ice/cpp/src/Ice/Value.cpp +145 -0
  377. data/dist/ice/cpp/src/Ice/WSAcceptor.cpp +87 -0
  378. data/dist/ice/cpp/src/Ice/WSAcceptor.h +46 -0
  379. data/dist/ice/cpp/src/Ice/WSConnector.cpp +87 -0
  380. data/dist/ice/cpp/src/Ice/WSConnector.h +36 -0
  381. data/dist/ice/cpp/src/Ice/WSEndpoint.cpp +455 -0
  382. data/dist/ice/cpp/src/Ice/WSEndpoint.h +82 -0
  383. data/dist/ice/cpp/src/Ice/WSTransceiver.cpp +1715 -0
  384. data/dist/ice/cpp/src/Ice/WSTransceiver.h +135 -0
  385. data/dist/ice/cpp/src/Ice/generated/BuiltinSequences.cpp +40 -0
  386. data/dist/ice/cpp/src/Ice/generated/Context.cpp +40 -0
  387. data/dist/ice/cpp/src/Ice/generated/EndpointTypes.cpp +40 -0
  388. data/dist/ice/cpp/src/Ice/generated/Identity.cpp +47 -0
  389. data/dist/ice/cpp/src/Ice/generated/Locator.cpp +752 -0
  390. data/dist/ice/cpp/src/Ice/generated/LocatorRegistry.cpp +577 -0
  391. data/dist/ice/cpp/src/Ice/generated/Metrics.cpp +1205 -0
  392. data/dist/ice/cpp/src/Ice/generated/OperationMode.cpp +56 -0
  393. data/dist/ice/cpp/src/Ice/generated/Process.cpp +330 -0
  394. data/dist/ice/cpp/src/Ice/generated/PropertiesAdmin.cpp +443 -0
  395. data/dist/ice/cpp/src/Ice/generated/PropertyDict.cpp +40 -0
  396. data/dist/ice/cpp/src/Ice/generated/RemoteLogger.cpp +851 -0
  397. data/dist/ice/cpp/src/Ice/generated/ReplyStatus.cpp +70 -0
  398. data/dist/ice/cpp/src/Ice/generated/Router.cpp +660 -0
  399. data/dist/ice/cpp/src/Ice/generated/SliceChecksumDict.cpp +39 -0
  400. data/dist/ice/cpp/src/Ice/generated/Version.cpp +54 -0
  401. data/dist/ice/cpp/src/IceDiscovery/LocatorI.cpp +202 -0
  402. data/dist/ice/cpp/src/IceDiscovery/LocatorI.h +68 -0
  403. data/dist/ice/cpp/src/IceDiscovery/LookupI.cpp +494 -0
  404. data/dist/ice/cpp/src/IceDiscovery/LookupI.h +168 -0
  405. data/dist/ice/cpp/src/IceDiscovery/PluginI.cpp +155 -0
  406. data/dist/ice/cpp/src/IceDiscovery/PluginI.h +31 -0
  407. data/dist/ice/cpp/src/IceDiscovery/generated/Lookup.cpp +638 -0
  408. data/dist/ice/cpp/src/IceLocatorDiscovery/Plugin.h +24 -0
  409. data/dist/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +822 -0
  410. data/dist/ice/cpp/src/IceLocatorDiscovery/generated/Lookup.cpp +468 -0
  411. data/dist/ice/cpp/src/Slice/DeprecationReporter.cpp +172 -0
  412. data/dist/ice/cpp/src/Slice/DeprecationReporter.h +14 -0
  413. data/dist/ice/cpp/src/Slice/DocCommentParser.cpp +736 -0
  414. data/dist/ice/cpp/src/Slice/DocCommentParser.h +61 -0
  415. data/dist/ice/cpp/src/Slice/FileTracker.cpp +96 -0
  416. data/dist/ice/cpp/src/Slice/FileTracker.h +44 -0
  417. data/dist/ice/cpp/src/Slice/Grammar.cpp +4125 -0
  418. data/dist/ice/cpp/src/Slice/Grammar.h +138 -0
  419. data/dist/ice/cpp/src/Slice/GrammarUtil.h +128 -0
  420. data/dist/ice/cpp/src/Slice/MetadataValidation.cpp +473 -0
  421. data/dist/ice/cpp/src/Slice/MetadataValidation.h +106 -0
  422. data/dist/ice/cpp/src/Slice/Parser.cpp +4906 -0
  423. data/dist/ice/cpp/src/Slice/Parser.h +1175 -0
  424. data/dist/ice/cpp/src/Slice/Preprocessor.cpp +295 -0
  425. data/dist/ice/cpp/src/Slice/Preprocessor.h +44 -0
  426. data/dist/ice/cpp/src/Slice/Scanner.cpp +3445 -0
  427. data/dist/ice/cpp/src/Slice/SliceUtil.cpp +790 -0
  428. data/dist/ice/cpp/src/Slice/StringLiteralUtil.cpp +448 -0
  429. data/dist/ice/cpp/src/Slice/Util.h +134 -0
  430. data/dist/ice/cpp/src/slice2rb/Main.cpp +33 -0
  431. data/dist/ice/cpp/src/slice2rb/Ruby.cpp +250 -0
  432. data/dist/ice/cpp/src/slice2rb/RubyUtil.cpp +1197 -0
  433. data/dist/ice/cpp/src/slice2rb/RubyUtil.h +56 -0
  434. data/dist/ice/mcpp/internal.H +530 -0
  435. data/dist/ice/mcpp/system.c +2741 -0
  436. data/dist/ice/slice/Glacier2/Metrics.ice +47 -0
  437. data/dist/ice/slice/Glacier2/PermissionsVerifier.ice +55 -0
  438. data/dist/ice/slice/Glacier2/Router.ice +93 -0
  439. data/dist/ice/slice/Glacier2/SSLInfo.ice +42 -0
  440. data/dist/ice/slice/Glacier2/Session.ice +133 -0
  441. data/dist/ice/slice/Ice/BuiltinSequences.ice +54 -0
  442. data/dist/ice/slice/Ice/Context.ice +24 -0
  443. data/dist/ice/slice/Ice/EndpointTypes.ice +50 -0
  444. data/dist/ice/slice/Ice/Identity.ice +36 -0
  445. data/dist/ice/slice/Ice/Locator.ice +74 -0
  446. data/dist/ice/slice/Ice/LocatorRegistry.ice +77 -0
  447. data/dist/ice/slice/Ice/Metrics.ice +201 -0
  448. data/dist/ice/slice/Ice/OperationMode.ice +38 -0
  449. data/dist/ice/slice/Ice/Process.ice +28 -0
  450. data/dist/ice/slice/Ice/PropertiesAdmin.ice +37 -0
  451. data/dist/ice/slice/Ice/PropertyDict.ice +23 -0
  452. data/dist/ice/slice/Ice/RemoteLogger.ice +126 -0
  453. data/dist/ice/slice/Ice/ReplyStatus.ice +65 -0
  454. data/dist/ice/slice/Ice/Router.ice +54 -0
  455. data/dist/ice/slice/Ice/SliceChecksumDict.ice +18 -0
  456. data/dist/ice/slice/Ice/Version.ice +43 -0
  457. data/dist/ice/slice/IceBox/ServiceManager.ice +79 -0
  458. data/dist/ice/slice/IceGrid/Admin.ice +981 -0
  459. data/dist/ice/slice/IceGrid/Descriptor.ice +519 -0
  460. data/dist/ice/slice/IceGrid/Exception.ice +98 -0
  461. data/dist/ice/slice/IceGrid/FileParser.ice +36 -0
  462. data/dist/ice/slice/IceGrid/Registry.ice +130 -0
  463. data/dist/ice/slice/IceGrid/Session.ice +64 -0
  464. data/dist/ice/slice/IceGrid/UserAccountMapper.ice +34 -0
  465. data/dist/ice/slice/IceStorm/IceStorm.ice +186 -0
  466. data/dist/ice/slice/IceStorm/Metrics.ice +41 -0
  467. data/dist/lib/Glacier2/Metrics.rb +41 -0
  468. data/dist/lib/Glacier2/PermissionsVerifier.rb +61 -0
  469. data/dist/lib/Glacier2/Router.rb +73 -0
  470. data/dist/lib/Glacier2/SSLInfo.rb +64 -0
  471. data/dist/lib/Glacier2/Session.rb +187 -0
  472. data/dist/lib/Glacier2.rb +7 -0
  473. data/dist/lib/Ice/BuiltinSequences.rb +48 -0
  474. data/dist/lib/Ice/CompressBatch.rb +50 -0
  475. data/dist/lib/Ice/Context.rb +12 -0
  476. data/dist/lib/Ice/EndpointSelectionType.rb +49 -0
  477. data/dist/lib/Ice/EndpointTypes.rb +28 -0
  478. data/dist/lib/Ice/Exception.rb +20 -0
  479. data/dist/lib/Ice/Identity.rb +47 -0
  480. data/dist/lib/Ice/IdentitySpaceship.rb +16 -0
  481. data/dist/lib/Ice/InitializationData.rb +12 -0
  482. data/dist/lib/Ice/LocalExceptions.rb +168 -0
  483. data/dist/lib/Ice/Locator.rb +83 -0
  484. data/dist/lib/Ice/LocatorRegistry.rb +73 -0
  485. data/dist/lib/Ice/Metrics.rb +290 -0
  486. data/dist/lib/Ice/OperationMode.rb +58 -0
  487. data/dist/lib/Ice/Process.rb +34 -0
  488. data/dist/lib/Ice/PropertiesAdmin.rb +39 -0
  489. data/dist/lib/Ice/PropertyDict.rb +12 -0
  490. data/dist/lib/Ice/Proxy.rb +85 -0
  491. data/dist/lib/Ice/ProxyFunctions.rb +69 -0
  492. data/dist/lib/Ice/RemoteLogger.rb +176 -0
  493. data/dist/lib/Ice/ReplyStatus.rb +65 -0
  494. data/dist/lib/Ice/Router.rb +59 -0
  495. data/dist/lib/Ice/SliceChecksumDict.rb +12 -0
  496. data/dist/lib/Ice/SliceUtil.rb +41 -0
  497. data/dist/lib/Ice/Struct.rb +11 -0
  498. data/dist/lib/Ice/ToStringMode.rb +50 -0
  499. data/dist/lib/Ice/Value.rb +93 -0
  500. data/dist/lib/Ice/Version.rb +78 -0
  501. data/dist/lib/Ice.rb +37 -0
  502. data/dist/lib/IceBox/ServiceManager.rb +104 -0
  503. data/dist/lib/IceBox.rb +3 -0
  504. data/dist/lib/IceGrid/Admin.rb +1208 -0
  505. data/dist/lib/IceGrid/Descriptor.rb +989 -0
  506. data/dist/lib/IceGrid/Exception.rb +145 -0
  507. data/dist/lib/IceGrid/FileParser.rb +41 -0
  508. data/dist/lib/IceGrid/Registry.rb +168 -0
  509. data/dist/lib/IceGrid/Session.rb +56 -0
  510. data/dist/lib/IceGrid/UserAccountMapper.rb +38 -0
  511. data/dist/lib/IceGrid.rb +9 -0
  512. data/dist/lib/IceStorm/IceStorm.rb +251 -0
  513. data/dist/lib/IceStorm/Metrics.rb +55 -0
  514. data/dist/lib/IceStorm.rb +4 -0
  515. data/extconf.rb +89 -0
  516. data/ice.gemspec +22 -17
  517. data/scripts/slice2rb +10 -0
  518. metadata +536 -712
  519. data/ICE_LICENSE +0 -48
  520. data/LICENSE +0 -340
  521. data/MCPP_LICENSE +0 -29
  522. data/bin/slice2rb +0 -12
  523. data/ext/Communicator.cpp +0 -792
  524. data/ext/Communicator.h +0 -20
  525. data/ext/Config.h +0 -143
  526. data/ext/Connection.cpp +0 -532
  527. data/ext/Connection.h +0 -24
  528. data/ext/Endpoint.cpp +0 -340
  529. data/ext/Endpoint.h +0 -22
  530. data/ext/ImplicitContext.cpp +0 -144
  531. data/ext/ImplicitContext.h +0 -20
  532. data/ext/Init.cpp +0 -49
  533. data/ext/Logger.cpp +0 -147
  534. data/ext/Logger.h +0 -23
  535. data/ext/Operation.cpp +0 -661
  536. data/ext/Operation.h +0 -31
  537. data/ext/Properties.cpp +0 -365
  538. data/ext/Properties.h +0 -20
  539. data/ext/Proxy.cpp +0 -1396
  540. data/ext/Proxy.h +0 -22
  541. data/ext/Slice.cpp +0 -205
  542. data/ext/Slice.h +0 -17
  543. data/ext/Types.cpp +0 -3325
  544. data/ext/Types.h +0 -595
  545. data/ext/Util.cpp +0 -812
  546. data/ext/Util.h +0 -586
  547. data/ext/ValueFactoryManager.cpp +0 -441
  548. data/ext/ValueFactoryManager.h +0 -95
  549. data/ext/extconf.rb +0 -97
  550. data/ext/ice/cpp/include/Ice/Application.h +0 -326
  551. data/ext/ice/cpp/include/Ice/AsyncResult.h +0 -155
  552. data/ext/ice/cpp/include/Ice/AsyncResultF.h +0 -23
  553. data/ext/ice/cpp/include/Ice/BatchRequestInterceptor.h +0 -75
  554. data/ext/ice/cpp/include/Ice/BatchRequestQueueF.h +0 -20
  555. data/ext/ice/cpp/include/Ice/Buffer.h +0 -154
  556. data/ext/ice/cpp/include/Ice/CommunicatorAsync.h +0 -154
  557. data/ext/ice/cpp/include/Ice/Comparable.h +0 -205
  558. data/ext/ice/cpp/include/Ice/Config.h +0 -76
  559. data/ext/ice/cpp/include/Ice/ConnectionAsync.h +0 -302
  560. data/ext/ice/cpp/include/Ice/ConnectionIF.h +0 -38
  561. data/ext/ice/cpp/include/Ice/ConsoleUtil.h +0 -23
  562. data/ext/ice/cpp/include/Ice/DefaultValueFactory.h +0 -57
  563. data/ext/ice/cpp/include/Ice/DispatchInterceptor.h +0 -41
  564. data/ext/ice/cpp/include/Ice/Dispatcher.h +0 -67
  565. data/ext/ice/cpp/include/Ice/DynamicLibrary.h +0 -102
  566. data/ext/ice/cpp/include/Ice/DynamicLibraryF.h +0 -24
  567. data/ext/ice/cpp/include/Ice/Exception.h +0 -161
  568. data/ext/ice/cpp/include/Ice/ExceptionHelpers.h +0 -74
  569. data/ext/ice/cpp/include/Ice/FactoryTable.h +0 -73
  570. data/ext/ice/cpp/include/Ice/FactoryTableInit.h +0 -84
  571. data/ext/ice/cpp/include/Ice/Format.h +0 -38
  572. data/ext/ice/cpp/include/Ice/Functional.h +0 -140
  573. data/ext/ice/cpp/include/Ice/GCObject.h +0 -76
  574. data/ext/ice/cpp/include/Ice/Handle.h +0 -182
  575. data/ext/ice/cpp/include/Ice/Ice.h +0 -55
  576. data/ext/ice/cpp/include/Ice/IconvStringConverter.h +0 -377
  577. data/ext/ice/cpp/include/Ice/Incoming.h +0 -225
  578. data/ext/ice/cpp/include/Ice/IncomingAsync.h +0 -186
  579. data/ext/ice/cpp/include/Ice/IncomingAsyncF.h +0 -36
  580. data/ext/ice/cpp/include/Ice/Initialize.h +0 -957
  581. data/ext/ice/cpp/include/Ice/InputStream.h +0 -1514
  582. data/ext/ice/cpp/include/Ice/InstanceF.h +0 -20
  583. data/ext/ice/cpp/include/Ice/InterfaceByValue.h +0 -57
  584. data/ext/ice/cpp/include/Ice/LocalObject.h +0 -35
  585. data/ext/ice/cpp/include/Ice/LocalObjectF.h +0 -21
  586. data/ext/ice/cpp/include/Ice/LoggerUtil.h +0 -185
  587. data/ext/ice/cpp/include/Ice/MetricsAdminI.h +0 -715
  588. data/ext/ice/cpp/include/Ice/MetricsFunctional.h +0 -159
  589. data/ext/ice/cpp/include/Ice/MetricsObserverI.h +0 -669
  590. data/ext/ice/cpp/include/Ice/NativePropertiesAdmin.h +0 -86
  591. data/ext/ice/cpp/include/Ice/Object.h +0 -507
  592. data/ext/ice/cpp/include/Ice/ObjectF.h +0 -30
  593. data/ext/ice/cpp/include/Ice/ObserverHelper.h +0 -182
  594. data/ext/ice/cpp/include/Ice/Optional.h +0 -1114
  595. data/ext/ice/cpp/include/Ice/OutgoingAsync.h +0 -856
  596. data/ext/ice/cpp/include/Ice/OutgoingAsyncF.h +0 -39
  597. data/ext/ice/cpp/include/Ice/OutputStream.h +0 -1092
  598. data/ext/ice/cpp/include/Ice/Protocol.h +0 -274
  599. data/ext/ice/cpp/include/Ice/Proxy.h +0 -5154
  600. data/ext/ice/cpp/include/Ice/ProxyF.h +0 -53
  601. data/ext/ice/cpp/include/Ice/ProxyFactoryF.h +0 -21
  602. data/ext/ice/cpp/include/Ice/ProxyHandle.h +0 -318
  603. data/ext/ice/cpp/include/Ice/ReferenceF.h +0 -29
  604. data/ext/ice/cpp/include/Ice/RegisterPlugins.h +0 -127
  605. data/ext/ice/cpp/include/Ice/RequestHandlerF.h +0 -30
  606. data/ext/ice/cpp/include/Ice/ResponseHandlerF.h +0 -25
  607. data/ext/ice/cpp/include/Ice/SHA1.h +0 -40
  608. data/ext/ice/cpp/include/Ice/ServantManagerF.h +0 -21
  609. data/ext/ice/cpp/include/Ice/Service.h +0 -379
  610. data/ext/ice/cpp/include/Ice/SliceChecksums.h +0 -33
  611. data/ext/ice/cpp/include/Ice/SlicedData.h +0 -172
  612. data/ext/ice/cpp/include/Ice/SlicedDataF.h +0 -40
  613. data/ext/ice/cpp/include/Ice/StreamHelpers.h +0 -1190
  614. data/ext/ice/cpp/include/Ice/StringConverter.h +0 -78
  615. data/ext/ice/cpp/include/Ice/ThreadPoolF.h +0 -23
  616. data/ext/ice/cpp/include/Ice/UUID.h +0 -19
  617. data/ext/ice/cpp/include/Ice/UniquePtr.h +0 -95
  618. data/ext/ice/cpp/include/Ice/UniqueRef.h +0 -97
  619. data/ext/ice/cpp/include/Ice/UserExceptionFactory.h +0 -88
  620. data/ext/ice/cpp/include/Ice/Value.h +0 -139
  621. data/ext/ice/cpp/include/Ice/ValueF.h +0 -21
  622. data/ext/ice/cpp/include/IceSSL/Config.h +0 -21
  623. data/ext/ice/cpp/include/IceSSL/IceSSL.h +0 -24
  624. data/ext/ice/cpp/include/IceSSL/OpenSSL.h +0 -147
  625. data/ext/ice/cpp/include/IceSSL/Plugin.h +0 -712
  626. data/ext/ice/cpp/include/IceSSL/SChannel.h +0 -72
  627. data/ext/ice/cpp/include/IceSSL/SecureTransport.h +0 -72
  628. data/ext/ice/cpp/include/IceSSL/UWP.h +0 -62
  629. data/ext/ice/cpp/include/IceUtil/Atomic.h +0 -179
  630. data/ext/ice/cpp/include/IceUtil/Cond.h +0 -317
  631. data/ext/ice/cpp/include/IceUtil/Config.h +0 -392
  632. data/ext/ice/cpp/include/IceUtil/ConsoleUtil.h +0 -92
  633. data/ext/ice/cpp/include/IceUtil/CountDownLatch.h +0 -45
  634. data/ext/ice/cpp/include/IceUtil/CtrlCHandler.h +0 -92
  635. data/ext/ice/cpp/include/IceUtil/DisableWarnings.h +0 -44
  636. data/ext/ice/cpp/include/IceUtil/Exception.h +0 -394
  637. data/ext/ice/cpp/include/IceUtil/FileUtil.h +0 -140
  638. data/ext/ice/cpp/include/IceUtil/Functional.h +0 -389
  639. data/ext/ice/cpp/include/IceUtil/Handle.h +0 -261
  640. data/ext/ice/cpp/include/IceUtil/IceUtil.h +0 -40
  641. data/ext/ice/cpp/include/IceUtil/InputUtil.h +0 -42
  642. data/ext/ice/cpp/include/IceUtil/Iterator.h +0 -31
  643. data/ext/ice/cpp/include/IceUtil/Lock.h +0 -128
  644. data/ext/ice/cpp/include/IceUtil/Monitor.h +0 -243
  645. data/ext/ice/cpp/include/IceUtil/Mutex.h +0 -349
  646. data/ext/ice/cpp/include/IceUtil/MutexProtocol.h +0 -23
  647. data/ext/ice/cpp/include/IceUtil/MutexPtrLock.h +0 -78
  648. data/ext/ice/cpp/include/IceUtil/MutexPtrTryLock.h +0 -77
  649. data/ext/ice/cpp/include/IceUtil/Optional.h +0 -433
  650. data/ext/ice/cpp/include/IceUtil/Options.h +0 -135
  651. data/ext/ice/cpp/include/IceUtil/OutputUtil.h +0 -383
  652. data/ext/ice/cpp/include/IceUtil/PopDisableWarnings.h +0 -14
  653. data/ext/ice/cpp/include/IceUtil/PushDisableWarnings.h +0 -33
  654. data/ext/ice/cpp/include/IceUtil/Random.h +0 -55
  655. data/ext/ice/cpp/include/IceUtil/RecMutex.h +0 -107
  656. data/ext/ice/cpp/include/IceUtil/ResourceConfig.h +0 -37
  657. data/ext/ice/cpp/include/IceUtil/ScannerConfig.h +0 -40
  658. data/ext/ice/cpp/include/IceUtil/ScopedArray.h +0 -98
  659. data/ext/ice/cpp/include/IceUtil/Shared.h +0 -127
  660. data/ext/ice/cpp/include/IceUtil/StopWatch.h +0 -49
  661. data/ext/ice/cpp/include/IceUtil/StringConverter.h +0 -195
  662. data/ext/ice/cpp/include/IceUtil/StringUtil.h +0 -97
  663. data/ext/ice/cpp/include/IceUtil/Thread.h +0 -160
  664. data/ext/ice/cpp/include/IceUtil/ThreadException.h +0 -94
  665. data/ext/ice/cpp/include/IceUtil/Time.h +0 -205
  666. data/ext/ice/cpp/include/IceUtil/Timer.h +0 -144
  667. data/ext/ice/cpp/include/IceUtil/UUID.h +0 -21
  668. data/ext/ice/cpp/include/IceUtil/UndefSysMacros.h +0 -37
  669. data/ext/ice/cpp/include/generated/Ice/BuiltinSequences.h +0 -170
  670. data/ext/ice/cpp/include/generated/Ice/Communicator.h +0 -1162
  671. data/ext/ice/cpp/include/generated/Ice/CommunicatorF.h +0 -101
  672. data/ext/ice/cpp/include/generated/Ice/Connection.h +0 -1703
  673. data/ext/ice/cpp/include/generated/Ice/ConnectionF.h +0 -119
  674. data/ext/ice/cpp/include/generated/Ice/Current.h +0 -322
  675. data/ext/ice/cpp/include/generated/Ice/Endpoint.h +0 -979
  676. data/ext/ice/cpp/include/generated/Ice/EndpointF.h +0 -166
  677. data/ext/ice/cpp/include/generated/Ice/EndpointTypes.h +0 -118
  678. data/ext/ice/cpp/include/generated/Ice/FacetMap.h +0 -80
  679. data/ext/ice/cpp/include/generated/Ice/Identity.h +0 -264
  680. data/ext/ice/cpp/include/generated/Ice/ImplicitContext.h +0 -284
  681. data/ext/ice/cpp/include/generated/Ice/ImplicitContextF.h +0 -101
  682. data/ext/ice/cpp/include/generated/Ice/Instrumentation.h +0 -1203
  683. data/ext/ice/cpp/include/generated/Ice/InstrumentationF.h +0 -128
  684. data/ext/ice/cpp/include/generated/Ice/LocalException.h +0 -7437
  685. data/ext/ice/cpp/include/generated/Ice/Locator.h +0 -3898
  686. data/ext/ice/cpp/include/generated/Ice/LocatorF.h +0 -147
  687. data/ext/ice/cpp/include/generated/Ice/Logger.h +0 -237
  688. data/ext/ice/cpp/include/generated/Ice/LoggerF.h +0 -101
  689. data/ext/ice/cpp/include/generated/Ice/Metrics.h +0 -4769
  690. data/ext/ice/cpp/include/generated/Ice/ObjectAdapter.h +0 -1181
  691. data/ext/ice/cpp/include/generated/Ice/ObjectAdapterF.h +0 -101
  692. data/ext/ice/cpp/include/generated/Ice/ObjectFactory.h +0 -203
  693. data/ext/ice/cpp/include/generated/Ice/Plugin.h +0 -318
  694. data/ext/ice/cpp/include/generated/Ice/PluginF.h +0 -110
  695. data/ext/ice/cpp/include/generated/Ice/Process.h +0 -977
  696. data/ext/ice/cpp/include/generated/Ice/ProcessF.h +0 -125
  697. data/ext/ice/cpp/include/generated/Ice/Properties.h +0 -452
  698. data/ext/ice/cpp/include/generated/Ice/PropertiesAdmin.h +0 -1366
  699. data/ext/ice/cpp/include/generated/Ice/PropertiesF.h +0 -134
  700. data/ext/ice/cpp/include/generated/Ice/RemoteLogger.h +0 -2707
  701. data/ext/ice/cpp/include/generated/Ice/Router.h +0 -1850
  702. data/ext/ice/cpp/include/generated/Ice/RouterF.h +0 -125
  703. data/ext/ice/cpp/include/generated/Ice/ServantLocator.h +0 -305
  704. data/ext/ice/cpp/include/generated/Ice/ServantLocatorF.h +0 -101
  705. data/ext/ice/cpp/include/generated/Ice/SliceChecksumDict.h +0 -84
  706. data/ext/ice/cpp/include/generated/Ice/ValueFactory.h +0 -330
  707. data/ext/ice/cpp/include/generated/Ice/Version.h +0 -357
  708. data/ext/ice/cpp/include/generated/IceSSL/ConnectionInfo.h +0 -228
  709. data/ext/ice/cpp/include/generated/IceSSL/ConnectionInfoF.h +0 -101
  710. data/ext/ice/cpp/include/generated/IceSSL/EndpointInfo.h +0 -186
  711. data/ext/ice/cpp/src/Ice/ACM.cpp +0 -380
  712. data/ext/ice/cpp/src/Ice/ACM.h +0 -119
  713. data/ext/ice/cpp/src/Ice/ACMF.h +0 -30
  714. data/ext/ice/cpp/src/Ice/Acceptor.cpp +0 -16
  715. data/ext/ice/cpp/src/Ice/Acceptor.h +0 -37
  716. data/ext/ice/cpp/src/Ice/AcceptorF.h +0 -25
  717. data/ext/ice/cpp/src/Ice/ArgVector.cpp +0 -59
  718. data/ext/ice/cpp/src/Ice/ArgVector.h +0 -36
  719. data/ext/ice/cpp/src/Ice/AsyncResult.cpp +0 -70
  720. data/ext/ice/cpp/src/Ice/Base64.cpp +0 -263
  721. data/ext/ice/cpp/src/Ice/Base64.h +0 -31
  722. data/ext/ice/cpp/src/Ice/BatchRequestQueue.cpp +0 -250
  723. data/ext/ice/cpp/src/Ice/BatchRequestQueue.h +0 -59
  724. data/ext/ice/cpp/src/Ice/Buffer.cpp +0 -155
  725. data/ext/ice/cpp/src/Ice/BuiltinSequences.cpp +0 -49
  726. data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +0 -407
  727. data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.h +0 -87
  728. data/ext/ice/cpp/src/Ice/Communicator.cpp +0 -79
  729. data/ext/ice/cpp/src/Ice/CommunicatorF.cpp +0 -61
  730. data/ext/ice/cpp/src/Ice/CommunicatorI.cpp +0 -586
  731. data/ext/ice/cpp/src/Ice/CommunicatorI.h +0 -167
  732. data/ext/ice/cpp/src/Ice/Cond.cpp +0 -381
  733. data/ext/ice/cpp/src/Ice/ConnectRequestHandler.cpp +0 -348
  734. data/ext/ice/cpp/src/Ice/ConnectRequestHandler.h +0 -72
  735. data/ext/ice/cpp/src/Ice/ConnectRequestHandlerF.h +0 -24
  736. data/ext/ice/cpp/src/Ice/Connection.cpp +0 -155
  737. data/ext/ice/cpp/src/Ice/ConnectionF.cpp +0 -61
  738. data/ext/ice/cpp/src/Ice/ConnectionFactory.cpp +0 -1972
  739. data/ext/ice/cpp/src/Ice/ConnectionFactory.h +0 -264
  740. data/ext/ice/cpp/src/Ice/ConnectionFactoryF.h +0 -30
  741. data/ext/ice/cpp/src/Ice/ConnectionI.cpp +0 -3670
  742. data/ext/ice/cpp/src/Ice/ConnectionI.h +0 -389
  743. data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.cpp +0 -73
  744. data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.h +0 -41
  745. data/ext/ice/cpp/src/Ice/Connector.cpp +0 -16
  746. data/ext/ice/cpp/src/Ice/Connector.h +0 -32
  747. data/ext/ice/cpp/src/Ice/ConnectorF.h +0 -21
  748. data/ext/ice/cpp/src/Ice/CountDownLatch.cpp +0 -171
  749. data/ext/ice/cpp/src/Ice/Current.cpp +0 -62
  750. data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +0 -159
  751. data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.h +0 -52
  752. data/ext/ice/cpp/src/Ice/DefaultsAndOverridesF.h +0 -21
  753. data/ext/ice/cpp/src/Ice/DispatchInterceptor.cpp +0 -37
  754. data/ext/ice/cpp/src/Ice/DynamicLibrary.cpp +0 -284
  755. data/ext/ice/cpp/src/Ice/Endpoint.cpp +0 -147
  756. data/ext/ice/cpp/src/Ice/EndpointF.cpp +0 -61
  757. data/ext/ice/cpp/src/Ice/EndpointFactory.cpp +0 -189
  758. data/ext/ice/cpp/src/Ice/EndpointFactory.h +0 -117
  759. data/ext/ice/cpp/src/Ice/EndpointFactoryF.h +0 -21
  760. data/ext/ice/cpp/src/Ice/EndpointFactoryManager.cpp +0 -213
  761. data/ext/ice/cpp/src/Ice/EndpointFactoryManager.h +0 -47
  762. data/ext/ice/cpp/src/Ice/EndpointFactoryManagerF.h +0 -21
  763. data/ext/ice/cpp/src/Ice/EndpointI.cpp +0 -98
  764. data/ext/ice/cpp/src/Ice/EndpointI.h +0 -218
  765. data/ext/ice/cpp/src/Ice/EndpointIF.h +0 -49
  766. data/ext/ice/cpp/src/Ice/EndpointTypes.cpp +0 -51
  767. data/ext/ice/cpp/src/Ice/EventHandler.cpp +0 -32
  768. data/ext/ice/cpp/src/Ice/EventHandler.h +0 -81
  769. data/ext/ice/cpp/src/Ice/EventHandlerF.h +0 -24
  770. data/ext/ice/cpp/src/Ice/Exception.cpp +0 -818
  771. data/ext/ice/cpp/src/Ice/FacetMap.cpp +0 -49
  772. data/ext/ice/cpp/src/Ice/FactoryTable.cpp +0 -162
  773. data/ext/ice/cpp/src/Ice/FactoryTableInit.cpp +0 -88
  774. data/ext/ice/cpp/src/Ice/GCObject.cpp +0 -442
  775. data/ext/ice/cpp/src/Ice/HashUtil.h +0 -53
  776. data/ext/ice/cpp/src/Ice/HttpParser.cpp +0 -684
  777. data/ext/ice/cpp/src/Ice/HttpParser.h +0 -117
  778. data/ext/ice/cpp/src/Ice/IPEndpointI.cpp +0 -710
  779. data/ext/ice/cpp/src/Ice/IPEndpointI.h +0 -152
  780. data/ext/ice/cpp/src/Ice/IPEndpointIF.h +0 -28
  781. data/ext/ice/cpp/src/Ice/IconvStringConverter.cpp +0 -51
  782. data/ext/ice/cpp/src/Ice/Identity.cpp +0 -57
  783. data/ext/ice/cpp/src/Ice/ImplicitContext.cpp +0 -75
  784. data/ext/ice/cpp/src/Ice/ImplicitContextF.cpp +0 -61
  785. data/ext/ice/cpp/src/Ice/ImplicitContextI.cpp +0 -655
  786. data/ext/ice/cpp/src/Ice/ImplicitContextI.h +0 -48
  787. data/ext/ice/cpp/src/Ice/Incoming.cpp +0 -795
  788. data/ext/ice/cpp/src/Ice/IncomingAsync.cpp +0 -230
  789. data/ext/ice/cpp/src/Ice/IncomingRequest.h +0 -33
  790. data/ext/ice/cpp/src/Ice/Initialize.cpp +0 -654
  791. data/ext/ice/cpp/src/Ice/InputStream.cpp +0 -2741
  792. data/ext/ice/cpp/src/Ice/Instance.cpp +0 -1967
  793. data/ext/ice/cpp/src/Ice/Instance.h +0 -235
  794. data/ext/ice/cpp/src/Ice/Instrumentation.cpp +0 -188
  795. data/ext/ice/cpp/src/Ice/InstrumentationF.cpp +0 -66
  796. data/ext/ice/cpp/src/Ice/InstrumentationI.cpp +0 -1094
  797. data/ext/ice/cpp/src/Ice/InstrumentationI.h +0 -256
  798. data/ext/ice/cpp/src/Ice/LocalException.cpp +0 -3262
  799. data/ext/ice/cpp/src/Ice/LocalObject.cpp +0 -23
  800. data/ext/ice/cpp/src/Ice/Locator.cpp +0 -2042
  801. data/ext/ice/cpp/src/Ice/LocatorF.cpp +0 -63
  802. data/ext/ice/cpp/src/Ice/LocatorInfo.cpp +0 -889
  803. data/ext/ice/cpp/src/Ice/LocatorInfo.h +0 -189
  804. data/ext/ice/cpp/src/Ice/LocatorInfoF.h +0 -29
  805. data/ext/ice/cpp/src/Ice/Logger.cpp +0 -73
  806. data/ext/ice/cpp/src/Ice/LoggerAdminI.cpp +0 -956
  807. data/ext/ice/cpp/src/Ice/LoggerAdminI.h +0 -41
  808. data/ext/ice/cpp/src/Ice/LoggerF.cpp +0 -61
  809. data/ext/ice/cpp/src/Ice/LoggerI.cpp +0 -259
  810. data/ext/ice/cpp/src/Ice/LoggerI.h +0 -52
  811. data/ext/ice/cpp/src/Ice/LoggerUtil.cpp +0 -100
  812. data/ext/ice/cpp/src/Ice/Metrics.cpp +0 -2352
  813. data/ext/ice/cpp/src/Ice/MetricsAdminI.cpp +0 -694
  814. data/ext/ice/cpp/src/Ice/MetricsObserverI.cpp +0 -8
  815. data/ext/ice/cpp/src/Ice/Network.cpp +0 -2249
  816. data/ext/ice/cpp/src/Ice/Network.h +0 -289
  817. data/ext/ice/cpp/src/Ice/NetworkF.h +0 -19
  818. data/ext/ice/cpp/src/Ice/NetworkProxy.cpp +0 -311
  819. data/ext/ice/cpp/src/Ice/NetworkProxy.h +0 -72
  820. data/ext/ice/cpp/src/Ice/NetworkProxyF.h +0 -21
  821. data/ext/ice/cpp/src/Ice/OSLogLoggerI.cpp +0 -57
  822. data/ext/ice/cpp/src/Ice/OSLogLoggerI.h +0 -40
  823. data/ext/ice/cpp/src/Ice/Object.cpp +0 -435
  824. data/ext/ice/cpp/src/Ice/ObjectAdapter.cpp +0 -79
  825. data/ext/ice/cpp/src/Ice/ObjectAdapterF.cpp +0 -61
  826. data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.cpp +0 -291
  827. data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.h +0 -53
  828. data/ext/ice/cpp/src/Ice/ObjectAdapterFactoryF.h +0 -25
  829. data/ext/ice/cpp/src/Ice/ObjectAdapterI.cpp +0 -1530
  830. data/ext/ice/cpp/src/Ice/ObjectAdapterI.h +0 -159
  831. data/ext/ice/cpp/src/Ice/ObjectFactory.cpp +0 -75
  832. data/ext/ice/cpp/src/Ice/ObserverHelper.cpp +0 -56
  833. data/ext/ice/cpp/src/Ice/OpaqueEndpointI.cpp +0 -408
  834. data/ext/ice/cpp/src/Ice/OpaqueEndpointI.h +0 -74
  835. data/ext/ice/cpp/src/Ice/OutgoingAsync.cpp +0 -1322
  836. data/ext/ice/cpp/src/Ice/OutputStream.cpp +0 -1367
  837. data/ext/ice/cpp/src/Ice/Plugin.cpp +0 -87
  838. data/ext/ice/cpp/src/Ice/PluginF.cpp +0 -61
  839. data/ext/ice/cpp/src/Ice/PluginManagerI.cpp +0 -503
  840. data/ext/ice/cpp/src/Ice/PluginManagerI.h +0 -61
  841. data/ext/ice/cpp/src/Ice/Process.cpp +0 -471
  842. data/ext/ice/cpp/src/Ice/ProcessF.cpp +0 -63
  843. data/ext/ice/cpp/src/Ice/Properties.cpp +0 -78
  844. data/ext/ice/cpp/src/Ice/PropertiesAdmin.cpp +0 -603
  845. data/ext/ice/cpp/src/Ice/PropertiesAdminI.cpp +0 -265
  846. data/ext/ice/cpp/src/Ice/PropertiesAdminI.h +0 -64
  847. data/ext/ice/cpp/src/Ice/PropertiesF.cpp +0 -63
  848. data/ext/ice/cpp/src/Ice/PropertiesI.cpp +0 -739
  849. data/ext/ice/cpp/src/Ice/PropertiesI.h +0 -70
  850. data/ext/ice/cpp/src/Ice/PropertyNames.cpp +0 -1429
  851. data/ext/ice/cpp/src/Ice/PropertyNames.h +0 -78
  852. data/ext/ice/cpp/src/Ice/Protocol.cpp +0 -124
  853. data/ext/ice/cpp/src/Ice/ProtocolInstance.cpp +0 -131
  854. data/ext/ice/cpp/src/Ice/ProtocolInstance.h +0 -93
  855. data/ext/ice/cpp/src/Ice/ProtocolInstanceF.h +0 -21
  856. data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.cpp +0 -51
  857. data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.h +0 -64
  858. data/ext/ice/cpp/src/Ice/ProtocolPluginFacadeF.h +0 -21
  859. data/ext/ice/cpp/src/Ice/Proxy.cpp +0 -1601
  860. data/ext/ice/cpp/src/Ice/ProxyFactory.cpp +0 -300
  861. data/ext/ice/cpp/src/Ice/ProxyFactory.h +0 -57
  862. data/ext/ice/cpp/src/Ice/Reference.cpp +0 -2046
  863. data/ext/ice/cpp/src/Ice/Reference.h +0 -323
  864. data/ext/ice/cpp/src/Ice/ReferenceFactory.cpp +0 -888
  865. data/ext/ice/cpp/src/Ice/ReferenceFactory.h +0 -76
  866. data/ext/ice/cpp/src/Ice/ReferenceFactoryF.h +0 -19
  867. data/ext/ice/cpp/src/Ice/RegisterPluginsInit.cpp +0 -38
  868. data/ext/ice/cpp/src/Ice/RegisterPluginsInit.h +0 -20
  869. data/ext/ice/cpp/src/Ice/RemoteLogger.cpp +0 -1171
  870. data/ext/ice/cpp/src/Ice/ReplyStatus.h +0 -24
  871. data/ext/ice/cpp/src/Ice/RequestHandler.cpp +0 -37
  872. data/ext/ice/cpp/src/Ice/RequestHandler.h +0 -78
  873. data/ext/ice/cpp/src/Ice/RequestHandlerFactory.cpp +0 -77
  874. data/ext/ice/cpp/src/Ice/RequestHandlerFactory.h +0 -37
  875. data/ext/ice/cpp/src/Ice/ResponseHandler.cpp +0 -12
  876. data/ext/ice/cpp/src/Ice/ResponseHandler.h +0 -43
  877. data/ext/ice/cpp/src/Ice/RetryQueue.cpp +0 -157
  878. data/ext/ice/cpp/src/Ice/RetryQueue.h +0 -66
  879. data/ext/ice/cpp/src/Ice/RetryQueueF.h +0 -19
  880. data/ext/ice/cpp/src/Ice/Router.cpp +0 -977
  881. data/ext/ice/cpp/src/Ice/RouterF.cpp +0 -63
  882. data/ext/ice/cpp/src/Ice/RouterInfo.cpp +0 -379
  883. data/ext/ice/cpp/src/Ice/RouterInfo.h +0 -152
  884. data/ext/ice/cpp/src/Ice/RouterInfoF.h +0 -25
  885. data/ext/ice/cpp/src/Ice/SHA1.cpp +0 -169
  886. data/ext/ice/cpp/src/Ice/Selector.cpp +0 -1525
  887. data/ext/ice/cpp/src/Ice/Selector.h +0 -292
  888. data/ext/ice/cpp/src/Ice/ServantLocator.cpp +0 -75
  889. data/ext/ice/cpp/src/Ice/ServantLocatorF.cpp +0 -61
  890. data/ext/ice/cpp/src/Ice/ServantManager.cpp +0 -480
  891. data/ext/ice/cpp/src/Ice/ServantManager.h +0 -69
  892. data/ext/ice/cpp/src/Ice/SharedContext.h +0 -46
  893. data/ext/ice/cpp/src/Ice/SliceChecksumDict.cpp +0 -49
  894. data/ext/ice/cpp/src/Ice/SliceChecksums.cpp +0 -75
  895. data/ext/ice/cpp/src/Ice/SlicedData.cpp +0 -127
  896. data/ext/ice/cpp/src/Ice/StreamSocket.cpp +0 -519
  897. data/ext/ice/cpp/src/Ice/StreamSocket.h +0 -85
  898. data/ext/ice/cpp/src/Ice/StringConverterPlugin.cpp +0 -192
  899. data/ext/ice/cpp/src/Ice/StringUtil.h +0 -30
  900. data/ext/ice/cpp/src/Ice/SysLoggerI.cpp +0 -166
  901. data/ext/ice/cpp/src/Ice/SysLoggerI.h +0 -37
  902. data/ext/ice/cpp/src/Ice/SystemdJournalI.cpp +0 -66
  903. data/ext/ice/cpp/src/Ice/SystemdJournalI.h +0 -39
  904. data/ext/ice/cpp/src/Ice/TcpAcceptor.cpp +0 -234
  905. data/ext/ice/cpp/src/Ice/TcpAcceptor.h +0 -61
  906. data/ext/ice/cpp/src/Ice/TcpConnector.cpp +0 -127
  907. data/ext/ice/cpp/src/Ice/TcpConnector.h +0 -45
  908. data/ext/ice/cpp/src/Ice/TcpEndpointI.cpp +0 -385
  909. data/ext/ice/cpp/src/Ice/TcpEndpointI.h +0 -90
  910. data/ext/ice/cpp/src/Ice/TcpTransceiver.cpp +0 -135
  911. data/ext/ice/cpp/src/Ice/TcpTransceiver.h +0 -58
  912. data/ext/ice/cpp/src/Ice/Thread.cpp +0 -569
  913. data/ext/ice/cpp/src/Ice/ThreadPool.cpp +0 -1292
  914. data/ext/ice/cpp/src/Ice/ThreadPool.h +0 -393
  915. data/ext/ice/cpp/src/Ice/Timer.cpp +0 -263
  916. data/ext/ice/cpp/src/Ice/TraceLevels.cpp +0 -38
  917. data/ext/ice/cpp/src/Ice/TraceLevels.h +0 -45
  918. data/ext/ice/cpp/src/Ice/TraceLevelsF.h +0 -21
  919. data/ext/ice/cpp/src/Ice/TraceUtil.cpp +0 -478
  920. data/ext/ice/cpp/src/Ice/TraceUtil.h +0 -30
  921. data/ext/ice/cpp/src/Ice/Transceiver.cpp +0 -18
  922. data/ext/ice/cpp/src/Ice/Transceiver.h +0 -49
  923. data/ext/ice/cpp/src/Ice/TransceiverF.h +0 -33
  924. data/ext/ice/cpp/src/Ice/UdpConnector.cpp +0 -131
  925. data/ext/ice/cpp/src/Ice/UdpConnector.h +0 -45
  926. data/ext/ice/cpp/src/Ice/UdpEndpointI.cpp +0 -515
  927. data/ext/ice/cpp/src/Ice/UdpEndpointI.h +0 -95
  928. data/ext/ice/cpp/src/Ice/UdpTransceiver.cpp +0 -806
  929. data/ext/ice/cpp/src/Ice/UdpTransceiver.h +0 -96
  930. data/ext/ice/cpp/src/Ice/Value.cpp +0 -76
  931. data/ext/ice/cpp/src/Ice/ValueFactory.cpp +0 -83
  932. data/ext/ice/cpp/src/Ice/ValueFactoryManagerI.cpp +0 -61
  933. data/ext/ice/cpp/src/Ice/ValueFactoryManagerI.h +0 -37
  934. data/ext/ice/cpp/src/Ice/Version.cpp +0 -57
  935. data/ext/ice/cpp/src/Ice/VirtualShared.h +0 -38
  936. data/ext/ice/cpp/src/Ice/WSAcceptor.cpp +0 -92
  937. data/ext/ice/cpp/src/Ice/WSAcceptor.h +0 -52
  938. data/ext/ice/cpp/src/Ice/WSConnector.cpp +0 -102
  939. data/ext/ice/cpp/src/Ice/WSConnector.h +0 -43
  940. data/ext/ice/cpp/src/Ice/WSEndpoint.cpp +0 -508
  941. data/ext/ice/cpp/src/Ice/WSEndpoint.h +0 -93
  942. data/ext/ice/cpp/src/Ice/WSTransceiver.cpp +0 -1704
  943. data/ext/ice/cpp/src/Ice/WSTransceiver.h +0 -141
  944. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.cpp +0 -915
  945. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.h +0 -1889
  946. data/ext/ice/cpp/src/IceDiscovery/LocatorI.cpp +0 -265
  947. data/ext/ice/cpp/src/IceDiscovery/LocatorI.h +0 -109
  948. data/ext/ice/cpp/src/IceDiscovery/LookupI.cpp +0 -608
  949. data/ext/ice/cpp/src/IceDiscovery/LookupI.h +0 -228
  950. data/ext/ice/cpp/src/IceDiscovery/PluginI.cpp +0 -176
  951. data/ext/ice/cpp/src/IceDiscovery/PluginI.h +0 -36
  952. data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.cpp +0 -730
  953. data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.h +0 -1197
  954. data/ext/ice/cpp/src/IceLocatorDiscovery/Plugin.h +0 -47
  955. data/ext/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +0 -1048
  956. data/ext/ice/cpp/src/IceSSL/AcceptorI.cpp +0 -105
  957. data/ext/ice/cpp/src/IceSSL/AcceptorI.h +0 -52
  958. data/ext/ice/cpp/src/IceSSL/CertificateI.cpp +0 -301
  959. data/ext/ice/cpp/src/IceSSL/CertificateI.h +0 -64
  960. data/ext/ice/cpp/src/IceSSL/ConnectionInfo.cpp +0 -75
  961. data/ext/ice/cpp/src/IceSSL/ConnectionInfoF.cpp +0 -61
  962. data/ext/ice/cpp/src/IceSSL/ConnectorI.cpp +0 -102
  963. data/ext/ice/cpp/src/IceSSL/ConnectorI.h +0 -44
  964. data/ext/ice/cpp/src/IceSSL/EndpointI.cpp +0 -372
  965. data/ext/ice/cpp/src/IceSSL/EndpointI.h +0 -100
  966. data/ext/ice/cpp/src/IceSSL/EndpointInfo.cpp +0 -75
  967. data/ext/ice/cpp/src/IceSSL/Instance.cpp +0 -28
  968. data/ext/ice/cpp/src/IceSSL/Instance.h +0 -37
  969. data/ext/ice/cpp/src/IceSSL/InstanceF.h +0 -33
  970. data/ext/ice/cpp/src/IceSSL/OpenSSLCertificateI.cpp +0 -688
  971. data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +0 -1147
  972. data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.h +0 -59
  973. data/ext/ice/cpp/src/IceSSL/OpenSSLEngineF.h +0 -27
  974. data/ext/ice/cpp/src/IceSSL/OpenSSLPluginI.cpp +0 -127
  975. data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +0 -1092
  976. data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.h +0 -90
  977. data/ext/ice/cpp/src/IceSSL/OpenSSLUtil.cpp +0 -288
  978. data/ext/ice/cpp/src/IceSSL/OpenSSLUtil.h +0 -58
  979. data/ext/ice/cpp/src/IceSSL/PluginI.cpp +0 -246
  980. data/ext/ice/cpp/src/IceSSL/PluginI.h +0 -67
  981. data/ext/ice/cpp/src/IceSSL/RFC2253.cpp +0 -490
  982. data/ext/ice/cpp/src/IceSSL/RFC2253.h +0 -62
  983. data/ext/ice/cpp/src/IceSSL/SChannelCertificateI.cpp +0 -721
  984. data/ext/ice/cpp/src/IceSSL/SChannelEngine.cpp +0 -1283
  985. data/ext/ice/cpp/src/IceSSL/SChannelEngine.h +0 -123
  986. data/ext/ice/cpp/src/IceSSL/SChannelEngineF.h +0 -31
  987. data/ext/ice/cpp/src/IceSSL/SChannelPluginI.cpp +0 -73
  988. data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.cpp +0 -1174
  989. data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.h +0 -133
  990. data/ext/ice/cpp/src/IceSSL/SSLEngine.cpp +0 -313
  991. data/ext/ice/cpp/src/IceSSL/SSLEngine.h +0 -100
  992. data/ext/ice/cpp/src/IceSSL/SSLEngineF.h +0 -21
  993. data/ext/ice/cpp/src/IceSSL/SecureTransportCertificateI.cpp +0 -999
  994. data/ext/ice/cpp/src/IceSSL/SecureTransportEngine.cpp +0 -1308
  995. data/ext/ice/cpp/src/IceSSL/SecureTransportEngine.h +0 -59
  996. data/ext/ice/cpp/src/IceSSL/SecureTransportEngineF.h +0 -29
  997. data/ext/ice/cpp/src/IceSSL/SecureTransportPluginI.cpp +0 -75
  998. data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +0 -719
  999. data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.h +0 -92
  1000. data/ext/ice/cpp/src/IceSSL/SecureTransportUtil.cpp +0 -868
  1001. data/ext/ice/cpp/src/IceSSL/SecureTransportUtil.h +0 -45
  1002. data/ext/ice/cpp/src/IceSSL/TrustManager.cpp +0 -236
  1003. data/ext/ice/cpp/src/IceSSL/TrustManager.h +0 -46
  1004. data/ext/ice/cpp/src/IceSSL/TrustManagerF.h +0 -21
  1005. data/ext/ice/cpp/src/IceSSL/UWPCertificateI.cpp +0 -266
  1006. data/ext/ice/cpp/src/IceSSL/UWPEngine.cpp +0 -338
  1007. data/ext/ice/cpp/src/IceSSL/UWPEngine.h +0 -41
  1008. data/ext/ice/cpp/src/IceSSL/UWPEngineF.h +0 -26
  1009. data/ext/ice/cpp/src/IceSSL/UWPPluginI.cpp +0 -89
  1010. data/ext/ice/cpp/src/IceSSL/UWPTransceiverI.cpp +0 -383
  1011. data/ext/ice/cpp/src/IceSSL/UWPTransceiverI.h +0 -71
  1012. data/ext/ice/cpp/src/IceSSL/Util.cpp +0 -192
  1013. data/ext/ice/cpp/src/IceSSL/Util.h +0 -99
  1014. data/ext/ice/cpp/src/IceUtil/ConsoleUtil.cpp +0 -157
  1015. data/ext/ice/cpp/src/IceUtil/ConvertUTF.cpp +0 -472
  1016. data/ext/ice/cpp/src/IceUtil/ConvertUTF.h +0 -147
  1017. data/ext/ice/cpp/src/IceUtil/CtrlCHandler.cpp +0 -259
  1018. data/ext/ice/cpp/src/IceUtil/FileUtil.cpp +0 -471
  1019. data/ext/ice/cpp/src/IceUtil/InputUtil.cpp +0 -36
  1020. data/ext/ice/cpp/src/IceUtil/MutexProtocol.cpp +0 -19
  1021. data/ext/ice/cpp/src/IceUtil/Options.cpp +0 -1051
  1022. data/ext/ice/cpp/src/IceUtil/OutputUtil.cpp +0 -609
  1023. data/ext/ice/cpp/src/IceUtil/Random.cpp +0 -180
  1024. data/ext/ice/cpp/src/IceUtil/RecMutex.cpp +0 -238
  1025. data/ext/ice/cpp/src/IceUtil/Shared.cpp +0 -71
  1026. data/ext/ice/cpp/src/IceUtil/StringConverter.cpp +0 -690
  1027. data/ext/ice/cpp/src/IceUtil/StringUtil.cpp +0 -1135
  1028. data/ext/ice/cpp/src/IceUtil/ThreadException.cpp +0 -130
  1029. data/ext/ice/cpp/src/IceUtil/Time.cpp +0 -307
  1030. data/ext/ice/cpp/src/IceUtil/UUID.cpp +0 -165
  1031. data/ext/ice/cpp/src/IceUtil/Unicode.cpp +0 -183
  1032. data/ext/ice/cpp/src/IceUtil/Unicode.h +0 -43
  1033. data/ext/ice/cpp/src/IceUtil/UtilException.cpp +0 -839
  1034. data/ext/ice/cpp/src/Slice/CPlusPlusUtil.cpp +0 -1810
  1035. data/ext/ice/cpp/src/Slice/CPlusPlusUtil.h +0 -72
  1036. data/ext/ice/cpp/src/Slice/Checksum.cpp +0 -447
  1037. data/ext/ice/cpp/src/Slice/Checksum.h +0 -21
  1038. data/ext/ice/cpp/src/Slice/FileTracker.cpp +0 -146
  1039. data/ext/ice/cpp/src/Slice/FileTracker.h +0 -66
  1040. data/ext/ice/cpp/src/Slice/Grammar.cpp +0 -4793
  1041. data/ext/ice/cpp/src/Slice/Grammar.h +0 -118
  1042. data/ext/ice/cpp/src/Slice/GrammarUtil.h +0 -228
  1043. data/ext/ice/cpp/src/Slice/JavaUtil.cpp +0 -5176
  1044. data/ext/ice/cpp/src/Slice/JavaUtil.h +0 -407
  1045. data/ext/ice/cpp/src/Slice/MD5.cpp +0 -52
  1046. data/ext/ice/cpp/src/Slice/MD5.h +0 -39
  1047. data/ext/ice/cpp/src/Slice/MD5I.cpp +0 -393
  1048. data/ext/ice/cpp/src/Slice/MD5I.h +0 -91
  1049. data/ext/ice/cpp/src/Slice/PHPUtil.cpp +0 -157
  1050. data/ext/ice/cpp/src/Slice/PHPUtil.h +0 -36
  1051. data/ext/ice/cpp/src/Slice/Parser.cpp +0 -7058
  1052. data/ext/ice/cpp/src/Slice/Parser.h +0 -1174
  1053. data/ext/ice/cpp/src/Slice/Preprocessor.cpp +0 -797
  1054. data/ext/ice/cpp/src/Slice/Preprocessor.h +0 -60
  1055. data/ext/ice/cpp/src/Slice/Python.cpp +0 -830
  1056. data/ext/ice/cpp/src/Slice/PythonUtil.cpp +0 -3439
  1057. data/ext/ice/cpp/src/Slice/PythonUtil.h +0 -70
  1058. data/ext/ice/cpp/src/Slice/Ruby.cpp +0 -350
  1059. data/ext/ice/cpp/src/Slice/RubyUtil.cpp +0 -1571
  1060. data/ext/ice/cpp/src/Slice/RubyUtil.h +0 -49
  1061. data/ext/ice/cpp/src/Slice/Scanner.cpp +0 -2807
  1062. data/ext/ice/cpp/src/Slice/SliceUtil.cpp +0 -424
  1063. data/ext/ice/cpp/src/Slice/StringLiteralUtil.cpp +0 -456
  1064. data/ext/ice/cpp/src/Slice/Util.h +0 -50
  1065. data/ext/ice/mcpp/CMakeLists.txt +0 -80
  1066. data/ext/ice/mcpp/LICENSE +0 -29
  1067. data/ext/ice/mcpp/Makefile +0 -63
  1068. data/ext/ice/mcpp/README.md +0 -32
  1069. data/ext/ice/mcpp/internal.H +0 -530
  1070. data/ext/ice/mcpp/mcpp.gyp +0 -88
  1071. data/ext/ice/mcpp/system.c +0 -2737
  1072. data/lib/Glacier2/Metrics.rb +0 -56
  1073. data/lib/Glacier2/PermissionsVerifier.rb +0 -93
  1074. data/lib/Glacier2/PermissionsVerifierF.rb +0 -30
  1075. data/lib/Glacier2/Router.rb +0 -95
  1076. data/lib/Glacier2/RouterF.rb +0 -25
  1077. data/lib/Glacier2/SSLInfo.rb +0 -72
  1078. data/lib/Glacier2/Session.rb +0 -247
  1079. data/lib/Glacier2.rb +0 -7
  1080. data/lib/Ice/BuiltinSequences.rb +0 -60
  1081. data/lib/Ice/Communicator.rb +0 -87
  1082. data/lib/Ice/CommunicatorF.rb +0 -24
  1083. data/lib/Ice/Connection.rb +0 -413
  1084. data/lib/Ice/ConnectionF.rb +0 -32
  1085. data/lib/Ice/Current.rb +0 -141
  1086. data/lib/Ice/Endpoint.rb +0 -187
  1087. data/lib/Ice/EndpointF.rb +0 -48
  1088. data/lib/Ice/EndpointTypes.rb +0 -69
  1089. data/lib/Ice/FacetMap.rb +0 -24
  1090. data/lib/Ice/Identity.rb +0 -63
  1091. data/lib/Ice/ImplicitContext.rb +0 -26
  1092. data/lib/Ice/ImplicitContextF.rb +0 -24
  1093. data/lib/Ice/Instrumentation.rb +0 -169
  1094. data/lib/Ice/InstrumentationF.rb +0 -31
  1095. data/lib/Ice/LocalException.rb +0 -1031
  1096. data/lib/Ice/Locator.rb +0 -196
  1097. data/lib/Ice/LocatorF.rb +0 -30
  1098. data/lib/Ice/Logger.rb +0 -24
  1099. data/lib/Ice/LoggerF.rb +0 -24
  1100. data/lib/Ice/Metrics.rb +0 -337
  1101. data/lib/Ice/ObjectAdapter.rb +0 -29
  1102. data/lib/Ice/ObjectAdapterF.rb +0 -24
  1103. data/lib/Ice/ObjectFactory.rb +0 -24
  1104. data/lib/Ice/Plugin.rb +0 -30
  1105. data/lib/Ice/PluginF.rb +0 -28
  1106. data/lib/Ice/Process.rb +0 -53
  1107. data/lib/Ice/ProcessF.rb +0 -25
  1108. data/lib/Ice/Properties.rb +0 -25
  1109. data/lib/Ice/PropertiesAdmin.rb +0 -63
  1110. data/lib/Ice/PropertiesF.rb +0 -29
  1111. data/lib/Ice/RemoteLogger.rb +0 -207
  1112. data/lib/Ice/Router.rb +0 -87
  1113. data/lib/Ice/RouterF.rb +0 -25
  1114. data/lib/Ice/ServantLocator.rb +0 -26
  1115. data/lib/Ice/ServantLocatorF.rb +0 -24
  1116. data/lib/Ice/SliceChecksumDict.rb +0 -24
  1117. data/lib/Ice/ValueFactory.rb +0 -28
  1118. data/lib/Ice/Version.rb +0 -90
  1119. data/lib/Ice.rb +0 -673
  1120. data/lib/IceBox/IceBox.rb +0 -164
  1121. data/lib/IceBox.rb +0 -5
  1122. data/lib/IceGrid/Admin.rb +0 -1196
  1123. data/lib/IceGrid/Descriptor.rb +0 -1034
  1124. data/lib/IceGrid/Exception.rb +0 -376
  1125. data/lib/IceGrid/FileParser.rb +0 -65
  1126. data/lib/IceGrid/PluginFacade.rb +0 -35
  1127. data/lib/IceGrid/Registry.rb +0 -209
  1128. data/lib/IceGrid/Session.rb +0 -71
  1129. data/lib/IceGrid/UserAccountMapper.rb +0 -61
  1130. data/lib/IceGrid.rb +0 -9
  1131. data/lib/IcePatch2/FileInfo.rb +0 -115
  1132. data/lib/IcePatch2/FileServer.rb +0 -123
  1133. data/lib/IcePatch2.rb +0 -5
  1134. data/lib/IceStorm/IceStorm.rb +0 -332
  1135. data/lib/IceStorm/Metrics.rb +0 -73
  1136. data/lib/IceStorm.rb +0 -6
  1137. data/slice/Glacier2/Metrics.ice +0 -88
  1138. data/slice/Glacier2/PermissionsVerifier.ice +0 -111
  1139. data/slice/Glacier2/PermissionsVerifierF.ice +0 -30
  1140. data/slice/Glacier2/Router.ice +0 -186
  1141. data/slice/Glacier2/RouterF.ice +0 -29
  1142. data/slice/Glacier2/SSLInfo.ice +0 -59
  1143. data/slice/Glacier2/Session.ice +0 -274
  1144. data/slice/Ice/BuiltinSequences.ice +0 -59
  1145. data/slice/Ice/Communicator.ice +0 -676
  1146. data/slice/Ice/CommunicatorF.ice +0 -31
  1147. data/slice/Ice/Connection.ice +0 -516
  1148. data/slice/Ice/ConnectionF.ice +0 -33
  1149. data/slice/Ice/Current.ice +0 -170
  1150. data/slice/Ice/Endpoint.ice +0 -291
  1151. data/slice/Ice/EndpointF.ice +0 -43
  1152. data/slice/Ice/EndpointTypes.ice +0 -48
  1153. data/slice/Ice/FacetMap.ice +0 -36
  1154. data/slice/Ice/Identity.ice +0 -75
  1155. data/slice/Ice/ImplicitContext.ice +0 -119
  1156. data/slice/Ice/ImplicitContextF.ice +0 -30
  1157. data/slice/Ice/Instrumentation.ice +0 -509
  1158. data/slice/Ice/InstrumentationF.ice +0 -38
  1159. data/slice/Ice/LocalException.ice +0 -1040
  1160. data/slice/Ice/Locator.ice +0 -239
  1161. data/slice/Ice/LocatorF.ice +0 -32
  1162. data/slice/Ice/Logger.ice +0 -99
  1163. data/slice/Ice/LoggerF.ice +0 -31
  1164. data/slice/Ice/Metrics.ice +0 -436
  1165. data/slice/Ice/ObjectAdapter.ice +0 -710
  1166. data/slice/Ice/ObjectAdapterF.ice +0 -31
  1167. data/slice/Ice/ObjectFactory.ice +0 -71
  1168. data/slice/Ice/Plugin.ice +0 -131
  1169. data/slice/Ice/PluginF.ice +0 -36
  1170. data/slice/Ice/Process.ice +0 -64
  1171. data/slice/Ice/ProcessF.ice +0 -31
  1172. data/slice/Ice/Properties.ice +0 -244
  1173. data/slice/Ice/PropertiesAdmin.ice +0 -87
  1174. data/slice/Ice/PropertiesF.ice +0 -32
  1175. data/slice/Ice/RemoteLogger.ice +0 -226
  1176. data/slice/Ice/Router.ice +0 -103
  1177. data/slice/Ice/RouterF.ice +0 -31
  1178. data/slice/Ice/ServantLocator.ice +0 -136
  1179. data/slice/Ice/ServantLocatorF.ice +0 -31
  1180. data/slice/Ice/SliceChecksumDict.ice +0 -36
  1181. data/slice/Ice/ValueFactory.ice +0 -133
  1182. data/slice/Ice/Version.ice +0 -51
  1183. data/slice/IceBT/ConnectionInfo.ice +0 -59
  1184. data/slice/IceBT/EndpointInfo.ice +0 -57
  1185. data/slice/IceBT/Types.ice +0 -45
  1186. data/slice/IceBox/IceBox.ice +0 -216
  1187. data/slice/IceDiscovery/IceDiscovery.ice +0 -98
  1188. data/slice/IceGrid/Admin.ice +0 -1957
  1189. data/slice/IceGrid/Descriptor.ice +0 -1094
  1190. data/slice/IceGrid/Exception.ice +0 -396
  1191. data/slice/IceGrid/FileParser.ice +0 -72
  1192. data/slice/IceGrid/PluginFacade.ice +0 -329
  1193. data/slice/IceGrid/Registry.ice +0 -269
  1194. data/slice/IceGrid/Session.ice +0 -128
  1195. data/slice/IceGrid/UserAccountMapper.ice +0 -69
  1196. data/slice/IceIAP/ConnectionInfo.ice +0 -74
  1197. data/slice/IceIAP/EndpointInfo.ice +0 -68
  1198. data/slice/IceLocatorDiscovery/IceLocatorDiscovery.ice +0 -83
  1199. data/slice/IcePatch2/FileInfo.ice +0 -85
  1200. data/slice/IcePatch2/FileServer.ice +0 -191
  1201. data/slice/IceSSL/ConnectionInfo.ice +0 -54
  1202. data/slice/IceSSL/ConnectionInfoF.ice +0 -31
  1203. data/slice/IceSSL/EndpointInfo.ice +0 -45
  1204. data/slice/IceStorm/IceStorm.ice +0 -414
  1205. data/slice/IceStorm/Metrics.ice +0 -83
  1206. /data/{ext → dist}/ice/mcpp/config.h +0 -0
  1207. /data/{ext → dist}/ice/mcpp/configed.H +0 -0
  1208. /data/{ext → dist}/ice/mcpp/directive.c +0 -0
  1209. /data/{ext → dist}/ice/mcpp/eval.c +0 -0
  1210. /data/{ext → dist}/ice/mcpp/expand.c +0 -0
  1211. /data/{ext → dist}/ice/mcpp/mbchar.c +0 -0
  1212. /data/{ext → dist}/ice/mcpp/mcpp_lib.h +0 -0
  1213. /data/{ext/ice/mcpp/main.c → dist/ice/mcpp/mcpp_main.c} +0 -0
  1214. /data/{ext → dist}/ice/mcpp/mcpp_out.h +0 -0
  1215. /data/{ext → dist}/ice/mcpp/support.c +0 -0
  1216. /data/{ext → dist}/ice/mcpp/system.H +0 -0
@@ -0,0 +1,3133 @@
1
+ // Copyright (c) ZeroC, Inc.
2
+
3
+ #include "Types.h"
4
+ #include "Ice/InputStream.h"
5
+ #include "Ice/LocalExceptions.h"
6
+ #include "Ice/OutputStream.h"
7
+ #include "Ice/OutputUtil.h"
8
+ #include "Ice/SlicedData.h"
9
+ #include "Proxy.h"
10
+ #include "Util.h"
11
+ #include <limits>
12
+ #include <list>
13
+ #include <math.h>
14
+
15
+ //
16
+ // Required for RHASH_SIZE to work properly with Ruby 1.8.x.
17
+ // T_ZOMBIE is only defined in Ruby 1.9.
18
+ //
19
+ #ifndef T_ZOMBIE
20
+ # include "st.h"
21
+ #endif
22
+
23
+ #ifndef RHASH_SIZE
24
+ # define RHASH_SIZE(v) RHASH(v)->tbl->num_entries
25
+ #endif
26
+
27
+ using namespace std;
28
+ using namespace IceRuby;
29
+ using namespace Ice;
30
+ using namespace IceInternal;
31
+
32
+ static VALUE _typeInfoClass, _exceptionInfoClass;
33
+
34
+ typedef map<string, ClassInfoPtr, std::less<>> ClassInfoMap;
35
+ static ClassInfoMap _classInfoMap;
36
+
37
+ typedef map<string, ProxyInfoPtr, std::less<>> ProxyInfoMap;
38
+ static ProxyInfoMap _proxyInfoMap;
39
+
40
+ typedef map<string, ExceptionInfoPtr, std::less<>> ExceptionInfoMap;
41
+ static ExceptionInfoMap _exceptionInfoMap;
42
+
43
+ namespace IceRuby
44
+ {
45
+ class InfoMapDestroyer
46
+ {
47
+ public:
48
+ ~InfoMapDestroyer();
49
+ };
50
+ static InfoMapDestroyer infoMapDestroyer;
51
+
52
+ string escapeString(const string& str)
53
+ {
54
+ static const string basicSourceChars = "abcdefghijklmnopqrstuvwxyz"
55
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
56
+ "0123456789"
57
+ "_{}[]#()<>%:;.?*+-/^&|~!=,\\\"' ";
58
+ static const set<char> charSet(basicSourceChars.begin(), basicSourceChars.end());
59
+
60
+ ostringstream out;
61
+
62
+ for (string::const_iterator c = str.begin(); c != str.end(); ++c)
63
+ {
64
+ if (charSet.find(*c) == charSet.end())
65
+ {
66
+ unsigned char uc = static_cast<unsigned char>(*c); // char may be signed, so make it positive
67
+ ostringstream s;
68
+ s << "\\"; // Print as octal if not in basic source character set
69
+ s.width(3);
70
+ s.fill('0');
71
+ s << oct;
72
+ s << static_cast<unsigned>(uc);
73
+ out << s.str();
74
+ }
75
+ else
76
+ {
77
+ out << *c; // Print normally if in basic source character set
78
+ }
79
+ }
80
+
81
+ return out.str();
82
+ }
83
+ }
84
+
85
+ //
86
+ // addClassInfo()
87
+ //
88
+ static void
89
+ addClassInfo(const string& id, const ClassInfoPtr& info)
90
+ {
91
+ //
92
+ // Do not assert. An application may load statically-
93
+ // translated definitions and then dynamically load
94
+ // duplicate definitions.
95
+ //
96
+ // assert(_classInfoMap.find(id) == _classInfoMap.end());
97
+ ClassInfoMap::iterator p = _classInfoMap.find(id);
98
+ if (p != _classInfoMap.end())
99
+ {
100
+ _classInfoMap.erase(p);
101
+ }
102
+ _classInfoMap.insert(ClassInfoMap::value_type(id, info));
103
+ }
104
+
105
+ //
106
+ // addProxyInfo()
107
+ //
108
+ static void
109
+ addProxyInfo(const string& id, const ProxyInfoPtr& info)
110
+ {
111
+ //
112
+ // Do not assert. An application may load statically-
113
+ // translated definitions and then dynamically load
114
+ // duplicate definitions.
115
+ //
116
+ // assert(_proxyInfoMap.find(id) == _proxyInfoMap.end());
117
+ ProxyInfoMap::iterator p = _proxyInfoMap.find(id);
118
+ if (p != _proxyInfoMap.end())
119
+ {
120
+ _proxyInfoMap.erase(p);
121
+ }
122
+ _proxyInfoMap.insert(ProxyInfoMap::value_type(id, info));
123
+ }
124
+
125
+ //
126
+ // lookupProxyInfo()
127
+ //
128
+ static IceRuby::ProxyInfoPtr
129
+ lookupProxyInfo(string_view id)
130
+ {
131
+ ProxyInfoMap::iterator p = _proxyInfoMap.find(id);
132
+ if (p != _proxyInfoMap.end())
133
+ {
134
+ return p->second;
135
+ }
136
+ return 0;
137
+ }
138
+
139
+ //
140
+ // addExceptionInfo()
141
+ //
142
+ static void
143
+ addExceptionInfo(const string& id, const ExceptionInfoPtr& info)
144
+ {
145
+ //
146
+ // Do not assert. An application may load statically-
147
+ // translated definitions and then dynamically load
148
+ // duplicate definitions.
149
+ //
150
+ // assert(_exceptionInfoMap.find(id) == _exceptionInfoMap.end());
151
+ _exceptionInfoMap.insert(ExceptionInfoMap::value_type(id, info));
152
+ }
153
+
154
+ //
155
+ // StreamUtil implementation
156
+ //
157
+ VALUE IceRuby::StreamUtil::_slicedDataType = Qnil;
158
+ VALUE IceRuby::StreamUtil::_sliceInfoType = Qnil;
159
+
160
+ IceRuby::StreamUtil::StreamUtil() = default;
161
+
162
+ IceRuby::StreamUtil::~StreamUtil()
163
+ {
164
+ //
165
+ // Make sure we break any cycles among the ValueReaders in preserved slices.
166
+ //
167
+ for (set<shared_ptr<ValueReader>>::iterator p = _readers.begin(); p != _readers.end(); ++p)
168
+ {
169
+ Ice::SlicedDataPtr slicedData = (*p)->getSlicedData();
170
+ for (Ice::SliceInfoSeq::const_iterator q = slicedData->slices.begin(); q != slicedData->slices.end(); ++q)
171
+ {
172
+ //
173
+ // Don't just call (*q)->instances.clear(), as releasing references
174
+ // to the instances could have unexpected side effects. We exchange
175
+ // the vector into a temporary and then let the temporary fall out
176
+ // of scope.
177
+ //
178
+ vector<shared_ptr<Ice::Value>> tmp;
179
+ tmp.swap((*q)->instances);
180
+ }
181
+ }
182
+ }
183
+
184
+ void
185
+ IceRuby::StreamUtil::add(const ReadValueCallbackPtr& callback)
186
+ {
187
+ _callbacks.push_back(callback);
188
+ }
189
+
190
+ void
191
+ IceRuby::StreamUtil::add(const shared_ptr<ValueReader>& reader)
192
+ {
193
+ assert(reader->getSlicedData());
194
+ _readers.insert(reader);
195
+ }
196
+
197
+ void
198
+ IceRuby::StreamUtil::updateSlicedData()
199
+ {
200
+ for (set<shared_ptr<ValueReader>>::iterator p = _readers.begin(); p != _readers.end(); ++p)
201
+ {
202
+ setSlicedDataMember((*p)->getObject(), (*p)->getSlicedData());
203
+ }
204
+ }
205
+
206
+ void
207
+ IceRuby::StreamUtil::setSlicedDataMember(VALUE obj, const Ice::SlicedDataPtr& slicedData)
208
+ {
209
+ //
210
+ // Create a Ruby equivalent of the SlicedData object.
211
+ //
212
+
213
+ assert(slicedData);
214
+
215
+ if (_slicedDataType == Qnil)
216
+ {
217
+ _slicedDataType = callRuby(rb_path2class, "Ice::SlicedData");
218
+ assert(!NIL_P(_slicedDataType));
219
+ }
220
+ if (_sliceInfoType == Qnil)
221
+ {
222
+ _sliceInfoType = callRuby(rb_path2class, "Ice::SliceInfo");
223
+ assert(!NIL_P(_sliceInfoType));
224
+ }
225
+
226
+ volatile VALUE sd = callRuby(rb_class_new_instance, 0, static_cast<VALUE*>(0), _slicedDataType);
227
+
228
+ volatile VALUE slices = createArray(static_cast<long>(slicedData->slices.size()));
229
+
230
+ callRuby(rb_iv_set, sd, "@slices", slices);
231
+
232
+ //
233
+ // Translate each SliceInfo object into its Ruby equivalent.
234
+ //
235
+ int i = 0;
236
+ for (vector<Ice::SliceInfoPtr>::const_iterator p = slicedData->slices.begin(); p != slicedData->slices.end(); ++p)
237
+ {
238
+ volatile VALUE slice = callRuby(rb_class_new_instance, 0, static_cast<VALUE*>(0), _sliceInfoType);
239
+
240
+ RARRAY_ASET(slices, i, slice);
241
+ i++;
242
+
243
+ //
244
+ // typeId
245
+ //
246
+ volatile VALUE typeId = createString((*p)->typeId);
247
+ callRuby(rb_iv_set, slice, "@typeId", typeId);
248
+
249
+ //
250
+ // compactId
251
+ //
252
+ volatile VALUE compactId = INT2FIX((*p)->compactId);
253
+ callRuby(rb_iv_set, slice, "@compactId", compactId);
254
+
255
+ //
256
+ // bytes
257
+ //
258
+ volatile VALUE bytes = callRuby(
259
+ rb_str_new,
260
+ (*p)->bytes.empty() ? 0 : reinterpret_cast<const char*>(&(*p)->bytes[0]),
261
+ static_cast<long>((*p)->bytes.size()));
262
+ callRuby(rb_iv_set, slice, "@bytes", bytes);
263
+
264
+ //
265
+ // instances
266
+ //
267
+ volatile VALUE instances = createArray(static_cast<long>((*p)->instances.size()));
268
+ callRuby(rb_iv_set, slice, "@instances", instances);
269
+
270
+ int j = 0;
271
+ for (vector<shared_ptr<Ice::Value>>::iterator q = (*p)->instances.begin(); q != (*p)->instances.end(); ++q)
272
+ {
273
+ //
274
+ // Each element in the instances list is an instance of ValueReader that wraps a Ruby object.
275
+ //
276
+ assert(*q);
277
+ auto r = dynamic_pointer_cast<ValueReader>(*q);
278
+ assert(r);
279
+ VALUE o = r->getObject();
280
+ assert(o != Qnil); // Should be non-nil.
281
+ RARRAY_ASET(instances, j, o);
282
+ j++;
283
+ }
284
+
285
+ //
286
+ // hasOptionalMembers
287
+ //
288
+ callRuby(rb_iv_set, slice, "@hasOptionalMembers", (*p)->hasOptionalMembers ? Qtrue : Qfalse);
289
+
290
+ //
291
+ // isLastSlice
292
+ //
293
+ callRuby(rb_iv_set, slice, "@isLastSlice", (*p)->isLastSlice ? Qtrue : Qfalse);
294
+ }
295
+
296
+ callRuby(rb_iv_set, obj, "@_ice_slicedData", sd);
297
+ }
298
+
299
+ //
300
+ // Instances of class types may have a data member named _ice_slicedData which is an instance of the Ruby class
301
+ // Ice::SlicedData. This data member is only set for unmarshaled instances.
302
+ //
303
+ Ice::SlicedDataPtr
304
+ IceRuby::StreamUtil::getSlicedDataMember(VALUE obj, ValueMap* valueMap)
305
+ {
306
+ Ice::SlicedDataPtr slicedData;
307
+
308
+ if (callRuby(rb_ivar_defined, obj, rb_intern("@_ice_slicedData")) == Qtrue)
309
+ {
310
+ volatile VALUE sd = callRuby(rb_iv_get, obj, "@_ice_slicedData");
311
+
312
+ if (sd != Qnil)
313
+ {
314
+ //
315
+ // The "slices" member is an array of Ice::SliceInfo objects.
316
+ //
317
+ volatile VALUE sl = callRuby(rb_iv_get, sd, "@slices");
318
+ assert(TYPE(sl) == T_ARRAY);
319
+
320
+ Ice::SliceInfoSeq slices;
321
+
322
+ long sz = RARRAY_LEN(sl);
323
+ for (long i = 0; i < sz; ++i)
324
+ {
325
+ volatile VALUE s = RARRAY_AREF(sl, i);
326
+
327
+ volatile VALUE typeId = callRuby(rb_iv_get, s, "@typeId");
328
+ volatile VALUE compactId = callRuby(rb_iv_get, s, "@compactId");
329
+
330
+ volatile VALUE bytes = callRuby(rb_iv_get, s, "@bytes");
331
+ assert(TYPE(bytes) == T_STRING);
332
+ const char* str = RSTRING_PTR(bytes);
333
+ const long len = RSTRING_LEN(bytes);
334
+ vector<byte> vtmp(reinterpret_cast<const byte*>(str), reinterpret_cast<const byte*>(str + len));
335
+ volatile VALUE hasOptionalMembers = callRuby(rb_iv_get, s, "@hasOptionalMembers");
336
+ volatile VALUE isLastSlice = callRuby(rb_iv_get, s, "@isLastSlice");
337
+
338
+ auto info = std::make_shared<Ice::SliceInfo>(
339
+ getString(typeId),
340
+ static_cast<int32_t>(getInteger(compactId)),
341
+ std::move(vtmp),
342
+ hasOptionalMembers == Qtrue,
343
+ isLastSlice == Qtrue);
344
+
345
+ volatile VALUE instances = callRuby(rb_iv_get, s, "@instances");
346
+ assert(TYPE(instances) == T_ARRAY);
347
+ long osz = RARRAY_LEN(instances);
348
+ for (long j = 0; j < osz; ++j)
349
+ {
350
+ VALUE o = RARRAY_AREF(instances, j);
351
+
352
+ shared_ptr<Ice::Value> writer;
353
+
354
+ ValueMap::iterator k = valueMap->find(o);
355
+ if (k == valueMap->end())
356
+ {
357
+ writer = make_shared<ValueWriter>(o, valueMap, nullptr);
358
+ valueMap->insert(ValueMap::value_type(o, writer));
359
+ }
360
+ else
361
+ {
362
+ writer = k->second;
363
+ }
364
+
365
+ info->instances.push_back(writer);
366
+ }
367
+
368
+ slices.push_back(info);
369
+ }
370
+
371
+ slicedData = std::make_shared<Ice::SlicedData>(slices);
372
+ }
373
+ }
374
+
375
+ return slicedData;
376
+ }
377
+
378
+ //
379
+ // UnmarshalCallback implementation.
380
+ //
381
+ IceRuby::UnmarshalCallback::~UnmarshalCallback() = default;
382
+
383
+ //
384
+ // TypeInfo implementation.
385
+ //
386
+ IceRuby::TypeInfo::TypeInfo() = default;
387
+
388
+ bool
389
+ IceRuby::TypeInfo::usesClasses() const
390
+ {
391
+ return false;
392
+ }
393
+
394
+ void
395
+ IceRuby::TypeInfo::unmarshaled(VALUE, VALUE, void*)
396
+ {
397
+ assert(false);
398
+ }
399
+
400
+ void
401
+ IceRuby::TypeInfo::destroy()
402
+ {
403
+ }
404
+
405
+ //
406
+ // PrimitiveInfo implementation.
407
+ //
408
+ IceRuby::PrimitiveInfo::PrimitiveInfo() = default;
409
+
410
+ IceRuby::PrimitiveInfo::PrimitiveInfo(Kind k) : kind(k) {}
411
+
412
+ string
413
+ IceRuby::PrimitiveInfo::getId() const
414
+ {
415
+ switch (kind)
416
+ {
417
+ case KindBool:
418
+ return "bool";
419
+ case KindByte:
420
+ return "byte";
421
+ case KindShort:
422
+ return "short";
423
+ case KindInt:
424
+ return "int";
425
+ case KindLong:
426
+ return "long";
427
+ case KindFloat:
428
+ return "float";
429
+ case KindDouble:
430
+ return "double";
431
+ case KindString:
432
+ return "string";
433
+ }
434
+ assert(false);
435
+ return string();
436
+ }
437
+
438
+ bool
439
+ IceRuby::PrimitiveInfo::validate(VALUE)
440
+ {
441
+ //
442
+ // Ruby supports type coercion, such that it's technically possible for any
443
+ // value to be coerced to a primitive type. It would be expensive to perform
444
+ // this coercion twice, once to validate and again to marshal, so we skip
445
+ // the validation here.
446
+ //
447
+ return true;
448
+ }
449
+
450
+ bool
451
+ IceRuby::PrimitiveInfo::variableLength() const
452
+ {
453
+ return kind == KindString;
454
+ }
455
+
456
+ int
457
+ IceRuby::PrimitiveInfo::wireSize() const
458
+ {
459
+ switch (kind)
460
+ {
461
+ case KindBool:
462
+ case KindByte:
463
+ return 1;
464
+ case KindShort:
465
+ return 2;
466
+ case KindInt:
467
+ return 4;
468
+ case KindLong:
469
+ return 8;
470
+ case KindFloat:
471
+ return 4;
472
+ case KindDouble:
473
+ return 8;
474
+ case KindString:
475
+ return 1;
476
+ }
477
+ assert(false);
478
+ return 0;
479
+ }
480
+
481
+ Ice::OptionalFormat
482
+ IceRuby::PrimitiveInfo::optionalFormat() const
483
+ {
484
+ switch (kind)
485
+ {
486
+ case KindBool:
487
+ case KindByte:
488
+ return Ice::OptionalFormat::F1;
489
+ case KindShort:
490
+ return Ice::OptionalFormat::F2;
491
+ case KindInt:
492
+ return Ice::OptionalFormat::F4;
493
+ case KindLong:
494
+ return Ice::OptionalFormat::F8;
495
+ case KindFloat:
496
+ return Ice::OptionalFormat::F4;
497
+ case KindDouble:
498
+ return Ice::OptionalFormat::F8;
499
+ case KindString:
500
+ return Ice::OptionalFormat::VSize;
501
+ }
502
+
503
+ assert(false);
504
+ return Ice::OptionalFormat::F1;
505
+ }
506
+
507
+ void
508
+ IceRuby::PrimitiveInfo::marshal(VALUE p, Ice::OutputStream* os, ValueMap*, bool)
509
+ {
510
+ switch (kind)
511
+ {
512
+ case PrimitiveInfo::KindBool:
513
+ {
514
+ os->write(static_cast<bool>(RTEST(p)));
515
+ break;
516
+ }
517
+ case PrimitiveInfo::KindByte:
518
+ {
519
+ long i = getInteger(p);
520
+ if (i >= 0 && i <= 255)
521
+ {
522
+ os->write(static_cast<uint8_t>(i));
523
+ break;
524
+ }
525
+ throw RubyException(rb_eTypeError, "value is out of range for a byte");
526
+ }
527
+ case PrimitiveInfo::KindShort:
528
+ {
529
+ long i = getInteger(p);
530
+ if (i >= SHRT_MIN && i <= SHRT_MAX)
531
+ {
532
+ os->write(static_cast<int16_t>(i));
533
+ break;
534
+ }
535
+ throw RubyException(rb_eTypeError, "value is out of range for a short");
536
+ }
537
+ case PrimitiveInfo::KindInt:
538
+ {
539
+ long i = getInteger(p);
540
+ if (i >= INT_MIN && i <= INT_MAX)
541
+ {
542
+ os->write(static_cast<int32_t>(i));
543
+ break;
544
+ }
545
+ throw RubyException(rb_eTypeError, "value is out of range for an int");
546
+ }
547
+ case PrimitiveInfo::KindLong:
548
+ {
549
+ os->write(getLong(p));
550
+ break;
551
+ }
552
+ case PrimitiveInfo::KindFloat:
553
+ {
554
+ volatile VALUE val = callRuby(rb_Float, p);
555
+ if (NIL_P(val))
556
+ {
557
+ throw RubyException(rb_eTypeError, "unable to convert value to a float");
558
+ }
559
+ assert(TYPE(val) == T_FLOAT);
560
+ double d = static_cast<double>(RFLOAT_VALUE(val));
561
+ if (isfinite(d) && (d > numeric_limits<float>::max() || d < -numeric_limits<float>::max()))
562
+ {
563
+ throw RubyException(rb_eTypeError, "value is out of range for a float");
564
+ }
565
+ os->write(static_cast<float>(d));
566
+ break;
567
+ }
568
+ case PrimitiveInfo::KindDouble:
569
+ {
570
+ volatile VALUE val = callRuby(rb_Float, p);
571
+ if (NIL_P(val))
572
+ {
573
+ throw RubyException(rb_eTypeError, "unable to convert value to a double");
574
+ }
575
+ assert(TYPE(val) == T_FLOAT);
576
+ os->write(static_cast<double>(RFLOAT_VALUE(val)));
577
+ break;
578
+ }
579
+ case PrimitiveInfo::KindString:
580
+ {
581
+ string val = getString(p);
582
+ os->write(val, false); // Bypass string conversion.
583
+ break;
584
+ }
585
+ }
586
+ }
587
+
588
+ void
589
+ IceRuby::PrimitiveInfo::unmarshal(
590
+ Ice::InputStream* is,
591
+ const UnmarshalCallbackPtr& cb,
592
+ VALUE target,
593
+ void* closure,
594
+ bool)
595
+ {
596
+ volatile VALUE val = Qnil;
597
+ switch (kind)
598
+ {
599
+ case PrimitiveInfo::KindBool:
600
+ {
601
+ bool b;
602
+ is->read(b);
603
+ val = b ? Qtrue : Qfalse;
604
+ break;
605
+ }
606
+ case PrimitiveInfo::KindByte:
607
+ {
608
+ uint8_t b;
609
+ is->read(b);
610
+ val = callRuby(rb_int2inum, b);
611
+ break;
612
+ }
613
+ case PrimitiveInfo::KindShort:
614
+ {
615
+ int16_t sh;
616
+ is->read(sh);
617
+ val = callRuby(rb_int2inum, sh);
618
+ break;
619
+ }
620
+ case PrimitiveInfo::KindInt:
621
+ {
622
+ int32_t i;
623
+ is->read(i);
624
+ val = callRuby(rb_int2inum, i);
625
+ break;
626
+ }
627
+ case PrimitiveInfo::KindLong:
628
+ {
629
+ int64_t l;
630
+ is->read(l);
631
+ val = callRuby(rb_ll2inum, l);
632
+ break;
633
+ }
634
+ case PrimitiveInfo::KindFloat:
635
+ {
636
+ float f;
637
+ is->read(f);
638
+ val = callRuby(rb_float_new, f);
639
+ break;
640
+ }
641
+ case PrimitiveInfo::KindDouble:
642
+ {
643
+ double d;
644
+ is->read(d);
645
+ val = callRuby(rb_float_new, d);
646
+ break;
647
+ }
648
+ case PrimitiveInfo::KindString:
649
+ {
650
+ string str;
651
+ is->read(str, false); // Bypass string conversion.
652
+ val = createString(str);
653
+ break;
654
+ }
655
+ }
656
+ cb->unmarshaled(val, target, closure);
657
+ }
658
+
659
+ void
660
+ IceRuby::PrimitiveInfo::print(VALUE value, IceInternal::Output& out, PrintObjectHistory*)
661
+ {
662
+ switch (kind)
663
+ {
664
+ case PrimitiveInfo::KindBool:
665
+ {
666
+ out << (RTEST(value) ? "true" : "false");
667
+ break;
668
+ }
669
+ case PrimitiveInfo::KindByte:
670
+ case PrimitiveInfo::KindShort:
671
+ case PrimitiveInfo::KindInt:
672
+ {
673
+ out << getInteger(value);
674
+ break;
675
+ }
676
+ case PrimitiveInfo::KindLong:
677
+ {
678
+ int64_t l = getLong(value);
679
+ out << l;
680
+ break;
681
+ }
682
+ case PrimitiveInfo::KindFloat:
683
+ case PrimitiveInfo::KindDouble:
684
+ {
685
+ double d = toDouble(value);
686
+ out << d;
687
+ break;
688
+ }
689
+ case PrimitiveInfo::KindString:
690
+ {
691
+ out << "'" << getString(value) << "'";
692
+ break;
693
+ }
694
+ }
695
+ }
696
+
697
+ double
698
+ IceRuby::PrimitiveInfo::toDouble(VALUE v)
699
+ {
700
+ volatile VALUE val = callRuby(rb_Float, v);
701
+ if (NIL_P(val))
702
+ {
703
+ throw RubyException(rb_eTypeError, "unable to convert value to a double");
704
+ }
705
+ assert(TYPE(val) == T_FLOAT);
706
+ return RFLOAT_VALUE(val);
707
+ }
708
+
709
+ //
710
+ // EnumInfo implementation.
711
+ //
712
+
713
+ namespace
714
+ {
715
+ struct EnumDefinitionIterator : public IceRuby::HashIterator
716
+ {
717
+ EnumDefinitionIterator() : maxValue(0) {}
718
+
719
+ virtual void element(VALUE key, VALUE value)
720
+ {
721
+ const int32_t v = static_cast<int32_t>(getInteger(key));
722
+ assert(enumerators.find(v) == enumerators.end());
723
+ enumerators[v] = value;
724
+
725
+ if (v > maxValue)
726
+ {
727
+ maxValue = v;
728
+ }
729
+ }
730
+
731
+ int32_t maxValue;
732
+ IceRuby::EnumeratorMap enumerators;
733
+ };
734
+ }
735
+
736
+ IceRuby::EnumInfo::EnumInfo(VALUE ident, VALUE t, VALUE e) : rubyClass(t), maxValue(0)
737
+ {
738
+ const_cast<string&>(id) = getString(ident);
739
+
740
+ EnumDefinitionIterator iter;
741
+ hashIterate(e, iter);
742
+
743
+ const_cast<int32_t&>(maxValue) = iter.maxValue;
744
+ const_cast<EnumeratorMap&>(enumerators) = iter.enumerators;
745
+ }
746
+
747
+ string
748
+ IceRuby::EnumInfo::getId() const
749
+ {
750
+ return id;
751
+ }
752
+
753
+ bool
754
+ IceRuby::EnumInfo::validate(VALUE val)
755
+ {
756
+ return callRuby(rb_obj_is_instance_of, val, rubyClass) == Qtrue;
757
+ }
758
+
759
+ bool
760
+ IceRuby::EnumInfo::variableLength() const
761
+ {
762
+ return true;
763
+ }
764
+
765
+ int
766
+ IceRuby::EnumInfo::wireSize() const
767
+ {
768
+ return 1;
769
+ }
770
+
771
+ Ice::OptionalFormat
772
+ IceRuby::EnumInfo::optionalFormat() const
773
+ {
774
+ return Ice::OptionalFormat::Size;
775
+ }
776
+
777
+ void
778
+ IceRuby::EnumInfo::marshal(VALUE p, Ice::OutputStream* os, ValueMap*, bool)
779
+ {
780
+ assert(callRuby(rb_obj_is_instance_of, p, rubyClass) == Qtrue); // validate() should have caught this.
781
+
782
+ //
783
+ // Validate value.
784
+ //
785
+ volatile VALUE val = callRuby(rb_iv_get, p, "@value");
786
+ const int32_t ival = static_cast<int32_t>(getInteger(val));
787
+ if (enumerators.find(ival) == enumerators.end())
788
+ {
789
+ throw RubyException(rb_eRangeError, "invalid enumerator %ld for enum %s", ival, id.c_str());
790
+ }
791
+
792
+ os->writeEnum(ival, maxValue);
793
+ }
794
+
795
+ void
796
+ IceRuby::EnumInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& cb, VALUE target, void* closure, bool)
797
+ {
798
+ int32_t val = is->readEnum(maxValue);
799
+
800
+ EnumeratorMap::const_iterator p = enumerators.find(val);
801
+ if (p == enumerators.end())
802
+ {
803
+ ostringstream ostr;
804
+ ostr << "invalid enumerator " << val << " for enum " << id;
805
+ throw Ice::MarshalException(__FILE__, __LINE__, ostr.str());
806
+ }
807
+
808
+ cb->unmarshaled(p->second, target, closure);
809
+ }
810
+
811
+ void
812
+ IceRuby::EnumInfo::print(VALUE value, IceInternal::Output& out, PrintObjectHistory*)
813
+ {
814
+ if (!validate(value))
815
+ {
816
+ out << "<invalid value - expected " << id << ">";
817
+ return;
818
+ }
819
+ volatile VALUE str = callRuby(rb_funcall, value, rb_intern("inspect"), 0);
820
+ out << getString(str);
821
+ }
822
+
823
+ //
824
+ // DataMember implementation.
825
+ //
826
+ void
827
+ IceRuby::DataMember::unmarshaled(VALUE val, VALUE target, void*)
828
+ {
829
+ callRuby(rb_ivar_set, target, rubyID, val);
830
+ }
831
+
832
+ static void
833
+ convertDataMembers(VALUE members, DataMemberList& reqMembers, DataMemberList& optMembers, bool allowOptional)
834
+ {
835
+ list<DataMemberPtr> optList;
836
+
837
+ volatile VALUE arr = callRuby(rb_check_array_type, members);
838
+ assert(!NIL_P(arr));
839
+ for (long i = 0; i < RARRAY_LEN(arr); ++i)
840
+ {
841
+ volatile VALUE m = callRuby(rb_check_array_type, RARRAY_AREF(arr, i));
842
+ assert(!NIL_P(m));
843
+ assert(RARRAY_LEN(m) == (allowOptional ? 4 : 2));
844
+
845
+ DataMemberPtr member = make_shared<DataMember>();
846
+
847
+ member->name = getString(RARRAY_AREF(m, 0));
848
+ member->type = getType(RARRAY_AREF(m, 1));
849
+ string s = "@" + member->name;
850
+ member->rubyID = rb_intern(s.c_str());
851
+
852
+ if (allowOptional)
853
+ {
854
+ member->optional = RTEST(RARRAY_AREF(m, 2));
855
+ member->tag = static_cast<int>(getInteger(RARRAY_AREF(m, 3)));
856
+ }
857
+ else
858
+ {
859
+ member->optional = false;
860
+ member->tag = 0;
861
+ }
862
+
863
+ if (member->optional)
864
+ {
865
+ optList.push_back(member);
866
+ }
867
+ else
868
+ {
869
+ reqMembers.push_back(member);
870
+ }
871
+ }
872
+
873
+ if (allowOptional)
874
+ {
875
+ class SortFn
876
+ {
877
+ public:
878
+ static bool compare(const DataMemberPtr& lhs, const DataMemberPtr& rhs) { return lhs->tag < rhs->tag; }
879
+ };
880
+
881
+ optList.sort(SortFn::compare);
882
+ copy(optList.begin(), optList.end(), back_inserter(optMembers));
883
+ }
884
+ }
885
+
886
+ //
887
+ // StructInfo implementation.
888
+ //
889
+ IceRuby::StructInfo::StructInfo(VALUE ident, VALUE t, VALUE m) : rubyClass(t)
890
+ {
891
+ const_cast<string&>(id) = getString(ident);
892
+
893
+ DataMemberList opt;
894
+ convertDataMembers(m, const_cast<DataMemberList&>(members), opt, false);
895
+ assert(opt.empty());
896
+
897
+ _variableLength = false;
898
+ _wireSize = 0;
899
+ for (DataMemberList::const_iterator p = members.begin(); p != members.end(); ++p)
900
+ {
901
+ if (!_variableLength && (*p)->type->variableLength())
902
+ {
903
+ _variableLength = true;
904
+ }
905
+ _wireSize += (*p)->type->wireSize();
906
+ }
907
+ }
908
+
909
+ string
910
+ IceRuby::StructInfo::getId() const
911
+ {
912
+ return id;
913
+ }
914
+
915
+ bool
916
+ IceRuby::StructInfo::validate(VALUE val)
917
+ {
918
+ return !NIL_P(val) && callRuby(rb_obj_is_kind_of, val, rubyClass) == Qtrue;
919
+ }
920
+
921
+ bool
922
+ IceRuby::StructInfo::variableLength() const
923
+ {
924
+ return _variableLength;
925
+ }
926
+
927
+ int
928
+ IceRuby::StructInfo::wireSize() const
929
+ {
930
+ return _wireSize;
931
+ }
932
+
933
+ Ice::OptionalFormat
934
+ IceRuby::StructInfo::optionalFormat() const
935
+ {
936
+ return _variableLength ? Ice::OptionalFormat::FSize : Ice::OptionalFormat::VSize;
937
+ }
938
+
939
+ bool
940
+ IceRuby::StructInfo::usesClasses() const
941
+ {
942
+ for (const auto& dm : members)
943
+ {
944
+ if (dm->type->usesClasses())
945
+ {
946
+ return true;
947
+ }
948
+ }
949
+
950
+ return false;
951
+ }
952
+
953
+ void
954
+ IceRuby::StructInfo::marshal(VALUE p, Ice::OutputStream* os, ValueMap* valueMap, bool optional)
955
+ {
956
+ assert(!NIL_P(p) && callRuby(rb_obj_is_kind_of, p, rubyClass) == Qtrue); // validate() should have caught this.
957
+
958
+ Ice::OutputStream::size_type sizePos = 0;
959
+ if (optional)
960
+ {
961
+ if (_variableLength)
962
+ {
963
+ sizePos = os->startSize();
964
+ }
965
+ else
966
+ {
967
+ os->writeSize(_wireSize);
968
+ }
969
+ }
970
+
971
+ for (DataMemberList::const_iterator q = members.begin(); q != members.end(); ++q)
972
+ {
973
+ DataMemberPtr member = *q;
974
+ volatile VALUE val = callRuby(rb_ivar_get, p, member->rubyID);
975
+ if (!member->type->validate(val))
976
+ {
977
+ throw RubyException(
978
+ rb_eTypeError,
979
+ "invalid value for %s member `%s'",
980
+ const_cast<char*>(id.c_str()),
981
+ member->name.c_str());
982
+ }
983
+ member->type->marshal(val, os, valueMap, false);
984
+ }
985
+
986
+ if (optional && _variableLength)
987
+ {
988
+ os->endSize(sizePos);
989
+ }
990
+ }
991
+
992
+ void
993
+ IceRuby::StructInfo::unmarshal(
994
+ Ice::InputStream* is,
995
+ const UnmarshalCallbackPtr& cb,
996
+ VALUE target,
997
+ void* closure,
998
+ bool optional)
999
+ {
1000
+ volatile VALUE obj = callRuby(rb_class_new_instance, 0, static_cast<VALUE*>(0), rubyClass);
1001
+
1002
+ if (optional)
1003
+ {
1004
+ if (_variableLength)
1005
+ {
1006
+ is->skip(4);
1007
+ }
1008
+ else
1009
+ {
1010
+ is->skipSize();
1011
+ }
1012
+ }
1013
+
1014
+ for (DataMemberList::const_iterator q = members.begin(); q != members.end(); ++q)
1015
+ {
1016
+ DataMemberPtr member = *q;
1017
+ member->type->unmarshal(is, member, obj, 0, false);
1018
+ }
1019
+
1020
+ cb->unmarshaled(obj, target, closure);
1021
+ }
1022
+
1023
+ void
1024
+ IceRuby::StructInfo::print(VALUE value, IceInternal::Output& out, PrintObjectHistory* history)
1025
+ {
1026
+ if (!validate(value))
1027
+ {
1028
+ out << "<invalid value - expected " << id << ">";
1029
+ return;
1030
+ }
1031
+
1032
+ out.sb();
1033
+ for (const auto& member : members)
1034
+ {
1035
+ out << nl << member->name << " = ";
1036
+ if (callRuby(rb_ivar_defined, value, member->rubyID) == Qfalse)
1037
+ {
1038
+ out << "<not defined>";
1039
+ }
1040
+ else
1041
+ {
1042
+ volatile VALUE val = callRuby(rb_ivar_get, value, member->rubyID);
1043
+ member->type->print(val, out, history);
1044
+ }
1045
+ }
1046
+ out.eb();
1047
+ }
1048
+
1049
+ void
1050
+ IceRuby::StructInfo::destroy()
1051
+ {
1052
+ for (DataMemberList::const_iterator p = members.begin(); p != members.end(); ++p)
1053
+ {
1054
+ (*p)->type->destroy();
1055
+ }
1056
+ const_cast<DataMemberList&>(members).clear();
1057
+ }
1058
+
1059
+ //
1060
+ // SequenceInfo implementation.
1061
+ //
1062
+ IceRuby::SequenceInfo::SequenceInfo(VALUE ident, VALUE t)
1063
+ {
1064
+ const_cast<string&>(id) = getString(ident);
1065
+ const_cast<TypeInfoPtr&>(elementType) = getType(t);
1066
+ }
1067
+
1068
+ string
1069
+ IceRuby::SequenceInfo::getId() const
1070
+ {
1071
+ return id;
1072
+ }
1073
+
1074
+ bool
1075
+ IceRuby::SequenceInfo::validate(VALUE val)
1076
+ {
1077
+ //
1078
+ // Accept nil, an array, a string (for sequence<byte>), or any object that responds to to_ary.
1079
+ //
1080
+ if (NIL_P(val) || TYPE(val) == T_ARRAY)
1081
+ {
1082
+ return true;
1083
+ }
1084
+ if (TYPE(val) == T_STRING)
1085
+ {
1086
+ PrimitiveInfoPtr pi = dynamic_pointer_cast<PrimitiveInfo>(elementType);
1087
+ if (pi && pi->kind == PrimitiveInfo::KindByte)
1088
+ {
1089
+ return true;
1090
+ }
1091
+ }
1092
+ ID rbid = rb_intern("to_ary");
1093
+ return callRuby(rb_respond_to, val, rbid) != 0;
1094
+ }
1095
+
1096
+ bool
1097
+ IceRuby::SequenceInfo::variableLength() const
1098
+ {
1099
+ return true;
1100
+ }
1101
+
1102
+ int
1103
+ IceRuby::SequenceInfo::wireSize() const
1104
+ {
1105
+ return 1;
1106
+ }
1107
+
1108
+ Ice::OptionalFormat
1109
+ IceRuby::SequenceInfo::optionalFormat() const
1110
+ {
1111
+ return elementType->variableLength() ? Ice::OptionalFormat::FSize : Ice::OptionalFormat::VSize;
1112
+ }
1113
+
1114
+ bool
1115
+ IceRuby::SequenceInfo::usesClasses() const
1116
+ {
1117
+ return elementType->usesClasses();
1118
+ }
1119
+
1120
+ void
1121
+ IceRuby::SequenceInfo::marshal(VALUE p, Ice::OutputStream* os, ValueMap* valueMap, bool optional)
1122
+ {
1123
+ PrimitiveInfoPtr pi = dynamic_pointer_cast<PrimitiveInfo>(elementType);
1124
+
1125
+ volatile VALUE arr = Qnil;
1126
+
1127
+ Ice::OutputStream::size_type sizePos = 0;
1128
+ if (optional)
1129
+ {
1130
+ if (elementType->variableLength())
1131
+ {
1132
+ sizePos = os->startSize();
1133
+ }
1134
+ else if (elementType->wireSize() > 1)
1135
+ {
1136
+ //
1137
+ // Determine the sequence size.
1138
+ //
1139
+ int sz = 0;
1140
+ if (!NIL_P(p))
1141
+ {
1142
+ if (TYPE(p) == T_ARRAY)
1143
+ {
1144
+ sz = static_cast<int>(RARRAY_LEN(p));
1145
+ }
1146
+ else
1147
+ {
1148
+ arr = callRuby(rb_Array, p);
1149
+ if (NIL_P(arr))
1150
+ {
1151
+ throw RubyException(rb_eTypeError, "unable to convert value to an array");
1152
+ }
1153
+ sz = static_cast<int>(RARRAY_LEN(arr));
1154
+ }
1155
+ }
1156
+ os->writeSize(sz == 0 ? 1 : sz * elementType->wireSize() + (sz > 254 ? 5 : 1));
1157
+ }
1158
+ }
1159
+
1160
+ if (NIL_P(p))
1161
+ {
1162
+ os->writeSize(0);
1163
+ }
1164
+ else if (pi)
1165
+ {
1166
+ marshalPrimitiveSequence(pi, p, os);
1167
+ }
1168
+ else
1169
+ {
1170
+ if (NIL_P(arr))
1171
+ {
1172
+ arr = callRuby(rb_Array, p);
1173
+ if (NIL_P(arr))
1174
+ {
1175
+ throw RubyException(rb_eTypeError, "unable to convert value to an array");
1176
+ }
1177
+ }
1178
+
1179
+ long sz = RARRAY_LEN(arr);
1180
+ os->writeSize(static_cast<int32_t>(sz));
1181
+ for (long i = 0; i < sz; ++i)
1182
+ {
1183
+ if (!elementType->validate(RARRAY_AREF(arr, i)))
1184
+ {
1185
+ throw RubyException(
1186
+ rb_eTypeError,
1187
+ "invalid value for element %ld of `%s'",
1188
+ i,
1189
+ const_cast<char*>(id.c_str()));
1190
+ }
1191
+ elementType->marshal(RARRAY_AREF(arr, i), os, valueMap, false);
1192
+ }
1193
+ }
1194
+
1195
+ if (optional && elementType->variableLength())
1196
+ {
1197
+ os->endSize(sizePos);
1198
+ }
1199
+ }
1200
+
1201
+ void
1202
+ IceRuby::SequenceInfo::unmarshal(
1203
+ Ice::InputStream* is,
1204
+ const UnmarshalCallbackPtr& cb,
1205
+ VALUE target,
1206
+ void* closure,
1207
+ bool optional)
1208
+ {
1209
+ if (optional)
1210
+ {
1211
+ if (elementType->variableLength())
1212
+ {
1213
+ is->skip(4);
1214
+ }
1215
+ else if (elementType->wireSize() > 1)
1216
+ {
1217
+ is->skipSize();
1218
+ }
1219
+ }
1220
+
1221
+ PrimitiveInfoPtr pi = dynamic_pointer_cast<PrimitiveInfo>(elementType);
1222
+ if (pi)
1223
+ {
1224
+ unmarshalPrimitiveSequence(pi, is, cb, target, closure);
1225
+ return;
1226
+ }
1227
+
1228
+ int32_t sz = is->readSize();
1229
+ volatile VALUE arr = createArray(sz);
1230
+
1231
+ for (int32_t i = 0; i < sz; ++i)
1232
+ {
1233
+ void* cl = reinterpret_cast<void*>(i);
1234
+ elementType->unmarshal(is, shared_from_this(), arr, cl, false);
1235
+ }
1236
+
1237
+ cb->unmarshaled(arr, target, closure);
1238
+ }
1239
+
1240
+ void
1241
+ IceRuby::SequenceInfo::unmarshaled(VALUE val, VALUE target, void* closure)
1242
+ {
1243
+ static_assert(sizeof(long) == sizeof(void*), "long and void* must have the same size");
1244
+ long i = reinterpret_cast<long>(closure);
1245
+ RARRAY_ASET(target, i, val);
1246
+ }
1247
+
1248
+ void
1249
+ IceRuby::SequenceInfo::print(VALUE value, IceInternal::Output& out, PrintObjectHistory* history)
1250
+ {
1251
+ if (!validate(value))
1252
+ {
1253
+ out << "<invalid value - expected " << id << ">";
1254
+ return;
1255
+ }
1256
+
1257
+ if (NIL_P(value))
1258
+ {
1259
+ out << "{}";
1260
+ }
1261
+ else
1262
+ {
1263
+ if (TYPE(value) == T_STRING)
1264
+ {
1265
+ PrimitiveInfoPtr pi = dynamic_pointer_cast<PrimitiveInfo>(elementType);
1266
+ if (pi && pi->kind == PrimitiveInfo::KindByte)
1267
+ {
1268
+ out << "'" << escapeString(getString(value)) << "'";
1269
+ return;
1270
+ }
1271
+ }
1272
+
1273
+ volatile VALUE arr = callRuby(rb_Array, value);
1274
+ if (NIL_P(arr))
1275
+ {
1276
+ throw RubyException(rb_eTypeError, "unable to convert value to an array");
1277
+ }
1278
+
1279
+ long sz = RARRAY_LEN(arr);
1280
+
1281
+ out.sb();
1282
+ for (long i = 0; i < sz; ++i)
1283
+ {
1284
+ out << nl << '[' << i << "] = ";
1285
+ elementType->print(RARRAY_AREF(arr, i), out, history);
1286
+ }
1287
+ out.eb();
1288
+ }
1289
+ }
1290
+
1291
+ void
1292
+ IceRuby::SequenceInfo::destroy()
1293
+ {
1294
+ if (elementType)
1295
+ {
1296
+ elementType->destroy();
1297
+ const_cast<TypeInfoPtr&>(elementType) = 0;
1298
+ }
1299
+ }
1300
+
1301
+ void
1302
+ IceRuby::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, VALUE p, Ice::OutputStream* os)
1303
+ {
1304
+ volatile VALUE arr = Qnil;
1305
+ volatile VALUE str = Qnil;
1306
+
1307
+ //
1308
+ // Accept a string or an array for sequence<byte>.
1309
+ //
1310
+ if (pi->kind == PrimitiveInfo::KindByte)
1311
+ {
1312
+ if (TYPE(p) == T_STRING)
1313
+ {
1314
+ str = p;
1315
+ }
1316
+ else
1317
+ {
1318
+ arr = callRuby(rb_Array, p);
1319
+ if (NIL_P(arr))
1320
+ {
1321
+ throw RubyException(rb_eTypeError, "argument is not a string or an array");
1322
+ }
1323
+ }
1324
+ }
1325
+ else
1326
+ {
1327
+ arr = callRuby(rb_Array, p);
1328
+ if (NIL_P(arr))
1329
+ {
1330
+ throw RubyException(rb_eTypeError, "unable to convert value to an array");
1331
+ }
1332
+ }
1333
+
1334
+ switch (pi->kind)
1335
+ {
1336
+ case PrimitiveInfo::KindBool:
1337
+ {
1338
+ long sz = RARRAY_LEN(arr);
1339
+ Ice::BoolSeq seq(static_cast<size_t>(sz));
1340
+ for (long i = 0; i < sz; ++i)
1341
+ {
1342
+ seq[static_cast<size_t>(i)] = RTEST(RARRAY_AREF(arr, i));
1343
+ }
1344
+ os->write(seq);
1345
+ break;
1346
+ }
1347
+ case PrimitiveInfo::KindByte:
1348
+ {
1349
+ if (!NIL_P(str))
1350
+ {
1351
+ const char* s = RSTRING_PTR(str);
1352
+ const long len = RSTRING_LEN(str);
1353
+ if (s == 0 || len == 0)
1354
+ {
1355
+ os->write(int32_t(0));
1356
+ }
1357
+ else
1358
+ {
1359
+ os->write(reinterpret_cast<const byte*>(s), reinterpret_cast<const byte*>(s + len));
1360
+ }
1361
+ }
1362
+ else
1363
+ {
1364
+ long sz = RARRAY_LEN(arr);
1365
+ Ice::ByteSeq seq(static_cast<size_t>(sz));
1366
+ for (long i = 0; i < sz; ++i)
1367
+ {
1368
+ long val = getInteger(RARRAY_AREF(arr, i));
1369
+ if (val < 0 || val > 255)
1370
+ {
1371
+ throw RubyException(rb_eTypeError, "invalid value for element %ld of sequence<byte>", i);
1372
+ }
1373
+ seq[static_cast<size_t>(i)] = static_cast<byte>(val);
1374
+ }
1375
+ os->write(seq);
1376
+ }
1377
+ break;
1378
+ }
1379
+ case PrimitiveInfo::KindShort:
1380
+ {
1381
+ long sz = RARRAY_LEN(arr);
1382
+ Ice::ShortSeq seq(static_cast<size_t>(sz));
1383
+ for (long i = 0; i < sz; ++i)
1384
+ {
1385
+ long val = getInteger(RARRAY_AREF(arr, i));
1386
+ if (val < SHRT_MIN || val > SHRT_MAX)
1387
+ {
1388
+ throw RubyException(rb_eTypeError, "invalid value for element %ld of sequence<short>", i);
1389
+ }
1390
+ seq[static_cast<size_t>(i)] = static_cast<int16_t>(val);
1391
+ }
1392
+ os->write(seq);
1393
+ break;
1394
+ }
1395
+ case PrimitiveInfo::KindInt:
1396
+ {
1397
+ long sz = RARRAY_LEN(arr);
1398
+ Ice::IntSeq seq(static_cast<size_t>(sz));
1399
+ for (long i = 0; i < sz; ++i)
1400
+ {
1401
+ long val = getInteger(RARRAY_AREF(arr, i));
1402
+ if (val < INT_MIN || val > INT_MAX)
1403
+ {
1404
+ throw RubyException(rb_eTypeError, "invalid value for element %ld of sequence<int>", i);
1405
+ }
1406
+ seq[static_cast<size_t>(i)] = static_cast<int32_t>(val);
1407
+ }
1408
+ os->write(seq);
1409
+ break;
1410
+ }
1411
+ case PrimitiveInfo::KindLong:
1412
+ {
1413
+ long sz = RARRAY_LEN(arr);
1414
+ Ice::LongSeq seq(static_cast<size_t>(sz));
1415
+ for (long i = 0; i < sz; ++i)
1416
+ {
1417
+ seq[static_cast<size_t>(i)] = getLong(RARRAY_AREF(arr, i));
1418
+ }
1419
+ os->write(seq);
1420
+ break;
1421
+ }
1422
+ case PrimitiveInfo::KindFloat:
1423
+ {
1424
+ long sz = RARRAY_LEN(arr);
1425
+ Ice::FloatSeq seq(static_cast<size_t>(sz));
1426
+ for (long i = 0; i < sz; ++i)
1427
+ {
1428
+ volatile VALUE v = callRuby(rb_Float, RARRAY_AREF(arr, i));
1429
+ if (NIL_P(v))
1430
+ {
1431
+ throw RubyException(rb_eTypeError, "unable to convert array element %ld to a float", i);
1432
+ }
1433
+ assert(TYPE(v) == T_FLOAT);
1434
+ seq[static_cast<size_t>(i)] = static_cast<float>(RFLOAT_VALUE(v));
1435
+ }
1436
+ os->write(seq);
1437
+ break;
1438
+ }
1439
+ case PrimitiveInfo::KindDouble:
1440
+ {
1441
+ long sz = RARRAY_LEN(arr);
1442
+ Ice::DoubleSeq seq(static_cast<size_t>(sz));
1443
+ for (long i = 0; i < sz; ++i)
1444
+ {
1445
+ volatile VALUE v = callRuby(rb_Float, RARRAY_AREF(arr, i));
1446
+ if (NIL_P(v))
1447
+ {
1448
+ throw RubyException(rb_eTypeError, "unable to convert array element %ld to a double", i);
1449
+ }
1450
+ assert(TYPE(v) == T_FLOAT);
1451
+ seq[static_cast<size_t>(i)] = RFLOAT_VALUE(v);
1452
+ }
1453
+ os->write(seq);
1454
+ break;
1455
+ }
1456
+ case PrimitiveInfo::KindString:
1457
+ {
1458
+ long sz = RARRAY_LEN(arr);
1459
+ Ice::StringSeq seq(static_cast<size_t>(sz));
1460
+ for (long i = 0; i < sz; ++i)
1461
+ {
1462
+ seq[static_cast<size_t>(i)] = getString(RARRAY_AREF(arr, i));
1463
+ }
1464
+ if (seq.empty())
1465
+ {
1466
+ os->write(seq);
1467
+ }
1468
+ else
1469
+ {
1470
+ os->write(&seq[0], &seq[0] + seq.size(), false); // Bypass string conversion.
1471
+ }
1472
+ break;
1473
+ }
1474
+ }
1475
+ }
1476
+
1477
+ void
1478
+ IceRuby::SequenceInfo::unmarshalPrimitiveSequence(
1479
+ const PrimitiveInfoPtr& pi,
1480
+ Ice::InputStream* is,
1481
+ const UnmarshalCallbackPtr& cb,
1482
+ VALUE target,
1483
+ void* closure)
1484
+ {
1485
+ volatile VALUE result = Qnil;
1486
+
1487
+ switch (pi->kind)
1488
+ {
1489
+ case PrimitiveInfo::KindBool:
1490
+ {
1491
+ pair<const bool*, const bool*> p;
1492
+ is->read(p);
1493
+ long sz = static_cast<long>(p.second - p.first);
1494
+ result = createArray(sz);
1495
+
1496
+ if (sz > 0)
1497
+ {
1498
+ for (long i = 0; i < sz; ++i)
1499
+ {
1500
+ RARRAY_ASET(result, i, p.first[i] ? Qtrue : Qfalse);
1501
+ }
1502
+ }
1503
+ break;
1504
+ }
1505
+ case PrimitiveInfo::KindByte:
1506
+ {
1507
+ pair<const uint8_t*, const uint8_t*> p;
1508
+ is->read(p);
1509
+ result =
1510
+ callRuby(rb_str_new, reinterpret_cast<const char*>(p.first), static_cast<long>(p.second - p.first));
1511
+ break;
1512
+ }
1513
+ case PrimitiveInfo::KindShort:
1514
+ {
1515
+ pair<const int16_t*, const int16_t*> p;
1516
+ is->read(p);
1517
+ long sz = static_cast<long>(p.second - p.first);
1518
+ result = createArray(sz);
1519
+
1520
+ if (sz > 0)
1521
+ {
1522
+ for (long i = 0; i < sz; ++i)
1523
+ {
1524
+ RARRAY_ASET(result, i, INT2FIX(p.first[i]));
1525
+ }
1526
+ }
1527
+ break;
1528
+ }
1529
+ case PrimitiveInfo::KindInt:
1530
+ {
1531
+ pair<const int32_t*, const int32_t*> p;
1532
+ is->read(p);
1533
+ long sz = static_cast<long>(p.second - p.first);
1534
+ result = createArray(sz);
1535
+
1536
+ if (sz > 0)
1537
+ {
1538
+ for (long i = 0; i < sz; ++i)
1539
+ {
1540
+ RARRAY_ASET(result, i, INT2FIX(p.first[i]));
1541
+ }
1542
+ }
1543
+ break;
1544
+ }
1545
+ case PrimitiveInfo::KindLong:
1546
+ {
1547
+ pair<const int64_t*, const int64_t*> p;
1548
+ is->read(p);
1549
+ long sz = static_cast<long>(p.second - p.first);
1550
+ result = createArray(sz);
1551
+
1552
+ if (sz > 0)
1553
+ {
1554
+ for (long i = 0; i < sz; ++i)
1555
+ {
1556
+ RARRAY_ASET(result, i, callRuby(rb_ll2inum, p.first[i]));
1557
+ }
1558
+ }
1559
+ break;
1560
+ }
1561
+ case PrimitiveInfo::KindFloat:
1562
+ {
1563
+ pair<const float*, const float*> p;
1564
+ is->read(p);
1565
+ long sz = static_cast<long>(p.second - p.first);
1566
+ result = createArray(sz);
1567
+
1568
+ if (sz > 0)
1569
+ {
1570
+ for (long i = 0; i < sz; ++i)
1571
+ {
1572
+ RARRAY_ASET(result, i, callRuby(rb_float_new, p.first[i]));
1573
+ }
1574
+ }
1575
+ break;
1576
+ }
1577
+ case PrimitiveInfo::KindDouble:
1578
+ {
1579
+ pair<const double*, const double*> p;
1580
+ is->read(p);
1581
+ long sz = static_cast<long>(p.second - p.first);
1582
+ result = createArray(sz);
1583
+
1584
+ if (sz > 0)
1585
+ {
1586
+ for (long i = 0; i < sz; ++i)
1587
+ {
1588
+ RARRAY_ASET(result, i, callRuby(rb_float_new, p.first[i]));
1589
+ }
1590
+ }
1591
+ break;
1592
+ }
1593
+ case PrimitiveInfo::KindString:
1594
+ {
1595
+ Ice::StringSeq seq;
1596
+ is->read(seq, false); // Bypass string conversion.
1597
+ long sz = static_cast<long>(seq.size());
1598
+ result = createArray(sz);
1599
+
1600
+ for (long i = 0; i < sz; ++i)
1601
+ {
1602
+ RARRAY_ASET(result, i, createString(seq[static_cast<size_t>(i)]));
1603
+ }
1604
+ break;
1605
+ }
1606
+ }
1607
+ cb->unmarshaled(result, target, closure);
1608
+ }
1609
+
1610
+ //
1611
+ // DictionaryInfo implementation.
1612
+ //
1613
+ IceRuby::DictionaryInfo::DictionaryInfo(VALUE ident, VALUE kt, VALUE vt)
1614
+ {
1615
+ const_cast<string&>(id) = getString(ident);
1616
+ const_cast<TypeInfoPtr&>(keyType) = getType(kt);
1617
+ const_cast<TypeInfoPtr&>(valueType) = getType(vt);
1618
+
1619
+ _variableLength = keyType->variableLength() || valueType->variableLength();
1620
+ _wireSize = keyType->wireSize() + valueType->wireSize();
1621
+ }
1622
+
1623
+ string
1624
+ IceRuby::DictionaryInfo::getId() const
1625
+ {
1626
+ return id;
1627
+ }
1628
+
1629
+ bool
1630
+ IceRuby::DictionaryInfo::validate(VALUE val)
1631
+ {
1632
+ //
1633
+ // Accept nil, a hash, or any object that responds to to_hash.
1634
+ //
1635
+ if (NIL_P(val) || TYPE(val) == T_HASH)
1636
+ {
1637
+ return true;
1638
+ }
1639
+ ID rbid = rb_intern("to_hash");
1640
+ return callRuby(rb_respond_to, val, rbid) != 0;
1641
+ }
1642
+
1643
+ bool
1644
+ IceRuby::DictionaryInfo::variableLength() const
1645
+ {
1646
+ return true;
1647
+ }
1648
+
1649
+ int
1650
+ IceRuby::DictionaryInfo::wireSize() const
1651
+ {
1652
+ return 1;
1653
+ }
1654
+
1655
+ Ice::OptionalFormat
1656
+ IceRuby::DictionaryInfo::optionalFormat() const
1657
+ {
1658
+ return _variableLength ? Ice::OptionalFormat::FSize : Ice::OptionalFormat::VSize;
1659
+ }
1660
+
1661
+ bool
1662
+ IceRuby::DictionaryInfo::usesClasses() const
1663
+ {
1664
+ return valueType->usesClasses();
1665
+ }
1666
+
1667
+ namespace
1668
+ {
1669
+ struct DictionaryMarshalIterator : public IceRuby::HashIterator
1670
+ {
1671
+ DictionaryMarshalIterator(const IceRuby::DictionaryInfoPtr& d, Ice::OutputStream* o, IceRuby::ValueMap* m)
1672
+ : dict(d),
1673
+ os(o),
1674
+ valueMap(m)
1675
+ {
1676
+ }
1677
+
1678
+ virtual void element(VALUE key, VALUE value) { dict->marshalElement(key, value, os, valueMap); }
1679
+
1680
+ IceRuby::DictionaryInfoPtr dict;
1681
+ Ice::OutputStream* os;
1682
+ IceRuby::ValueMap* valueMap;
1683
+ };
1684
+ }
1685
+
1686
+ void
1687
+ IceRuby::DictionaryInfo::marshal(VALUE p, Ice::OutputStream* os, ValueMap* valueMap, bool optional)
1688
+ {
1689
+ volatile VALUE hash = Qnil;
1690
+
1691
+ if (!NIL_P(p))
1692
+ {
1693
+ hash = callRuby(rb_convert_type, p, T_HASH, "Hash", "to_hash");
1694
+ if (NIL_P(hash))
1695
+ {
1696
+ throw RubyException(rb_eTypeError, "unable to convert value to a hash");
1697
+ }
1698
+ }
1699
+
1700
+ int32_t sz = 0;
1701
+ if (!NIL_P(hash))
1702
+ {
1703
+ sz = static_cast<int32_t>(RHASH_SIZE(hash));
1704
+ }
1705
+
1706
+ Ice::OutputStream::size_type sizePos = 0;
1707
+ if (optional)
1708
+ {
1709
+ if (_variableLength)
1710
+ {
1711
+ sizePos = os->startSize();
1712
+ }
1713
+ else
1714
+ {
1715
+ os->writeSize(sz == 0 ? 1 : sz * _wireSize + (sz > 254 ? 5 : 1));
1716
+ }
1717
+ }
1718
+
1719
+ if (NIL_P(hash))
1720
+ {
1721
+ os->writeSize(0);
1722
+ }
1723
+ else
1724
+ {
1725
+ os->writeSize(sz);
1726
+ if (sz > 0)
1727
+ {
1728
+ DictionaryMarshalIterator iter(shared_from_this(), os, valueMap);
1729
+ hashIterate(hash, iter);
1730
+ }
1731
+ }
1732
+
1733
+ if (optional && _variableLength)
1734
+ {
1735
+ os->endSize(sizePos);
1736
+ }
1737
+ }
1738
+
1739
+ void
1740
+ IceRuby::DictionaryInfo::marshalElement(VALUE key, VALUE value, Ice::OutputStream* os, ValueMap* valueMap)
1741
+ {
1742
+ if (!keyType->validate(key))
1743
+ {
1744
+ throw RubyException(rb_eTypeError, "invalid key in `%s' element", const_cast<char*>(id.c_str()));
1745
+ }
1746
+
1747
+ if (!valueType->validate(value))
1748
+ {
1749
+ throw RubyException(rb_eTypeError, "invalid value in `%s' element", const_cast<char*>(id.c_str()));
1750
+ }
1751
+
1752
+ keyType->marshal(key, os, valueMap, false);
1753
+ valueType->marshal(value, os, valueMap, false);
1754
+ }
1755
+
1756
+ void
1757
+ IceRuby::DictionaryInfo::unmarshal(
1758
+ Ice::InputStream* is,
1759
+ const UnmarshalCallbackPtr& cb,
1760
+ VALUE target,
1761
+ void* closure,
1762
+ bool optional)
1763
+ {
1764
+ if (optional)
1765
+ {
1766
+ if (_variableLength)
1767
+ {
1768
+ is->skip(4);
1769
+ }
1770
+ else
1771
+ {
1772
+ is->skipSize();
1773
+ }
1774
+ }
1775
+
1776
+ volatile VALUE hash = callRuby(rb_hash_new);
1777
+
1778
+ KeyCallbackPtr keyCB = make_shared<KeyCallback>();
1779
+ keyCB->key = Qnil;
1780
+
1781
+ int32_t sz = is->readSize();
1782
+ for (int32_t i = 0; i < sz; ++i)
1783
+ {
1784
+ //
1785
+ // A dictionary key cannot be a class (or contain one), so the key must be
1786
+ // available immediately.
1787
+ //
1788
+ keyType->unmarshal(is, keyCB, Qnil, 0, false);
1789
+ assert(!NIL_P(keyCB->key));
1790
+ if (valueType->usesClasses())
1791
+ {
1792
+ // Temporarily set the entry with a Qnil value to ensure the key is not GC
1793
+ // while unmarshaling a value class
1794
+ if (RB_TYPE_P(keyCB->key, T_STRING))
1795
+ {
1796
+ // For string keys create a frozen string to ensure that the key used
1797
+ // in the map matches the one keep in the closure
1798
+ keyCB->key = rb_str_new_frozen(keyCB->key);
1799
+ }
1800
+ callRuby(rb_hash_aset, hash, keyCB->key, Qnil);
1801
+ }
1802
+ //
1803
+ // The callback will set the dictionary entry with the unmarshaled value,
1804
+ // so we pass it the key.
1805
+ //
1806
+ void* cl = reinterpret_cast<void*>(keyCB->key);
1807
+ valueType->unmarshal(is, shared_from_this(), hash, cl, false);
1808
+ }
1809
+
1810
+ cb->unmarshaled(hash, target, closure);
1811
+ }
1812
+
1813
+ void
1814
+ IceRuby::DictionaryInfo::unmarshaled(VALUE val, VALUE target, void* closure)
1815
+ {
1816
+ volatile VALUE key = reinterpret_cast<VALUE>(closure);
1817
+ callRuby(rb_hash_aset, target, key, val);
1818
+ }
1819
+
1820
+ namespace
1821
+ {
1822
+ struct DictionaryPrintIterator : public IceRuby::HashIterator
1823
+ {
1824
+ DictionaryPrintIterator(const DictionaryInfoPtr& d, IceInternal::Output& o, PrintObjectHistory* h)
1825
+ : dict(d),
1826
+ out(o),
1827
+ history(h)
1828
+ {
1829
+ }
1830
+
1831
+ virtual void element(VALUE key, VALUE value) { dict->printElement(key, value, out, history); }
1832
+
1833
+ IceRuby::DictionaryInfoPtr dict;
1834
+ IceInternal::Output& out;
1835
+ IceRuby::PrintObjectHistory* history;
1836
+ };
1837
+ }
1838
+
1839
+ void
1840
+ IceRuby::DictionaryInfo::print(VALUE value, IceInternal::Output& out, PrintObjectHistory* history)
1841
+ {
1842
+ if (!validate(value))
1843
+ {
1844
+ out << "<invalid value - expected " << id << ">";
1845
+ return;
1846
+ }
1847
+
1848
+ if (NIL_P(value))
1849
+ {
1850
+ out << "{}";
1851
+ }
1852
+ else
1853
+ {
1854
+ volatile VALUE hash = callRuby(rb_convert_type, value, T_HASH, "Hash", "to_hash");
1855
+ if (NIL_P(hash))
1856
+ {
1857
+ throw RubyException(rb_eTypeError, "unable to convert value to a hash");
1858
+ }
1859
+
1860
+ if (RHASH_SIZE(hash) == 0)
1861
+ {
1862
+ out << "{}";
1863
+ return;
1864
+ }
1865
+
1866
+ out.sb();
1867
+ DictionaryPrintIterator iter(shared_from_this(), out, history);
1868
+ hashIterate(hash, iter);
1869
+ out.eb();
1870
+ }
1871
+ }
1872
+
1873
+ void
1874
+ IceRuby::DictionaryInfo::printElement(VALUE key, VALUE value, IceInternal::Output& out, PrintObjectHistory* history)
1875
+ {
1876
+ out << nl << "key = ";
1877
+ keyType->print(key, out, history);
1878
+ out << nl << "value = ";
1879
+ valueType->print(value, out, history);
1880
+ }
1881
+
1882
+ void
1883
+ IceRuby::DictionaryInfo::KeyCallback::unmarshaled(VALUE val, VALUE, void*)
1884
+ {
1885
+ key = val;
1886
+ }
1887
+
1888
+ void
1889
+ IceRuby::DictionaryInfo::destroy()
1890
+ {
1891
+ if (keyType)
1892
+ {
1893
+ keyType->destroy();
1894
+ const_cast<TypeInfoPtr&>(keyType) = 0;
1895
+ }
1896
+ if (valueType)
1897
+ {
1898
+ valueType->destroy();
1899
+ const_cast<TypeInfoPtr&>(valueType) = 0;
1900
+ }
1901
+ }
1902
+
1903
+ //
1904
+ // ClassInfo implementation.
1905
+ //
1906
+
1907
+ ClassInfoPtr
1908
+ IceRuby::ClassInfo::create(VALUE ident)
1909
+ {
1910
+ shared_ptr<ClassInfo> classInfo{new ClassInfo{ident}};
1911
+ const_cast<VALUE&>(classInfo->typeObj) = createType(classInfo);
1912
+ return classInfo;
1913
+ }
1914
+
1915
+ IceRuby::ClassInfo::ClassInfo(VALUE ident)
1916
+ : compactId(-1),
1917
+ isBase(false),
1918
+ interface(false),
1919
+ rubyClass(Qnil),
1920
+ typeObj(Qnil),
1921
+ defined(false)
1922
+ {
1923
+ const_cast<string&>(id) = getString(ident);
1924
+ const_cast<bool&>(isBase) = id == Ice::Value::ice_staticId();
1925
+ }
1926
+
1927
+ void
1928
+ IceRuby::ClassInfo::define(VALUE t, VALUE compact, VALUE intf, VALUE b, VALUE m)
1929
+ {
1930
+ if (!NIL_P(b))
1931
+ {
1932
+ const_cast<ClassInfoPtr&>(base) = dynamic_pointer_cast<ClassInfo>(getType(b));
1933
+ assert(base);
1934
+ }
1935
+
1936
+ const_cast<int32_t&>(compactId) = static_cast<int32_t>(getInteger(compact));
1937
+ const_cast<bool&>(interface) = RTEST(intf);
1938
+ convertDataMembers(m, const_cast<DataMemberList&>(members), const_cast<DataMemberList&>(optionalMembers), true);
1939
+ const_cast<VALUE&>(rubyClass) = t;
1940
+ const_cast<bool&>(defined) = true;
1941
+ }
1942
+
1943
+ string
1944
+ IceRuby::ClassInfo::getId() const
1945
+ {
1946
+ return id;
1947
+ }
1948
+
1949
+ bool
1950
+ IceRuby::ClassInfo::validate(VALUE val)
1951
+ {
1952
+ if (NIL_P(val))
1953
+ {
1954
+ return true;
1955
+ }
1956
+
1957
+ //
1958
+ // We consider an object to be an instance of this class if its class contains
1959
+ // an ICE_TYPE constant that refers to this class, or a subclass of this class.
1960
+ //
1961
+ volatile VALUE cls = CLASS_OF(val);
1962
+ volatile VALUE type = Qnil;
1963
+ type = callRuby(rb_const_get, cls, rb_intern("ICE_TYPE"));
1964
+ assert(!NIL_P(type));
1965
+ ClassInfoPtr info = dynamic_pointer_cast<ClassInfo>(getType(type));
1966
+ assert(info);
1967
+ return this->interface || info->isA(shared_from_this());
1968
+ }
1969
+
1970
+ bool
1971
+ IceRuby::ClassInfo::variableLength() const
1972
+ {
1973
+ return true;
1974
+ }
1975
+
1976
+ int
1977
+ IceRuby::ClassInfo::wireSize() const
1978
+ {
1979
+ return 1;
1980
+ }
1981
+
1982
+ Ice::OptionalFormat
1983
+ IceRuby::ClassInfo::optionalFormat() const
1984
+ {
1985
+ return Ice::OptionalFormat::Class;
1986
+ }
1987
+
1988
+ bool
1989
+ IceRuby::ClassInfo::usesClasses() const
1990
+ {
1991
+ return true;
1992
+ }
1993
+
1994
+ void
1995
+ IceRuby::ClassInfo::marshal(VALUE p, Ice::OutputStream* os, ValueMap* valueMap, bool)
1996
+ {
1997
+ if (!defined)
1998
+ {
1999
+ throw RubyException(rb_eRuntimeError, "class %s is declared but not defined", id.c_str());
2000
+ }
2001
+
2002
+ if (NIL_P(p))
2003
+ {
2004
+ shared_ptr<Ice::Value> value; // nullptr
2005
+ os->write(value);
2006
+ return;
2007
+ }
2008
+
2009
+ //
2010
+ // Ice::ValueWriter is a subclass of Ice::Value that wraps a Ruby object for marshaling.
2011
+ // It is possible that this Ruby object has already been marshaled, therefore we first must
2012
+ // check the object map to see if this object is present. If so, we use the existing ValueWriter,
2013
+ // otherwise we create a new one.
2014
+ //
2015
+ shared_ptr<Ice::Value> writer;
2016
+ assert(valueMap);
2017
+ ValueMap::iterator q = valueMap->find(p);
2018
+ if (q == valueMap->end())
2019
+ {
2020
+ writer = make_shared<ValueWriter>(p, valueMap, shared_from_this());
2021
+ valueMap->insert(ValueMap::value_type(p, writer));
2022
+ }
2023
+ else
2024
+ {
2025
+ writer = q->second;
2026
+ }
2027
+
2028
+ //
2029
+ // Give the writer to the stream. The stream will eventually call write() on it.
2030
+ //
2031
+ os->write(writer);
2032
+ }
2033
+
2034
+ namespace
2035
+ {
2036
+ void patchObject(void* addr, const shared_ptr<Ice::Value>& v)
2037
+ {
2038
+ ReadValueCallback* cb = static_cast<ReadValueCallback*>(addr);
2039
+ assert(cb);
2040
+ cb->invoke(v);
2041
+ }
2042
+ }
2043
+
2044
+ void
2045
+ IceRuby::ClassInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& cb, VALUE target, void* closure, bool)
2046
+ {
2047
+ if (!defined)
2048
+ {
2049
+ throw RubyException(rb_eRuntimeError, "class %s is declared but not defined", id.c_str());
2050
+ }
2051
+
2052
+ //
2053
+ // This callback is notified when the Slice value is actually read. The StreamUtil object
2054
+ // attached to the stream keeps a reference to the callback object to ensure it lives
2055
+ // long enough.
2056
+ //
2057
+ ReadValueCallbackPtr rocb = make_shared<ReadValueCallback>(shared_from_this(), cb, target, closure);
2058
+ StreamUtil* util = reinterpret_cast<StreamUtil*>(is->getClosure());
2059
+ assert(util);
2060
+ util->add(rocb);
2061
+ is->read(patchObject, rocb.get());
2062
+ }
2063
+
2064
+ void
2065
+ IceRuby::ClassInfo::print(VALUE value, IceInternal::Output& out, PrintObjectHistory* history)
2066
+ {
2067
+ if (!validate(value))
2068
+ {
2069
+ out << "<invalid value - expected " << id << ">";
2070
+ return;
2071
+ }
2072
+
2073
+ if (NIL_P(value))
2074
+ {
2075
+ out << "<nil>";
2076
+ }
2077
+ else
2078
+ {
2079
+ map<VALUE, int>::iterator q = history->objects.find(value);
2080
+ if (q != history->objects.end())
2081
+ {
2082
+ out << "<object #" << q->second << ">";
2083
+ }
2084
+ else
2085
+ {
2086
+ volatile VALUE cls = CLASS_OF(value);
2087
+ volatile VALUE type = Qnil;
2088
+ ClassInfoPtr info;
2089
+ type = callRuby(rb_const_get, cls, rb_intern("ICE_TYPE"));
2090
+ info = dynamic_pointer_cast<ClassInfo>(getType(type));
2091
+ assert(info);
2092
+ out << "object #" << history->index << " (" << info->id << ')';
2093
+ history->objects.insert(map<VALUE, int>::value_type(value, history->index));
2094
+ ++history->index;
2095
+ out.sb();
2096
+ info->printMembers(value, out, history);
2097
+ out.eb();
2098
+ }
2099
+ }
2100
+ }
2101
+
2102
+ void
2103
+ IceRuby::ClassInfo::destroy()
2104
+ {
2105
+ const_cast<ClassInfoPtr&>(base) = 0;
2106
+ if (!members.empty())
2107
+ {
2108
+ DataMemberList ml = members;
2109
+ const_cast<DataMemberList&>(members).clear();
2110
+ for (DataMemberList::iterator p = ml.begin(); p != ml.end(); ++p)
2111
+ {
2112
+ (*p)->type->destroy();
2113
+ }
2114
+ }
2115
+ }
2116
+
2117
+ void
2118
+ IceRuby::ClassInfo::printMembers(VALUE value, IceInternal::Output& out, PrintObjectHistory* history)
2119
+ {
2120
+ if (base)
2121
+ {
2122
+ base->printMembers(value, out, history);
2123
+ }
2124
+
2125
+ for (const auto& member : members)
2126
+ {
2127
+ out << nl << member->name << " = ";
2128
+ if (callRuby(rb_ivar_defined, value, member->rubyID) == Qfalse)
2129
+ {
2130
+ out << "<not defined>";
2131
+ }
2132
+ else
2133
+ {
2134
+ volatile VALUE val = callRuby(rb_ivar_get, value, member->rubyID);
2135
+ member->type->print(val, out, history);
2136
+ }
2137
+ }
2138
+
2139
+ for (const auto& member : optionalMembers)
2140
+ {
2141
+ out << nl << member->name << " = ";
2142
+ if (callRuby(rb_ivar_defined, value, member->rubyID) == Qfalse)
2143
+ {
2144
+ out << "<not defined>";
2145
+ }
2146
+ else
2147
+ {
2148
+ volatile VALUE val = callRuby(rb_ivar_get, value, member->rubyID);
2149
+ if (val == Qnil)
2150
+ {
2151
+ out << "<nil>";
2152
+ }
2153
+ else
2154
+ {
2155
+ member->type->print(val, out, history);
2156
+ }
2157
+ }
2158
+ }
2159
+ }
2160
+
2161
+ bool
2162
+ IceRuby::ClassInfo::isA(const ClassInfoPtr& info)
2163
+ {
2164
+ //
2165
+ // Return true if this class has an is-a relationship with info.
2166
+ //
2167
+ if (info->isBase)
2168
+ {
2169
+ return true;
2170
+ }
2171
+ else if (this == info.get())
2172
+ {
2173
+ return true;
2174
+ }
2175
+
2176
+ return base && base->isA(info);
2177
+ }
2178
+
2179
+ //
2180
+ // ProxyInfo implementation.
2181
+ //
2182
+
2183
+ ProxyInfoPtr
2184
+ IceRuby::ProxyInfo::create(VALUE ident)
2185
+ {
2186
+ shared_ptr<ProxyInfo> proxyInfo{new ProxyInfo{ident}};
2187
+ const_cast<VALUE&>(proxyInfo->typeObj) = createType(proxyInfo);
2188
+ return proxyInfo;
2189
+ }
2190
+
2191
+ IceRuby::ProxyInfo::ProxyInfo(VALUE ident) : isBase(false), rubyClass(Qnil), typeObj(Qnil)
2192
+ {
2193
+ const_cast<string&>(id) = getString(ident);
2194
+ const_cast<bool&>(isBase) = id == Ice::Object::ice_staticId();
2195
+ }
2196
+
2197
+ void
2198
+ IceRuby::ProxyInfo::define(VALUE t, VALUE b, VALUE i)
2199
+ {
2200
+ if (!NIL_P(b))
2201
+ {
2202
+ const_cast<ProxyInfoPtr&>(base) = dynamic_pointer_cast<ProxyInfo>(getType(b));
2203
+ assert(base);
2204
+ }
2205
+
2206
+ volatile VALUE arr = callRuby(rb_check_array_type, i);
2207
+ assert(!NIL_P(arr));
2208
+ for (int n = 0; n < RARRAY_LEN(arr); ++n)
2209
+ {
2210
+ ProxyInfoPtr iface = dynamic_pointer_cast<ProxyInfo>(getType(RARRAY_AREF(arr, n)));
2211
+ assert(iface);
2212
+ const_cast<ProxyInfoList&>(interfaces).push_back(iface);
2213
+ }
2214
+
2215
+ const_cast<VALUE&>(rubyClass) = t;
2216
+ }
2217
+
2218
+ string
2219
+ IceRuby::ProxyInfo::getId() const
2220
+ {
2221
+ return id;
2222
+ }
2223
+
2224
+ bool
2225
+ IceRuby::ProxyInfo::validate(VALUE val)
2226
+ {
2227
+ return NIL_P(val) || checkProxy(val);
2228
+ }
2229
+
2230
+ bool
2231
+ IceRuby::ProxyInfo::variableLength() const
2232
+ {
2233
+ return true;
2234
+ }
2235
+
2236
+ int
2237
+ IceRuby::ProxyInfo::wireSize() const
2238
+ {
2239
+ return 1;
2240
+ }
2241
+
2242
+ Ice::OptionalFormat
2243
+ IceRuby::ProxyInfo::optionalFormat() const
2244
+ {
2245
+ return Ice::OptionalFormat::FSize;
2246
+ }
2247
+
2248
+ void
2249
+ IceRuby::ProxyInfo::marshal(VALUE p, Ice::OutputStream* os, ValueMap*, bool optional)
2250
+ {
2251
+ Ice::OutputStream::size_type sizePos = 0;
2252
+ if (optional)
2253
+ {
2254
+ sizePos = os->startSize();
2255
+ }
2256
+
2257
+ std::optional<Ice::ObjectPrx> proxy;
2258
+
2259
+ if (!NIL_P(p))
2260
+ {
2261
+ assert(checkProxy(p)); // validate() should have caught this.
2262
+ proxy = getProxy(p);
2263
+ }
2264
+ os->write(proxy);
2265
+
2266
+ if (optional)
2267
+ {
2268
+ os->endSize(sizePos);
2269
+ }
2270
+ }
2271
+
2272
+ void
2273
+ IceRuby::ProxyInfo::unmarshal(
2274
+ Ice::InputStream* is,
2275
+ const UnmarshalCallbackPtr& cb,
2276
+ VALUE target,
2277
+ void* closure,
2278
+ bool optional)
2279
+ {
2280
+ if (optional)
2281
+ {
2282
+ is->skip(4);
2283
+ }
2284
+
2285
+ std::optional<Ice::ObjectPrx> proxy;
2286
+ is->read(proxy);
2287
+
2288
+ if (!proxy)
2289
+ {
2290
+ cb->unmarshaled(Qnil, target, closure);
2291
+ return;
2292
+ }
2293
+
2294
+ if (NIL_P(rubyClass))
2295
+ {
2296
+ throw RubyException(rb_eRuntimeError, "class %s is declared but not defined", id.c_str());
2297
+ }
2298
+
2299
+ volatile VALUE p = createProxy(proxy.value(), rubyClass);
2300
+ cb->unmarshaled(p, target, closure);
2301
+ }
2302
+
2303
+ void
2304
+ IceRuby::ProxyInfo::print(VALUE value, IceInternal::Output& out, PrintObjectHistory*)
2305
+ {
2306
+ if (!validate(value))
2307
+ {
2308
+ out << "<invalid value - expected " << getId() << ">";
2309
+ return;
2310
+ }
2311
+
2312
+ if (NIL_P(value))
2313
+ {
2314
+ out << "<nil>";
2315
+ }
2316
+ else
2317
+ {
2318
+ out << getString(value);
2319
+ }
2320
+ }
2321
+
2322
+ bool
2323
+ IceRuby::ProxyInfo::isA(const ProxyInfoPtr& info)
2324
+ {
2325
+ //
2326
+ // Return true if this class has an is-a relationship with info.
2327
+ //
2328
+ if (info->isBase)
2329
+ {
2330
+ return true;
2331
+ }
2332
+ else if (this == info.get())
2333
+ {
2334
+ return true;
2335
+ }
2336
+ else if (base && base->isA(info))
2337
+ {
2338
+ return true;
2339
+ }
2340
+ else if (!interfaces.empty())
2341
+ {
2342
+ for (ProxyInfoList::const_iterator p = interfaces.begin(); p != interfaces.end(); ++p)
2343
+ {
2344
+ if ((*p)->isA(info))
2345
+ {
2346
+ return true;
2347
+ }
2348
+ }
2349
+ }
2350
+
2351
+ return false;
2352
+ }
2353
+
2354
+ void
2355
+ IceRuby::ProxyInfo::destroy()
2356
+ {
2357
+ const_cast<ProxyInfoPtr&>(base) = 0;
2358
+ const_cast<ProxyInfoList&>(interfaces).clear();
2359
+ }
2360
+
2361
+ //
2362
+ // ValueWriter implementation.
2363
+ //
2364
+ IceRuby::ValueWriter::ValueWriter(VALUE object, ValueMap* valueMap, const ClassInfoPtr& formal)
2365
+ : _object(object),
2366
+ _map(valueMap),
2367
+ _formal(formal)
2368
+ {
2369
+ //
2370
+ // Mark the object as in use for the lifetime of this wrapper.
2371
+ //
2372
+ rb_gc_register_address(&_object);
2373
+ if (!_formal || !_formal->interface)
2374
+ {
2375
+ volatile VALUE cls = CLASS_OF(object);
2376
+ volatile VALUE type = callRuby(rb_const_get, cls, rb_intern("ICE_TYPE"));
2377
+ assert(!NIL_P(type));
2378
+ _info = dynamic_pointer_cast<ClassInfo>(getType(type));
2379
+ assert(_info);
2380
+ }
2381
+ }
2382
+
2383
+ IceRuby::ValueWriter::~ValueWriter() { rb_gc_unregister_address(&_object); }
2384
+
2385
+ void
2386
+ IceRuby::ValueWriter::ice_preMarshal()
2387
+ {
2388
+ ID id = rb_intern("ice_preMarshal");
2389
+ if (callRuby(rb_respond_to, _object, id))
2390
+ {
2391
+ callRuby(rb_funcall, _object, id, 0);
2392
+ }
2393
+ }
2394
+
2395
+ void
2396
+ IceRuby::ValueWriter::_iceWrite(Ice::OutputStream* os) const
2397
+ {
2398
+ //
2399
+ // Retrieve the SlicedData object that we stored as a hidden member of the Ruby object.
2400
+ //
2401
+ Ice::SlicedDataPtr slicedData = StreamUtil::getSlicedDataMember(_object, const_cast<ValueMap*>(_map));
2402
+
2403
+ os->startValue(slicedData);
2404
+ if (_formal && _formal->interface)
2405
+ {
2406
+ ID op = rb_intern("ice_id");
2407
+ string id = getString(callRuby(rb_funcall, _object, op, 0));
2408
+ os->startSlice(id, -1, true);
2409
+ os->endSlice();
2410
+ }
2411
+ else
2412
+ {
2413
+ if (_info->id != "::Ice::UnknownSlicedValue")
2414
+ {
2415
+ ClassInfoPtr info = _info;
2416
+ while (info)
2417
+ {
2418
+ os->startSlice(info->id, info->compactId, !info->base);
2419
+
2420
+ writeMembers(os, info->members);
2421
+ writeMembers(os, info->optionalMembers); // The optional members have already been sorted by tag.
2422
+
2423
+ os->endSlice();
2424
+
2425
+ info = info->base;
2426
+ }
2427
+ }
2428
+ }
2429
+ os->endValue();
2430
+ }
2431
+
2432
+ void
2433
+ IceRuby::ValueWriter::_iceRead(Ice::InputStream*)
2434
+ {
2435
+ assert(false);
2436
+ }
2437
+
2438
+ void
2439
+ IceRuby::ValueWriter::writeMembers(Ice::OutputStream* os, const DataMemberList& members) const
2440
+ {
2441
+ for (DataMemberList::const_iterator q = members.begin(); q != members.end(); ++q)
2442
+ {
2443
+ DataMemberPtr member = *q;
2444
+
2445
+ volatile VALUE val = callRuby(rb_ivar_get, _object, member->rubyID);
2446
+
2447
+ if (member->optional && (val == Qnil || !os->writeOptional(member->tag, member->type->optionalFormat())))
2448
+ {
2449
+ continue;
2450
+ }
2451
+
2452
+ if (!member->type->validate(val))
2453
+ {
2454
+ throw RubyException(
2455
+ rb_eTypeError,
2456
+ "invalid value for %s member `%s'",
2457
+ _info->id.c_str(),
2458
+ member->name.c_str());
2459
+ }
2460
+
2461
+ member->type->marshal(val, os, _map, member->optional);
2462
+ }
2463
+ }
2464
+
2465
+ //
2466
+ // ValueReader implementation.
2467
+ //
2468
+ IceRuby::ValueReader::ValueReader(VALUE object, const ClassInfoPtr& info) : _object(object), _info(info)
2469
+ {
2470
+ //
2471
+ // Mark the object as in use for the lifetime of this wrapper.
2472
+ //
2473
+ rb_gc_register_address(&_object);
2474
+ }
2475
+
2476
+ IceRuby::ValueReader::~ValueReader() { rb_gc_unregister_address(&_object); }
2477
+
2478
+ void
2479
+ IceRuby::ValueReader::ice_postUnmarshal()
2480
+ {
2481
+ ID id = rb_intern("ice_postUnmarshal");
2482
+ if (callRuby(rb_respond_to, _object, id))
2483
+ {
2484
+ callRuby(rb_funcall, _object, id, 0);
2485
+ }
2486
+ }
2487
+
2488
+ void
2489
+ IceRuby::ValueReader::_iceWrite(Ice::OutputStream*) const
2490
+ {
2491
+ assert(false);
2492
+ }
2493
+
2494
+ void
2495
+ IceRuby::ValueReader::_iceRead(Ice::InputStream* is)
2496
+ {
2497
+ is->startValue();
2498
+
2499
+ const bool unknown = _info->id == "::Ice::UnknownSlicedValue";
2500
+
2501
+ //
2502
+ // Unmarshal the slices of a user-defined class.
2503
+ //
2504
+ if (!unknown && _info->id != Ice::Value::ice_staticId())
2505
+ {
2506
+ ClassInfoPtr info = _info;
2507
+ while (info)
2508
+ {
2509
+ is->startSlice();
2510
+
2511
+ DataMemberList::const_iterator p;
2512
+
2513
+ for (p = info->members.begin(); p != info->members.end(); ++p)
2514
+ {
2515
+ DataMemberPtr member = *p;
2516
+ member->type->unmarshal(is, member, _object, 0, false);
2517
+ }
2518
+
2519
+ //
2520
+ // The optional members have already been sorted by tag.
2521
+ //
2522
+ for (p = info->optionalMembers.begin(); p != info->optionalMembers.end(); ++p)
2523
+ {
2524
+ DataMemberPtr member = *p;
2525
+ if (is->readOptional(member->tag, member->type->optionalFormat()))
2526
+ {
2527
+ member->type->unmarshal(is, member, _object, 0, true);
2528
+ }
2529
+ else
2530
+ {
2531
+ callRuby(rb_ivar_set, _object, member->rubyID, Qnil);
2532
+ }
2533
+ }
2534
+
2535
+ is->endSlice();
2536
+
2537
+ info = info->base;
2538
+ }
2539
+ }
2540
+
2541
+ _slicedData = is->endValue();
2542
+
2543
+ if (_slicedData)
2544
+ {
2545
+ StreamUtil* util = reinterpret_cast<StreamUtil*>(is->getClosure());
2546
+ assert(util);
2547
+ util->add(shared_ptr<ValueReader>(shared_from_this()));
2548
+
2549
+ //
2550
+ // Define the "unknownTypeId" member for an instance of UnknownSlicedValue.
2551
+ //
2552
+ if (unknown)
2553
+ {
2554
+ assert(!_slicedData->slices.empty());
2555
+
2556
+ volatile VALUE typeId = createString(_slicedData->slices[0]->typeId);
2557
+ callRuby(rb_iv_set, _object, "@unknownTypeId", typeId);
2558
+ }
2559
+ }
2560
+ }
2561
+
2562
+ ClassInfoPtr
2563
+ IceRuby::ValueReader::getInfo() const
2564
+ {
2565
+ return _info;
2566
+ }
2567
+
2568
+ VALUE
2569
+ IceRuby::ValueReader::getObject() const { return _object; }
2570
+
2571
+ Ice::SlicedDataPtr
2572
+ IceRuby::ValueReader::getSlicedData() const
2573
+ {
2574
+ return _slicedData;
2575
+ }
2576
+
2577
+ //
2578
+ // InfoMapDestroyer implementation.
2579
+ //
2580
+ IceRuby::InfoMapDestroyer::~InfoMapDestroyer()
2581
+ {
2582
+ {
2583
+ for (ProxyInfoMap::iterator p = _proxyInfoMap.begin(); p != _proxyInfoMap.end(); ++p)
2584
+ {
2585
+ p->second->destroy();
2586
+ }
2587
+ }
2588
+ {
2589
+ for (ClassInfoMap::iterator p = _classInfoMap.begin(); p != _classInfoMap.end(); ++p)
2590
+ {
2591
+ p->second->destroy();
2592
+ }
2593
+ }
2594
+ _exceptionInfoMap.clear();
2595
+ }
2596
+
2597
+ //
2598
+ // ReadValueCallback implementation.
2599
+ //
2600
+ IceRuby::ReadValueCallback::ReadValueCallback(
2601
+ const ClassInfoPtr& info,
2602
+ const UnmarshalCallbackPtr& cb,
2603
+ VALUE target,
2604
+ void* closure)
2605
+ : _info(info),
2606
+ _cb(cb),
2607
+ _target(target),
2608
+ _closure(closure)
2609
+ {
2610
+ }
2611
+
2612
+ void
2613
+ IceRuby::ReadValueCallback::invoke(const shared_ptr<Ice::Value>& p)
2614
+ {
2615
+ if (p)
2616
+ {
2617
+ auto reader = dynamic_pointer_cast<ValueReader>(p);
2618
+ assert(reader);
2619
+
2620
+ //
2621
+ // Verify that the unmarshaled object is compatible with the formal type.
2622
+ //
2623
+ volatile VALUE obj = reader->getObject();
2624
+ if (!_info->interface && !_info->validate(obj))
2625
+ {
2626
+ throw MarshalException{
2627
+ __FILE__,
2628
+ __LINE__,
2629
+ "failed to unmarshal class with type ID '" + _info->id +
2630
+ "': the Slice loader returned a class with type ID '" + reader->getInfo()->id + "'"};
2631
+ }
2632
+ #ifndef NDEBUG
2633
+ // With debug builds we force a GC to ensure that all data members are correctly keep alive.
2634
+ rb_gc();
2635
+ #endif
2636
+ _cb->unmarshaled(obj, _target, _closure);
2637
+ }
2638
+ else
2639
+ {
2640
+ _cb->unmarshaled(Qnil, _target, _closure);
2641
+ }
2642
+ }
2643
+
2644
+ //
2645
+ // ExceptionInfo implementation.
2646
+ //
2647
+ VALUE
2648
+ IceRuby::ExceptionInfo::unmarshal(Ice::InputStream* is)
2649
+ {
2650
+ volatile VALUE obj = callRuby(rb_class_new_instance, 0, static_cast<VALUE*>(0), rubyClass);
2651
+
2652
+ ExceptionInfoPtr info = shared_from_this();
2653
+ while (info)
2654
+ {
2655
+ is->startSlice();
2656
+
2657
+ DataMemberList::iterator q;
2658
+
2659
+ for (q = info->members.begin(); q != info->members.end(); ++q)
2660
+ {
2661
+ DataMemberPtr member = *q;
2662
+ member->type->unmarshal(is, member, obj, 0, false);
2663
+ }
2664
+
2665
+ //
2666
+ // The optional members have already been sorted by tag.
2667
+ //
2668
+ for (q = info->optionalMembers.begin(); q != info->optionalMembers.end(); ++q)
2669
+ {
2670
+ DataMemberPtr member = *q;
2671
+ if (is->readOptional(member->tag, member->type->optionalFormat()))
2672
+ {
2673
+ member->type->unmarshal(is, member, obj, 0, true);
2674
+ }
2675
+ else
2676
+ {
2677
+ callRuby(rb_ivar_set, obj, member->rubyID, Qnil);
2678
+ }
2679
+ }
2680
+
2681
+ is->endSlice();
2682
+
2683
+ info = info->base;
2684
+ }
2685
+
2686
+ return obj;
2687
+ }
2688
+
2689
+ void
2690
+ IceRuby::ExceptionInfo::print(VALUE value, IceInternal::Output& out)
2691
+ {
2692
+ if (callRuby(rb_obj_is_kind_of, value, rubyClass) == Qfalse)
2693
+ {
2694
+ out << "<invalid value - expected " << id << ">";
2695
+ return;
2696
+ }
2697
+
2698
+ PrintObjectHistory history;
2699
+ history.index = 0;
2700
+
2701
+ out << "exception " << id;
2702
+ out.sb();
2703
+ printMembers(value, out, &history);
2704
+ out.eb();
2705
+ }
2706
+
2707
+ void
2708
+ IceRuby::ExceptionInfo::printMembers(VALUE value, IceInternal::Output& out, PrintObjectHistory* history)
2709
+ {
2710
+ if (base)
2711
+ {
2712
+ base->printMembers(value, out, history);
2713
+ }
2714
+
2715
+ for (const auto& member : members)
2716
+ {
2717
+ out << nl << member->name << " = ";
2718
+ if (callRuby(rb_ivar_defined, value, member->rubyID) == Qfalse)
2719
+ {
2720
+ out << "<not defined>";
2721
+ }
2722
+ else
2723
+ {
2724
+ volatile VALUE val = callRuby(rb_ivar_get, value, member->rubyID);
2725
+ member->type->print(val, out, history);
2726
+ }
2727
+ }
2728
+
2729
+ for (const auto& member : optionalMembers)
2730
+ {
2731
+ out << nl << member->name << " = ";
2732
+ if (callRuby(rb_ivar_defined, value, member->rubyID) == Qfalse)
2733
+ {
2734
+ out << "<not defined>";
2735
+ }
2736
+ else
2737
+ {
2738
+ volatile VALUE val = callRuby(rb_ivar_get, value, member->rubyID);
2739
+ if (val == Qnil)
2740
+ {
2741
+ out << "<nil>";
2742
+ }
2743
+ else
2744
+ {
2745
+ member->type->print(val, out, history);
2746
+ }
2747
+ }
2748
+ }
2749
+ }
2750
+
2751
+ //
2752
+ // ExceptionReader implementation.
2753
+ //
2754
+ IceRuby::ExceptionReader::ExceptionReader(const ExceptionInfoPtr& info) : _info(info) {}
2755
+
2756
+ IceRuby::ExceptionReader::ExceptionReader(const ExceptionReader& reader) : _info(reader._info), _ex(reader._ex)
2757
+ {
2758
+ rb_gc_register_address(&_ex);
2759
+ }
2760
+
2761
+ IceRuby::ExceptionReader::~ExceptionReader() { rb_gc_unregister_address(&_ex); }
2762
+
2763
+ const char*
2764
+ IceRuby::ExceptionReader::ice_id() const noexcept
2765
+ {
2766
+ return _info->id.c_str();
2767
+ }
2768
+
2769
+ void
2770
+ IceRuby::ExceptionReader::ice_throw() const
2771
+ {
2772
+ assert(false);
2773
+ }
2774
+
2775
+ void
2776
+ IceRuby::ExceptionReader::_write(Ice::OutputStream*) const
2777
+ {
2778
+ assert(false);
2779
+ }
2780
+
2781
+ void
2782
+ IceRuby::ExceptionReader::_read(Ice::InputStream* is)
2783
+ {
2784
+ is->startException();
2785
+
2786
+ const_cast<VALUE&>(_ex) = _info->unmarshal(is);
2787
+ rb_gc_register_address(&_ex);
2788
+ }
2789
+
2790
+ bool
2791
+ IceRuby::ExceptionReader::_usesClasses() const
2792
+ {
2793
+ return _info->usesClasses;
2794
+ }
2795
+
2796
+ VALUE
2797
+ IceRuby::ExceptionReader::getException() const { return _ex; }
2798
+
2799
+ extern "C" VALUE
2800
+ IceRuby_defineEnum(VALUE /*self*/, VALUE id, VALUE type, VALUE enumerators)
2801
+ {
2802
+ ICE_RUBY_TRY
2803
+ {
2804
+ EnumInfoPtr info = make_shared<EnumInfo>(id, type, enumerators);
2805
+ return createType(info);
2806
+ }
2807
+ ICE_RUBY_CATCH
2808
+ return Qnil;
2809
+ }
2810
+
2811
+ extern "C" VALUE
2812
+ IceRuby_defineStruct(VALUE /*self*/, VALUE id, VALUE type, VALUE members)
2813
+ {
2814
+ ICE_RUBY_TRY
2815
+ {
2816
+ StructInfoPtr info = make_shared<StructInfo>(id, type, members);
2817
+ return createType(info);
2818
+ }
2819
+ ICE_RUBY_CATCH
2820
+ return Qnil;
2821
+ }
2822
+
2823
+ extern "C" VALUE
2824
+ IceRuby_defineSequence(VALUE /*self*/, VALUE id, VALUE elementType)
2825
+ {
2826
+ ICE_RUBY_TRY
2827
+ {
2828
+ SequenceInfoPtr info = make_shared<SequenceInfo>(id, elementType);
2829
+ return createType(info);
2830
+ }
2831
+ ICE_RUBY_CATCH
2832
+ return Qnil;
2833
+ }
2834
+
2835
+ extern "C" VALUE
2836
+ IceRuby_defineDictionary(VALUE /*self*/, VALUE id, VALUE keyType, VALUE valueType)
2837
+ {
2838
+ ICE_RUBY_TRY
2839
+ {
2840
+ DictionaryInfoPtr info = make_shared<DictionaryInfo>(id, keyType, valueType);
2841
+ return createType(info);
2842
+ }
2843
+ ICE_RUBY_CATCH
2844
+ return Qnil;
2845
+ }
2846
+
2847
+ extern "C" VALUE
2848
+ IceRuby_declareProxy(VALUE /*self*/, VALUE id)
2849
+ {
2850
+ ICE_RUBY_TRY
2851
+ {
2852
+ string proxyId = getString(id);
2853
+ proxyId += "Prx";
2854
+
2855
+ ProxyInfoPtr info = lookupProxyInfo(proxyId);
2856
+ if (!info)
2857
+ {
2858
+ info = ProxyInfo::create(id);
2859
+ addProxyInfo(proxyId, info);
2860
+ }
2861
+
2862
+ return info->typeObj;
2863
+ }
2864
+ ICE_RUBY_CATCH
2865
+ return Qnil;
2866
+ }
2867
+
2868
+ extern "C" VALUE
2869
+ IceRuby_declareClass(VALUE /*self*/, VALUE id)
2870
+ {
2871
+ ICE_RUBY_TRY
2872
+ {
2873
+ string idstr = getString(id);
2874
+ ClassInfoPtr info = lookupClassInfo(idstr);
2875
+ if (!info)
2876
+ {
2877
+ info = ClassInfo::create(id);
2878
+ addClassInfo(idstr, info);
2879
+ }
2880
+
2881
+ return info->typeObj;
2882
+ }
2883
+ ICE_RUBY_CATCH
2884
+ return Qnil;
2885
+ }
2886
+
2887
+ extern "C" VALUE
2888
+ IceRuby_defineException(VALUE /*self*/, VALUE id, VALUE type, VALUE base, VALUE members)
2889
+ {
2890
+ ICE_RUBY_TRY
2891
+ {
2892
+ ExceptionInfoPtr info = make_shared<ExceptionInfo>();
2893
+ info->id = getString(id);
2894
+
2895
+ if (!NIL_P(base))
2896
+ {
2897
+ info->base = dynamic_pointer_cast<ExceptionInfo>(getException(base));
2898
+ assert(info->base);
2899
+ }
2900
+
2901
+ convertDataMembers(members, info->members, info->optionalMembers, true);
2902
+
2903
+ info->usesClasses = false;
2904
+
2905
+ //
2906
+ // Only examine the required members to see if any use classes.
2907
+ //
2908
+ for (const auto& dm : info->members)
2909
+ {
2910
+ if (!info->usesClasses)
2911
+ {
2912
+ info->usesClasses = dm->type->usesClasses();
2913
+ }
2914
+ }
2915
+
2916
+ info->rubyClass = type;
2917
+
2918
+ addExceptionInfo(info->id, info);
2919
+
2920
+ return createException(info);
2921
+ }
2922
+ ICE_RUBY_CATCH
2923
+ return Qnil;
2924
+ }
2925
+
2926
+ extern "C" VALUE
2927
+ IceRuby_TypeInfo_defineProxy(VALUE self, VALUE type, VALUE base, VALUE interfaces)
2928
+ {
2929
+ ICE_RUBY_TRY
2930
+ {
2931
+ ProxyInfoPtr info = dynamic_pointer_cast<ProxyInfo>(getType(self));
2932
+ assert(info);
2933
+
2934
+ info->define(type, base, interfaces);
2935
+ rb_define_const(type, "ICE_TYPE", self);
2936
+ rb_define_const(type, "ICE_ID", createString(info->id));
2937
+ }
2938
+ ICE_RUBY_CATCH
2939
+ return Qnil;
2940
+ }
2941
+
2942
+ extern "C" VALUE
2943
+ IceRuby_TypeInfo_defineClass(VALUE self, VALUE type, VALUE compactId, VALUE interface, VALUE base, VALUE members)
2944
+ {
2945
+ ICE_RUBY_TRY
2946
+ {
2947
+ ClassInfoPtr info = dynamic_pointer_cast<ClassInfo>(getType(self));
2948
+ assert(info);
2949
+
2950
+ info->define(type, compactId, interface, base, members);
2951
+
2952
+ if (info->compactId != -1)
2953
+ {
2954
+ addClassInfo(std::to_string(info->compactId), info);
2955
+ }
2956
+
2957
+ if (type != Qnil && !info->interface)
2958
+ {
2959
+ rb_define_const(type, "ICE_TYPE", self);
2960
+ rb_define_const(type, "ICE_ID", createString(info->id));
2961
+ }
2962
+ }
2963
+ ICE_RUBY_CATCH
2964
+ return Qnil;
2965
+ }
2966
+
2967
+ extern "C" VALUE
2968
+ IceRuby_stringify(VALUE /*self*/, VALUE obj, VALUE type)
2969
+ {
2970
+ ICE_RUBY_TRY
2971
+ {
2972
+ TypeInfoPtr info = getType(type);
2973
+
2974
+ ostringstream ostr;
2975
+ IceInternal::Output out(ostr);
2976
+ PrintObjectHistory history;
2977
+ history.index = 0;
2978
+ info->print(obj, out, &history);
2979
+
2980
+ string str = ostr.str();
2981
+ return createString(str);
2982
+ }
2983
+ ICE_RUBY_CATCH
2984
+ return Qnil;
2985
+ }
2986
+
2987
+ extern "C" VALUE
2988
+ IceRuby_stringifyException(VALUE /*self*/, VALUE exc)
2989
+ {
2990
+ ICE_RUBY_TRY
2991
+ {
2992
+ volatile VALUE cls = CLASS_OF(exc);
2993
+ volatile VALUE type = callRuby(rb_const_get, cls, rb_intern("ICE_TYPE"));
2994
+ ExceptionInfoPtr info = getException(type);
2995
+
2996
+ ostringstream ostr;
2997
+ IceInternal::Output out(ostr);
2998
+ info->print(exc, out);
2999
+
3000
+ string str = ostr.str();
3001
+ return createString(str);
3002
+ }
3003
+ ICE_RUBY_CATCH
3004
+ return Qnil;
3005
+ }
3006
+
3007
+ //
3008
+ // lookupClassInfo()
3009
+ //
3010
+ IceRuby::ClassInfoPtr
3011
+ IceRuby::lookupClassInfo(string_view id)
3012
+ {
3013
+ ClassInfoMap::iterator p = _classInfoMap.find(id);
3014
+ if (p != _classInfoMap.end())
3015
+ {
3016
+ return p->second;
3017
+ }
3018
+ return 0;
3019
+ }
3020
+
3021
+ //
3022
+ // lookupExceptionInfo()
3023
+ //
3024
+ IceRuby::ExceptionInfoPtr
3025
+ IceRuby::lookupExceptionInfo(string_view id)
3026
+ {
3027
+ ExceptionInfoMap::iterator p = _exceptionInfoMap.find(id);
3028
+ if (p != _exceptionInfoMap.end())
3029
+ {
3030
+ return p->second;
3031
+ }
3032
+ return 0;
3033
+ }
3034
+
3035
+ bool
3036
+ IceRuby::initTypes(VALUE iceModule)
3037
+ {
3038
+ //
3039
+ // Define a class to represent TypeInfo, and another to represent ExceptionInfo.
3040
+ //
3041
+ _typeInfoClass = rb_define_class_under(iceModule, "Internal_TypeInfo", rb_cObject);
3042
+ rb_undef_alloc_func(_typeInfoClass);
3043
+ _exceptionInfoClass = rb_define_class_under(iceModule, "Internal_ExceptionInfo", rb_cObject);
3044
+ rb_undef_alloc_func(_exceptionInfoClass);
3045
+
3046
+ rb_define_const(iceModule, "T_bool", createType(make_shared<PrimitiveInfo>(PrimitiveInfo::KindBool)));
3047
+ rb_define_const(iceModule, "T_byte", createType(make_shared<PrimitiveInfo>(PrimitiveInfo::KindByte)));
3048
+ rb_define_const(iceModule, "T_short", createType(make_shared<PrimitiveInfo>(PrimitiveInfo::KindShort)));
3049
+ rb_define_const(iceModule, "T_int", createType(make_shared<PrimitiveInfo>(PrimitiveInfo::KindInt)));
3050
+ rb_define_const(iceModule, "T_long", createType(make_shared<PrimitiveInfo>(PrimitiveInfo::KindLong)));
3051
+ rb_define_const(iceModule, "T_float", createType(make_shared<PrimitiveInfo>(PrimitiveInfo::KindFloat)));
3052
+ rb_define_const(iceModule, "T_double", createType(make_shared<PrimitiveInfo>(PrimitiveInfo::KindDouble)));
3053
+ rb_define_const(iceModule, "T_string", createType(make_shared<PrimitiveInfo>(PrimitiveInfo::KindString)));
3054
+
3055
+ rb_define_module_function(iceModule, "__defineEnum", CAST_METHOD(IceRuby_defineEnum), 3);
3056
+ rb_define_module_function(iceModule, "__defineStruct", CAST_METHOD(IceRuby_defineStruct), 3);
3057
+ rb_define_module_function(iceModule, "__defineSequence", CAST_METHOD(IceRuby_defineSequence), 2);
3058
+ rb_define_module_function(iceModule, "__defineDictionary", CAST_METHOD(IceRuby_defineDictionary), 3);
3059
+ rb_define_module_function(iceModule, "__declareProxy", CAST_METHOD(IceRuby_declareProxy), 1);
3060
+ rb_define_module_function(iceModule, "__declareClass", CAST_METHOD(IceRuby_declareClass), 1);
3061
+ rb_define_module_function(iceModule, "__defineException", CAST_METHOD(IceRuby_defineException), 4);
3062
+
3063
+ rb_define_method(_typeInfoClass, "defineClass", CAST_METHOD(IceRuby_TypeInfo_defineClass), 5);
3064
+ rb_define_method(_typeInfoClass, "defineProxy", CAST_METHOD(IceRuby_TypeInfo_defineProxy), 3);
3065
+
3066
+ rb_define_module_function(iceModule, "__stringify", CAST_METHOD(IceRuby_stringify), 2);
3067
+ rb_define_module_function(iceModule, "__stringifyException", CAST_METHOD(IceRuby_stringifyException), 1);
3068
+
3069
+ // Keep Ice::Unset as an alias for nil, for backwards compatibility.
3070
+ rb_define_const(iceModule, "Unset", Qnil);
3071
+
3072
+ return true;
3073
+ }
3074
+
3075
+ IceRuby::TypeInfoPtr
3076
+ IceRuby::getType(VALUE obj)
3077
+ {
3078
+ assert(TYPE(obj) == T_DATA);
3079
+ assert(rb_obj_is_instance_of(obj, _typeInfoClass) == Qtrue);
3080
+ TypeInfoPtr* p = reinterpret_cast<TypeInfoPtr*>(DATA_PTR(obj));
3081
+ return *p;
3082
+ }
3083
+
3084
+ extern "C" void
3085
+ IceRuby_TypeInfo_free(void* p)
3086
+ {
3087
+ delete static_cast<TypeInfoPtr*>(p);
3088
+ }
3089
+
3090
+ static const rb_data_type_t IceRuby_TypeInfoType = {
3091
+ .wrap_struct_name = "Ice::TypeInfo",
3092
+ .function =
3093
+ {
3094
+ .dfree = IceRuby_TypeInfo_free,
3095
+ },
3096
+ .flags = RUBY_TYPED_FREE_IMMEDIATELY,
3097
+ };
3098
+
3099
+ VALUE
3100
+ IceRuby::createType(const TypeInfoPtr& info)
3101
+ {
3102
+ return TypedData_Wrap_Struct(_typeInfoClass, &IceRuby_TypeInfoType, new TypeInfoPtr(info));
3103
+ }
3104
+
3105
+ IceRuby::ExceptionInfoPtr
3106
+ IceRuby::getException(VALUE obj)
3107
+ {
3108
+ assert(TYPE(obj) == T_DATA);
3109
+ assert(rb_obj_is_instance_of(obj, _exceptionInfoClass) == Qtrue);
3110
+ ExceptionInfoPtr* p = reinterpret_cast<ExceptionInfoPtr*>(DATA_PTR(obj));
3111
+ return *p;
3112
+ }
3113
+
3114
+ extern "C" void
3115
+ IceRuby_ExceptionInfo_free(void* p)
3116
+ {
3117
+ delete static_cast<ExceptionInfoPtr*>(p);
3118
+ }
3119
+
3120
+ static const rb_data_type_t IceRuby_ExceptionInfoType = {
3121
+ .wrap_struct_name = "Ice::ExceptionInfo",
3122
+ .function =
3123
+ {
3124
+ .dfree = IceRuby_ExceptionInfo_free,
3125
+ },
3126
+ .flags = RUBY_TYPED_FREE_IMMEDIATELY,
3127
+ };
3128
+
3129
+ VALUE
3130
+ IceRuby::createException(const ExceptionInfoPtr& info)
3131
+ {
3132
+ return TypedData_Wrap_Struct(_exceptionInfoClass, &IceRuby_ExceptionInfoType, new ExceptionInfoPtr(info));
3133
+ }