zeroc-ice 3.6.1 → 3.6.2

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 (653) hide show
  1. checksums.yaml +4 -4
  2. data/ICE_LICENSE +1 -1
  3. data/bin/slice2rb +1 -1
  4. data/ext/Communicator.cpp +31 -1
  5. data/ext/Communicator.h +1 -1
  6. data/ext/Config.h +12 -1
  7. data/ext/Connection.cpp +1 -1
  8. data/ext/Connection.h +1 -1
  9. data/ext/Endpoint.cpp +1 -1
  10. data/ext/Endpoint.h +1 -1
  11. data/ext/ImplicitContext.cpp +1 -1
  12. data/ext/ImplicitContext.h +1 -1
  13. data/ext/Init.cpp +1 -1
  14. data/ext/Logger.cpp +1 -1
  15. data/ext/Logger.h +1 -1
  16. data/ext/ObjectFactory.cpp +1 -1
  17. data/ext/ObjectFactory.h +1 -1
  18. data/ext/Operation.cpp +12 -12
  19. data/ext/Operation.h +1 -1
  20. data/ext/Properties.cpp +1 -1
  21. data/ext/Properties.h +1 -1
  22. data/ext/Proxy.cpp +5 -5
  23. data/ext/Proxy.h +1 -1
  24. data/ext/Slice.cpp +5 -1
  25. data/ext/Slice.h +1 -1
  26. data/ext/Types.cpp +40 -31
  27. data/ext/Types.h +1 -1
  28. data/ext/Util.cpp +4 -4
  29. data/ext/Util.h +2 -2
  30. data/ext/extconf.rb +2 -2
  31. data/ext/ice/cpp/include/Ice/ACMF.h +1 -1
  32. data/ext/ice/cpp/include/Ice/Application.h +1 -1
  33. data/ext/ice/cpp/include/Ice/AsyncResult.h +6 -1
  34. data/ext/ice/cpp/include/Ice/AsyncResultF.h +1 -1
  35. data/ext/ice/cpp/include/Ice/BasicStream.h +1 -1
  36. data/ext/ice/cpp/include/Ice/BatchRequestInterceptor.h +1 -1
  37. data/ext/ice/cpp/include/Ice/BatchRequestQueueF.h +1 -1
  38. data/ext/ice/cpp/include/Ice/Buffer.h +1 -1
  39. data/ext/ice/cpp/include/Ice/BuiltinSequences.h +3 -3
  40. data/ext/ice/cpp/include/Ice/Communicator.h +3 -5
  41. data/ext/ice/cpp/include/Ice/CommunicatorAsync.h +1 -1
  42. data/ext/ice/cpp/include/Ice/CommunicatorF.h +3 -5
  43. data/ext/ice/cpp/include/Ice/Config.h +1 -1
  44. data/ext/ice/cpp/include/Ice/Connection.h +12 -31
  45. data/ext/ice/cpp/include/Ice/ConnectionAsync.h +1 -1
  46. data/ext/ice/cpp/include/Ice/ConnectionF.h +3 -9
  47. data/ext/ice/cpp/include/Ice/ConnectionFactoryF.h +1 -1
  48. data/ext/ice/cpp/include/Ice/ConnectionIF.h +1 -1
  49. data/ext/ice/cpp/include/Ice/Current.h +3 -3
  50. data/ext/ice/cpp/include/Ice/DefaultObjectFactory.h +1 -1
  51. data/ext/ice/cpp/include/Ice/DeprecatedStringConverter.h +1 -1
  52. data/ext/ice/cpp/include/Ice/DispatchInterceptor.h +1 -1
  53. data/ext/ice/cpp/include/Ice/Dispatcher.h +1 -1
  54. data/ext/ice/cpp/include/Ice/DynamicLibrary.h +1 -1
  55. data/ext/ice/cpp/include/Ice/DynamicLibraryF.h +1 -1
  56. data/ext/ice/cpp/include/Ice/Endpoint.h +3 -17
  57. data/ext/ice/cpp/include/Ice/EndpointF.h +3 -15
  58. data/ext/ice/cpp/include/Ice/EndpointTypes.h +3 -3
  59. data/ext/ice/cpp/include/Ice/Exception.h +1 -1
  60. data/ext/ice/cpp/include/Ice/FacetMap.h +3 -3
  61. data/ext/ice/cpp/include/Ice/FactoryTable.h +1 -1
  62. data/ext/ice/cpp/include/Ice/FactoryTableInit.h +1 -1
  63. data/ext/ice/cpp/include/Ice/Format.h +1 -1
  64. data/ext/ice/cpp/include/Ice/Functional.h +1 -1
  65. data/ext/ice/cpp/include/Ice/GCObject.h +1 -1
  66. data/ext/ice/cpp/include/Ice/Handle.h +1 -1
  67. data/ext/ice/cpp/include/Ice/Ice.h +1 -1
  68. data/ext/ice/cpp/include/Ice/Identity.h +3 -3
  69. data/ext/ice/cpp/include/Ice/ImplicitContext.h +3 -5
  70. data/ext/ice/cpp/include/Ice/ImplicitContextF.h +3 -5
  71. data/ext/ice/cpp/include/Ice/Incoming.h +1 -1
  72. data/ext/ice/cpp/include/Ice/IncomingAsync.h +1 -1
  73. data/ext/ice/cpp/include/Ice/IncomingAsyncF.h +1 -1
  74. data/ext/ice/cpp/include/Ice/Initialize.h +3 -1
  75. data/ext/ice/cpp/include/Ice/InstanceF.h +1 -1
  76. data/ext/ice/cpp/include/Ice/Instrumentation.h +3 -23
  77. data/ext/ice/cpp/include/Ice/InstrumentationF.h +3 -7
  78. data/ext/ice/cpp/include/Ice/LocalException.h +3 -3
  79. data/ext/ice/cpp/include/Ice/LocalObject.h +1 -1
  80. data/ext/ice/cpp/include/Ice/LocalObjectF.h +1 -1
  81. data/ext/ice/cpp/include/Ice/Locator.h +3 -9
  82. data/ext/ice/cpp/include/Ice/LocatorF.h +3 -7
  83. data/ext/ice/cpp/include/Ice/Logger.h +3 -5
  84. data/ext/ice/cpp/include/Ice/LoggerF.h +3 -5
  85. data/ext/ice/cpp/include/Ice/LoggerUtil.h +1 -1
  86. data/ext/ice/cpp/include/Ice/Metrics.h +12 -28
  87. data/ext/ice/cpp/include/Ice/MetricsAdminI.h +1 -1
  88. data/ext/ice/cpp/include/Ice/MetricsFunctional.h +1 -1
  89. data/ext/ice/cpp/include/Ice/MetricsObserverI.h +1 -1
  90. data/ext/ice/cpp/include/Ice/NativePropertiesAdmin.h +1 -1
  91. data/ext/ice/cpp/include/Ice/Object.h +1 -1
  92. data/ext/ice/cpp/include/Ice/ObjectAdapter.h +3 -5
  93. data/ext/ice/cpp/include/Ice/ObjectAdapterF.h +3 -5
  94. data/ext/ice/cpp/include/Ice/ObjectAdapterFactoryF.h +1 -1
  95. data/ext/ice/cpp/include/Ice/ObjectF.h +1 -1
  96. data/ext/ice/cpp/include/Ice/ObjectFactory.h +3 -5
  97. data/ext/ice/cpp/include/Ice/ObjectFactoryF.h +3 -5
  98. data/ext/ice/cpp/include/Ice/ObjectFactoryManagerF.h +1 -1
  99. data/ext/ice/cpp/include/Ice/ObserverHelper.h +1 -1
  100. data/ext/ice/cpp/include/Ice/Outgoing.h +1 -1
  101. data/ext/ice/cpp/include/Ice/OutgoingAsync.h +1 -1
  102. data/ext/ice/cpp/include/Ice/OutgoingAsyncF.h +1 -1
  103. data/ext/ice/cpp/include/Ice/Plugin.h +3 -7
  104. data/ext/ice/cpp/include/Ice/PluginF.h +3 -7
  105. data/ext/ice/cpp/include/Ice/Process.h +3 -5
  106. data/ext/ice/cpp/include/Ice/ProcessF.h +3 -5
  107. data/ext/ice/cpp/include/Ice/Properties.h +3 -5
  108. data/ext/ice/cpp/include/Ice/PropertiesAdmin.h +3 -5
  109. data/ext/ice/cpp/include/Ice/PropertiesF.h +3 -7
  110. data/ext/ice/cpp/include/Ice/Protocol.h +1 -1
  111. data/ext/ice/cpp/include/Ice/Proxy.h +1 -1
  112. data/ext/ice/cpp/include/Ice/ProxyF.h +1 -1
  113. data/ext/ice/cpp/include/Ice/ProxyFactoryF.h +1 -1
  114. data/ext/ice/cpp/include/Ice/ProxyHandle.h +1 -1
  115. data/ext/ice/cpp/include/Ice/ReferenceF.h +1 -1
  116. data/ext/ice/cpp/include/Ice/RegisterPlugins.h +1 -1
  117. data/ext/ice/cpp/include/Ice/RemoteLogger.h +3 -7
  118. data/ext/ice/cpp/include/Ice/RequestHandlerF.h +1 -1
  119. data/ext/ice/cpp/include/Ice/ResponseHandlerF.h +1 -1
  120. data/ext/ice/cpp/include/Ice/Router.h +3 -7
  121. data/ext/ice/cpp/include/Ice/RouterF.h +3 -5
  122. data/ext/ice/cpp/include/Ice/ServantLocator.h +3 -5
  123. data/ext/ice/cpp/include/Ice/ServantLocatorF.h +3 -5
  124. data/ext/ice/cpp/include/Ice/ServantManagerF.h +1 -1
  125. data/ext/ice/cpp/include/Ice/Service.h +1 -1
  126. data/ext/ice/cpp/include/Ice/SliceChecksumDict.h +3 -3
  127. data/ext/ice/cpp/include/Ice/SliceChecksums.h +1 -1
  128. data/ext/ice/cpp/include/Ice/SlicedData.h +1 -1
  129. data/ext/ice/cpp/include/Ice/SlicedDataF.h +1 -1
  130. data/ext/ice/cpp/include/Ice/Stream.h +1 -1
  131. data/ext/ice/cpp/include/Ice/StreamF.h +1 -1
  132. data/ext/ice/cpp/include/Ice/StreamHelpers.h +1 -1
  133. data/ext/ice/cpp/include/Ice/ThreadPoolF.h +1 -1
  134. data/ext/ice/cpp/include/Ice/UserExceptionFactory.h +1 -1
  135. data/ext/ice/cpp/include/Ice/Version.h +3 -3
  136. data/ext/ice/cpp/include/IceSSL/Config.h +1 -1
  137. data/ext/ice/cpp/include/IceSSL/ConnectionInfo.h +6 -19
  138. data/ext/ice/cpp/include/IceSSL/EndpointInfo.h +3 -7
  139. data/ext/ice/cpp/include/IceSSL/IceSSL.h +1 -1
  140. data/ext/ice/cpp/include/IceSSL/Plugin.h +1 -1
  141. data/ext/ice/cpp/include/IceUtil/AbstractMutex.h +1 -1
  142. data/ext/ice/cpp/include/IceUtil/Atomic.h +1 -1
  143. data/ext/ice/cpp/include/IceUtil/Cache.h +1 -1
  144. data/ext/ice/cpp/include/IceUtil/Cond.h +1 -1
  145. data/ext/ice/cpp/include/IceUtil/Config.h +3 -3
  146. data/ext/ice/cpp/include/IceUtil/CountDownLatch.h +1 -1
  147. data/ext/ice/cpp/include/IceUtil/CtrlCHandler.h +1 -1
  148. data/ext/ice/cpp/include/IceUtil/DisableWarnings.h +1 -1
  149. data/ext/ice/cpp/include/IceUtil/Exception.h +1 -1
  150. data/ext/ice/cpp/include/IceUtil/Functional.h +1 -1
  151. data/ext/ice/cpp/include/IceUtil/Handle.h +1 -1
  152. data/ext/ice/cpp/include/IceUtil/IceUtil.h +1 -1
  153. data/ext/ice/cpp/include/IceUtil/IconvStringConverter.h +1 -1
  154. data/ext/ice/cpp/include/IceUtil/InputUtil.h +1 -1
  155. data/ext/ice/cpp/include/IceUtil/Iterator.h +1 -1
  156. data/ext/ice/cpp/include/IceUtil/Lock.h +1 -1
  157. data/ext/ice/cpp/include/IceUtil/Monitor.h +1 -1
  158. data/ext/ice/cpp/include/IceUtil/Mutex.h +1 -1
  159. data/ext/ice/cpp/include/IceUtil/MutexProtocol.h +1 -1
  160. data/ext/ice/cpp/include/IceUtil/MutexPtrLock.h +1 -1
  161. data/ext/ice/cpp/include/IceUtil/MutexPtrTryLock.h +1 -1
  162. data/ext/ice/cpp/include/IceUtil/Optional.h +1 -1
  163. data/ext/ice/cpp/include/IceUtil/Options.h +1 -1
  164. data/ext/ice/cpp/include/IceUtil/OutputUtil.h +1 -1
  165. data/ext/ice/cpp/include/IceUtil/PopDisableWarnings.h +1 -1
  166. data/ext/ice/cpp/include/IceUtil/PushDisableWarnings.h +1 -1
  167. data/ext/ice/cpp/include/IceUtil/Random.h +1 -1
  168. data/ext/ice/cpp/include/IceUtil/RecMutex.h +1 -1
  169. data/ext/ice/cpp/include/IceUtil/SHA1.h +1 -1
  170. data/ext/ice/cpp/include/IceUtil/ScannerConfig.h +1 -1
  171. data/ext/ice/cpp/include/IceUtil/ScopedArray.h +1 -1
  172. data/ext/ice/cpp/include/IceUtil/Shared.h +1 -1
  173. data/ext/ice/cpp/include/IceUtil/StringUtil.h +1 -1
  174. data/ext/ice/cpp/include/IceUtil/Thread.h +1 -1
  175. data/ext/ice/cpp/include/IceUtil/ThreadException.h +1 -1
  176. data/ext/ice/cpp/include/IceUtil/Time.h +1 -1
  177. data/ext/ice/cpp/include/IceUtil/Timer.h +1 -1
  178. data/ext/ice/cpp/include/IceUtil/UUID.h +1 -1
  179. data/ext/ice/cpp/include/IceUtil/UndefSysMacros.h +1 -1
  180. data/ext/ice/cpp/include/IceUtil/UniquePtr.h +1 -1
  181. data/ext/ice/cpp/include/Slice/CPlusPlusUtil.h +1 -1
  182. data/ext/ice/cpp/include/Slice/Checksum.h +1 -1
  183. data/ext/ice/cpp/include/Slice/CsUtil.h +1 -1
  184. data/ext/ice/cpp/include/Slice/DotNetNames.h +1 -1
  185. data/ext/ice/cpp/include/Slice/FileTracker.h +1 -1
  186. data/ext/ice/cpp/include/Slice/JavaUtil.h +1 -1
  187. data/ext/ice/cpp/include/Slice/ObjCUtil.h +1 -1
  188. data/ext/ice/cpp/include/Slice/PHPUtil.h +1 -1
  189. data/ext/ice/cpp/include/Slice/Parser.h +1 -1
  190. data/ext/ice/cpp/include/Slice/Preprocessor.h +1 -1
  191. data/ext/ice/cpp/include/Slice/PythonUtil.h +1 -1
  192. data/ext/ice/cpp/include/Slice/RubyUtil.h +1 -1
  193. data/ext/ice/cpp/include/Slice/Util.h +1 -1
  194. data/ext/ice/cpp/src/Ice/ACM.cpp +1 -1
  195. data/ext/ice/cpp/src/Ice/ACM.h +1 -1
  196. data/ext/ice/cpp/src/Ice/Acceptor.cpp +1 -1
  197. data/ext/ice/cpp/src/Ice/Acceptor.h +1 -1
  198. data/ext/ice/cpp/src/Ice/AcceptorF.h +1 -1
  199. data/ext/ice/cpp/src/Ice/AsyncResult.cpp +1 -1
  200. data/ext/ice/cpp/src/Ice/Base64.cpp +1 -1
  201. data/ext/ice/cpp/src/Ice/Base64.h +1 -1
  202. data/ext/ice/cpp/src/Ice/BasicStream.cpp +1 -1
  203. data/ext/ice/cpp/src/Ice/BatchRequestQueue.cpp +1 -1
  204. data/ext/ice/cpp/src/Ice/BatchRequestQueue.h +1 -1
  205. data/ext/ice/cpp/src/Ice/Buffer.cpp +1 -1
  206. data/ext/ice/cpp/src/Ice/BuiltinSequences.cpp +3 -3
  207. data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +1 -1
  208. data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.h +1 -1
  209. data/ext/ice/cpp/src/Ice/Communicator.cpp +3 -3
  210. data/ext/ice/cpp/src/Ice/CommunicatorF.cpp +3 -3
  211. data/ext/ice/cpp/src/Ice/CommunicatorI.cpp +1 -1
  212. data/ext/ice/cpp/src/Ice/CommunicatorI.h +1 -1
  213. data/ext/ice/cpp/src/Ice/ConnectRequestHandler.cpp +1 -1
  214. data/ext/ice/cpp/src/Ice/ConnectRequestHandler.h +1 -1
  215. data/ext/ice/cpp/src/Ice/ConnectRequestHandlerF.h +1 -1
  216. data/ext/ice/cpp/src/Ice/Connection.cpp +3 -3
  217. data/ext/ice/cpp/src/Ice/ConnectionF.cpp +3 -3
  218. data/ext/ice/cpp/src/Ice/ConnectionFactory.cpp +1 -1
  219. data/ext/ice/cpp/src/Ice/ConnectionFactory.h +1 -1
  220. data/ext/ice/cpp/src/Ice/ConnectionI.cpp +1 -1
  221. data/ext/ice/cpp/src/Ice/ConnectionI.h +1 -1
  222. data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.cpp +1 -1
  223. data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.h +1 -1
  224. data/ext/ice/cpp/src/Ice/Connector.cpp +1 -1
  225. data/ext/ice/cpp/src/Ice/Connector.h +1 -1
  226. data/ext/ice/cpp/src/Ice/ConnectorF.h +1 -1
  227. data/ext/ice/cpp/src/Ice/Current.cpp +3 -3
  228. data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +1 -1
  229. data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.h +1 -1
  230. data/ext/ice/cpp/src/Ice/DefaultsAndOverridesF.h +1 -1
  231. data/ext/ice/cpp/src/Ice/DeprecatedStringConverter.cpp +1 -1
  232. data/ext/ice/cpp/src/Ice/DispatchInterceptor.cpp +1 -1
  233. data/ext/ice/cpp/src/Ice/DynamicLibrary.cpp +1 -1
  234. data/ext/ice/cpp/src/Ice/Endpoint.cpp +3 -3
  235. data/ext/ice/cpp/src/Ice/EndpointF.cpp +3 -3
  236. data/ext/ice/cpp/src/Ice/EndpointFactory.cpp +1 -1
  237. data/ext/ice/cpp/src/Ice/EndpointFactory.h +1 -1
  238. data/ext/ice/cpp/src/Ice/EndpointFactoryF.h +1 -1
  239. data/ext/ice/cpp/src/Ice/EndpointFactoryManager.cpp +1 -1
  240. data/ext/ice/cpp/src/Ice/EndpointFactoryManager.h +1 -1
  241. data/ext/ice/cpp/src/Ice/EndpointFactoryManagerF.h +1 -1
  242. data/ext/ice/cpp/src/Ice/EndpointI.cpp +1 -1
  243. data/ext/ice/cpp/src/Ice/EndpointI.h +1 -1
  244. data/ext/ice/cpp/src/Ice/EndpointIF.h +1 -1
  245. data/ext/ice/cpp/src/Ice/EndpointTypes.cpp +3 -3
  246. data/ext/ice/cpp/src/Ice/EventHandler.cpp +1 -1
  247. data/ext/ice/cpp/src/Ice/EventHandler.h +1 -1
  248. data/ext/ice/cpp/src/Ice/EventHandlerF.h +1 -1
  249. data/ext/ice/cpp/src/Ice/Exception.cpp +1 -1
  250. data/ext/ice/cpp/src/Ice/FacetMap.cpp +3 -3
  251. data/ext/ice/cpp/src/Ice/FactoryTable.cpp +1 -1
  252. data/ext/ice/cpp/src/Ice/FactoryTableInit.cpp +1 -1
  253. data/ext/ice/cpp/src/Ice/GCObject.cpp +1 -1
  254. data/ext/ice/cpp/src/Ice/HashUtil.h +1 -1
  255. data/ext/ice/cpp/src/Ice/HttpParser.cpp +1 -1
  256. data/ext/ice/cpp/src/Ice/HttpParser.h +1 -1
  257. data/ext/ice/cpp/src/Ice/IPEndpointI.cpp +1 -1
  258. data/ext/ice/cpp/src/Ice/IPEndpointI.h +1 -1
  259. data/ext/ice/cpp/src/Ice/IPEndpointIF.h +1 -1
  260. data/ext/ice/cpp/src/Ice/Identity.cpp +3 -3
  261. data/ext/ice/cpp/src/Ice/ImplicitContext.cpp +3 -3
  262. data/ext/ice/cpp/src/Ice/ImplicitContextF.cpp +3 -3
  263. data/ext/ice/cpp/src/Ice/ImplicitContextI.cpp +1 -1
  264. data/ext/ice/cpp/src/Ice/ImplicitContextI.h +1 -1
  265. data/ext/ice/cpp/src/Ice/Incoming.cpp +1 -1
  266. data/ext/ice/cpp/src/Ice/IncomingAsync.cpp +1 -1
  267. data/ext/ice/cpp/src/Ice/IncomingRequest.h +1 -1
  268. data/ext/ice/cpp/src/Ice/Initialize.cpp +117 -1
  269. data/ext/ice/cpp/src/Ice/Instance.cpp +1 -1
  270. data/ext/ice/cpp/src/Ice/Instance.h +1 -1
  271. data/ext/ice/cpp/src/Ice/Instrumentation.cpp +3 -3
  272. data/ext/ice/cpp/src/Ice/InstrumentationF.cpp +3 -3
  273. data/ext/ice/cpp/src/Ice/InstrumentationI.cpp +1 -1
  274. data/ext/ice/cpp/src/Ice/InstrumentationI.h +1 -1
  275. data/ext/ice/cpp/src/Ice/LocalException.cpp +3 -3
  276. data/ext/ice/cpp/src/Ice/LocalObject.cpp +1 -1
  277. data/ext/ice/cpp/src/Ice/Locator.cpp +3 -3
  278. data/ext/ice/cpp/src/Ice/LocatorF.cpp +3 -3
  279. data/ext/ice/cpp/src/Ice/LocatorInfo.cpp +1 -1
  280. data/ext/ice/cpp/src/Ice/LocatorInfo.h +1 -1
  281. data/ext/ice/cpp/src/Ice/LocatorInfoF.h +1 -1
  282. data/ext/ice/cpp/src/Ice/Logger.cpp +3 -3
  283. data/ext/ice/cpp/src/Ice/LoggerAdminI.cpp +1 -1
  284. data/ext/ice/cpp/src/Ice/LoggerAdminI.h +1 -1
  285. data/ext/ice/cpp/src/Ice/LoggerF.cpp +3 -3
  286. data/ext/ice/cpp/src/Ice/LoggerI.cpp +1 -1
  287. data/ext/ice/cpp/src/Ice/LoggerI.h +1 -1
  288. data/ext/ice/cpp/src/Ice/LoggerUtil.cpp +1 -1
  289. data/ext/ice/cpp/src/Ice/Metrics.cpp +3 -3
  290. data/ext/ice/cpp/src/Ice/MetricsAdminI.cpp +1 -1
  291. data/ext/ice/cpp/src/Ice/MetricsObserverI.cpp +1 -1
  292. data/ext/ice/cpp/src/Ice/Network.cpp +1 -1
  293. data/ext/ice/cpp/src/Ice/Network.h +1 -1
  294. data/ext/ice/cpp/src/Ice/NetworkF.h +1 -1
  295. data/ext/ice/cpp/src/Ice/NetworkProxy.cpp +1 -1
  296. data/ext/ice/cpp/src/Ice/NetworkProxy.h +1 -1
  297. data/ext/ice/cpp/src/Ice/NetworkProxyF.h +1 -1
  298. data/ext/ice/cpp/src/Ice/Object.cpp +1 -1
  299. data/ext/ice/cpp/src/Ice/ObjectAdapter.cpp +3 -3
  300. data/ext/ice/cpp/src/Ice/ObjectAdapterF.cpp +3 -3
  301. data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.cpp +1 -1
  302. data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.h +1 -1
  303. data/ext/ice/cpp/src/Ice/ObjectAdapterI.cpp +1 -1
  304. data/ext/ice/cpp/src/Ice/ObjectAdapterI.h +1 -1
  305. data/ext/ice/cpp/src/Ice/ObjectFactory.cpp +3 -3
  306. data/ext/ice/cpp/src/Ice/ObjectFactoryF.cpp +3 -3
  307. data/ext/ice/cpp/src/Ice/ObjectFactoryManager.cpp +1 -1
  308. data/ext/ice/cpp/src/Ice/ObjectFactoryManager.h +1 -1
  309. data/ext/ice/cpp/src/Ice/ObserverHelper.cpp +1 -1
  310. data/ext/ice/cpp/src/Ice/OpaqueEndpointI.cpp +1 -1
  311. data/ext/ice/cpp/src/Ice/OpaqueEndpointI.h +1 -1
  312. data/ext/ice/cpp/src/Ice/Outgoing.cpp +1 -1
  313. data/ext/ice/cpp/src/Ice/OutgoingAsync.cpp +1 -1
  314. data/ext/ice/cpp/src/Ice/Plugin.cpp +3 -3
  315. data/ext/ice/cpp/src/Ice/PluginF.cpp +3 -3
  316. data/ext/ice/cpp/src/Ice/PluginManagerI.cpp +1 -1
  317. data/ext/ice/cpp/src/Ice/PluginManagerI.h +1 -1
  318. data/ext/ice/cpp/src/Ice/Process.cpp +3 -3
  319. data/ext/ice/cpp/src/Ice/ProcessF.cpp +3 -3
  320. data/ext/ice/cpp/src/Ice/Properties.cpp +3 -3
  321. data/ext/ice/cpp/src/Ice/PropertiesAdmin.cpp +3 -3
  322. data/ext/ice/cpp/src/Ice/PropertiesAdminI.cpp +1 -1
  323. data/ext/ice/cpp/src/Ice/PropertiesAdminI.h +1 -1
  324. data/ext/ice/cpp/src/Ice/PropertiesF.cpp +3 -3
  325. data/ext/ice/cpp/src/Ice/PropertiesI.cpp +1 -1
  326. data/ext/ice/cpp/src/Ice/PropertiesI.h +1 -1
  327. data/ext/ice/cpp/src/Ice/PropertyNames.cpp +1 -1
  328. data/ext/ice/cpp/src/Ice/PropertyNames.h +1 -1
  329. data/ext/ice/cpp/src/Ice/Protocol.cpp +1 -1
  330. data/ext/ice/cpp/src/Ice/ProtocolInstance.cpp +1 -1
  331. data/ext/ice/cpp/src/Ice/ProtocolInstance.h +1 -1
  332. data/ext/ice/cpp/src/Ice/ProtocolInstanceF.h +1 -1
  333. data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.cpp +1 -1
  334. data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.h +1 -1
  335. data/ext/ice/cpp/src/Ice/ProtocolPluginFacadeF.h +1 -1
  336. data/ext/ice/cpp/src/Ice/Proxy.cpp +1 -1
  337. data/ext/ice/cpp/src/Ice/ProxyFactory.cpp +1 -1
  338. data/ext/ice/cpp/src/Ice/ProxyFactory.h +1 -1
  339. data/ext/ice/cpp/src/Ice/Reference.cpp +1 -1
  340. data/ext/ice/cpp/src/Ice/Reference.h +1 -1
  341. data/ext/ice/cpp/src/Ice/ReferenceFactory.cpp +1 -1
  342. data/ext/ice/cpp/src/Ice/ReferenceFactory.h +1 -1
  343. data/ext/ice/cpp/src/Ice/ReferenceFactoryF.h +1 -1
  344. data/ext/ice/cpp/src/Ice/RegisterPluginsInit.cpp +1 -1
  345. data/ext/ice/cpp/src/Ice/RegisterPluginsInit.h +1 -1
  346. data/ext/ice/cpp/src/Ice/RemoteLogger.cpp +3 -3
  347. data/ext/ice/cpp/src/Ice/ReplyStatus.h +1 -1
  348. data/ext/ice/cpp/src/Ice/RequestHandler.cpp +1 -1
  349. data/ext/ice/cpp/src/Ice/RequestHandler.h +1 -1
  350. data/ext/ice/cpp/src/Ice/RequestHandlerFactory.cpp +1 -1
  351. data/ext/ice/cpp/src/Ice/RequestHandlerFactory.h +1 -1
  352. data/ext/ice/cpp/src/Ice/ResponseHandler.cpp +1 -1
  353. data/ext/ice/cpp/src/Ice/ResponseHandler.h +1 -1
  354. data/ext/ice/cpp/src/Ice/RetryQueue.cpp +1 -1
  355. data/ext/ice/cpp/src/Ice/RetryQueue.h +1 -1
  356. data/ext/ice/cpp/src/Ice/RetryQueueF.h +1 -1
  357. data/ext/ice/cpp/src/Ice/Router.cpp +3 -3
  358. data/ext/ice/cpp/src/Ice/RouterF.cpp +3 -3
  359. data/ext/ice/cpp/src/Ice/RouterInfo.cpp +1 -1
  360. data/ext/ice/cpp/src/Ice/RouterInfo.h +1 -1
  361. data/ext/ice/cpp/src/Ice/RouterInfoF.h +1 -1
  362. data/ext/ice/cpp/src/Ice/Selector.cpp +1 -1
  363. data/ext/ice/cpp/src/Ice/Selector.h +1 -1
  364. data/ext/ice/cpp/src/Ice/ServantLocator.cpp +3 -3
  365. data/ext/ice/cpp/src/Ice/ServantLocatorF.cpp +3 -3
  366. data/ext/ice/cpp/src/Ice/ServantManager.cpp +1 -1
  367. data/ext/ice/cpp/src/Ice/ServantManager.h +1 -1
  368. data/ext/ice/cpp/src/Ice/SharedContext.h +1 -1
  369. data/ext/ice/cpp/src/Ice/SliceChecksumDict.cpp +3 -3
  370. data/ext/ice/cpp/src/Ice/SliceChecksums.cpp +1 -1
  371. data/ext/ice/cpp/src/Ice/SlicedData.cpp +1 -1
  372. data/ext/ice/cpp/src/Ice/Stream.cpp +1 -1
  373. data/ext/ice/cpp/src/Ice/StreamI.cpp +1 -1
  374. data/ext/ice/cpp/src/Ice/StreamI.h +1 -1
  375. data/ext/ice/cpp/src/Ice/StreamSocket.cpp +1 -1
  376. data/ext/ice/cpp/src/Ice/StreamSocket.h +1 -1
  377. data/ext/ice/cpp/src/Ice/StringConverterPlugin.cpp +1 -1
  378. data/ext/ice/cpp/src/Ice/SysLoggerI.cpp +1 -1
  379. data/ext/ice/cpp/src/Ice/SysLoggerI.h +1 -1
  380. data/ext/ice/cpp/src/Ice/TcpAcceptor.cpp +1 -1
  381. data/ext/ice/cpp/src/Ice/TcpAcceptor.h +1 -1
  382. data/ext/ice/cpp/src/Ice/TcpConnector.cpp +1 -1
  383. data/ext/ice/cpp/src/Ice/TcpConnector.h +1 -1
  384. data/ext/ice/cpp/src/Ice/TcpEndpointI.cpp +1 -1
  385. data/ext/ice/cpp/src/Ice/TcpEndpointI.h +1 -1
  386. data/ext/ice/cpp/src/Ice/TcpTransceiver.cpp +1 -1
  387. data/ext/ice/cpp/src/Ice/TcpTransceiver.h +1 -1
  388. data/ext/ice/cpp/src/Ice/ThreadPool.cpp +4 -4
  389. data/ext/ice/cpp/src/Ice/ThreadPool.h +1 -1
  390. data/ext/ice/cpp/src/Ice/TraceLevels.cpp +1 -1
  391. data/ext/ice/cpp/src/Ice/TraceLevels.h +1 -1
  392. data/ext/ice/cpp/src/Ice/TraceLevelsF.h +1 -1
  393. data/ext/ice/cpp/src/Ice/TraceUtil.cpp +1 -1
  394. data/ext/ice/cpp/src/Ice/TraceUtil.h +1 -1
  395. data/ext/ice/cpp/src/Ice/Transceiver.cpp +1 -1
  396. data/ext/ice/cpp/src/Ice/Transceiver.h +1 -1
  397. data/ext/ice/cpp/src/Ice/TransceiverF.h +1 -1
  398. data/ext/ice/cpp/src/Ice/UdpConnector.cpp +1 -1
  399. data/ext/ice/cpp/src/Ice/UdpConnector.h +1 -1
  400. data/ext/ice/cpp/src/Ice/UdpEndpointI.cpp +1 -1
  401. data/ext/ice/cpp/src/Ice/UdpEndpointI.h +1 -1
  402. data/ext/ice/cpp/src/Ice/UdpTransceiver.cpp +1 -1
  403. data/ext/ice/cpp/src/Ice/UdpTransceiver.h +1 -1
  404. data/ext/ice/cpp/src/Ice/Version.cpp +3 -3
  405. data/ext/ice/cpp/src/Ice/WSAcceptor.cpp +1 -1
  406. data/ext/ice/cpp/src/Ice/WSAcceptor.h +1 -1
  407. data/ext/ice/cpp/src/Ice/WSConnector.cpp +1 -1
  408. data/ext/ice/cpp/src/Ice/WSConnector.h +1 -1
  409. data/ext/ice/cpp/src/Ice/WSEndpoint.cpp +1 -1
  410. data/ext/ice/cpp/src/Ice/WSEndpoint.h +1 -1
  411. data/ext/ice/cpp/src/Ice/WSTransceiver.cpp +1 -1
  412. data/ext/ice/cpp/src/Ice/WSTransceiver.h +1 -1
  413. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.cpp +3 -3
  414. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.h +3 -7
  415. data/ext/ice/cpp/src/IceDiscovery/LocatorI.cpp +1 -1
  416. data/ext/ice/cpp/src/IceDiscovery/LocatorI.h +1 -1
  417. data/ext/ice/cpp/src/IceDiscovery/LookupI.cpp +1 -1
  418. data/ext/ice/cpp/src/IceDiscovery/LookupI.h +1 -1
  419. data/ext/ice/cpp/src/IceDiscovery/PluginI.cpp +1 -1
  420. data/ext/ice/cpp/src/IceDiscovery/PluginI.h +1 -1
  421. data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.cpp +3 -3
  422. data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.h +3 -7
  423. data/ext/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +1 -1
  424. data/ext/ice/cpp/src/IceLocatorDiscovery/PluginI.h +1 -1
  425. data/ext/ice/cpp/src/IceSSL/AcceptorI.cpp +1 -1
  426. data/ext/ice/cpp/src/IceSSL/AcceptorI.h +1 -1
  427. data/ext/ice/cpp/src/IceSSL/Certificate.cpp +1 -1
  428. data/ext/ice/cpp/src/IceSSL/ConnectionInfo.cpp +3 -3
  429. data/ext/ice/cpp/src/IceSSL/ConnectorI.cpp +1 -1
  430. data/ext/ice/cpp/src/IceSSL/ConnectorI.h +1 -1
  431. data/ext/ice/cpp/src/IceSSL/EndpointI.cpp +1 -1
  432. data/ext/ice/cpp/src/IceSSL/EndpointI.h +1 -1
  433. data/ext/ice/cpp/src/IceSSL/EndpointInfo.cpp +3 -3
  434. data/ext/ice/cpp/src/IceSSL/Instance.cpp +1 -1
  435. data/ext/ice/cpp/src/IceSSL/Instance.h +1 -1
  436. data/ext/ice/cpp/src/IceSSL/InstanceF.h +1 -1
  437. data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +2 -2
  438. data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +7 -2
  439. data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.h +1 -1
  440. data/ext/ice/cpp/src/IceSSL/PluginI.cpp +1 -1
  441. data/ext/ice/cpp/src/IceSSL/PluginI.h +1 -1
  442. data/ext/ice/cpp/src/IceSSL/RFC2253.cpp +1 -1
  443. data/ext/ice/cpp/src/IceSSL/RFC2253.h +1 -1
  444. data/ext/ice/cpp/src/IceSSL/SChannelEngine.cpp +1 -1
  445. data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.cpp +1 -1
  446. data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.h +1 -1
  447. data/ext/ice/cpp/src/IceSSL/SSLEngine.cpp +1 -1
  448. data/ext/ice/cpp/src/IceSSL/SSLEngine.h +2 -1
  449. data/ext/ice/cpp/src/IceSSL/SSLEngineF.h +1 -1
  450. data/ext/ice/cpp/src/IceSSL/SecureTransportEngine.cpp +96 -85
  451. data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +14 -9
  452. data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.h +1 -1
  453. data/ext/ice/cpp/src/IceSSL/TrustManager.cpp +1 -1
  454. data/ext/ice/cpp/src/IceSSL/TrustManager.h +1 -1
  455. data/ext/ice/cpp/src/IceSSL/TrustManagerF.h +1 -1
  456. data/ext/ice/cpp/src/IceSSL/Util.cpp +1 -1
  457. data/ext/ice/cpp/src/IceSSL/Util.h +1 -1
  458. data/ext/ice/cpp/src/IceUtil/ArgVector.cpp +1 -1
  459. data/ext/ice/cpp/src/IceUtil/ArgVector.h +1 -1
  460. data/ext/ice/cpp/src/IceUtil/Cond.cpp +1 -1
  461. data/ext/ice/cpp/src/IceUtil/ConvertUTF.cpp +1 -1
  462. data/ext/ice/cpp/src/IceUtil/ConvertUTF.h +1 -1
  463. data/ext/ice/cpp/src/IceUtil/CountDownLatch.cpp +1 -1
  464. data/ext/ice/cpp/src/IceUtil/CtrlCHandler.cpp +1 -1
  465. data/ext/ice/cpp/src/IceUtil/Exception.cpp +2 -2
  466. data/ext/ice/cpp/src/IceUtil/FileUtil.cpp +54 -15
  467. data/ext/ice/cpp/src/IceUtil/FileUtil.h +6 -1
  468. data/ext/ice/cpp/src/IceUtil/InputUtil.cpp +1 -1
  469. data/ext/ice/cpp/src/IceUtil/MutexProtocol.cpp +1 -1
  470. data/ext/ice/cpp/src/IceUtil/Options.cpp +1 -1
  471. data/ext/ice/cpp/src/IceUtil/OutputUtil.cpp +1 -1
  472. data/ext/ice/cpp/src/IceUtil/Random.cpp +1 -1
  473. data/ext/ice/cpp/src/IceUtil/RecMutex.cpp +1 -1
  474. data/ext/ice/cpp/src/IceUtil/SHA1.cpp +1 -1
  475. data/ext/ice/cpp/src/IceUtil/Shared.cpp +1 -1
  476. data/ext/ice/cpp/src/IceUtil/StopWatch.h +1 -1
  477. data/ext/ice/cpp/src/IceUtil/StringConverter.cpp +1 -1
  478. data/ext/ice/cpp/src/IceUtil/StringUtil.cpp +1 -1
  479. data/ext/ice/cpp/src/IceUtil/Thread.cpp +1 -1
  480. data/ext/ice/cpp/src/IceUtil/ThreadException.cpp +1 -1
  481. data/ext/ice/cpp/src/IceUtil/Time.cpp +1 -1
  482. data/ext/ice/cpp/src/IceUtil/Timer.cpp +1 -1
  483. data/ext/ice/cpp/src/IceUtil/UUID.cpp +1 -1
  484. data/ext/ice/cpp/src/IceUtil/Unicode.cpp +57 -1
  485. data/ext/ice/cpp/src/IceUtil/Unicode.h +14 -1
  486. data/ext/ice/cpp/src/Slice/CPlusPlusUtil.cpp +2 -2
  487. data/ext/ice/cpp/src/Slice/Checksum.cpp +1 -1
  488. data/ext/ice/cpp/src/Slice/CsUtil.cpp +1 -1
  489. data/ext/ice/cpp/src/Slice/DotNetNames.cpp +1 -1
  490. data/ext/ice/cpp/src/Slice/FileTracker.cpp +1 -1
  491. data/ext/ice/cpp/src/Slice/Grammar.cpp +1 -1
  492. data/ext/ice/cpp/src/Slice/GrammarUtil.h +1 -1
  493. data/ext/ice/cpp/src/Slice/JavaUtil.cpp +2 -2
  494. data/ext/ice/cpp/src/Slice/MD5.cpp +1 -1
  495. data/ext/ice/cpp/src/Slice/MD5.h +1 -1
  496. data/ext/ice/cpp/src/Slice/ObjCUtil.cpp +1 -1
  497. data/ext/ice/cpp/src/Slice/PHPUtil.cpp +1 -1
  498. data/ext/ice/cpp/src/Slice/Parser.cpp +1 -1
  499. data/ext/ice/cpp/src/Slice/Preprocessor.cpp +1 -1
  500. data/ext/ice/cpp/src/Slice/Python.cpp +1 -1
  501. data/ext/ice/cpp/src/Slice/PythonUtil.cpp +738 -209
  502. data/ext/ice/cpp/src/Slice/Ruby.cpp +5 -2
  503. data/ext/ice/cpp/src/Slice/RubyUtil.cpp +125 -55
  504. data/ext/ice/cpp/src/Slice/Scanner.cpp +341 -204
  505. data/ext/ice/cpp/src/Slice/Util.cpp +1 -1
  506. data/ext/ice/mcpp/Makefile +5 -2
  507. data/ext/ice/mcpp/README.md +8 -2
  508. data/ext/ice/mcpp/configed.H +9 -1
  509. data/ext/ice/mcpp/support.c +3 -2
  510. data/ice.gemspec +2 -2
  511. data/lib/Glacier2.rb +1 -1
  512. data/lib/Glacier2/Metrics.rb +3 -2
  513. data/lib/Glacier2/PermissionsVerifier.rb +3 -2
  514. data/lib/Glacier2/PermissionsVerifierF.rb +3 -2
  515. data/lib/Glacier2/Router.rb +3 -2
  516. data/lib/Glacier2/RouterF.rb +3 -2
  517. data/lib/Glacier2/SSLInfo.rb +3 -2
  518. data/lib/Glacier2/Session.rb +3 -2
  519. data/lib/Ice.rb +1 -1
  520. data/lib/Ice/BuiltinSequences.rb +3 -2
  521. data/lib/Ice/Communicator.rb +3 -2
  522. data/lib/Ice/CommunicatorF.rb +3 -2
  523. data/lib/Ice/Connection.rb +3 -2
  524. data/lib/Ice/ConnectionF.rb +3 -2
  525. data/lib/Ice/Current.rb +3 -2
  526. data/lib/Ice/Endpoint.rb +3 -2
  527. data/lib/Ice/EndpointF.rb +3 -2
  528. data/lib/Ice/EndpointTypes.rb +3 -2
  529. data/lib/Ice/FacetMap.rb +3 -2
  530. data/lib/Ice/Identity.rb +3 -2
  531. data/lib/Ice/ImplicitContext.rb +3 -2
  532. data/lib/Ice/ImplicitContextF.rb +3 -2
  533. data/lib/Ice/Instrumentation.rb +3 -2
  534. data/lib/Ice/InstrumentationF.rb +3 -2
  535. data/lib/Ice/LocalException.rb +3 -2
  536. data/lib/Ice/Locator.rb +3 -2
  537. data/lib/Ice/LocatorF.rb +3 -2
  538. data/lib/Ice/Logger.rb +3 -2
  539. data/lib/Ice/LoggerF.rb +3 -2
  540. data/lib/Ice/Metrics.rb +3 -2
  541. data/lib/Ice/ObjectAdapterF.rb +3 -2
  542. data/lib/Ice/ObjectFactory.rb +3 -2
  543. data/lib/Ice/ObjectFactoryF.rb +3 -2
  544. data/lib/Ice/Plugin.rb +3 -2
  545. data/lib/Ice/PluginF.rb +3 -2
  546. data/lib/Ice/Process.rb +3 -2
  547. data/lib/Ice/ProcessF.rb +3 -2
  548. data/lib/Ice/Properties.rb +3 -2
  549. data/lib/Ice/PropertiesAdmin.rb +3 -2
  550. data/lib/Ice/PropertiesF.rb +3 -2
  551. data/lib/Ice/RemoteLogger.rb +3 -2
  552. data/lib/Ice/Router.rb +3 -2
  553. data/lib/Ice/RouterF.rb +3 -2
  554. data/lib/Ice/SliceChecksumDict.rb +3 -2
  555. data/lib/Ice/Version.rb +3 -2
  556. data/lib/IceBox.rb +1 -1
  557. data/lib/IceBox/IceBox.rb +3 -2
  558. data/lib/IceGrid.rb +1 -1
  559. data/lib/IceGrid/Admin.rb +3 -2
  560. data/lib/IceGrid/Descriptor.rb +3 -2
  561. data/lib/IceGrid/Exception.rb +3 -2
  562. data/lib/IceGrid/FileParser.rb +3 -2
  563. data/lib/IceGrid/Locator.rb +3 -2
  564. data/lib/IceGrid/Observer.rb +3 -2
  565. data/lib/IceGrid/Query.rb +3 -2
  566. data/lib/IceGrid/Registry.rb +3 -2
  567. data/lib/IceGrid/Session.rb +3 -2
  568. data/lib/IceGrid/UserAccountMapper.rb +3 -2
  569. data/lib/IcePatch2.rb +1 -1
  570. data/lib/IcePatch2/FileInfo.rb +3 -2
  571. data/lib/IcePatch2/FileServer.rb +3 -2
  572. data/lib/IceStorm.rb +1 -1
  573. data/lib/IceStorm/IceStorm.rb +3 -2
  574. data/lib/IceStorm/Metrics.rb +3 -2
  575. data/slice/Freeze/BackgroundSaveEvictor.ice +1 -1
  576. data/slice/Freeze/CatalogData.ice +1 -1
  577. data/slice/Freeze/Connection.ice +1 -1
  578. data/slice/Freeze/ConnectionF.ice +1 -1
  579. data/slice/Freeze/DB.ice +1 -1
  580. data/slice/Freeze/Evictor.ice +1 -1
  581. data/slice/Freeze/EvictorF.ice +1 -1
  582. data/slice/Freeze/EvictorStorage.ice +1 -1
  583. data/slice/Freeze/Exception.ice +1 -1
  584. data/slice/Freeze/Transaction.ice +1 -1
  585. data/slice/Freeze/TransactionalEvictor.ice +1 -1
  586. data/slice/Glacier2/Metrics.ice +1 -1
  587. data/slice/Glacier2/PermissionsVerifier.ice +1 -1
  588. data/slice/Glacier2/PermissionsVerifierF.ice +1 -1
  589. data/slice/Glacier2/Router.ice +1 -1
  590. data/slice/Glacier2/RouterF.ice +1 -1
  591. data/slice/Glacier2/SSLInfo.ice +1 -1
  592. data/slice/Glacier2/Session.ice +1 -1
  593. data/slice/Ice/BuiltinSequences.ice +1 -1
  594. data/slice/Ice/Communicator.ice +1 -1
  595. data/slice/Ice/CommunicatorF.ice +1 -1
  596. data/slice/Ice/Connection.ice +3 -3
  597. data/slice/Ice/ConnectionF.ice +1 -1
  598. data/slice/Ice/Current.ice +1 -1
  599. data/slice/Ice/Endpoint.ice +1 -1
  600. data/slice/Ice/EndpointF.ice +1 -1
  601. data/slice/Ice/EndpointTypes.ice +1 -1
  602. data/slice/Ice/FacetMap.ice +1 -1
  603. data/slice/Ice/Identity.ice +1 -1
  604. data/slice/Ice/ImplicitContext.ice +1 -1
  605. data/slice/Ice/ImplicitContextF.ice +1 -1
  606. data/slice/Ice/Instrumentation.ice +1 -1
  607. data/slice/Ice/InstrumentationF.ice +1 -1
  608. data/slice/Ice/LocalException.ice +1 -1
  609. data/slice/Ice/Locator.ice +1 -1
  610. data/slice/Ice/LocatorF.ice +1 -1
  611. data/slice/Ice/Logger.ice +1 -1
  612. data/slice/Ice/LoggerF.ice +1 -1
  613. data/slice/Ice/Metrics.ice +1 -1
  614. data/slice/Ice/ObjectAdapter.ice +4 -4
  615. data/slice/Ice/ObjectAdapterF.ice +1 -1
  616. data/slice/Ice/ObjectFactory.ice +1 -1
  617. data/slice/Ice/ObjectFactoryF.ice +1 -1
  618. data/slice/Ice/Plugin.ice +2 -2
  619. data/slice/Ice/PluginF.ice +1 -1
  620. data/slice/Ice/Process.ice +1 -1
  621. data/slice/Ice/ProcessF.ice +1 -1
  622. data/slice/Ice/Properties.ice +1 -1
  623. data/slice/Ice/PropertiesAdmin.ice +1 -1
  624. data/slice/Ice/PropertiesF.ice +1 -1
  625. data/slice/Ice/RemoteLogger.ice +4 -4
  626. data/slice/Ice/Router.ice +2 -2
  627. data/slice/Ice/RouterF.ice +1 -1
  628. data/slice/Ice/ServantLocator.ice +16 -16
  629. data/slice/Ice/ServantLocatorF.ice +1 -1
  630. data/slice/Ice/SliceChecksumDict.ice +1 -1
  631. data/slice/Ice/Version.ice +1 -1
  632. data/slice/IceBox/IceBox.ice +1 -1
  633. data/slice/IceDiscovery/IceDiscovery.ice +1 -1
  634. data/slice/IceGrid/Admin.ice +1 -1
  635. data/slice/IceGrid/Descriptor.ice +1 -1
  636. data/slice/IceGrid/Exception.ice +1 -1
  637. data/slice/IceGrid/FileParser.ice +1 -1
  638. data/slice/IceGrid/Locator.ice +1 -1
  639. data/slice/IceGrid/Observer.ice +1 -1
  640. data/slice/IceGrid/PluginFacade.ice +11 -11
  641. data/slice/IceGrid/Query.ice +1 -1
  642. data/slice/IceGrid/Registry.ice +1 -1
  643. data/slice/IceGrid/Session.ice +1 -1
  644. data/slice/IceGrid/UserAccountMapper.ice +1 -1
  645. data/slice/IceLocatorDiscovery/IceLocatorDiscovery.ice +1 -1
  646. data/slice/IcePatch2/FileInfo.ice +1 -1
  647. data/slice/IcePatch2/FileServer.ice +1 -1
  648. data/slice/IceSSL/ConnectionInfo.ice +2 -2
  649. data/slice/IceSSL/EndpointInfo.ice +1 -1
  650. data/slice/IceStorm/IceStorm.ice +1 -1
  651. data/slice/IceStorm/Metrics.ice +1 -1
  652. metadata +461 -462
  653. data/ext/ice/mcpp/Makefile.mak +0 -54
