zeroc-ice 3.7.9.1 → 3.7.11

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