@@ -1,6 +1,6 @@
1
1
  // **********************************************************************
2
2
  //
3
- // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
3
+ // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
4
4
  //
5
5
  // This copy of Ice is licensed to you under the terms described in the
6
6
  // ICE_LICENSE file included in this distribution.
@@ -1,6 +1,6 @@
1
1
  // **********************************************************************
2
2
  //
3
- // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
3
+ // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
4
4
  //
5
5
  // This copy of Ice is licensed to you under the terms described in the
6
6
  // ICE_LICENSE file included in this distribution.
@@ -128,4 +128,60 @@ IceUtilInternal::convertUTF8ToUTFWstring(const Byte*& sourceStart, const Byte* s
128
128
  return result;
129
129
  }
130
130
 
131
+ ConversionResult
132
+ IceUtilInternal::convertUTF8ToUTF16(const vector<unsigned char>& source, vector<unsigned short>& target, ConversionFlags flags)
133
+ {
134
+ target.resize(source.size());
135
+ const unsigned char* sourceStart = &source[0];
136
+ const unsigned char* sourceEnd = &source[0] + source.size();
137
+
138
+ unsigned short* targetStart = &target[0];
139
+ unsigned short* targetEnd = &target[0] + target.size();
140
+ ConversionResult result = ConvertUTF8toUTF16(&sourceStart, sourceEnd, &targetStart, targetEnd, flags);
141
+
142
+ if(result == conversionOK)
143
+ {
144
+ target.resize(targetStart - &target[0]);
145
+ }
146
+ return result;
147
+ }
148
+
149
+ ConversionResult
150
+ IceUtilInternal::convertUTF8ToUTF32(const vector<unsigned char>& source, vector<unsigned int>& target, ConversionFlags flags)
151
+ {
152
+ target.resize(source.size());
153
+ const unsigned char* sourceStart = &source[0];
154
+ const unsigned char* sourceEnd = &source[0] + source.size();
155
+
156
+ unsigned int* targetStart = &target[0];
157
+ unsigned int* targetEnd = &target[0] + target.size();
158
+ ConversionResult result = ConvertUTF8toUTF32(&sourceStart, sourceEnd, &targetStart, targetEnd, flags);
159
+
160
+ if(result == conversionOK)
161
+ {
162
+ target.resize(targetStart - &target[0]);
163
+ }
164
+ return result;
165
+ }
166
+
167
+ ConversionResult
168
+ IceUtilInternal::convertUTF32ToUTF8(const vector<unsigned int>& source, vector<unsigned char>& target, ConversionFlags flags)
169
+ {
170
+ target.resize(source.size() * 4);
171
+
172
+ const unsigned int* sourceStart = &source[0];
173
+ const unsigned int* sourceEnd = &source[0] + source.size();
174
+
175
+ unsigned char* targetStart = &target[0];
176
+ unsigned char* targetEnd = &target[0] + target.size();
177
+ ConversionResult result = ConvertUTF32toUTF8(&sourceStart, sourceEnd, &targetStart, targetEnd, flags);
178
+
179
+ if(result == conversionOK)
180
+ {
181
+ target.resize(targetStart - &target[0]);
182
+ }
183
+ return result;
184
+ }
185
+
186
+
131
187
 
@@ -1,6 +1,6 @@
1
1
  // **********************************************************************
2
2
  //
3
- // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
3
+ // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
4
4
  //
5
5
  // This copy of Ice is licensed to you under the terms described in the
6
6
  // ICE_LICENSE file included in this distribution.
@@ -44,6 +44,19 @@ ConversionResult
44
44
  convertUTF8ToUTFWstring(const IceUtil::Byte*& sourceStart, const IceUtil::Byte* sourceEnd,
45
45
  std::wstring& target, IceUtil::ConversionFlags flags);
46
46
 
47
+
48
+ ICE_UTIL_API ConversionResult
49
+ convertUTF8ToUTF16(const std::vector<unsigned char>&, std::vector<unsigned short>&,
50
+ IceUtil::ConversionFlags);
51
+
52
+ ICE_UTIL_API ConversionResult
53
+ convertUTF8ToUTF32(const std::vector<unsigned char>&, std::vector<unsigned int>&,
54
+ IceUtil::ConversionFlags);
55
+
56
+ ICE_UTIL_API ConversionResult
57
+ convertUTF32ToUTF8(const std::vector<unsigned int>&, std::vector<unsigned char>&,
58
+ IceUtil::ConversionFlags);
59
+
47
60
  }
48
61
 
49
62
  #endif
@@ -1,6 +1,6 @@
1
1
  // **********************************************************************
2
2
  //
3
- // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
3
+ // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
4
4
  //
5
5
  // This copy of Ice is licensed to you under the terms described in the
6
6
  // ICE_LICENSE file included in this distribution.
@@ -383,7 +383,7 @@ Slice::printHeader(Output& out)
383
383
  static const char* header =
384
384
  "// **********************************************************************\n"
385
385
  "//\n"
386
- "// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\n"
386
+ "// Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.\n"
387
387
  "//\n"
388
388
  "// This copy of Ice is licensed to you under the terms described in the\n"
389
389
  "// ICE_LICENSE file included in this distribution.\n"
@@ -1,6 +1,6 @@
1
1
  // **********************************************************************
2
2
  //
3
- // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
3
+ // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
4
4
  //
5
5
  // This copy of Ice is licensed to you under the terms described in the
6
6
  // ICE_LICENSE file included in this distribution.
@@ -1,6 +1,6 @@
1
1
  // **********************************************************************
2
2
  //
3
- // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
3
+ // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
4
4
  //
5
5
  // This copy of Ice is licensed to you under the terms described in the
6
6
  // ICE_LICENSE file included in this distribution.
@@ -1,6 +1,6 @@
1
1
  // **********************************************************************
2
2
  //
3
- // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
3
+ // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
4
4
  //
5
5
  // This copy of Ice is licensed to you under the terms described in the
6
6
  // ICE_LICENSE file included in this distribution.
@@ -1,6 +1,6 @@
1
1
  // **********************************************************************
2
2
  //
3
- // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
3
+ // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
4
4
  //
5
5
  // This copy of Ice is licensed to you under the terms described in the
6
6
  // ICE_LICENSE file included in this distribution.
@@ -81,7 +81,7 @@
81
81
 
82
82
  // **********************************************************************
83
83
  //
84
- // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
84
+ // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
85
85
  //
86
86
  // This copy of Ice is licensed to you under the terms described in the
87
87
  // ICE_LICENSE file included in this distribution.
@@ -1,6 +1,6 @@
1
1
  // **********************************************************************
2
2
  //
3
- // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
3
+ // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
4
4
  //
5
5
  // This copy of Ice is licensed to you under the terms described in the
6
6
  // ICE_LICENSE file included in this distribution.
@@ -1,6 +1,6 @@
1
1
  // **********************************************************************
2
2
  //
3
- // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
3
+ // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
4
4
  //
5
5
  // This copy of Ice is licensed to you under the terms described in the
6
6
  // ICE_LICENSE file included in this distribution.
@@ -286,7 +286,7 @@ Slice::JavaOutput::printHeader()
286
286
  static const char* header =
287
287
  "// **********************************************************************\n"
288
288
  "//\n"
289
- "// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\n"
289
+ "// Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.\n"
290
290
  "//\n"
291
291
  "// This copy of Ice is licensed to you under the terms described in the\n"
292
292
  "// ICE_LICENSE file included in this distribution.\n"
@@ -1,6 +1,6 @@
1
1
  // **********************************************************************
2
2
  //
3
- // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
3
+ // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
4
4
  //
5
5
  // This copy of Ice is licensed to you under the terms described in the
6
6
  // ICE_LICENSE file included in this distribution.
@@ -1,6 +1,6 @@
1
1
  // **********************************************************************
2
2
  //
3
- // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
3
+ // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
4
4
  //
5
5
  // This copy of Ice is licensed to you under the terms described in the
6
6
  // ICE_LICENSE file included in this distribution.
@@ -1,6 +1,6 @@
1
1
  // **********************************************************************
2
2
  //
3
- // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
3
+ // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
4
4
  //
5
5
  // This copy of Ice is licensed to you under the terms described in the
6
6
  // ICE_LICENSE file included in this distribution.
@@ -1,6 +1,6 @@
1
1
  // **********************************************************************
2
2
  //
3
- // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
3
+ // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
4
4
  //
5
5
  // This copy of Ice is licensed to you under the terms described in the
6
6
  // ICE_LICENSE file included in this distribution.
@@ -1,6 +1,6 @@
1
1
  // **********************************************************************
2
2
  //
3
- // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
3
+ // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
4
4
  //
5
5
  // This copy of Ice is licensed to you under the terms described in the
6
6
  // ICE_LICENSE file included in this distribution.
@@ -1,6 +1,6 @@
1
1
  // **********************************************************************
2
2
  //
3
- // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
3
+ // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
4
4
  //
5
5
  // This copy of Ice is licensed to you under the terms described in the
6
6
  // ICE_LICENSE file included in this distribution.
@@ -1,6 +1,6 @@
1
1
  // **********************************************************************
2
2
  //
3
- // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
3
+ // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
4
4
  //
5
5
  // This copy of Ice is licensed to you under the terms described in the
6
6
  // ICE_LICENSE file included in this distribution.
@@ -1,6 +1,6 @@
1
1
  // **********************************************************************
2
2
  //
3
- // Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
3
+ // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
4
4
  //
5
5
  // This copy of Ice is licensed to you under the terms described in the
6
6
  // ICE_LICENSE file included in this distribution.
@@ -13,6 +13,7 @@
13
13
  #include <IceUtil/IceUtil.h>
14
14
  #include <IceUtil/StringUtil.h>
15
15
  #include <IceUtil/InputUtil.h>
16
+ #include <IceUtil/Unicode.h>
16
17
  #include <climits>
17
18
  #include <iterator>
18
19
 
@@ -164,7 +165,27 @@ private:
164
165
  void collectClassMembers(const ClassDefPtr&, MemberInfoList&, bool);
165
166
  void collectExceptionMembers(const ExceptionPtr&, MemberInfoList&, bool);
166
167
 
167
- string editComment(const string&);
168
+ typedef vector<string> StringVec;
169
+
170
+ StringVec stripMarkup(const string&);
171
+
172
+ void writeDocstring(const string&, const string& = "");
173
+ void writeDocstring(const string&, const DataMemberList&);
174
+ void writeDocstring(const string&, const EnumeratorList&);
175
+
176
+ typedef map<string, string> StringMap;
177
+ struct OpComment
178
+ {
179
+ StringVec description;
180
+ StringMap params;
181
+ string returns;
182
+ StringMap exceptions;
183
+ };
184
+ bool parseOpComment(const string&, OpComment&);
185
+
186
+ enum DocstringMode { DocSync, DocAsyncBegin, DocAsyncEnd, DocDispatch, DocAsyncDispatch };
187
+
188
+ void writeDocstring(const OperationPtr&, DocstringMode, bool);
168
189
 
169
190
  Output& _out;
170
191
  set<string>& _moduleHistory;
@@ -351,11 +372,7 @@ Slice::Python::CodeVisitor::visitModuleStart(const ModulePtr& p)
351
372
  }
352
373
  _out << nl << "__name__ = '" << abs << "'";
353
374
 
354
- string comment = p->comment();
355
- if(!comment.empty())
356
- {
357
- _out << nl << "_M_" << abs << ".__doc__ = '''" << editComment(comment) << "'''";
358
- }
375
+ writeDocstring(p->comment(), "_M_" + abs + ".__doc__ = ");
359
376
 
360
377
  _moduleStack.push_front(abs);
361
378
  return true;
@@ -448,11 +465,7 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
448
465
 
449
466
  _out.inc();
450
467
 
451
- string comment = p->comment();
452
- if(!comment.empty())
453
- {
454
- _out << nl << "'''" << editComment(comment) << "'''";
455
- }
468
+ writeDocstring(p->comment(), p->dataMembers());
456
469
 
457
470
  //
458
471
  // __init__
@@ -581,11 +594,9 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
581
594
  }
582
595
  _out << "):";
583
596
  _out.inc();
584
- comment = (*oli)->comment();
585
- if(!comment.empty())
586
- {
587
- _out << nl << "'''" << editComment(comment) << "'''";
588
- }
597
+
598
+ writeDocstring(*oli, DocAsyncDispatch, false);
599
+
589
600
  _out << nl << "pass";
590
601
  _out.dec();
591
602
  }
@@ -608,11 +619,7 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
608
619
  }
609
620
  _out << "):";
610
621
  _out.inc();
611
- comment = (*oli)->comment();
612
- if(!comment.empty())
613
- {
614
- _out << nl << "'''" << editComment(comment) << "'''";
615
- }
622
+ writeDocstring(*oli, DocDispatch, p->isLocal());
616
623
  _out << nl << "pass";
617
624
  _out.dec();
618
625
  }
@@ -679,17 +686,8 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
679
686
  }
680
687
  }
681
688
 
682
- comment = (*oli)->comment();
683
- if(!comment.empty())
684
- {
685
- comment = "'''" + editComment(comment) + "'''";
686
- }
687
-
688
689
  _out << sp;
689
- if(!comment.empty())
690
- {
691
- _out << nl << comment;
692
- }
690
+ writeDocstring(*oli, DocSync, false);
693
691
  _out << nl << "def " << fixedOpName << "(self";
694
692
  if(!inParams.empty())
695
693
  {
@@ -709,10 +707,7 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
709
707
  // Async operations.
710
708
  //
711
709
  _out << sp;
712
- if(!comment.empty())
713
- {
714
- _out << nl << comment;
715
- }
710
+ writeDocstring(*oli, DocAsyncBegin, false);
716
711
  _out << nl << "def begin_" << (*oli)->name() << "(self";
717
712
  if(!inParams.empty())
718
713
  {
@@ -729,10 +724,7 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
729
724
  _out.dec();
730
725
 
731
726
  _out << sp;
732
- if(!comment.empty())
733
- {
734
- _out << nl << comment;
735
- }
727
+ writeDocstring(*oli, DocAsyncEnd, false);
736
728
  _out << nl << "def end_" << (*oli)->name() << "(self, _r):";
737
729
  _out.inc();
738
730
  _out << nl << "return _M_" << abs << "._op_" << (*oli)->name() << ".end(self, _r)";
@@ -1031,14 +1023,10 @@ Slice::Python::CodeVisitor::visitExceptionStart(const ExceptionPtr& p)
1031
1023
  _out << "):";
1032
1024
  _out.inc();
1033
1025
 
1034
- string comment = p->comment();
1035
- if(!comment.empty())
1036
- {
1037
- _out << nl << "'''" << editComment(comment) << "'''";
1038
- }
1039
-
1040
1026
  DataMemberList members = p->dataMembers();
1041
1027
 
1028
+ writeDocstring(p->comment(), members);
1029
+
1042
1030
  //
1043
1031
  // __init__
1044
1032
  //
@@ -1159,10 +1147,10 @@ Slice::Python::CodeVisitor::visitStructStart(const StructPtr& p)
1159
1147
  string scoped = p->scoped();
1160
1148
  string abs = getAbsolute(p);
1161
1149
  string name = fixIdent(p->name());
1150
+ DataMemberList members = p->dataMembers();
1162
1151
  MemberInfoList memberList;
1163
1152
 
1164
1153
  {
1165
- DataMemberList members = p->dataMembers();
1166
1154
  for(DataMemberList::iterator q = members.begin(); q != members.end(); ++q)
1167
1155
  {
1168
1156
  memberList.push_back(MemberInfo());
@@ -1178,11 +1166,7 @@ Slice::Python::CodeVisitor::visitStructStart(const StructPtr& p)
1178
1166
  _out << nl << "class " << name << "(object):";
1179
1167
  _out.inc();
1180
1168
 
1181
- string comment = p->comment();
1182
- if(!comment.empty())
1183
- {
1184
- _out << nl << "'''" << editComment(comment) << "'''";
1185
- }
1169
+ writeDocstring(p->comment(), members);
1186
1170
 
1187
1171
  _out << nl << "def __init__(self";
1188
1172
  writeConstructorParams(memberList);
@@ -1512,11 +1496,7 @@ Slice::Python::CodeVisitor::visitEnum(const EnumPtr& p)
1512
1496
  _out << nl << "class " << name << "(Ice.EnumBase):";
1513
1497
  _out.inc();
1514
1498
 
1515
- string comment = p->comment();
1516
- if(!comment.empty())
1517
- {
1518
- _out << nl << "'''" << editComment(comment) << "'''";
1519
- }
1499
+ writeDocstring(p->comment(), enums);
1520
1500
 
1521
1501
  _out << sp << nl << "def __init__(self, _n, _v):";
1522
1502
  _out.inc();
@@ -1879,68 +1859,138 @@ Slice::Python::CodeVisitor::writeConstantValue(const TypePtr& type, const Syntax
1879
1859
 
1880
1860
  _out << "\""; // Opening "
1881
1861
 
1882
- for(string::const_iterator c = value.begin(); c != value.end(); ++c)
1862
+ for(size_t i = 0; i < value.size();)
1883
1863
  {
1884
- switch(*c)
1885
- {
1886
- case '"':
1864
+ char c = value[i];
1865
+ switch(c)
1887
1866
  {
1888
- _out << "\\\"";
1889
- break;
1890
- }
1891
- case '\\':
1892
- {
1893
- _out << "\\\\";
1894
- break;
1895
- }
1896
- case '\r':
1897
- {
1898
- _out << "\\r";
1899
- break;
1900
- }
1901
- case '\n':
1902
- {
1903
- _out << "\\n";
1904
- break;
1905
- }
1906
- case '\t':
1907
- {
1908
- _out << "\\t";
1909
- break;
1910
- }
1911
- case '\b':
1912
- {
1913
- _out << "\\b";
1914
- break;
1915
- }
1916
- case '\f':
1917
- {
1918
- _out << "\\f";
1919
- break;
1920
- }
1921
- default:
1922
- {
1923
- if(charSet.find(*c) == charSet.end())
1867
+ case '"':
1924
1868
  {
1925
- unsigned char uc = *c; // Char may be signed, so make it positive.
1926
- stringstream s;
1927
- s << "\\"; // Print as octal if not in basic source character set.
1928
- s.flags(ios_base::oct);
1929
- s.width(3);
1930
- s.fill('0');
1931
- s << static_cast<unsigned>(uc);
1932
- _out << s.str();
1869
+ _out << "\\\"";
1870
+ break;
1933
1871
  }
1934
- else
1872
+ case '\\':
1935
1873
  {
1936
- _out << *c; // Print normally if in basic source character set.
1874
+ string s = "\\";
1875
+ size_t j = i + 1;
1876
+ for(; j < value.size(); ++j)
1877
+ {
1878
+ if(value[j] != '\\')
1879
+ {
1880
+ break;
1881
+ }
1882
+ s += "\\";
1883
+ }
1884
+
1885
+ //
1886
+ // An even number of slash \ will escape the backslash and
1887
+ // the codepoint will be interpreted as its charaters
1888
+ //
1889
+ // \\u00000041 - ['\\', 'u', '0', '0', '0', '0', '0', '0', '4', '1']
1890
+ // \\\u00000041 - ['\\', 'A'] (41 is the codepoint for 'A')
1891
+ //
1892
+ if(s.size() % 2 != 0 && (value[j] == 'U' || value[j] == 'u'))
1893
+ {
1894
+ //
1895
+ // Convert codepoint to UTF8 bytes and write the escaped bytes
1896
+ //
1897
+ _out << s.substr(0, s.size() - 1);
1898
+
1899
+ size_t sz = value[j] == 'U' ? 8 : 4;
1900
+ string codepoint = value.substr(j + 1, sz);
1901
+ assert(codepoint.size() == sz);
1902
+
1903
+ IceUtil::Int64 v = IceUtilInternal::strToInt64(codepoint.c_str(), 0, 16);
1904
+
1905
+ vector<unsigned int> u32buffer;
1906
+ u32buffer.push_back(static_cast<unsigned int>(v));
1907
+
1908
+ vector<unsigned char> u8buffer;
1909
+ IceUtilInternal::ConversionResult result = convertUTF32ToUTF8(u32buffer, u8buffer, IceUtil::lenientConversion);
1910
+ switch(result)
1911
+ {
1912
+ case conversionOK:
1913
+ break;
1914
+ case sourceExhausted:
1915
+ throw IceUtil::IllegalConversionException(__FILE__, __LINE__, "string source exhausted");
1916
+ case sourceIllegal:
1917
+ throw IceUtil::IllegalConversionException(__FILE__, __LINE__, "string source illegal");
1918
+ default:
1919
+ {
1920
+ assert(0);
1921
+ throw IceUtil::IllegalConversionException(__FILE__, __LINE__);
1922
+ }
1923
+ }
1924
+
1925
+ ostringstream s;
1926
+ for(vector<unsigned char>::const_iterator q = u8buffer.begin(); q != u8buffer.end(); ++q)
1927
+ {
1928
+ s << "\\";
1929
+ s.fill('0');
1930
+ s.width(3);
1931
+ s << oct;
1932
+ s << static_cast<unsigned int>(*q);
1933
+ }
1934
+ _out << s.str();
1935
+
1936
+ i = j + 1 + sz;
1937
+ }
1938
+ else
1939
+ {
1940
+ _out << s;
1941
+ i = j;
1942
+ }
1943
+ continue;
1944
+ }
1945
+ case '\r':
1946
+ {
1947
+ _out << "\\r";
1948
+ break;
1949
+ }
1950
+ case '\n':
1951
+ {
1952
+ _out << "\\n";
1953
+ break;
1954
+ }
1955
+ case '\t':
1956
+ {
1957
+ _out << "\\t";
1958
+ break;
1959
+ }
1960
+ case '\b':
1961
+ {
1962
+ _out << "\\b";
1963
+ break;
1964
+ }
1965
+ case '\f':
1966
+ {
1967
+ _out << "\\f";
1968
+ break;
1969
+ }
1970
+ default:
1971
+ {
1972
+ if(charSet.find(c) == charSet.end())
1973
+ {
1974
+ unsigned char uc = c; // Char may be signed, so make it positive.
1975
+ stringstream s;
1976
+ s << "\\"; // Print as octal if not in basic source character set.
1977
+ s.flags(ios_base::oct);
1978
+ s.width(3);
1979
+ s.fill('0');
1980
+ s << static_cast<unsigned>(uc);
1981
+ _out << s.str();
1982
+ }
1983
+ else
1984
+ {
1985
+ _out << c; // Print normally if in basic source character set.
1986
+ }
1987
+ break;
1937
1988
  }
1938
- break;
1939
- }
1940
1989
  }
1990
+ ++i;
1941
1991
  }
1942
1992
 
1943
- _out << "\""; // Closing "
1993
+ _out << "\""; // Closing "
1944
1994
  break;
1945
1995
  }
1946
1996
  case Slice::Builtin::KindObject:
@@ -2062,25 +2112,25 @@ Slice::Python::CodeVisitor::collectExceptionMembers(const ExceptionPtr& p, Membe
2062
2112
  }
2063
2113
  }
2064
2114
 
2065
- string
2066
- Slice::Python::CodeVisitor::editComment(const string& comment)
2115
+ Slice::Python::CodeVisitor::StringVec
2116
+ Slice::Python::CodeVisitor::stripMarkup(const string& comment)
2067
2117
  {
2068
2118
  //
2069
2119
  // Strip HTML markup and javadoc links.
2070
2120
  //
2071
- string result = comment;
2121
+ string text = comment;
2072
2122
  string::size_type pos = 0;
2073
2123
  do
2074
2124
  {
2075
- pos = result.find('<', pos);
2125
+ pos = text.find('<', pos);
2076
2126
  if(pos != string::npos)
2077
2127
  {
2078
- string::size_type endpos = result.find('>', pos);
2128
+ string::size_type endpos = text.find('>', pos);
2079
2129
  if(endpos == string::npos)
2080
2130
  {
2081
2131
  break;
2082
2132
  }
2083
- result.erase(pos, endpos - pos + 1);
2133
+ text.erase(pos, endpos - pos + 1);
2084
2134
  }
2085
2135
  } while(pos != string::npos);
2086
2136
 
@@ -2088,18 +2138,18 @@ Slice::Python::CodeVisitor::editComment(const string& comment)
2088
2138
  pos = 0;
2089
2139
  do
2090
2140
  {
2091
- pos = result.find(link, pos);
2141
+ pos = text.find(link, pos);
2092
2142
  if(pos != string::npos)
2093
2143
  {
2094
- result.erase(pos, link.size());
2095
- string::size_type endpos = result.find('}', pos);
2144
+ text.erase(pos, link.size());
2145
+ string::size_type endpos = text.find('}', pos);
2096
2146
  if(endpos != string::npos)
2097
2147
  {
2098
- string::size_type identpos = result.find_first_not_of(" \t#", pos);
2148
+ string::size_type identpos = text.find_first_not_of(" \t#", pos);
2099
2149
  if(identpos != string::npos && identpos < endpos)
2100
2150
  {
2101
- string ident = result.substr(identpos, endpos - identpos);
2102
- result.replace(pos, endpos - pos + 1, fixIdent(ident));
2151
+ string ident = text.substr(identpos, endpos - identpos);
2152
+ text.replace(pos, endpos - pos + 1, fixIdent(ident));
2103
2153
  }
2104
2154
  }
2105
2155
  }
@@ -2116,160 +2166,639 @@ Slice::Python::CodeVisitor::editComment(const string& comment)
2116
2166
  // Look for the next @ and delete up to that, or
2117
2167
  // to the end of the string, if not found.
2118
2168
  //
2119
- pos = result.find(seeTag, pos);
2169
+ pos = text.find(seeTag, pos);
2120
2170
  if(pos != string::npos)
2121
2171
  {
2122
- string::size_type next = result.find('@', pos + seeTag.size());
2172
+ string::size_type next = text.find('@', pos + seeTag.size());
2123
2173
  if(next != string::npos)
2124
2174
  {
2125
- result.erase(pos, next - pos);
2175
+ text.erase(pos, next - pos);
2126
2176
  }
2127
2177
  else
2128
2178
  {
2129
- result.erase(pos, string::npos);
2179
+ text.erase(pos, string::npos);
2130
2180
  }
2131
2181
  }
2132
2182
  } while(pos != string::npos);
2133
2183
 
2134
2184
  //
2135
- // Reformat @param, @return, and @throws.
2185
+ // Escape triple quotes.
2136
2186
  //
2137
- static const string paramTag = "@param";
2187
+ static const string singleQuotes = "'''";
2138
2188
  pos = 0;
2139
- bool first = true;
2140
- do
2189
+ while((pos = text.find(singleQuotes, pos)) != string::npos)
2141
2190
  {
2142
- pos = result.find(paramTag, pos);
2143
- if(pos != string::npos)
2191
+ text.insert(pos, "\\");
2192
+ pos += singleQuotes.size() + 1;
2193
+ }
2194
+ static const string doubleQuotes = "\"\"\"";
2195
+ pos = 0;
2196
+ while((pos = text.find(doubleQuotes, pos)) != string::npos)
2197
+ {
2198
+ text.insert(pos, "\\");
2199
+ pos += doubleQuotes.size() + 1;
2200
+ }
2201
+
2202
+ //
2203
+ // Fold multiple empty lines.
2204
+ //
2205
+ pos = 0;
2206
+ while(true)
2207
+ {
2208
+ pos = text.find('\n', pos);
2209
+ if(pos == string::npos)
2210
+ {
2211
+ break;
2212
+ }
2213
+
2214
+ //
2215
+ // Skip the next LF or CR/LF, if present.
2216
+ //
2217
+ if(pos < text.size() - 1 && text[pos + 1] == '\n')
2218
+ {
2219
+ pos += 2;
2220
+ }
2221
+ else if(pos < text.size() - 2 && text[pos + 1] == '\r' && text[pos + 2] == '\n')
2222
+ {
2223
+ pos += 3;
2224
+ }
2225
+ else
2144
2226
  {
2145
- result.replace(pos, paramTag.size() + 1, " ");
2227
+ ++pos;
2228
+ continue;
2229
+ }
2230
+
2231
+ //
2232
+ // Erase any more CR/LF characters.
2233
+ //
2234
+ string::size_type next = text.find_first_not_of("\r\n", pos);
2235
+ if(next != string::npos)
2236
+ {
2237
+ text.erase(pos, next - pos);
2238
+ }
2239
+ }
2240
+
2241
+ //
2242
+ // Remove trailing whitespace.
2243
+ //
2244
+ pos = text.find_last_not_of(" \t\r\n");
2245
+ if(pos != string::npos)
2246
+ {
2247
+ text.erase(pos + 1, text.size() - pos - 1);
2248
+ }
2146
2249
 
2147
- if(first)
2250
+ //
2251
+ // Split text into lines.
2252
+ //
2253
+ StringVec lines;
2254
+ if(!text.empty())
2255
+ {
2256
+ string::size_type start = 0;
2257
+ while(start != string::npos)
2258
+ {
2259
+ string::size_type nl = text.find_first_of("\r\n", start);
2260
+ string line;
2261
+ if(nl != string::npos)
2148
2262
  {
2149
- string::size_type bol = result.rfind('\n', pos);
2150
- if(bol == string::npos)
2151
- {
2152
- bol = 0;
2153
- }
2154
- else
2263
+ line = text.substr(start, nl - start);
2264
+ start = nl;
2265
+ }
2266
+ else
2267
+ {
2268
+ line = text.substr(start);
2269
+ start = text.size();
2270
+ }
2271
+
2272
+ lines.push_back(line);
2273
+
2274
+ start = text.find_first_not_of("\r\n", start);
2275
+ }
2276
+ }
2277
+
2278
+ return lines;
2279
+ }
2280
+
2281
+ void
2282
+ Slice::Python::CodeVisitor::writeDocstring(const string& comment, const string& prefix)
2283
+ {
2284
+ StringVec lines = stripMarkup(comment);
2285
+ if(lines.empty())
2286
+ {
2287
+ return;
2288
+ }
2289
+
2290
+ _out << nl << prefix << "\"\"\"";
2291
+
2292
+ for(StringVec::const_iterator q = lines.begin(); q != lines.end(); ++q)
2293
+ {
2294
+ if(q != lines.begin())
2295
+ {
2296
+ _out << nl;
2297
+ }
2298
+ _out << *q;
2299
+ }
2300
+
2301
+ _out << "\"\"\"";
2302
+ }
2303
+
2304
+ void
2305
+ Slice::Python::CodeVisitor::writeDocstring(const string& comment, const DataMemberList& members)
2306
+ {
2307
+ StringVec lines = stripMarkup(comment);
2308
+ if(lines.empty())
2309
+ {
2310
+ return;
2311
+ }
2312
+
2313
+ _out << nl << "\"\"\"";
2314
+
2315
+ for(StringVec::const_iterator q = lines.begin(); q != lines.end(); ++q)
2316
+ {
2317
+ if(q != lines.begin())
2318
+ {
2319
+ _out << nl;
2320
+ }
2321
+ _out << *q;
2322
+ }
2323
+
2324
+ if(!members.empty())
2325
+ {
2326
+ //
2327
+ // Collect docstrings (if any) for the members.
2328
+ //
2329
+ map<string, StringVec> docs;
2330
+ for(DataMemberList::const_iterator m = members.begin(); m != members.end(); ++m)
2331
+ {
2332
+ StringVec doc = stripMarkup((*m)->comment());
2333
+ if(!doc.empty())
2334
+ {
2335
+ docs[(*m)->name()] = doc;
2336
+ }
2337
+ }
2338
+ //
2339
+ // Only emit members if there's a docstring for at least one member.
2340
+ //
2341
+ if(!docs.empty())
2342
+ {
2343
+ _out << nl << "Members:";
2344
+ for(DataMemberList::const_iterator m = members.begin(); m != members.end(); ++m)
2345
+ {
2346
+ _out << nl << fixIdent((*m)->name()) << " -- ";
2347
+ map<string, StringVec>::iterator p = docs.find((*m)->name());
2348
+ if(p != docs.end())
2155
2349
  {
2156
- bol++;
2350
+ for(StringVec::const_iterator q = p->second.begin(); q != p->second.end(); ++q)
2351
+ {
2352
+ if(q != p->second.begin())
2353
+ {
2354
+ _out << nl;
2355
+ }
2356
+ _out << *q;
2357
+ }
2157
2358
  }
2158
- result.insert(bol, "Arguments:\n");
2159
- first = false;
2160
2359
  }
2161
2360
  }
2162
- } while(pos != string::npos);
2361
+ }
2163
2362
 
2164
- static const string returnTag = "@return";
2165
- pos = result.find(returnTag);
2166
- first = true;
2167
- if(pos != string::npos)
2363
+ _out << "\"\"\"";
2364
+ }
2365
+
2366
+ void
2367
+ Slice::Python::CodeVisitor::writeDocstring(const string& comment, const EnumeratorList& enums)
2368
+ {
2369
+ StringVec lines = stripMarkup(comment);
2370
+ if(lines.empty())
2168
2371
  {
2169
- result.replace(pos, returnTag.size() + 1, " ");
2170
- string::size_type bol = result.rfind('\n', pos);
2171
- if(bol == string::npos)
2372
+ return;
2373
+ }
2374
+
2375
+ _out << nl << "\"\"\"";
2376
+
2377
+ for(StringVec::const_iterator q = lines.begin(); q != lines.end(); ++q)
2378
+ {
2379
+ if(q != lines.begin())
2172
2380
  {
2173
- bol = 0;
2381
+ _out << nl;
2174
2382
  }
2175
- else
2383
+ _out << *q;
2384
+ }
2385
+
2386
+ if(!enums.empty())
2387
+ {
2388
+ //
2389
+ // Collect docstrings (if any) for the enumerators.
2390
+ //
2391
+ map<string, StringVec> docs;
2392
+ for(EnumeratorList::const_iterator e = enums.begin(); e != enums.end(); ++e)
2393
+ {
2394
+ StringVec doc = stripMarkup((*e)->comment());
2395
+ if(!doc.empty())
2396
+ {
2397
+ docs[(*e)->name()] = doc;
2398
+ }
2399
+ }
2400
+ //
2401
+ // Only emit enumerators if there's a docstring for at least one enumerator.
2402
+ //
2403
+ if(!docs.empty())
2176
2404
  {
2177
- bol++;
2405
+ _out << nl << "Enumerators:";
2406
+ for(EnumeratorList::const_iterator e = enums.begin(); e != enums.end(); ++e)
2407
+ {
2408
+ _out << nl << fixIdent((*e)->name()) << " -- ";
2409
+ map<string, StringVec>::iterator p = docs.find((*e)->name());
2410
+ if(p != docs.end())
2411
+ {
2412
+ for(StringVec::const_iterator q = p->second.begin(); q != p->second.end(); ++q)
2413
+ {
2414
+ if(q != p->second.begin())
2415
+ {
2416
+ _out << nl;
2417
+ }
2418
+ _out << *q;
2419
+ }
2420
+ }
2421
+ }
2178
2422
  }
2179
- result.insert(bol, "Returns:\n");
2180
2423
  }
2181
2424
 
2182
- static const string throwsTag = "@throws";
2183
- pos = 0;
2184
- first = true;
2185
- do
2425
+ _out << "\"\"\"";
2426
+ }
2427
+
2428
+ bool
2429
+ Slice::Python::CodeVisitor::parseOpComment(const string& comment, OpComment& c)
2430
+ {
2431
+ //
2432
+ // Remove most javadoc & HTML markup.
2433
+ //
2434
+ StringVec lines = stripMarkup(comment);
2435
+ if(lines.empty())
2186
2436
  {
2187
- pos = result.find(throwsTag, pos);
2188
- if(pos != string::npos)
2189
- {
2190
- result.replace(pos, throwsTag.size() + 1, " ");
2437
+ return false;
2438
+ }
2439
+
2440
+ //
2441
+ // Extract the descriptions of parameters, exceptions and return values.
2442
+ //
2443
+ string name;
2444
+ bool inParam = false, inException = false, inReturn = false;
2445
+ vector<string>::size_type i = 0;
2446
+ while(i < lines.size())
2447
+ {
2448
+ string l = lines[i];
2449
+ string::size_type paramTag = l.find("@param");
2450
+ string::size_type throwTag = l.find("@throw");
2451
+ string::size_type returnTag = l.find("@return");
2191
2452
 
2192
- if(first)
2453
+ if(paramTag != string::npos)
2454
+ {
2455
+ string::size_type pos = l.find_first_of(" \t", paramTag);
2456
+ if(pos != string::npos)
2457
+ {
2458
+ pos = l.find_first_not_of(" \t", pos);
2459
+ }
2460
+ if(pos != string::npos)
2193
2461
  {
2194
- string::size_type bol = result.rfind('\n', pos);
2195
- if(bol == string::npos)
2462
+ string::size_type namePos = pos;
2463
+ pos = l.find_first_of(" \t", pos);
2464
+ inParam = true;
2465
+ inException = false;
2466
+ inReturn = false;
2467
+ if(pos == string::npos)
2196
2468
  {
2197
- bol = 0;
2469
+ //
2470
+ // Doc assumed to have the format
2471
+ //
2472
+ // @param foo
2473
+ // Description of foo...
2474
+ //
2475
+ name = l.substr(namePos);
2476
+ c.params[name] = "";
2198
2477
  }
2199
2478
  else
2200
2479
  {
2201
- bol++;
2480
+ name = l.substr(namePos, pos - namePos);
2481
+ pos = l.find_first_not_of(" \t", pos);
2482
+ if(pos != string::npos)
2483
+ {
2484
+ c.params[name] = l.substr(pos);
2485
+ }
2486
+ else
2487
+ {
2488
+ c.params[name] = "";
2489
+ }
2490
+ }
2491
+ }
2492
+ lines.erase(lines.begin() + i);
2493
+ continue;
2494
+ }
2495
+ else if(throwTag != string::npos)
2496
+ {
2497
+ string::size_type pos = l.find_first_of(" \t", throwTag);
2498
+ if(pos != string::npos)
2499
+ {
2500
+ pos = l.find_first_not_of(" \t", pos);
2501
+ }
2502
+ if(pos != string::npos)
2503
+ {
2504
+ string::size_type namePos = pos;
2505
+ pos = l.find_first_of(" \t", pos);
2506
+ inException = true;
2507
+ inParam = false;
2508
+ inReturn = false;
2509
+ if(pos == string::npos)
2510
+ {
2511
+ //
2512
+ // Doc assumed to have the format
2513
+ //
2514
+ // @throw foo
2515
+ // Description of foo...
2516
+ //
2517
+ name = l.substr(namePos);
2518
+ c.exceptions[name] = "";
2519
+ }
2520
+ else
2521
+ {
2522
+ name = l.substr(namePos, pos - namePos);
2523
+ pos = l.find_first_not_of(" \t", pos);
2524
+ if(pos != string::npos)
2525
+ {
2526
+ c.exceptions[name] = l.substr(pos);
2527
+ }
2528
+ else
2529
+ {
2530
+ c.exceptions[name] = "";
2531
+ }
2532
+ }
2533
+ }
2534
+ lines.erase(lines.begin() + i);
2535
+ continue;
2536
+ }
2537
+ else if(returnTag != string::npos)
2538
+ {
2539
+ string::size_type pos = l.find_first_of(" \t", returnTag);
2540
+ if(pos != string::npos)
2541
+ {
2542
+ pos = l.find_first_not_of(" \t", pos);
2543
+ }
2544
+ if(pos != string::npos)
2545
+ {
2546
+ inReturn = true;
2547
+ inException = false;
2548
+ inParam = false;
2549
+ c.returns = l.substr(pos);
2550
+ }
2551
+ lines.erase(lines.begin() + i);
2552
+ continue;
2553
+ }
2554
+ else
2555
+ {
2556
+ //
2557
+ // We didn't find a tag so we assume this line is a continuation of a
2558
+ // previous description.
2559
+ //
2560
+ string::size_type pos = l.find_first_not_of(" \t");
2561
+ if(pos != string::npos && l[pos] != '@')
2562
+ {
2563
+ if(inParam)
2564
+ {
2565
+ assert(!name.empty());
2566
+ if(!c.params[name].empty())
2567
+ {
2568
+ c.params[name] += " ";
2569
+ }
2570
+ c.params[name] += l.substr(pos);
2571
+ lines.erase(lines.begin() + i);
2572
+ continue;
2573
+ }
2574
+ else if(inException)
2575
+ {
2576
+ assert(!name.empty());
2577
+ if(!c.exceptions[name].empty())
2578
+ {
2579
+ c.exceptions[name] += " ";
2580
+ }
2581
+ c.exceptions[name] += l.substr(pos);
2582
+ lines.erase(lines.begin() + i);
2583
+ continue;
2584
+ }
2585
+ else if(inReturn)
2586
+ {
2587
+ if(!c.returns.empty())
2588
+ {
2589
+ c.returns += " ";
2590
+ }
2591
+ c.returns += l.substr(pos);
2592
+ lines.erase(lines.begin() + i);
2593
+ continue;
2202
2594
  }
2203
- result.insert(bol, "Exceptions:\n");
2204
- first = false;
2205
2595
  }
2206
2596
  }
2207
- } while(pos != string::npos);
2597
+
2598
+ i++;
2599
+ }
2208
2600
 
2209
2601
  //
2210
- // Escape triple quotes.
2602
+ // All remaining lines become the general description.
2211
2603
  //
2212
- static const string quotes = "'''";
2213
- pos = 0;
2214
- do
2604
+ for(vector<string>::iterator p = lines.begin(); p != lines.end(); ++p)
2215
2605
  {
2216
- pos = result.find(quotes, pos);
2217
- if(pos != string::npos)
2606
+ if(p->find_first_not_of(" \t\n\r") != string::npos)
2218
2607
  {
2219
- result.insert(pos, "\\");
2220
- pos += quotes.size() + 1;
2608
+ c.description.push_back(*p);
2221
2609
  }
2222
- } while(pos != string::npos);
2610
+ }
2611
+
2612
+ return true;
2613
+ }
2614
+
2615
+ void
2616
+ Slice::Python::CodeVisitor::writeDocstring(const OperationPtr& op, DocstringMode mode, bool local)
2617
+ {
2618
+ OpComment comment;
2619
+ if(!parseOpComment(op->comment(), comment))
2620
+ {
2621
+ return;
2622
+ }
2623
+
2624
+ TypePtr ret = op->returnType();
2625
+ ParamDeclList params = op->parameters();
2626
+ vector<string> inParams, outParams;
2627
+ for(ParamDeclList::iterator p = params.begin(); p != params.end(); ++p)
2628
+ {
2629
+ if((*p)->isOutParam())
2630
+ {
2631
+ outParams.push_back((*p)->name());
2632
+ }
2633
+ else
2634
+ {
2635
+ inParams.push_back((*p)->name());
2636
+ }
2637
+ }
2638
+
2639
+ if(comment.description.empty())
2640
+ {
2641
+ if((mode == DocSync || mode == DocDispatch) && comment.params.empty() && comment.exceptions.empty() &&
2642
+ comment.returns.empty())
2643
+ {
2644
+ return;
2645
+ }
2646
+ else if(mode == DocAsyncBegin && inParams.empty())
2647
+ {
2648
+ return;
2649
+ }
2650
+ else if(mode == DocAsyncEnd && outParams.empty() && comment.returns.empty())
2651
+ {
2652
+ return;
2653
+ }
2654
+ else if(mode == DocAsyncDispatch && inParams.empty() && comment.exceptions.empty())
2655
+ {
2656
+ return;
2657
+ }
2658
+ }
2223
2659
 
2224
2660
  //
2225
- // Fold multiple empty lines.
2661
+ // Emit the general description.
2226
2662
  //
2227
- pos = 0;
2228
- while(true)
2663
+ _out << nl << "\"\"\"";
2664
+ if(!comment.description.empty())
2229
2665
  {
2230
- pos = result.find('\n', pos);
2231
- if(pos == string::npos)
2666
+ for(StringVec::const_iterator q = comment.description.begin(); q != comment.description.end(); ++q)
2232
2667
  {
2233
- break;
2668
+ if(q != comment.description.begin())
2669
+ {
2670
+ _out << nl;
2671
+ }
2672
+ _out << *q;
2234
2673
  }
2674
+ }
2235
2675
 
2236
- //
2237
- // Skip the next LF or CR/LF, if present.
2238
- //
2239
- if(pos < result.size() - 1 && result[pos + 1] == '\n')
2676
+ //
2677
+ // Emit arguments.
2678
+ //
2679
+ bool needArgs = false;
2680
+ switch(mode)
2681
+ {
2682
+ case DocSync:
2683
+ case DocAsyncBegin:
2684
+ case DocDispatch:
2685
+ needArgs = !local || !inParams.empty();
2686
+ break;
2687
+ case DocAsyncEnd:
2688
+ case DocAsyncDispatch:
2689
+ needArgs = true;
2690
+ break;
2691
+ }
2692
+
2693
+ if(needArgs)
2694
+ {
2695
+ _out << nl << "Arguments:";
2696
+ if(mode == DocAsyncDispatch)
2240
2697
  {
2241
- pos += 2;
2698
+ _out << nl << "_cb -- The asynchronous callback object.";
2242
2699
  }
2243
- else if(pos < result.size() - 2 && result[pos + 1] == '\r' && result[pos + 2] == '\n')
2700
+ for(vector<string>::iterator q = inParams.begin(); q != inParams.end(); ++q)
2244
2701
  {
2245
- pos += 3;
2702
+ string fixed = fixIdent(*q);
2703
+ _out << nl << fixed << " -- ";
2704
+ StringMap::const_iterator r = comment.params.find(*q);
2705
+ if(r == comment.params.end())
2706
+ {
2707
+ r = comment.params.find(fixed); // Just in case.
2708
+ }
2709
+ if(r != comment.params.end())
2710
+ {
2711
+ _out << r->second;
2712
+ }
2246
2713
  }
2247
- else
2714
+ if(mode == DocAsyncBegin)
2248
2715
  {
2249
- ++pos;
2250
- continue;
2716
+ _out << nl << "_response -- The asynchronous response callback."
2717
+ << nl << "_ex -- The asynchronous exception callback."
2718
+ << nl << "_sent -- The asynchronous sent callback.";
2251
2719
  }
2252
-
2253
- //
2254
- // Erase any more CR/LF characters.
2255
- //
2256
- string::size_type next = result.find_first_not_of("\r\n", pos);
2257
- if(next != string::npos)
2720
+ if(!local && (mode == DocSync || mode == DocAsyncBegin))
2258
2721
  {
2259
- result.erase(pos, next - pos);
2722
+ _out << nl << "_ctx -- The request context for the invocation.";
2260
2723
  }
2724
+ if(!local && (mode == DocDispatch || mode == DocAsyncDispatch))
2725
+ {
2726
+ _out << nl << "current -- The Current object for the invocation.";
2727
+ }
2728
+ }
2729
+ else if(mode == DocAsyncEnd)
2730
+ {
2731
+ _out << nl << "Arguments:"
2732
+ << nl << "_r - The asynchronous result object for the invocation.";
2261
2733
  }
2262
2734
 
2263
2735
  //
2264
- // Remove trailing whitespace.
2736
+ // Emit return value(s).
2265
2737
  //
2266
- pos = result.find_last_not_of(" \t\r\n");
2267
- if(pos != string::npos)
2738
+ if(mode == DocAsyncBegin)
2268
2739
  {
2269
- result.erase(pos + 1, result.size() - pos - 1);
2740
+ _out << nl << "Returns: An asynchronous result object for the invocation.";
2270
2741
  }
2271
2742
 
2272
- return result;
2743
+ if((mode == DocSync || mode == DocAsyncEnd || mode == DocDispatch) && (ret || !outParams.empty()))
2744
+ {
2745
+ if((outParams.size() + (ret ? 1 : 0)) > 1)
2746
+ {
2747
+ _out << nl << "Returns a tuple containing the following:";
2748
+ if(ret)
2749
+ {
2750
+ _out << nl << "_retval -- " << comment.returns;
2751
+ }
2752
+ for(vector<string>::iterator q = outParams.begin(); q != outParams.end(); ++q)
2753
+ {
2754
+ string fixed = fixIdent(*q);
2755
+ _out << nl << fixed << " -- ";
2756
+ StringMap::const_iterator r = comment.params.find(*q);
2757
+ if(r == comment.params.end())
2758
+ {
2759
+ r = comment.params.find(fixed); // Just in case.
2760
+ }
2761
+ if(r != comment.params.end())
2762
+ {
2763
+ _out << r->second;
2764
+ }
2765
+ }
2766
+ }
2767
+ else if(ret && !comment.returns.empty())
2768
+ {
2769
+ _out << nl << "Returns: " << comment.returns;
2770
+ }
2771
+ else if(!outParams.empty())
2772
+ {
2773
+ assert(outParams.size() == 1);
2774
+ _out << nl << "Returns:";
2775
+ string fixed = fixIdent(outParams[0]);
2776
+ _out << nl << fixed << " -- ";
2777
+ StringMap::const_iterator r = comment.params.find(outParams[0]);
2778
+ if(r == comment.params.end())
2779
+ {
2780
+ r = comment.params.find(fixed); // Just in case.
2781
+ }
2782
+ if(r != comment.params.end())
2783
+ {
2784
+ _out << r->second;
2785
+ }
2786
+ }
2787
+ }
2788
+
2789
+ //
2790
+ // Emit exceptions.
2791
+ //
2792
+ if((mode == DocSync || mode == DocAsyncEnd || mode == DocDispatch || mode == DocAsyncDispatch) &&
2793
+ !comment.exceptions.empty())
2794
+ {
2795
+ _out << nl << "Throws:";
2796
+ for(StringMap::const_iterator r = comment.exceptions.begin(); r != comment.exceptions.end(); ++r)
2797
+ {
2798
+ _out << nl << r->first << " -- " << r->second;
2799
+ }
2800
+ }
2801
+ _out << "\"\"\"";
2273
2802
  }
2274
2803
 
2275
2804
  void
@@ -2416,7 +2945,7 @@ Slice::Python::printHeader(IceUtilInternal::Output& out)
2416
2945
  static const char* header =
2417
2946
  "# **********************************************************************\n"
2418
2947
  "#\n"
2419
- "# Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\n"
2948
+ "# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.\n"
2420
2949
  "#\n"
2421
2950
  "# This copy of Ice is licensed to you under the terms described in the\n"
2422
2951
  "# ICE_LICENSE file included in this distribution.\n"