zeroc-ice 3.7.11 → 3.8.1
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.
- checksums.yaml +4 -4
- data/dist/IceRuby/Communicator.cpp +159 -376
- data/dist/IceRuby/Communicator.h +8 -9
- data/dist/IceRuby/Config.h +23 -89
- data/dist/IceRuby/Connection.cpp +111 -219
- data/dist/IceRuby/Connection.h +8 -12
- data/dist/IceRuby/DefaultSliceLoader.cpp +45 -0
- data/dist/IceRuby/DefaultSliceLoader.h +25 -0
- data/dist/IceRuby/Endpoint.cpp +63 -65
- data/dist/IceRuby/Endpoint.h +7 -11
- data/dist/IceRuby/ImplicitContext.cpp +26 -31
- data/dist/IceRuby/ImplicitContext.h +6 -10
- data/dist/IceRuby/Init.cpp +27 -40
- data/dist/IceRuby/Logger.cpp +23 -28
- data/dist/IceRuby/Logger.h +8 -12
- data/dist/IceRuby/Operation.cpp +177 -219
- data/dist/IceRuby/Operation.h +15 -18
- data/dist/IceRuby/Properties.cpp +133 -89
- data/dist/IceRuby/Properties.h +6 -10
- data/dist/IceRuby/Proxy.cpp +179 -649
- data/dist/IceRuby/Proxy.h +11 -12
- data/dist/IceRuby/RubySliceLoader.cpp +39 -0
- data/dist/IceRuby/RubySliceLoader.h +27 -0
- data/dist/IceRuby/Slice.cpp +88 -94
- data/dist/IceRuby/Slice.h +3 -7
- data/dist/IceRuby/Types.cpp +987 -1190
- data/dist/IceRuby/Types.h +390 -461
- data/dist/IceRuby/Util.cpp +214 -473
- data/dist/IceRuby/Util.h +378 -479
- data/dist/ice/cpp/include/Ice/AsyncResponseHandler.h +85 -0
- data/dist/ice/cpp/include/Ice/BatchRequest.h +39 -0
- data/dist/ice/cpp/include/Ice/BatchRequestQueueF.h +4 -10
- data/dist/ice/cpp/include/Ice/Buffer.h +116 -111
- data/dist/ice/cpp/include/Ice/Communicator.h +411 -0
- data/dist/ice/cpp/include/Ice/CommunicatorF.h +16 -0
- data/dist/ice/cpp/include/Ice/Config.h +46 -62
- data/dist/ice/cpp/include/Ice/Connection.h +410 -0
- data/dist/ice/cpp/include/Ice/ConnectionF.h +36 -0
- data/dist/ice/cpp/include/Ice/ConnectionIF.h +6 -28
- data/dist/ice/cpp/include/Ice/CtrlCHandler.h +56 -0
- data/dist/ice/cpp/include/Ice/Current.h +60 -0
- data/dist/ice/cpp/include/Ice/DefaultSliceLoader.h +160 -0
- data/dist/ice/cpp/include/Ice/Demangle.h +17 -0
- data/dist/ice/cpp/include/Ice/Endpoint.h +298 -0
- data/dist/ice/cpp/include/Ice/EndpointF.h +44 -0
- data/dist/ice/cpp/include/Ice/EndpointSelectionType.h +21 -0
- data/dist/ice/cpp/include/Ice/Exception.h +46 -151
- data/dist/ice/cpp/include/Ice/FacetMap.h +16 -0
- data/dist/ice/cpp/include/Ice/Format.h +11 -27
- data/dist/ice/cpp/include/Ice/Ice.h +53 -48
- data/dist/ice/cpp/include/Ice/IconvStringConverter.h +165 -326
- data/dist/ice/cpp/include/Ice/ImplicitContext.h +76 -0
- data/dist/ice/cpp/include/Ice/IncomingRequest.h +75 -0
- data/dist/ice/cpp/include/Ice/Initialize.h +113 -927
- data/dist/ice/cpp/include/Ice/InputStream.h +748 -1320
- data/dist/ice/cpp/include/Ice/InstanceF.h +4 -10
- data/dist/ice/cpp/include/Ice/Instrumentation.h +319 -0
- data/dist/ice/cpp/include/Ice/LocalException.h +58 -0
- data/dist/ice/cpp/include/Ice/LocalExceptions.h +870 -0
- data/dist/ice/cpp/include/Ice/Logger.h +62 -0
- data/dist/ice/cpp/include/Ice/LoggerUtil.h +124 -147
- data/dist/ice/cpp/include/Ice/MarshaledResult.h +50 -0
- data/dist/ice/cpp/include/Ice/NativePropertiesAdmin.h +41 -71
- data/dist/ice/cpp/include/Ice/Object.h +151 -490
- data/dist/ice/cpp/include/Ice/ObjectAdapter.h +324 -0
- data/dist/ice/cpp/include/Ice/ObjectAdapterF.h +16 -0
- data/dist/ice/cpp/include/Ice/ObjectF.h +5 -19
- data/dist/ice/cpp/include/Ice/ObserverHelper.h +115 -132
- data/dist/ice/cpp/include/Ice/OutgoingAsync.h +392 -748
- data/dist/ice/cpp/include/Ice/OutgoingResponse.h +129 -0
- data/dist/ice/cpp/include/Ice/OutputStream.h +756 -956
- data/dist/ice/cpp/include/Ice/Plugin.h +73 -0
- data/dist/ice/cpp/include/Ice/PluginFactory.h +77 -0
- data/dist/ice/cpp/include/{IceUtil → Ice}/PopDisableWarnings.h +8 -6
- data/dist/ice/cpp/include/Ice/Properties.h +307 -0
- data/dist/ice/cpp/include/Ice/PropertiesF.h +19 -0
- data/dist/ice/cpp/include/Ice/Proxy.h +665 -5094
- data/dist/ice/cpp/include/Ice/ProxyF.h +2 -44
- data/dist/ice/cpp/include/Ice/ProxyFunctions.h +209 -0
- data/dist/ice/cpp/include/Ice/PushDisableWarnings.h +29 -0
- data/dist/ice/cpp/include/Ice/ReferenceF.h +4 -19
- data/dist/ice/cpp/include/Ice/RequestHandlerF.h +8 -18
- data/dist/ice/cpp/include/Ice/SSL/ClientAuthenticationOptions.h +276 -0
- data/dist/ice/cpp/include/Ice/SSL/Config.h +54 -0
- data/dist/ice/cpp/include/Ice/SSL/ConnectionInfo.h +107 -0
- data/dist/ice/cpp/include/Ice/SSL/ConnectionInfoF.h +39 -0
- data/dist/ice/cpp/include/Ice/SSL/EndpointInfo.h +40 -0
- data/dist/ice/cpp/include/Ice/SSL/SSLException.h +32 -0
- data/dist/ice/cpp/include/Ice/SSL/ServerAuthenticationOptions.h +286 -0
- data/dist/ice/cpp/include/Ice/ServantLocator.h +51 -0
- data/dist/ice/cpp/include/Ice/Service.h +182 -342
- data/dist/ice/cpp/include/Ice/SliceLoader.h +67 -0
- data/dist/ice/cpp/include/Ice/SlicedData.h +113 -160
- data/dist/ice/cpp/include/Ice/SlicedDataF.h +17 -27
- data/dist/ice/cpp/include/Ice/StreamHelpers.h +532 -1070
- data/dist/ice/cpp/include/Ice/StreamableTraits.h +291 -0
- data/dist/ice/cpp/include/Ice/StringConverter.h +152 -63
- data/dist/ice/cpp/include/Ice/StringUtil.h +114 -0
- data/dist/ice/cpp/include/Ice/TimerTask.h +24 -0
- data/dist/ice/cpp/include/Ice/TupleCompare.h +103 -0
- data/dist/ice/cpp/include/Ice/UUID.h +6 -9
- data/dist/ice/cpp/include/Ice/UserException.h +46 -0
- data/dist/ice/cpp/include/Ice/UserExceptionFactory.h +4 -79
- data/dist/ice/cpp/include/Ice/Value.h +103 -115
- data/dist/ice/cpp/include/Ice/ValueF.h +6 -11
- data/dist/ice/cpp/include/IceDiscovery/IceDiscovery.h +16 -1877
- data/dist/ice/cpp/include/IceLocatorDiscovery/IceLocatorDiscovery.h +16 -1185
- data/dist/ice/cpp/include/generated/Ice/BuiltinSequences.h +46 -146
- data/dist/ice/cpp/include/generated/Ice/Context.h +40 -0
- data/dist/ice/cpp/include/generated/Ice/EndpointTypes.h +49 -93
- data/dist/ice/cpp/include/generated/Ice/Identity.h +70 -226
- data/dist/ice/cpp/include/generated/Ice/Locator.h +494 -3850
- data/dist/ice/cpp/include/generated/Ice/LocatorRegistry.h +443 -0
- data/dist/ice/cpp/include/generated/Ice/Metrics.h +937 -4603
- data/dist/ice/cpp/include/generated/Ice/OperationMode.h +73 -0
- data/dist/ice/cpp/include/generated/Ice/Process.h +197 -929
- data/dist/ice/cpp/include/generated/Ice/PropertiesAdmin.h +249 -1301
- data/dist/ice/cpp/include/generated/Ice/PropertyDict.h +39 -0
- data/dist/ice/cpp/include/generated/Ice/RemoteLogger.h +637 -2620
- data/dist/ice/cpp/include/generated/Ice/ReplyStatus.h +94 -0
- data/dist/ice/cpp/include/generated/Ice/Router.h +429 -1783
- data/dist/ice/cpp/include/generated/Ice/SliceChecksumDict.h +18 -65
- data/dist/ice/cpp/include/generated/Ice/Version.h +73 -318
- data/dist/ice/cpp/include/generated/IceDiscovery/Lookup.h +498 -0
- data/dist/ice/cpp/include/generated/IceLocatorDiscovery/Lookup.h +387 -0
- data/dist/ice/cpp/src/Ice/Acceptor.h +28 -24
- data/dist/ice/cpp/src/Ice/AcceptorF.h +6 -14
- data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories.h +16 -0
- data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_all.cpp +43 -0
- data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_min.cpp +17 -0
- data/dist/ice/cpp/src/Ice/ArgVector.cpp +17 -18
- data/dist/ice/cpp/src/Ice/ArgVector.h +19 -25
- data/dist/ice/cpp/src/Ice/Base64.cpp +66 -66
- data/dist/ice/cpp/src/Ice/Base64.h +14 -19
- data/dist/ice/cpp/src/Ice/BatchRequestQueue.cpp +70 -121
- data/dist/ice/cpp/src/Ice/BatchRequestQueue.h +37 -47
- data/dist/ice/cpp/src/Ice/Buffer.cpp +73 -41
- data/dist/ice/cpp/src/Ice/CheckIdentity.h +21 -0
- data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +215 -249
- data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.h +38 -60
- data/dist/ice/cpp/src/Ice/Communicator.cpp +399 -0
- data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.cpp +140 -0
- data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.h +39 -0
- data/dist/ice/cpp/src/Ice/ConnectRequestHandler.cpp +63 -184
- data/dist/ice/cpp/src/Ice/ConnectRequestHandler.h +30 -51
- data/dist/ice/cpp/src/Ice/ConnectRequestHandlerF.h +4 -14
- data/dist/ice/cpp/src/Ice/Connection.cpp +44 -0
- data/dist/ice/cpp/src/Ice/ConnectionFactory.cpp +578 -792
- data/dist/ice/cpp/src/Ice/ConnectionFactory.h +200 -200
- data/dist/ice/cpp/src/Ice/ConnectionFactoryF.h +6 -19
- data/dist/ice/cpp/src/Ice/ConnectionI.cpp +1674 -1782
- data/dist/ice/cpp/src/Ice/ConnectionI.h +333 -293
- data/dist/ice/cpp/src/Ice/ConnectionOptions.h +22 -0
- data/dist/ice/cpp/src/Ice/Connector.h +25 -19
- data/dist/ice/cpp/src/Ice/ConnectorF.h +4 -11
- data/dist/ice/cpp/src/{IceUtil → Ice}/ConsoleUtil.cpp +32 -53
- data/dist/ice/cpp/src/Ice/ConsoleUtil.h +79 -0
- data/dist/ice/cpp/src/Ice/CtrlCHandler.cpp +189 -0
- data/dist/ice/cpp/src/Ice/Current.cpp +29 -0
- data/dist/ice/cpp/src/Ice/DLLMain.cpp +25 -35
- data/dist/ice/cpp/src/Ice/DefaultSliceLoader.cpp +39 -0
- data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +41 -119
- data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.h +27 -41
- data/dist/ice/cpp/src/Ice/DefaultsAndOverridesF.h +4 -11
- data/dist/ice/cpp/src/Ice/Demangle.cpp +26 -0
- data/dist/ice/cpp/src/Ice/DisableWarnings.h +31 -0
- data/dist/ice/cpp/src/Ice/DynamicLibrary.cpp +44 -112
- data/dist/ice/cpp/src/Ice/DynamicLibrary.h +91 -0
- data/dist/ice/cpp/src/Ice/Endian.h +40 -0
- data/dist/ice/cpp/src/Ice/EndpointFactory.cpp +35 -59
- data/dist/ice/cpp/src/Ice/EndpointFactory.h +82 -103
- data/dist/ice/cpp/src/Ice/EndpointFactoryF.h +4 -11
- data/dist/ice/cpp/src/Ice/EndpointFactoryManager.cpp +54 -87
- data/dist/ice/cpp/src/Ice/EndpointFactoryManager.h +28 -33
- data/dist/ice/cpp/src/Ice/EndpointFactoryManagerF.h +4 -11
- data/dist/ice/cpp/src/Ice/EndpointI.cpp +53 -23
- data/dist/ice/cpp/src/Ice/EndpointI.h +132 -200
- data/dist/ice/cpp/src/Ice/EndpointIF.h +11 -39
- data/dist/ice/cpp/src/Ice/EventHandler.cpp +3 -26
- data/dist/ice/cpp/src/Ice/EventHandler.h +46 -56
- data/dist/ice/cpp/src/Ice/EventHandlerF.h +4 -14
- data/dist/ice/cpp/src/Ice/Exception.cpp +3 -816
- data/dist/ice/cpp/src/Ice/FileUtil.cpp +476 -0
- data/dist/ice/cpp/src/Ice/FileUtil.h +152 -0
- data/dist/ice/cpp/src/Ice/FixedRequestHandler.cpp +34 -0
- data/dist/ice/cpp/src/Ice/FixedRequestHandler.h +29 -0
- data/dist/ice/cpp/src/Ice/HashUtil.h +46 -32
- data/dist/ice/cpp/src/Ice/HttpParser.cpp +431 -431
- data/dist/ice/cpp/src/Ice/HttpParser.h +95 -100
- data/dist/ice/cpp/src/Ice/IPEndpointI.cpp +207 -324
- data/dist/ice/cpp/src/Ice/IPEndpointI.h +80 -126
- data/dist/ice/cpp/src/Ice/IPEndpointIF.h +6 -17
- data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp +172 -0
- data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.h +89 -0
- data/dist/ice/cpp/src/Ice/ImplicitContext.cpp +109 -0
- data/dist/ice/cpp/src/Ice/IncomingRequest.cpp +66 -0
- data/dist/ice/cpp/src/Ice/Initialize.cpp +48 -542
- data/dist/ice/cpp/src/Ice/InputStream.cpp +848 -1385
- data/dist/ice/cpp/src/Ice/Instance.cpp +816 -827
- data/dist/ice/cpp/src/Ice/Instance.h +202 -212
- data/dist/ice/cpp/src/Ice/InstrumentationI.cpp +526 -661
- data/dist/ice/cpp/src/Ice/InstrumentationI.h +171 -192
- data/dist/ice/cpp/src/Ice/LocalException.cpp +518 -0
- data/dist/ice/cpp/src/Ice/LocalExceptions.cpp +577 -0
- data/dist/ice/cpp/src/Ice/LocatorInfo.cpp +291 -329
- data/dist/ice/cpp/src/Ice/LocatorInfo.h +144 -157
- data/dist/ice/cpp/src/Ice/LocatorInfoF.h +8 -17
- data/dist/ice/cpp/src/Ice/LoggerAdminI.cpp +561 -743
- data/dist/ice/cpp/src/Ice/LoggerAdminI.h +18 -28
- data/dist/ice/cpp/src/Ice/LoggerI.cpp +66 -91
- data/dist/ice/cpp/src/Ice/LoggerI.h +36 -41
- data/dist/ice/cpp/src/Ice/LoggerMiddleware.cpp +176 -0
- data/dist/ice/cpp/src/Ice/LoggerMiddleware.h +42 -0
- data/dist/ice/cpp/src/Ice/LoggerUtil.cpp +14 -38
- data/dist/ice/cpp/src/Ice/MarshaledResult.cpp +20 -0
- data/dist/ice/cpp/src/Ice/MetricsAdminI.cpp +194 -280
- data/dist/ice/cpp/src/Ice/MetricsAdminI.h +600 -0
- data/dist/ice/cpp/src/Ice/MetricsFunctional.h +92 -0
- data/dist/ice/cpp/src/Ice/MetricsObserverI.h +587 -0
- data/dist/ice/cpp/src/Ice/NativePropertiesAdmin.cpp +185 -0
- data/dist/ice/cpp/src/Ice/Network.cpp +595 -917
- data/dist/ice/cpp/src/Ice/Network.h +189 -213
- data/dist/ice/cpp/src/Ice/NetworkF.h +2 -10
- data/dist/ice/cpp/src/Ice/NetworkProxy.cpp +99 -104
- data/dist/ice/cpp/src/Ice/NetworkProxy.h +49 -54
- data/dist/ice/cpp/src/Ice/NetworkProxyF.h +4 -11
- data/dist/ice/cpp/src/Ice/OSLogLoggerI.cpp +16 -18
- data/dist/ice/cpp/src/Ice/OSLogLoggerI.h +22 -27
- data/dist/ice/cpp/src/Ice/Object.cpp +152 -338
- data/dist/ice/cpp/src/Ice/ObjectAdapterFactory.cpp +170 -113
- data/dist/ice/cpp/src/Ice/ObjectAdapterFactory.h +41 -41
- data/dist/ice/cpp/src/Ice/ObjectAdapterFactoryF.h +4 -15
- data/dist/ice/cpp/src/Ice/ObjectAdapterI.cpp +580 -727
- data/dist/ice/cpp/src/Ice/ObjectAdapterI.h +149 -145
- data/dist/ice/cpp/src/Ice/ObserverHelper.cpp +36 -17
- data/dist/ice/cpp/src/Ice/ObserverMiddleware.cpp +96 -0
- data/dist/ice/cpp/src/Ice/ObserverMiddleware.h +25 -0
- data/dist/ice/cpp/src/Ice/OpaqueEndpointI.cpp +147 -187
- data/dist/ice/cpp/src/Ice/OpaqueEndpointI.h +56 -64
- data/dist/ice/cpp/src/{IceUtil → Ice}/Options.cpp +187 -258
- data/dist/ice/cpp/src/Ice/Options.h +119 -0
- data/dist/ice/cpp/src/Ice/OutgoingAsync.cpp +516 -732
- data/dist/ice/cpp/src/Ice/OutgoingResponse.cpp +276 -0
- data/dist/ice/cpp/src/Ice/OutputStream.cpp +610 -543
- data/dist/ice/cpp/src/Ice/OutputUtil.cpp +344 -0
- data/dist/ice/cpp/src/Ice/OutputUtil.h +173 -0
- data/dist/ice/cpp/src/Ice/PluginManagerI.cpp +118 -277
- data/dist/ice/cpp/src/Ice/PluginManagerI.h +41 -48
- data/dist/ice/cpp/src/Ice/Properties.cpp +931 -0
- data/dist/ice/cpp/src/Ice/PropertyNames.cpp +519 -1341
- data/dist/ice/cpp/src/Ice/PropertyNames.h +49 -64
- data/dist/ice/cpp/src/Ice/PropertyUtil.cpp +103 -0
- data/dist/ice/cpp/src/Ice/PropertyUtil.h +31 -0
- data/dist/ice/cpp/src/Ice/Protocol.cpp +129 -94
- data/dist/ice/cpp/src/Ice/Protocol.h +116 -0
- data/dist/ice/cpp/src/Ice/ProtocolInstance.cpp +117 -62
- data/dist/ice/cpp/src/Ice/ProtocolInstance.h +63 -82
- data/dist/ice/cpp/src/Ice/ProtocolInstanceF.h +4 -11
- data/dist/ice/cpp/src/Ice/ProtocolPluginFacade.cpp +10 -32
- data/dist/ice/cpp/src/Ice/ProtocolPluginFacade.h +25 -54
- data/dist/ice/cpp/src/Ice/Proxy.cpp +294 -1357
- data/dist/ice/cpp/src/Ice/ProxyAsync.cpp +684 -0
- data/dist/ice/cpp/src/Ice/ProxyFunctions.cpp +90 -0
- data/dist/ice/cpp/src/Ice/PushDisableDeprecatedWarnings.h +15 -0
- data/dist/ice/cpp/src/Ice/Random.cpp +29 -0
- data/dist/ice/cpp/src/Ice/Random.h +23 -0
- data/dist/ice/cpp/src/Ice/Reference.cpp +635 -1097
- data/dist/ice/cpp/src/Ice/Reference.h +314 -298
- data/dist/ice/cpp/src/Ice/ReferenceFactory.cpp +320 -378
- data/dist/ice/cpp/src/Ice/ReferenceFactory.h +48 -66
- data/dist/ice/cpp/src/Ice/ReferenceFactoryF.h +4 -9
- data/dist/ice/cpp/src/Ice/RequestHandler.cpp +15 -24
- data/dist/ice/cpp/src/Ice/RequestHandler.h +43 -68
- data/dist/ice/cpp/src/Ice/RequestHandlerCache.cpp +76 -0
- data/dist/ice/cpp/src/Ice/RequestHandlerCache.h +33 -0
- data/dist/ice/cpp/src/Ice/ResourceConfig.h +27 -0
- data/dist/ice/cpp/src/Ice/RetryQueue.cpp +51 -57
- data/dist/ice/cpp/src/Ice/RetryQueue.h +39 -46
- data/dist/ice/cpp/src/Ice/RetryQueueF.h +4 -9
- data/dist/ice/cpp/src/Ice/RouterInfo.cpp +97 -201
- data/dist/ice/cpp/src/Ice/RouterInfo.h +61 -118
- data/dist/ice/cpp/src/Ice/RouterInfoF.h +6 -14
- data/dist/ice/cpp/src/Ice/SHA1.cpp +86 -60
- data/dist/ice/cpp/src/Ice/SHA1.h +35 -0
- data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.cpp +89 -0
- data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.h +87 -0
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.cpp +521 -0
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.h +40 -0
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngineF.h +13 -0
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.cpp +646 -0
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.h +80 -0
- data/dist/ice/cpp/src/{IceSSL → Ice/SSL}/RFC2253.cpp +85 -88
- data/dist/ice/cpp/src/Ice/SSL/RFC2253.h +58 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLAcceptorI.cpp +124 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLAcceptorI.h +52 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLConnectorI.cpp +92 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLConnectorI.h +38 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLEndpointI.cpp +377 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLEndpointI.h +84 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLEngine.cpp +115 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLEngine.h +69 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLEngineF.h +14 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLException.cpp +18 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLInstance.cpp +27 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLInstance.h +26 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLInstanceF.h +19 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLUtil.cpp +673 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLUtil.h +118 -0
- data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.cpp +1449 -0
- data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.h +58 -0
- data/dist/ice/cpp/src/Ice/SSL/SchannelEngineF.h +18 -0
- data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.cpp +1088 -0
- data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.h +118 -0
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.cpp +825 -0
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.h +44 -0
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngineF.h +18 -0
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.cpp +621 -0
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.h +91 -0
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.cpp +1048 -0
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.h +40 -0
- data/dist/ice/cpp/src/Ice/SSL/TrustManager.cpp +233 -0
- data/dist/ice/cpp/src/Ice/SSL/TrustManager.h +42 -0
- data/dist/ice/cpp/src/Ice/SSL/TrustManagerF.h +14 -0
- data/dist/ice/cpp/src/Ice/ScannerConfig.h +35 -0
- data/dist/ice/cpp/src/Ice/Selector.cpp +341 -606
- data/dist/ice/cpp/src/Ice/Selector.h +167 -224
- data/dist/ice/cpp/src/Ice/ServantManager.cpp +195 -128
- data/dist/ice/cpp/src/Ice/ServantManager.h +52 -55
- data/dist/ice/cpp/src/Ice/ServantManagerF.h +14 -0
- data/dist/ice/cpp/src/Ice/Service.cpp +548 -641
- data/dist/ice/cpp/src/Ice/SharedContext.h +13 -26
- data/dist/ice/cpp/src/Ice/SliceLoader.cpp +53 -0
- data/dist/ice/cpp/src/Ice/SlicedData.cpp +17 -96
- data/dist/ice/cpp/src/Ice/StreamSocket.cpp +104 -151
- data/dist/ice/cpp/src/Ice/StreamSocket.h +48 -60
- data/dist/ice/cpp/src/Ice/StringConverter.cpp +586 -0
- data/dist/ice/cpp/src/Ice/StringUtil.cpp +1137 -0
- data/dist/ice/cpp/src/Ice/SysLoggerI.cpp +41 -47
- data/dist/ice/cpp/src/Ice/SysLoggerI.h +24 -27
- data/dist/ice/cpp/src/Ice/SystemdJournalI.cpp +16 -17
- data/dist/ice/cpp/src/Ice/SystemdJournalI.h +19 -25
- data/dist/ice/cpp/src/Ice/TargetCompare.h +96 -0
- data/dist/ice/cpp/src/Ice/TcpAcceptor.cpp +67 -88
- data/dist/ice/cpp/src/Ice/TcpAcceptor.h +34 -40
- data/dist/ice/cpp/src/Ice/TcpConnector.cpp +42 -41
- data/dist/ice/cpp/src/Ice/TcpConnector.h +26 -35
- data/dist/ice/cpp/src/Ice/TcpEndpointI.cpp +172 -146
- data/dist/ice/cpp/src/Ice/TcpEndpointI.h +76 -80
- data/dist/ice/cpp/src/Ice/TcpTransceiver.cpp +38 -26
- data/dist/ice/cpp/src/Ice/TcpTransceiver.h +40 -45
- data/dist/ice/cpp/src/Ice/ThreadPool.cpp +333 -515
- data/dist/ice/cpp/src/Ice/ThreadPool.h +202 -290
- data/dist/ice/cpp/src/Ice/ThreadPoolF.h +14 -0
- data/dist/ice/cpp/src/Ice/TimeUtil.cpp +47 -0
- data/dist/ice/cpp/src/Ice/TimeUtil.h +21 -0
- data/dist/ice/cpp/src/Ice/Timer.cpp +73 -167
- data/dist/ice/cpp/src/Ice/Timer.h +212 -0
- data/dist/ice/cpp/src/Ice/TraceLevels.cpp +11 -29
- data/dist/ice/cpp/src/Ice/TraceLevels.h +22 -28
- data/dist/ice/cpp/src/Ice/TraceLevelsF.h +4 -11
- data/dist/ice/cpp/src/Ice/TraceUtil.cpp +136 -215
- data/dist/ice/cpp/src/Ice/TraceUtil.h +27 -16
- data/dist/ice/cpp/src/Ice/Transceiver.cpp +3 -7
- data/dist/ice/cpp/src/Ice/Transceiver.h +35 -32
- data/dist/ice/cpp/src/Ice/TransceiverF.h +10 -20
- data/dist/ice/cpp/src/Ice/UUID.cpp +79 -0
- data/dist/ice/cpp/src/Ice/UdpConnector.cpp +39 -39
- data/dist/ice/cpp/src/Ice/UdpConnector.h +27 -36
- data/dist/ice/cpp/src/Ice/UdpEndpointI.cpp +178 -213
- data/dist/ice/cpp/src/Ice/UdpEndpointI.h +82 -85
- data/dist/ice/cpp/src/Ice/UdpTransceiver.cpp +201 -221
- data/dist/ice/cpp/src/Ice/UdpTransceiver.h +68 -74
- data/dist/ice/cpp/{include/IceUtil → src/Ice}/UndefSysMacros.h +12 -12
- data/dist/ice/cpp/src/Ice/UniqueRef.h +77 -0
- data/dist/ice/cpp/src/Ice/UserException.cpp +58 -0
- data/dist/ice/cpp/src/Ice/Value.cpp +107 -38
- data/dist/ice/cpp/src/Ice/WSAcceptor.cpp +10 -15
- data/dist/ice/cpp/src/Ice/WSAcceptor.h +31 -37
- data/dist/ice/cpp/src/Ice/WSConnector.cpp +25 -40
- data/dist/ice/cpp/src/Ice/WSConnector.h +26 -33
- data/dist/ice/cpp/src/Ice/WSEndpoint.cpp +164 -217
- data/dist/ice/cpp/src/Ice/WSEndpoint.h +72 -83
- data/dist/ice/cpp/src/Ice/WSTransceiver.cpp +469 -458
- data/dist/ice/cpp/src/Ice/WSTransceiver.h +117 -123
- data/dist/ice/cpp/src/Ice/generated/BuiltinSequences.cpp +20 -29
- data/dist/ice/cpp/src/Ice/generated/Context.cpp +40 -0
- data/dist/ice/cpp/src/Ice/generated/EndpointTypes.cpp +20 -31
- data/dist/ice/cpp/src/Ice/generated/Identity.cpp +24 -34
- data/dist/ice/cpp/src/Ice/generated/Locator.cpp +454 -1744
- data/dist/ice/cpp/src/Ice/generated/LocatorRegistry.cpp +577 -0
- data/dist/ice/cpp/src/Ice/generated/Metrics.cpp +824 -1971
- data/dist/ice/cpp/src/Ice/generated/OperationMode.cpp +56 -0
- data/dist/ice/cpp/src/Ice/generated/Process.cpp +190 -331
- data/dist/ice/cpp/src/Ice/generated/PropertiesAdmin.cpp +289 -449
- data/dist/ice/cpp/src/Ice/generated/PropertyDict.cpp +40 -0
- data/dist/ice/cpp/src/Ice/generated/RemoteLogger.cpp +547 -867
- data/dist/ice/cpp/src/Ice/generated/ReplyStatus.cpp +70 -0
- data/dist/ice/cpp/src/Ice/generated/Router.cpp +406 -723
- data/dist/ice/cpp/src/Ice/generated/SliceChecksumDict.cpp +19 -29
- data/dist/ice/cpp/src/Ice/generated/Version.cpp +28 -31
- data/dist/ice/cpp/src/IceDiscovery/LocatorI.cpp +76 -139
- data/dist/ice/cpp/src/IceDiscovery/LocatorI.h +55 -96
- data/dist/ice/cpp/src/IceDiscovery/LookupI.cpp +190 -303
- data/dist/ice/cpp/src/IceDiscovery/LookupI.h +126 -185
- data/dist/ice/cpp/src/IceDiscovery/PluginI.cpp +56 -77
- data/dist/ice/cpp/src/IceDiscovery/PluginI.h +20 -25
- data/dist/ice/cpp/src/IceDiscovery/generated/Lookup.cpp +638 -0
- data/dist/ice/cpp/src/IceLocatorDiscovery/Plugin.h +14 -37
- data/dist/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +411 -649
- data/dist/ice/cpp/src/IceLocatorDiscovery/generated/Lookup.cpp +468 -0
- data/dist/ice/cpp/src/Slice/DeprecationReporter.cpp +172 -0
- data/dist/ice/cpp/src/Slice/DeprecationReporter.h +14 -0
- data/dist/ice/cpp/src/Slice/DocCommentParser.cpp +736 -0
- data/dist/ice/cpp/src/Slice/DocCommentParser.h +61 -0
- data/dist/ice/cpp/src/Slice/FileTracker.cpp +25 -75
- data/dist/ice/cpp/src/Slice/FileTracker.h +35 -56
- data/dist/ice/cpp/src/Slice/Grammar.cpp +2711 -3382
- data/dist/ice/cpp/src/Slice/Grammar.h +95 -75
- data/dist/ice/cpp/src/Slice/GrammarUtil.h +117 -217
- data/dist/ice/cpp/src/Slice/MetadataValidation.cpp +486 -0
- data/dist/ice/cpp/src/Slice/MetadataValidation.h +106 -0
- data/dist/ice/cpp/src/Slice/Parser.cpp +3068 -5223
- data/dist/ice/cpp/src/Slice/Parser.h +1086 -1065
- data/dist/ice/cpp/src/Slice/Preprocessor.cpp +97 -599
- data/dist/ice/cpp/src/Slice/Preprocessor.h +26 -42
- data/dist/ice/cpp/src/Slice/Scanner.cpp +1562 -924
- data/dist/ice/cpp/src/Slice/SliceUtil.cpp +517 -113
- data/dist/ice/cpp/src/Slice/StringLiteralUtil.cpp +254 -269
- data/dist/ice/cpp/src/Slice/Util.h +126 -35
- data/dist/ice/cpp/src/slice2rb/Main.cpp +13 -15
- data/dist/ice/cpp/src/slice2rb/Ruby.cpp +250 -0
- data/dist/ice/cpp/src/slice2rb/RubyUtil.cpp +1197 -0
- data/dist/ice/cpp/src/slice2rb/RubyUtil.h +56 -0
- data/dist/ice/slice/Glacier2/Metrics.ice +34 -75
- data/dist/ice/slice/Glacier2/PermissionsVerifier.ice +42 -98
- data/dist/ice/slice/Glacier2/Router.ice +80 -173
- data/dist/ice/slice/Glacier2/SSLInfo.ice +23 -40
- data/dist/ice/slice/Glacier2/Session.ice +120 -261
- data/dist/ice/slice/Ice/BuiltinSequences.ice +33 -38
- data/dist/ice/slice/Ice/Context.ice +24 -0
- data/dist/ice/slice/Ice/EndpointTypes.ice +35 -33
- data/dist/ice/slice/Ice/Identity.ice +24 -63
- data/dist/ice/slice/Ice/Locator.ice +61 -226
- data/dist/ice/slice/Ice/LocatorRegistry.ice +77 -0
- data/dist/ice/slice/Ice/Metrics.ice +189 -424
- data/dist/ice/slice/Ice/OperationMode.ice +38 -0
- data/dist/ice/slice/Ice/Process.ice +16 -52
- data/dist/ice/slice/Ice/PropertiesAdmin.ice +25 -75
- data/dist/ice/slice/Ice/PropertyDict.ice +23 -0
- data/dist/ice/slice/Ice/RemoteLogger.ice +113 -213
- data/dist/ice/slice/Ice/ReplyStatus.ice +65 -0
- data/dist/ice/slice/Ice/Router.ice +42 -91
- data/dist/ice/slice/Ice/SliceChecksumDict.ice +7 -25
- data/dist/ice/slice/Ice/Version.ice +31 -39
- data/dist/ice/slice/IceBox/ServiceManager.ice +79 -0
- data/dist/ice/slice/IceGrid/Admin.ice +942 -1918
- data/dist/ice/slice/IceGrid/Descriptor.ice +476 -1051
- data/dist/ice/slice/IceGrid/Exception.ice +86 -384
- data/dist/ice/slice/IceGrid/FileParser.ice +23 -59
- data/dist/ice/slice/IceGrid/Registry.ice +117 -256
- data/dist/ice/slice/IceGrid/Session.ice +46 -110
- data/dist/ice/slice/IceGrid/UserAccountMapper.ice +22 -57
- data/dist/ice/slice/IceStorm/IceStorm.ice +173 -401
- data/dist/ice/slice/IceStorm/Metrics.ice +28 -70
- data/dist/lib/Glacier2/Metrics.rb +16 -31
- data/dist/lib/Glacier2/PermissionsVerifier.rb +18 -50
- data/dist/lib/Glacier2/Router.rb +20 -42
- data/dist/lib/Glacier2/SSLInfo.rb +14 -22
- data/dist/lib/Glacier2/Session.rb +53 -113
- data/dist/lib/Glacier2.rb +6 -6
- data/dist/lib/Ice/BuiltinSequences.rb +14 -26
- data/dist/lib/Ice/CompressBatch.rb +50 -0
- data/dist/lib/Ice/Context.rb +12 -0
- data/dist/lib/Ice/EndpointSelectionType.rb +49 -0
- data/dist/lib/Ice/EndpointTypes.rb +14 -55
- data/dist/lib/Ice/Exception.rb +20 -0
- data/dist/lib/Ice/Identity.rb +10 -26
- data/dist/lib/Ice/IdentitySpaceship.rb +16 -0
- data/dist/lib/Ice/InitializationData.rb +12 -0
- data/dist/lib/Ice/LocalExceptions.rb +168 -0
- data/dist/lib/Ice/Locator.rb +21 -134
- data/dist/lib/Ice/LocatorRegistry.rb +73 -0
- data/dist/lib/Ice/Metrics.rb +85 -132
- data/dist/lib/Ice/OperationMode.rb +58 -0
- data/dist/lib/Ice/Process.rb +12 -31
- data/dist/lib/Ice/PropertiesAdmin.rb +12 -36
- data/dist/lib/Ice/PropertyDict.rb +12 -0
- data/dist/lib/Ice/Proxy.rb +85 -0
- data/dist/lib/Ice/ProxyFunctions.rb +69 -0
- data/dist/lib/Ice/RemoteLogger.rb +29 -60
- data/dist/lib/Ice/ReplyStatus.rb +65 -0
- data/dist/lib/Ice/Router.rb +19 -47
- data/dist/lib/Ice/SliceChecksumDict.rb +5 -17
- data/dist/lib/Ice/SliceUtil.rb +41 -0
- data/dist/lib/Ice/Struct.rb +11 -0
- data/dist/lib/Ice/ToStringMode.rb +50 -0
- data/dist/lib/Ice/Value.rb +93 -0
- data/dist/lib/Ice/Version.rb +12 -24
- data/dist/lib/Ice.rb +29 -665
- data/dist/lib/IceBox/ServiceManager.rb +104 -0
- data/dist/lib/IceBox.rb +2 -4
- data/dist/lib/IceGrid/Admin.rb +303 -291
- data/dist/lib/IceGrid/Descriptor.rb +147 -192
- data/dist/lib/IceGrid/Exception.rb +26 -257
- data/dist/lib/IceGrid/FileParser.rb +12 -36
- data/dist/lib/IceGrid/Registry.rb +35 -76
- data/dist/lib/IceGrid/Session.rb +19 -34
- data/dist/lib/IceGrid/UserAccountMapper.rb +11 -34
- data/dist/lib/IceGrid.rb +3 -3
- data/dist/lib/IceStorm/IceStorm.rb +51 -132
- data/dist/lib/IceStorm/Metrics.rb +19 -37
- data/dist/lib/IceStorm.rb +3 -5
- data/extconf.rb +6 -8
- data/ice.gemspec +3 -3
- data/scripts/slice2rb +1 -3
- metadata +206 -386
- data/dist/IceRuby/ValueFactoryManager.cpp +0 -445
- data/dist/IceRuby/ValueFactoryManager.h +0 -95
- data/dist/ice/cpp/include/Ice/Application.h +0 -326
- data/dist/ice/cpp/include/Ice/AsyncResult.h +0 -155
- data/dist/ice/cpp/include/Ice/AsyncResultF.h +0 -23
- data/dist/ice/cpp/include/Ice/BatchRequestInterceptor.h +0 -75
- data/dist/ice/cpp/include/Ice/CommunicatorAsync.h +0 -154
- data/dist/ice/cpp/include/Ice/Comparable.h +0 -205
- data/dist/ice/cpp/include/Ice/ConnectionAsync.h +0 -302
- data/dist/ice/cpp/include/Ice/ConsoleUtil.h +0 -23
- data/dist/ice/cpp/include/Ice/DefaultValueFactory.h +0 -57
- data/dist/ice/cpp/include/Ice/DispatchInterceptor.h +0 -41
- data/dist/ice/cpp/include/Ice/Dispatcher.h +0 -67
- data/dist/ice/cpp/include/Ice/DynamicLibrary.h +0 -102
- data/dist/ice/cpp/include/Ice/DynamicLibraryF.h +0 -24
- data/dist/ice/cpp/include/Ice/ExceptionHelpers.h +0 -74
- data/dist/ice/cpp/include/Ice/FactoryTable.h +0 -73
- data/dist/ice/cpp/include/Ice/FactoryTableInit.h +0 -84
- data/dist/ice/cpp/include/Ice/Functional.h +0 -140
- data/dist/ice/cpp/include/Ice/GCObject.h +0 -76
- data/dist/ice/cpp/include/Ice/Handle.h +0 -182
- data/dist/ice/cpp/include/Ice/Incoming.h +0 -225
- data/dist/ice/cpp/include/Ice/IncomingAsync.h +0 -186
- data/dist/ice/cpp/include/Ice/IncomingAsyncF.h +0 -36
- data/dist/ice/cpp/include/Ice/InterfaceByValue.h +0 -57
- data/dist/ice/cpp/include/Ice/LocalObject.h +0 -35
- data/dist/ice/cpp/include/Ice/LocalObjectF.h +0 -21
- data/dist/ice/cpp/include/Ice/MetricsAdminI.h +0 -715
- data/dist/ice/cpp/include/Ice/MetricsFunctional.h +0 -159
- data/dist/ice/cpp/include/Ice/MetricsObserverI.h +0 -669
- data/dist/ice/cpp/include/Ice/Optional.h +0 -1114
- data/dist/ice/cpp/include/Ice/OutgoingAsyncF.h +0 -39
- data/dist/ice/cpp/include/Ice/Protocol.h +0 -274
- data/dist/ice/cpp/include/Ice/ProxyFactoryF.h +0 -21
- data/dist/ice/cpp/include/Ice/ProxyHandle.h +0 -318
- data/dist/ice/cpp/include/Ice/RegisterPlugins.h +0 -127
- data/dist/ice/cpp/include/Ice/ResponseHandlerF.h +0 -25
- data/dist/ice/cpp/include/Ice/SHA1.h +0 -40
- data/dist/ice/cpp/include/Ice/ServantManagerF.h +0 -21
- data/dist/ice/cpp/include/Ice/SliceChecksums.h +0 -33
- data/dist/ice/cpp/include/Ice/ThreadPoolF.h +0 -23
- data/dist/ice/cpp/include/Ice/UniquePtr.h +0 -95
- data/dist/ice/cpp/include/Ice/UniqueRef.h +0 -97
- data/dist/ice/cpp/include/IceSSL/Config.h +0 -21
- data/dist/ice/cpp/include/IceSSL/IceSSL.h +0 -24
- data/dist/ice/cpp/include/IceSSL/OpenSSL.h +0 -147
- data/dist/ice/cpp/include/IceSSL/Plugin.h +0 -712
- data/dist/ice/cpp/include/IceSSL/SChannel.h +0 -72
- data/dist/ice/cpp/include/IceSSL/SecureTransport.h +0 -72
- data/dist/ice/cpp/include/IceUtil/Atomic.h +0 -179
- data/dist/ice/cpp/include/IceUtil/Cond.h +0 -317
- data/dist/ice/cpp/include/IceUtil/Config.h +0 -392
- data/dist/ice/cpp/include/IceUtil/ConsoleUtil.h +0 -92
- data/dist/ice/cpp/include/IceUtil/CountDownLatch.h +0 -45
- data/dist/ice/cpp/include/IceUtil/CtrlCHandler.h +0 -96
- data/dist/ice/cpp/include/IceUtil/DisableWarnings.h +0 -44
- data/dist/ice/cpp/include/IceUtil/Exception.h +0 -394
- data/dist/ice/cpp/include/IceUtil/FileUtil.h +0 -140
- data/dist/ice/cpp/include/IceUtil/Functional.h +0 -389
- data/dist/ice/cpp/include/IceUtil/Handle.h +0 -261
- data/dist/ice/cpp/include/IceUtil/IceUtil.h +0 -40
- data/dist/ice/cpp/include/IceUtil/InputUtil.h +0 -42
- data/dist/ice/cpp/include/IceUtil/Iterator.h +0 -31
- data/dist/ice/cpp/include/IceUtil/Lock.h +0 -128
- data/dist/ice/cpp/include/IceUtil/Monitor.h +0 -243
- data/dist/ice/cpp/include/IceUtil/Mutex.h +0 -349
- data/dist/ice/cpp/include/IceUtil/MutexProtocol.h +0 -23
- data/dist/ice/cpp/include/IceUtil/MutexPtrLock.h +0 -78
- data/dist/ice/cpp/include/IceUtil/MutexPtrTryLock.h +0 -77
- data/dist/ice/cpp/include/IceUtil/Optional.h +0 -433
- data/dist/ice/cpp/include/IceUtil/Options.h +0 -135
- data/dist/ice/cpp/include/IceUtil/OutputUtil.h +0 -383
- data/dist/ice/cpp/include/IceUtil/PushDisableWarnings.h +0 -33
- data/dist/ice/cpp/include/IceUtil/Random.h +0 -55
- data/dist/ice/cpp/include/IceUtil/RecMutex.h +0 -107
- data/dist/ice/cpp/include/IceUtil/ResourceConfig.h +0 -37
- data/dist/ice/cpp/include/IceUtil/ScannerConfig.h +0 -40
- data/dist/ice/cpp/include/IceUtil/ScopedArray.h +0 -98
- data/dist/ice/cpp/include/IceUtil/Shared.h +0 -127
- data/dist/ice/cpp/include/IceUtil/StopWatch.h +0 -49
- data/dist/ice/cpp/include/IceUtil/StringConverter.h +0 -195
- data/dist/ice/cpp/include/IceUtil/StringUtil.h +0 -97
- data/dist/ice/cpp/include/IceUtil/Thread.h +0 -160
- data/dist/ice/cpp/include/IceUtil/ThreadException.h +0 -94
- data/dist/ice/cpp/include/IceUtil/Time.h +0 -205
- data/dist/ice/cpp/include/IceUtil/Timer.h +0 -153
- data/dist/ice/cpp/include/IceUtil/UUID.h +0 -21
- data/dist/ice/cpp/include/generated/Glacier2/Metrics.h +0 -475
- data/dist/ice/cpp/include/generated/Glacier2/PermissionsVerifier.h +0 -1430
- data/dist/ice/cpp/include/generated/Glacier2/PermissionsVerifierF.h +0 -147
- data/dist/ice/cpp/include/generated/Glacier2/Router.h +0 -3260
- data/dist/ice/cpp/include/generated/Glacier2/RouterF.h +0 -125
- data/dist/ice/cpp/include/generated/Glacier2/SSLInfo.h +0 -223
- data/dist/ice/cpp/include/generated/Glacier2/Session.h +0 -5894
- data/dist/ice/cpp/include/generated/Ice/Communicator.h +0 -1162
- data/dist/ice/cpp/include/generated/Ice/CommunicatorF.h +0 -101
- data/dist/ice/cpp/include/generated/Ice/Connection.h +0 -1703
- data/dist/ice/cpp/include/generated/Ice/ConnectionF.h +0 -119
- data/dist/ice/cpp/include/generated/Ice/Current.h +0 -322
- data/dist/ice/cpp/include/generated/Ice/Endpoint.h +0 -979
- data/dist/ice/cpp/include/generated/Ice/EndpointF.h +0 -166
- data/dist/ice/cpp/include/generated/Ice/FacetMap.h +0 -80
- data/dist/ice/cpp/include/generated/Ice/ImplicitContext.h +0 -284
- data/dist/ice/cpp/include/generated/Ice/ImplicitContextF.h +0 -101
- data/dist/ice/cpp/include/generated/Ice/Instrumentation.h +0 -1203
- data/dist/ice/cpp/include/generated/Ice/InstrumentationF.h +0 -128
- data/dist/ice/cpp/include/generated/Ice/LocalException.h +0 -7437
- data/dist/ice/cpp/include/generated/Ice/LocatorF.h +0 -147
- data/dist/ice/cpp/include/generated/Ice/Logger.h +0 -237
- data/dist/ice/cpp/include/generated/Ice/LoggerF.h +0 -101
- data/dist/ice/cpp/include/generated/Ice/ObjectAdapter.h +0 -1181
- data/dist/ice/cpp/include/generated/Ice/ObjectAdapterF.h +0 -101
- data/dist/ice/cpp/include/generated/Ice/ObjectFactory.h +0 -203
- data/dist/ice/cpp/include/generated/Ice/Plugin.h +0 -318
- data/dist/ice/cpp/include/generated/Ice/PluginF.h +0 -110
- data/dist/ice/cpp/include/generated/Ice/ProcessF.h +0 -125
- data/dist/ice/cpp/include/generated/Ice/Properties.h +0 -452
- data/dist/ice/cpp/include/generated/Ice/PropertiesF.h +0 -134
- data/dist/ice/cpp/include/generated/Ice/RouterF.h +0 -125
- data/dist/ice/cpp/include/generated/Ice/ServantLocator.h +0 -305
- data/dist/ice/cpp/include/generated/Ice/ServantLocatorF.h +0 -101
- data/dist/ice/cpp/include/generated/Ice/ValueFactory.h +0 -330
- data/dist/ice/cpp/include/generated/IceBox/IceBox.h +0 -3269
- data/dist/ice/cpp/include/generated/IceGrid/Admin.h +0 -33773
- data/dist/ice/cpp/include/generated/IceGrid/Descriptor.h +0 -5254
- data/dist/ice/cpp/include/generated/IceGrid/Exception.h +0 -2834
- data/dist/ice/cpp/include/generated/IceGrid/FileParser.h +0 -824
- data/dist/ice/cpp/include/generated/IceGrid/PluginFacade.h +0 -635
- data/dist/ice/cpp/include/generated/IceGrid/Registry.h +0 -5089
- data/dist/ice/cpp/include/generated/IceGrid/Session.h +0 -2240
- data/dist/ice/cpp/include/generated/IceGrid/UserAccountMapper.h +0 -800
- data/dist/ice/cpp/include/generated/IcePatch2/FileInfo.h +0 -325
- data/dist/ice/cpp/include/generated/IcePatch2/FileServer.h +0 -2891
- data/dist/ice/cpp/include/generated/IceSSL/ConnectionInfo.h +0 -228
- data/dist/ice/cpp/include/generated/IceSSL/ConnectionInfoF.h +0 -101
- data/dist/ice/cpp/include/generated/IceSSL/EndpointInfo.h +0 -186
- data/dist/ice/cpp/include/generated/IceStorm/IceStorm.h +0 -6627
- data/dist/ice/cpp/include/generated/IceStorm/Metrics.h +0 -665
- data/dist/ice/cpp/src/Ice/ACM.cpp +0 -380
- data/dist/ice/cpp/src/Ice/ACM.h +0 -119
- data/dist/ice/cpp/src/Ice/ACMF.h +0 -30
- data/dist/ice/cpp/src/Ice/Acceptor.cpp +0 -16
- data/dist/ice/cpp/src/Ice/Application.cpp +0 -661
- data/dist/ice/cpp/src/Ice/AsyncResult.cpp +0 -70
- data/dist/ice/cpp/src/Ice/CommunicatorI.cpp +0 -586
- data/dist/ice/cpp/src/Ice/CommunicatorI.h +0 -167
- data/dist/ice/cpp/src/Ice/Cond.cpp +0 -381
- data/dist/ice/cpp/src/Ice/ConnectionRequestHandler.cpp +0 -73
- data/dist/ice/cpp/src/Ice/ConnectionRequestHandler.h +0 -41
- data/dist/ice/cpp/src/Ice/Connector.cpp +0 -16
- data/dist/ice/cpp/src/Ice/CountDownLatch.cpp +0 -171
- data/dist/ice/cpp/src/Ice/DispatchInterceptor.cpp +0 -37
- data/dist/ice/cpp/src/Ice/FactoryTable.cpp +0 -162
- data/dist/ice/cpp/src/Ice/FactoryTableInit.cpp +0 -88
- data/dist/ice/cpp/src/Ice/GCObject.cpp +0 -442
- data/dist/ice/cpp/src/Ice/IconvStringConverter.cpp +0 -51
- data/dist/ice/cpp/src/Ice/ImplicitContextI.cpp +0 -655
- data/dist/ice/cpp/src/Ice/ImplicitContextI.h +0 -48
- data/dist/ice/cpp/src/Ice/Incoming.cpp +0 -795
- data/dist/ice/cpp/src/Ice/IncomingAsync.cpp +0 -230
- data/dist/ice/cpp/src/Ice/IncomingRequest.h +0 -33
- data/dist/ice/cpp/src/Ice/LocalObject.cpp +0 -23
- data/dist/ice/cpp/src/Ice/MetricsObserverI.cpp +0 -8
- data/dist/ice/cpp/src/Ice/PropertiesAdminI.cpp +0 -265
- data/dist/ice/cpp/src/Ice/PropertiesAdminI.h +0 -64
- data/dist/ice/cpp/src/Ice/PropertiesI.cpp +0 -739
- data/dist/ice/cpp/src/Ice/PropertiesI.h +0 -70
- data/dist/ice/cpp/src/Ice/ProtocolPluginFacadeF.h +0 -21
- data/dist/ice/cpp/src/Ice/ProxyFactory.cpp +0 -300
- data/dist/ice/cpp/src/Ice/ProxyFactory.h +0 -57
- data/dist/ice/cpp/src/Ice/RegisterPluginsInit.cpp +0 -38
- data/dist/ice/cpp/src/Ice/RegisterPluginsInit.h +0 -20
- data/dist/ice/cpp/src/Ice/ReplyStatus.h +0 -24
- data/dist/ice/cpp/src/Ice/RequestHandlerFactory.cpp +0 -77
- data/dist/ice/cpp/src/Ice/RequestHandlerFactory.h +0 -37
- data/dist/ice/cpp/src/Ice/ResponseHandler.cpp +0 -12
- data/dist/ice/cpp/src/Ice/ResponseHandler.h +0 -43
- data/dist/ice/cpp/src/Ice/SliceChecksums.cpp +0 -75
- data/dist/ice/cpp/src/Ice/StringConverterPlugin.cpp +0 -192
- data/dist/ice/cpp/src/Ice/StringUtil.h +0 -30
- data/dist/ice/cpp/src/Ice/Thread.cpp +0 -569
- data/dist/ice/cpp/src/Ice/ValueFactoryManagerI.cpp +0 -61
- data/dist/ice/cpp/src/Ice/ValueFactoryManagerI.h +0 -37
- data/dist/ice/cpp/src/Ice/VirtualShared.h +0 -38
- data/dist/ice/cpp/src/Ice/generated/Communicator.cpp +0 -79
- data/dist/ice/cpp/src/Ice/generated/CommunicatorF.cpp +0 -61
- data/dist/ice/cpp/src/Ice/generated/Connection.cpp +0 -155
- data/dist/ice/cpp/src/Ice/generated/ConnectionF.cpp +0 -61
- data/dist/ice/cpp/src/Ice/generated/Current.cpp +0 -62
- data/dist/ice/cpp/src/Ice/generated/Endpoint.cpp +0 -147
- data/dist/ice/cpp/src/Ice/generated/EndpointF.cpp +0 -61
- data/dist/ice/cpp/src/Ice/generated/FacetMap.cpp +0 -49
- data/dist/ice/cpp/src/Ice/generated/ImplicitContext.cpp +0 -75
- data/dist/ice/cpp/src/Ice/generated/ImplicitContextF.cpp +0 -61
- data/dist/ice/cpp/src/Ice/generated/Instrumentation.cpp +0 -188
- data/dist/ice/cpp/src/Ice/generated/InstrumentationF.cpp +0 -66
- data/dist/ice/cpp/src/Ice/generated/LocalException.cpp +0 -3262
- data/dist/ice/cpp/src/Ice/generated/LocatorF.cpp +0 -63
- data/dist/ice/cpp/src/Ice/generated/Logger.cpp +0 -73
- data/dist/ice/cpp/src/Ice/generated/LoggerF.cpp +0 -61
- data/dist/ice/cpp/src/Ice/generated/ObjectAdapter.cpp +0 -79
- data/dist/ice/cpp/src/Ice/generated/ObjectAdapterF.cpp +0 -61
- data/dist/ice/cpp/src/Ice/generated/ObjectFactory.cpp +0 -75
- data/dist/ice/cpp/src/Ice/generated/Plugin.cpp +0 -87
- data/dist/ice/cpp/src/Ice/generated/PluginF.cpp +0 -61
- data/dist/ice/cpp/src/Ice/generated/ProcessF.cpp +0 -63
- data/dist/ice/cpp/src/Ice/generated/Properties.cpp +0 -78
- data/dist/ice/cpp/src/Ice/generated/PropertiesF.cpp +0 -63
- data/dist/ice/cpp/src/Ice/generated/RouterF.cpp +0 -63
- data/dist/ice/cpp/src/Ice/generated/ServantLocator.cpp +0 -75
- data/dist/ice/cpp/src/Ice/generated/ServantLocatorF.cpp +0 -61
- data/dist/ice/cpp/src/Ice/generated/ValueFactory.cpp +0 -83
- data/dist/ice/cpp/src/Ice/ios/StreamAcceptor.cpp +0 -154
- data/dist/ice/cpp/src/Ice/ios/StreamAcceptor.h +0 -49
- data/dist/ice/cpp/src/Ice/ios/StreamConnector.cpp +0 -146
- data/dist/ice/cpp/src/Ice/ios/StreamConnector.h +0 -52
- data/dist/ice/cpp/src/Ice/ios/StreamEndpointI.cpp +0 -477
- data/dist/ice/cpp/src/Ice/ios/StreamEndpointI.h +0 -156
- data/dist/ice/cpp/src/Ice/ios/StreamTransceiver.cpp +0 -570
- data/dist/ice/cpp/src/Ice/ios/StreamTransceiver.h +0 -93
- data/dist/ice/cpp/src/IceDiscovery/generated/IceDiscovery/IceDiscovery.h +0 -1889
- data/dist/ice/cpp/src/IceDiscovery/generated/IceDiscovery.cpp +0 -915
- data/dist/ice/cpp/src/IceLocatorDiscovery/generated/IceLocatorDiscovery/IceLocatorDiscovery.h +0 -1197
- data/dist/ice/cpp/src/IceLocatorDiscovery/generated/IceLocatorDiscovery.cpp +0 -730
- data/dist/ice/cpp/src/IceSSL/AcceptorI.cpp +0 -105
- data/dist/ice/cpp/src/IceSSL/AcceptorI.h +0 -52
- data/dist/ice/cpp/src/IceSSL/CertificateI.cpp +0 -301
- data/dist/ice/cpp/src/IceSSL/CertificateI.h +0 -64
- data/dist/ice/cpp/src/IceSSL/ConnectorI.cpp +0 -102
- data/dist/ice/cpp/src/IceSSL/ConnectorI.h +0 -44
- data/dist/ice/cpp/src/IceSSL/EndpointI.cpp +0 -372
- data/dist/ice/cpp/src/IceSSL/EndpointI.h +0 -100
- data/dist/ice/cpp/src/IceSSL/Instance.cpp +0 -28
- data/dist/ice/cpp/src/IceSSL/Instance.h +0 -37
- data/dist/ice/cpp/src/IceSSL/InstanceF.h +0 -33
- data/dist/ice/cpp/src/IceSSL/OpenSSLCertificateI.cpp +0 -688
- data/dist/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +0 -1147
- data/dist/ice/cpp/src/IceSSL/OpenSSLEngine.h +0 -59
- data/dist/ice/cpp/src/IceSSL/OpenSSLEngineF.h +0 -27
- data/dist/ice/cpp/src/IceSSL/OpenSSLPluginI.cpp +0 -127
- data/dist/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +0 -1092
- data/dist/ice/cpp/src/IceSSL/OpenSSLTransceiverI.h +0 -90
- data/dist/ice/cpp/src/IceSSL/OpenSSLUtil.cpp +0 -288
- data/dist/ice/cpp/src/IceSSL/OpenSSLUtil.h +0 -58
- data/dist/ice/cpp/src/IceSSL/PluginI.cpp +0 -246
- data/dist/ice/cpp/src/IceSSL/PluginI.h +0 -67
- data/dist/ice/cpp/src/IceSSL/RFC2253.h +0 -62
- data/dist/ice/cpp/src/IceSSL/SChannelCertificateI.cpp +0 -721
- data/dist/ice/cpp/src/IceSSL/SChannelEngine.cpp +0 -1283
- data/dist/ice/cpp/src/IceSSL/SChannelEngine.h +0 -123
- data/dist/ice/cpp/src/IceSSL/SChannelEngineF.h +0 -31
- data/dist/ice/cpp/src/IceSSL/SChannelPluginI.cpp +0 -73
- data/dist/ice/cpp/src/IceSSL/SChannelTransceiverI.cpp +0 -1174
- data/dist/ice/cpp/src/IceSSL/SChannelTransceiverI.h +0 -133
- data/dist/ice/cpp/src/IceSSL/SSLEngine.cpp +0 -313
- data/dist/ice/cpp/src/IceSSL/SSLEngine.h +0 -100
- data/dist/ice/cpp/src/IceSSL/SSLEngineF.h +0 -21
- data/dist/ice/cpp/src/IceSSL/SecureTransportCertificateI.cpp +0 -999
- data/dist/ice/cpp/src/IceSSL/SecureTransportEngine.cpp +0 -1308
- data/dist/ice/cpp/src/IceSSL/SecureTransportEngine.h +0 -59
- data/dist/ice/cpp/src/IceSSL/SecureTransportEngineF.h +0 -29
- data/dist/ice/cpp/src/IceSSL/SecureTransportPluginI.cpp +0 -75
- data/dist/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +0 -719
- data/dist/ice/cpp/src/IceSSL/SecureTransportTransceiverI.h +0 -92
- data/dist/ice/cpp/src/IceSSL/SecureTransportUtil.cpp +0 -868
- data/dist/ice/cpp/src/IceSSL/SecureTransportUtil.h +0 -45
- data/dist/ice/cpp/src/IceSSL/TrustManager.cpp +0 -236
- data/dist/ice/cpp/src/IceSSL/TrustManager.h +0 -46
- data/dist/ice/cpp/src/IceSSL/TrustManagerF.h +0 -21
- data/dist/ice/cpp/src/IceSSL/Util.cpp +0 -192
- data/dist/ice/cpp/src/IceSSL/Util.h +0 -99
- data/dist/ice/cpp/src/IceSSL/generated/ConnectionInfo.cpp +0 -75
- data/dist/ice/cpp/src/IceSSL/generated/ConnectionInfoF.cpp +0 -61
- data/dist/ice/cpp/src/IceSSL/generated/EndpointInfo.cpp +0 -75
- data/dist/ice/cpp/src/IceUtil/ConvertUTF.cpp +0 -472
- data/dist/ice/cpp/src/IceUtil/ConvertUTF.h +0 -147
- data/dist/ice/cpp/src/IceUtil/CtrlCHandler.cpp +0 -259
- data/dist/ice/cpp/src/IceUtil/FileUtil.cpp +0 -471
- data/dist/ice/cpp/src/IceUtil/InputUtil.cpp +0 -36
- data/dist/ice/cpp/src/IceUtil/MutexProtocol.cpp +0 -19
- data/dist/ice/cpp/src/IceUtil/OutputUtil.cpp +0 -609
- data/dist/ice/cpp/src/IceUtil/Random.cpp +0 -180
- data/dist/ice/cpp/src/IceUtil/RecMutex.cpp +0 -238
- data/dist/ice/cpp/src/IceUtil/Shared.cpp +0 -71
- data/dist/ice/cpp/src/IceUtil/StringConverter.cpp +0 -690
- data/dist/ice/cpp/src/IceUtil/StringUtil.cpp +0 -1135
- data/dist/ice/cpp/src/IceUtil/ThreadException.cpp +0 -130
- data/dist/ice/cpp/src/IceUtil/Time.cpp +0 -307
- data/dist/ice/cpp/src/IceUtil/UUID.cpp +0 -165
- data/dist/ice/cpp/src/IceUtil/Unicode.cpp +0 -183
- data/dist/ice/cpp/src/IceUtil/Unicode.h +0 -43
- data/dist/ice/cpp/src/IceUtil/UtilException.cpp +0 -839
- data/dist/ice/cpp/src/Slice/CPlusPlusUtil.cpp +0 -1810
- data/dist/ice/cpp/src/Slice/CPlusPlusUtil.h +0 -72
- data/dist/ice/cpp/src/Slice/Checksum.cpp +0 -447
- data/dist/ice/cpp/src/Slice/Checksum.h +0 -21
- data/dist/ice/cpp/src/Slice/JavaUtil.cpp +0 -5183
- data/dist/ice/cpp/src/Slice/JavaUtil.h +0 -407
- data/dist/ice/cpp/src/Slice/MD5.cpp +0 -52
- data/dist/ice/cpp/src/Slice/MD5.h +0 -39
- data/dist/ice/cpp/src/Slice/MD5I.cpp +0 -393
- data/dist/ice/cpp/src/Slice/MD5I.h +0 -91
- data/dist/ice/cpp/src/Slice/PHPUtil.cpp +0 -157
- data/dist/ice/cpp/src/Slice/PHPUtil.h +0 -36
- data/dist/ice/cpp/src/Slice/Python.cpp +0 -830
- data/dist/ice/cpp/src/Slice/PythonUtil.cpp +0 -3439
- data/dist/ice/cpp/src/Slice/PythonUtil.h +0 -70
- data/dist/ice/cpp/src/Slice/Ruby.cpp +0 -350
- data/dist/ice/cpp/src/Slice/RubyUtil.cpp +0 -1571
- data/dist/ice/cpp/src/Slice/RubyUtil.h +0 -49
- data/dist/ice/slice/Glacier2/PermissionsVerifierF.ice +0 -30
- data/dist/ice/slice/Glacier2/RouterF.ice +0 -29
- data/dist/ice/slice/Ice/Communicator.ice +0 -676
- data/dist/ice/slice/Ice/CommunicatorF.ice +0 -31
- data/dist/ice/slice/Ice/Connection.ice +0 -516
- data/dist/ice/slice/Ice/ConnectionF.ice +0 -33
- data/dist/ice/slice/Ice/Current.ice +0 -170
- data/dist/ice/slice/Ice/Endpoint.ice +0 -291
- data/dist/ice/slice/Ice/EndpointF.ice +0 -43
- data/dist/ice/slice/Ice/FacetMap.ice +0 -36
- data/dist/ice/slice/Ice/ImplicitContext.ice +0 -119
- data/dist/ice/slice/Ice/ImplicitContextF.ice +0 -30
- data/dist/ice/slice/Ice/Instrumentation.ice +0 -509
- data/dist/ice/slice/Ice/InstrumentationF.ice +0 -38
- data/dist/ice/slice/Ice/LocalException.ice +0 -1040
- data/dist/ice/slice/Ice/LocatorF.ice +0 -32
- data/dist/ice/slice/Ice/Logger.ice +0 -99
- data/dist/ice/slice/Ice/LoggerF.ice +0 -31
- data/dist/ice/slice/Ice/ObjectAdapter.ice +0 -710
- data/dist/ice/slice/Ice/ObjectAdapterF.ice +0 -31
- data/dist/ice/slice/Ice/ObjectFactory.ice +0 -71
- data/dist/ice/slice/Ice/Plugin.ice +0 -131
- data/dist/ice/slice/Ice/PluginF.ice +0 -36
- data/dist/ice/slice/Ice/ProcessF.ice +0 -31
- data/dist/ice/slice/Ice/Properties.ice +0 -244
- data/dist/ice/slice/Ice/PropertiesF.ice +0 -32
- data/dist/ice/slice/Ice/RouterF.ice +0 -31
- data/dist/ice/slice/Ice/ServantLocator.ice +0 -136
- data/dist/ice/slice/Ice/ServantLocatorF.ice +0 -31
- data/dist/ice/slice/Ice/ValueFactory.ice +0 -133
- data/dist/ice/slice/IceBox/IceBox.ice +0 -216
- data/dist/ice/slice/IceGrid/PluginFacade.ice +0 -329
- data/dist/ice/slice/IcePatch2/FileInfo.ice +0 -85
- data/dist/ice/slice/IcePatch2/FileServer.ice +0 -191
- data/dist/lib/Glacier2/PermissionsVerifierF.rb +0 -30
- data/dist/lib/Glacier2/RouterF.rb +0 -25
- data/dist/lib/Ice/Communicator.rb +0 -87
- data/dist/lib/Ice/CommunicatorF.rb +0 -24
- data/dist/lib/Ice/Connection.rb +0 -413
- data/dist/lib/Ice/ConnectionF.rb +0 -32
- data/dist/lib/Ice/Current.rb +0 -141
- data/dist/lib/Ice/Endpoint.rb +0 -187
- data/dist/lib/Ice/EndpointF.rb +0 -48
- data/dist/lib/Ice/FacetMap.rb +0 -24
- data/dist/lib/Ice/ImplicitContext.rb +0 -26
- data/dist/lib/Ice/ImplicitContextF.rb +0 -24
- data/dist/lib/Ice/Instrumentation.rb +0 -169
- data/dist/lib/Ice/InstrumentationF.rb +0 -31
- data/dist/lib/Ice/LocalException.rb +0 -1031
- data/dist/lib/Ice/LocatorF.rb +0 -30
- data/dist/lib/Ice/Logger.rb +0 -24
- data/dist/lib/Ice/LoggerF.rb +0 -24
- data/dist/lib/Ice/ObjectAdapter.rb +0 -29
- data/dist/lib/Ice/ObjectAdapterF.rb +0 -24
- data/dist/lib/Ice/ObjectFactory.rb +0 -24
- data/dist/lib/Ice/Plugin.rb +0 -30
- data/dist/lib/Ice/PluginF.rb +0 -28
- data/dist/lib/Ice/ProcessF.rb +0 -25
- data/dist/lib/Ice/Properties.rb +0 -25
- data/dist/lib/Ice/PropertiesF.rb +0 -29
- data/dist/lib/Ice/RouterF.rb +0 -25
- data/dist/lib/Ice/ServantLocator.rb +0 -26
- data/dist/lib/Ice/ServantLocatorF.rb +0 -24
- data/dist/lib/Ice/ValueFactory.rb +0 -28
- data/dist/lib/IceBox/IceBox.rb +0 -164
- data/dist/lib/IceGrid/PluginFacade.rb +0 -35
- data/dist/lib/IcePatch2/FileInfo.rb +0 -115
- data/dist/lib/IcePatch2/FileServer.rb +0 -123
- data/dist/lib/IcePatch2.rb +0 -5
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
// Copyright (c) ZeroC, Inc.
|
|
2
|
+
|
|
3
|
+
#include "Ice/OutputStream.h"
|
|
4
|
+
#include "DefaultsAndOverrides.h"
|
|
5
|
+
#include "Endian.h"
|
|
6
|
+
#include "Ice/LocalExceptions.h"
|
|
7
|
+
#include "Ice/LoggerUtil.h"
|
|
8
|
+
#include "Ice/Object.h"
|
|
9
|
+
#include "Ice/Proxy.h"
|
|
10
|
+
#include "Ice/SlicedData.h"
|
|
11
|
+
#include "Ice/StringConverter.h"
|
|
12
|
+
#include "Instance.h"
|
|
13
|
+
#include "TraceUtil.h"
|
|
4
14
|
|
|
5
|
-
#include <Ice/OutputStream.h>
|
|
6
|
-
#include <Ice/DefaultsAndOverrides.h>
|
|
7
|
-
#include <Ice/Instance.h>
|
|
8
|
-
#include <Ice/Object.h>
|
|
9
|
-
#include <Ice/Proxy.h>
|
|
10
|
-
#include <Ice/ProxyFactory.h>
|
|
11
|
-
#include <Ice/ValueFactory.h>
|
|
12
|
-
#include <Ice/LocalException.h>
|
|
13
|
-
#include <Ice/Protocol.h>
|
|
14
|
-
#include <Ice/TraceUtil.h>
|
|
15
|
-
#include <Ice/LoggerUtil.h>
|
|
16
|
-
#include <Ice/SlicedData.h>
|
|
17
|
-
#include <Ice/StringConverter.h>
|
|
18
15
|
#include <iterator>
|
|
19
16
|
|
|
20
17
|
using namespace std;
|
|
@@ -23,119 +20,142 @@ using namespace IceInternal;
|
|
|
23
20
|
|
|
24
21
|
namespace
|
|
25
22
|
{
|
|
26
|
-
|
|
27
|
-
class StreamUTF8BufferI : public IceUtil::UTF8Buffer
|
|
28
|
-
{
|
|
29
|
-
public:
|
|
30
|
-
|
|
31
|
-
StreamUTF8BufferI(OutputStream& stream) :
|
|
32
|
-
_stream(stream)
|
|
33
|
-
{
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
Ice::Byte* getMoreBytes(size_t howMany, Ice::Byte* firstUnused)
|
|
23
|
+
class StreamUTF8BufferI final : public Ice::UTF8Buffer
|
|
37
24
|
{
|
|
38
|
-
|
|
25
|
+
public:
|
|
26
|
+
StreamUTF8BufferI(OutputStream& stream) : _stream(stream) {}
|
|
39
27
|
|
|
40
|
-
|
|
28
|
+
byte* getMoreBytes(size_t howMany, byte* firstUnused) final
|
|
41
29
|
{
|
|
42
|
-
|
|
43
|
-
// Return unused bytes
|
|
44
|
-
//
|
|
45
|
-
_stream.resize(static_cast<size_t>(firstUnused - _stream.b.begin()));
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
//
|
|
49
|
-
// Index of first unused byte
|
|
50
|
-
//
|
|
51
|
-
Buffer::Container::size_type pos = _stream.b.size();
|
|
30
|
+
assert(howMany > 0);
|
|
52
31
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
32
|
+
if (firstUnused)
|
|
33
|
+
{
|
|
34
|
+
//
|
|
35
|
+
// Return unused bytes
|
|
36
|
+
//
|
|
37
|
+
_stream.resize(static_cast<size_t>(firstUnused - _stream.b.begin()));
|
|
38
|
+
}
|
|
58
39
|
|
|
59
|
-
|
|
60
|
-
|
|
40
|
+
//
|
|
41
|
+
// Index of first unused byte
|
|
42
|
+
//
|
|
43
|
+
Buffer::Container::size_type pos = _stream.b.size();
|
|
61
44
|
|
|
62
|
-
|
|
45
|
+
//
|
|
46
|
+
// Since resize may reallocate the buffer, when firstUnused != 0, the
|
|
47
|
+
// return value can be != firstUnused
|
|
48
|
+
//
|
|
49
|
+
_stream.resize(pos + howMany);
|
|
63
50
|
|
|
64
|
-
|
|
65
|
-
}
|
|
51
|
+
return &_stream.b[pos];
|
|
52
|
+
}
|
|
66
53
|
|
|
54
|
+
private:
|
|
55
|
+
OutputStream& _stream;
|
|
56
|
+
};
|
|
67
57
|
}
|
|
68
58
|
|
|
69
|
-
Ice::OutputStream::OutputStream(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
59
|
+
Ice::OutputStream::OutputStream(
|
|
60
|
+
EncodingVersion encoding,
|
|
61
|
+
FormatType format,
|
|
62
|
+
StringConverterPtr stringConverter,
|
|
63
|
+
WstringConverterPtr wstringConverter)
|
|
64
|
+
: _stringConverter(std::move(stringConverter)),
|
|
65
|
+
_wstringConverter(std::move(wstringConverter)),
|
|
66
|
+
_closure(nullptr),
|
|
67
|
+
_encoding(encoding),
|
|
68
|
+
_format(format),
|
|
69
|
+
_currentEncaps(nullptr)
|
|
75
70
|
{
|
|
76
71
|
}
|
|
77
72
|
|
|
78
|
-
Ice::OutputStream::OutputStream(
|
|
79
|
-
|
|
80
|
-
|
|
73
|
+
Ice::OutputStream::OutputStream(
|
|
74
|
+
pair<const byte*, const byte*> buf,
|
|
75
|
+
EncodingVersion encoding,
|
|
76
|
+
FormatType format,
|
|
77
|
+
StringConverterPtr stringConverter,
|
|
78
|
+
WstringConverterPtr wstringConverter)
|
|
79
|
+
: Buffer(buf.first, buf.second),
|
|
80
|
+
_stringConverter(std::move(stringConverter)),
|
|
81
|
+
_wstringConverter(std::move(wstringConverter)),
|
|
82
|
+
_closure(nullptr),
|
|
83
|
+
_encoding(encoding),
|
|
84
|
+
_format(format),
|
|
85
|
+
_currentEncaps(nullptr)
|
|
81
86
|
{
|
|
82
|
-
|
|
87
|
+
b.reset();
|
|
83
88
|
}
|
|
84
89
|
|
|
85
|
-
Ice::OutputStream::OutputStream(const CommunicatorPtr& communicator,
|
|
86
|
-
|
|
87
|
-
_currentEncaps(0)
|
|
90
|
+
Ice::OutputStream::OutputStream(const CommunicatorPtr& communicator, EncodingVersion encoding)
|
|
91
|
+
: OutputStream(getInstance(communicator).get(), encoding)
|
|
88
92
|
{
|
|
89
|
-
initialize(communicator, encoding);
|
|
90
93
|
}
|
|
91
94
|
|
|
92
|
-
Ice::OutputStream::OutputStream(const CommunicatorPtr& communicator
|
|
93
|
-
|
|
94
|
-
Buffer(buf.first, buf.second),
|
|
95
|
-
_closure(0),
|
|
96
|
-
_currentEncaps(0)
|
|
95
|
+
Ice::OutputStream::OutputStream(const CommunicatorPtr& communicator)
|
|
96
|
+
: OutputStream(communicator, getInstance(communicator)->defaultsAndOverrides()->defaultEncoding)
|
|
97
97
|
{
|
|
98
|
-
initialize(communicator, encoding);
|
|
99
|
-
b.reset();
|
|
100
98
|
}
|
|
101
99
|
|
|
102
|
-
Ice::OutputStream::OutputStream(Instance* instance,
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
Ice::OutputStream::OutputStream(Instance* instance, EncodingVersion encoding)
|
|
101
|
+
: OutputStream(
|
|
102
|
+
encoding,
|
|
103
|
+
instance->defaultsAndOverrides()->defaultFormat,
|
|
104
|
+
instance->getStringConverter(),
|
|
105
|
+
instance->getWstringConverter())
|
|
105
106
|
{
|
|
106
|
-
initialize(instance, encoding);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
109
|
+
Ice::OutputStream::OutputStream(OutputStream&& other) noexcept
|
|
110
|
+
: Buffer(std::move(other)),
|
|
111
|
+
_stringConverter(std::move(other._stringConverter)),
|
|
112
|
+
_wstringConverter(std::move(other._wstringConverter)),
|
|
113
|
+
_closure(other._closure),
|
|
114
|
+
_encoding(other._encoding),
|
|
115
|
+
_format(other._format),
|
|
116
|
+
_currentEncaps(other._currentEncaps)
|
|
117
|
+
{
|
|
118
|
+
// Reset other to its default state.
|
|
119
|
+
other._closure = nullptr;
|
|
120
|
+
other._encoding = Encoding_1_1;
|
|
121
|
+
other._format = FormatType::CompactFormat;
|
|
122
|
+
other._currentEncaps = nullptr;
|
|
123
|
+
other._preAllocatedEncaps.reset();
|
|
124
|
+
|
|
125
|
+
// Reset in the unusual case where other held a "failed" encapsulation.
|
|
126
|
+
resetEncapsulation();
|
|
122
127
|
}
|
|
123
128
|
|
|
124
|
-
|
|
125
|
-
Ice::OutputStream::
|
|
129
|
+
Ice::OutputStream&
|
|
130
|
+
Ice::OutputStream::operator=(OutputStream&& other) noexcept
|
|
126
131
|
{
|
|
127
|
-
|
|
132
|
+
if (this != &other)
|
|
133
|
+
{
|
|
134
|
+
Buffer::operator=(std::move(other));
|
|
135
|
+
_stringConverter = std::move(other._stringConverter);
|
|
136
|
+
_wstringConverter = std::move(other._wstringConverter);
|
|
137
|
+
_closure = other._closure;
|
|
138
|
+
_encoding = other._encoding;
|
|
139
|
+
_format = other._format;
|
|
140
|
+
_currentEncaps = other._currentEncaps;
|
|
128
141
|
|
|
129
|
-
|
|
130
|
-
|
|
142
|
+
// Reset other to its default state.
|
|
143
|
+
other._closure = nullptr;
|
|
144
|
+
other._encoding = Encoding_1_1;
|
|
145
|
+
other._format = FormatType::CompactFormat;
|
|
146
|
+
other._currentEncaps = nullptr;
|
|
147
|
+
other._preAllocatedEncaps.reset();
|
|
131
148
|
|
|
132
|
-
|
|
149
|
+
// Reset in the unusual case where other held a "failed" encapsulation.
|
|
150
|
+
resetEncapsulation();
|
|
151
|
+
}
|
|
152
|
+
return *this;
|
|
133
153
|
}
|
|
134
154
|
|
|
135
155
|
void
|
|
136
156
|
Ice::OutputStream::clear()
|
|
137
157
|
{
|
|
138
|
-
while(_currentEncaps && _currentEncaps != &_preAllocatedEncaps)
|
|
158
|
+
while (_currentEncaps && _currentEncaps != &_preAllocatedEncaps)
|
|
139
159
|
{
|
|
140
160
|
Encaps* oldEncaps = _currentEncaps;
|
|
141
161
|
_currentEncaps = _currentEncaps->previous;
|
|
@@ -143,12 +163,6 @@ Ice::OutputStream::clear()
|
|
|
143
163
|
}
|
|
144
164
|
}
|
|
145
165
|
|
|
146
|
-
void
|
|
147
|
-
Ice::OutputStream::setFormat(FormatType fmt)
|
|
148
|
-
{
|
|
149
|
-
_format = fmt;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
166
|
void*
|
|
153
167
|
Ice::OutputStream::getClosure() const
|
|
154
168
|
{
|
|
@@ -164,18 +178,19 @@ Ice::OutputStream::setClosure(void* p)
|
|
|
164
178
|
}
|
|
165
179
|
|
|
166
180
|
void
|
|
167
|
-
Ice::OutputStream::swap(OutputStream& other)
|
|
181
|
+
Ice::OutputStream::swap(OutputStream& other) noexcept
|
|
168
182
|
{
|
|
169
183
|
swapBuffer(other);
|
|
170
184
|
|
|
171
|
-
std::swap(
|
|
185
|
+
std::swap(_stringConverter, other._stringConverter);
|
|
186
|
+
std::swap(_wstringConverter, other._wstringConverter);
|
|
172
187
|
std::swap(_closure, other._closure);
|
|
173
188
|
std::swap(_encoding, other._encoding);
|
|
174
189
|
std::swap(_format, other._format);
|
|
175
190
|
|
|
176
191
|
//
|
|
177
192
|
// Swap is never called for streams that have encapsulations being written. However,
|
|
178
|
-
// encapsulations might still be set in case
|
|
193
|
+
// encapsulations might still be set in case marshaling failed. We just
|
|
179
194
|
// reset the encapsulations if there are still some set.
|
|
180
195
|
//
|
|
181
196
|
resetEncapsulation();
|
|
@@ -185,7 +200,7 @@ Ice::OutputStream::swap(OutputStream& other)
|
|
|
185
200
|
void
|
|
186
201
|
Ice::OutputStream::resetEncapsulation()
|
|
187
202
|
{
|
|
188
|
-
while(_currentEncaps && _currentEncaps != &_preAllocatedEncaps)
|
|
203
|
+
while (_currentEncaps && _currentEncaps != &_preAllocatedEncaps)
|
|
189
204
|
{
|
|
190
205
|
Encaps* oldEncaps = _currentEncaps;
|
|
191
206
|
_currentEncaps = _currentEncaps->previous;
|
|
@@ -204,24 +219,92 @@ Ice::OutputStream::startEncapsulation()
|
|
|
204
219
|
// encapsulation, otherwise, use the stream encoding version.
|
|
205
220
|
//
|
|
206
221
|
|
|
207
|
-
if(_currentEncaps)
|
|
222
|
+
if (_currentEncaps)
|
|
208
223
|
{
|
|
209
224
|
startEncapsulation(_currentEncaps->encoding, _currentEncaps->format);
|
|
210
225
|
}
|
|
211
226
|
else
|
|
212
227
|
{
|
|
213
|
-
startEncapsulation(_encoding,
|
|
228
|
+
startEncapsulation(_encoding, nullopt);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
void
|
|
233
|
+
Ice::OutputStream::startEncapsulation(const EncodingVersion& encoding, std::optional<FormatType> format)
|
|
234
|
+
{
|
|
235
|
+
IceInternal::checkSupportedEncoding(encoding);
|
|
236
|
+
|
|
237
|
+
Encaps* oldEncaps = _currentEncaps;
|
|
238
|
+
if (!oldEncaps) // First allocated encaps?
|
|
239
|
+
{
|
|
240
|
+
_currentEncaps = &_preAllocatedEncaps;
|
|
241
|
+
}
|
|
242
|
+
else
|
|
243
|
+
{
|
|
244
|
+
_currentEncaps = new Encaps();
|
|
245
|
+
_currentEncaps->previous = oldEncaps;
|
|
214
246
|
}
|
|
247
|
+
_currentEncaps->format = format.value_or(_format);
|
|
248
|
+
_currentEncaps->encoding = encoding;
|
|
249
|
+
_currentEncaps->start = b.size();
|
|
250
|
+
|
|
251
|
+
write(std::int32_t(0)); // Placeholder for the encapsulation length.
|
|
252
|
+
write(_currentEncaps->encoding);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
void
|
|
256
|
+
Ice::OutputStream::endEncapsulation()
|
|
257
|
+
{
|
|
258
|
+
assert(_currentEncaps);
|
|
259
|
+
|
|
260
|
+
// Size includes size and version.
|
|
261
|
+
auto sz = static_cast<std::int32_t>(b.size() - _currentEncaps->start);
|
|
262
|
+
write(sz, &(*(b.begin() + _currentEncaps->start)));
|
|
263
|
+
|
|
264
|
+
Encaps* oldEncaps = _currentEncaps;
|
|
265
|
+
_currentEncaps = _currentEncaps->previous;
|
|
266
|
+
if (oldEncaps == &_preAllocatedEncaps)
|
|
267
|
+
{
|
|
268
|
+
oldEncaps->reset();
|
|
269
|
+
}
|
|
270
|
+
else
|
|
271
|
+
{
|
|
272
|
+
delete oldEncaps;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
void
|
|
277
|
+
Ice::OutputStream::writeEmptyEncapsulation(const EncodingVersion& encoding)
|
|
278
|
+
{
|
|
279
|
+
IceInternal::checkSupportedEncoding(encoding);
|
|
280
|
+
write(std::int32_t(6)); // Size
|
|
281
|
+
write(encoding);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
void
|
|
285
|
+
Ice::OutputStream::writeEncapsulation(const byte* v, int32_t sz)
|
|
286
|
+
{
|
|
287
|
+
if (sz < 6)
|
|
288
|
+
{
|
|
289
|
+
throw MarshalException{
|
|
290
|
+
__FILE__,
|
|
291
|
+
__LINE__,
|
|
292
|
+
"the provided array does not have enough bytes for an encapsulation"};
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
Container::size_type position = b.size();
|
|
296
|
+
resize(position + static_cast<size_t>(sz));
|
|
297
|
+
memcpy(&b[position], &v[0], static_cast<size_t>(sz));
|
|
215
298
|
}
|
|
216
299
|
|
|
217
300
|
void
|
|
218
301
|
Ice::OutputStream::writePendingValues()
|
|
219
302
|
{
|
|
220
|
-
if(_currentEncaps && _currentEncaps->encoder)
|
|
303
|
+
if (_currentEncaps && _currentEncaps->encoder)
|
|
221
304
|
{
|
|
222
305
|
_currentEncaps->encoder->writePendingValues();
|
|
223
306
|
}
|
|
224
|
-
else if(getEncoding() == Ice::Encoding_1_0)
|
|
307
|
+
else if (getEncoding() == Ice::Encoding_1_0)
|
|
225
308
|
{
|
|
226
309
|
//
|
|
227
310
|
// If using the 1.0 encoding and no instances were written, we
|
|
@@ -237,9 +320,9 @@ Ice::OutputStream::writePendingValues()
|
|
|
237
320
|
}
|
|
238
321
|
|
|
239
322
|
void
|
|
240
|
-
Ice::OutputStream::writeBlob(const vector<
|
|
323
|
+
Ice::OutputStream::writeBlob(const vector<byte>& v)
|
|
241
324
|
{
|
|
242
|
-
if(!v.empty())
|
|
325
|
+
if (!v.empty())
|
|
243
326
|
{
|
|
244
327
|
Container::size_type pos = b.size();
|
|
245
328
|
resize(pos + v.size());
|
|
@@ -248,11 +331,11 @@ Ice::OutputStream::writeBlob(const vector<Byte>& v)
|
|
|
248
331
|
}
|
|
249
332
|
|
|
250
333
|
void
|
|
251
|
-
Ice::OutputStream::write(const
|
|
334
|
+
Ice::OutputStream::write(const byte* begin, const byte* end)
|
|
252
335
|
{
|
|
253
|
-
|
|
336
|
+
auto sz = static_cast<int32_t>(end - begin);
|
|
254
337
|
writeSize(sz);
|
|
255
|
-
if(sz > 0)
|
|
338
|
+
if (sz > 0)
|
|
256
339
|
{
|
|
257
340
|
Container::size_type pos = b.size();
|
|
258
341
|
resize(pos + static_cast<size_t>(sz));
|
|
@@ -261,50 +344,61 @@ Ice::OutputStream::write(const Byte* begin, const Byte* end)
|
|
|
261
344
|
}
|
|
262
345
|
|
|
263
346
|
void
|
|
264
|
-
Ice::OutputStream::write(const
|
|
347
|
+
Ice::OutputStream::write(const uint8_t* begin, const uint8_t* end)
|
|
265
348
|
{
|
|
266
|
-
|
|
349
|
+
auto sz = static_cast<int32_t>(end - begin);
|
|
267
350
|
writeSize(sz);
|
|
268
|
-
if(sz > 0)
|
|
351
|
+
if (sz > 0)
|
|
269
352
|
{
|
|
270
353
|
Container::size_type pos = b.size();
|
|
271
354
|
resize(pos + static_cast<size_t>(sz));
|
|
272
|
-
|
|
355
|
+
memcpy(&b[pos], begin, static_cast<size_t>(sz));
|
|
273
356
|
}
|
|
274
357
|
}
|
|
275
358
|
|
|
276
|
-
|
|
359
|
+
void
|
|
360
|
+
Ice::OutputStream::write(const vector<bool>& v)
|
|
277
361
|
{
|
|
362
|
+
auto sz = static_cast<int32_t>(v.size());
|
|
363
|
+
writeSize(sz);
|
|
364
|
+
if (sz > 0)
|
|
365
|
+
{
|
|
366
|
+
Container::size_type pos = b.size();
|
|
367
|
+
resize(pos + static_cast<size_t>(sz));
|
|
368
|
+
copy(v.begin(), v.end(), reinterpret_cast<uint8_t*>(b.begin()) + pos);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
278
371
|
|
|
279
|
-
|
|
280
|
-
struct WriteBoolHelper
|
|
372
|
+
namespace
|
|
281
373
|
{
|
|
282
|
-
|
|
374
|
+
template<size_t boolSize> struct WriteBoolHelper
|
|
283
375
|
{
|
|
284
|
-
|
|
376
|
+
static void
|
|
377
|
+
write(const bool* begin, OutputStream::Container::size_type pos, OutputStream::Container& b, int32_t sz)
|
|
285
378
|
{
|
|
286
|
-
|
|
379
|
+
for (size_t idx = 0; idx < static_cast<size_t>(sz); ++idx)
|
|
380
|
+
{
|
|
381
|
+
b[pos + idx] = static_cast<std::byte>(*(begin + idx));
|
|
382
|
+
}
|
|
287
383
|
}
|
|
288
|
-
}
|
|
289
|
-
};
|
|
384
|
+
};
|
|
290
385
|
|
|
291
|
-
template<>
|
|
292
|
-
struct WriteBoolHelper<1>
|
|
293
|
-
{
|
|
294
|
-
static void write(const bool* begin, OutputStream::Container::size_type pos, OutputStream::Container& b, Int sz)
|
|
386
|
+
template<> struct WriteBoolHelper<1>
|
|
295
387
|
{
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
388
|
+
static void
|
|
389
|
+
write(const bool* begin, OutputStream::Container::size_type pos, OutputStream::Container& b, int32_t sz)
|
|
390
|
+
{
|
|
391
|
+
memcpy(&b[pos], begin, static_cast<size_t>(sz));
|
|
392
|
+
}
|
|
393
|
+
};
|
|
300
394
|
}
|
|
301
395
|
|
|
302
396
|
void
|
|
303
397
|
Ice::OutputStream::write(const bool* begin, const bool* end)
|
|
304
398
|
{
|
|
305
|
-
|
|
399
|
+
auto sz = static_cast<int32_t>(end - begin);
|
|
306
400
|
writeSize(sz);
|
|
307
|
-
if(sz > 0)
|
|
401
|
+
if (sz > 0)
|
|
308
402
|
{
|
|
309
403
|
Container::size_type pos = b.size();
|
|
310
404
|
resize(pos + static_cast<size_t>(sz));
|
|
@@ -313,234 +407,282 @@ Ice::OutputStream::write(const bool* begin, const bool* end)
|
|
|
313
407
|
}
|
|
314
408
|
|
|
315
409
|
void
|
|
316
|
-
Ice::OutputStream::write(
|
|
410
|
+
Ice::OutputStream::write(int16_t v)
|
|
317
411
|
{
|
|
318
412
|
Container::size_type pos = b.size();
|
|
319
|
-
resize(pos + sizeof(
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
413
|
+
resize(pos + sizeof(int16_t));
|
|
414
|
+
byte* dest = &b[pos];
|
|
415
|
+
if constexpr (endian::native == endian::big)
|
|
416
|
+
{
|
|
417
|
+
const byte* src = reinterpret_cast<const byte*>(&v) + sizeof(int16_t) - 1;
|
|
418
|
+
*dest++ = *src--;
|
|
419
|
+
*dest = *src;
|
|
420
|
+
}
|
|
421
|
+
else
|
|
422
|
+
{
|
|
423
|
+
const byte* src = reinterpret_cast<const byte*>(&v);
|
|
424
|
+
*dest++ = *src++;
|
|
425
|
+
*dest = *src;
|
|
426
|
+
}
|
|
330
427
|
}
|
|
331
428
|
|
|
332
429
|
void
|
|
333
|
-
Ice::OutputStream::write(const
|
|
430
|
+
Ice::OutputStream::write(const int16_t* begin, const int16_t* end)
|
|
334
431
|
{
|
|
335
|
-
|
|
432
|
+
auto sz = static_cast<int32_t>(end - begin);
|
|
336
433
|
writeSize(sz);
|
|
337
|
-
if(sz > 0)
|
|
434
|
+
if (sz > 0)
|
|
338
435
|
{
|
|
339
436
|
Container::size_type pos = b.size();
|
|
340
|
-
resize(pos + static_cast<size_t>(sz) * sizeof(
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
437
|
+
resize(pos + static_cast<size_t>(sz) * sizeof(int16_t));
|
|
438
|
+
if constexpr (endian::native == endian::big)
|
|
439
|
+
{
|
|
440
|
+
const byte* src = reinterpret_cast<const byte*>(begin) + sizeof(int16_t) - 1;
|
|
441
|
+
byte* dest = &(*(b.begin() + pos));
|
|
442
|
+
for (int j = 0; j < sz; ++j)
|
|
443
|
+
{
|
|
444
|
+
*dest++ = *src--;
|
|
445
|
+
*dest++ = *src--;
|
|
446
|
+
src += 2 * sizeof(int16_t);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
else
|
|
345
450
|
{
|
|
346
|
-
|
|
347
|
-
*dest++ = *src--;
|
|
348
|
-
src += 2 * sizeof(Short);
|
|
451
|
+
memcpy(&b[pos], reinterpret_cast<const byte*>(begin), static_cast<size_t>(sz) * sizeof(int16_t));
|
|
349
452
|
}
|
|
350
|
-
#else
|
|
351
|
-
memcpy(&b[pos], reinterpret_cast<const Byte*>(begin), static_cast<size_t>(sz) * sizeof(Short));
|
|
352
|
-
#endif
|
|
353
453
|
}
|
|
354
454
|
}
|
|
355
455
|
|
|
356
456
|
void
|
|
357
|
-
Ice::OutputStream::write(
|
|
457
|
+
Ice::OutputStream::write(int32_t v, Container::iterator dest)
|
|
358
458
|
{
|
|
359
|
-
|
|
459
|
+
if constexpr (endian::native == endian::big)
|
|
460
|
+
{
|
|
461
|
+
const std::byte* src = reinterpret_cast<const std::byte*>(&v) + sizeof(std::int32_t) - 1;
|
|
462
|
+
*dest++ = *src--;
|
|
463
|
+
*dest++ = *src--;
|
|
464
|
+
*dest++ = *src--;
|
|
465
|
+
*dest = *src;
|
|
466
|
+
}
|
|
467
|
+
else
|
|
468
|
+
{
|
|
469
|
+
auto src = reinterpret_cast<const std::byte*>(&v);
|
|
470
|
+
*dest++ = *src++;
|
|
471
|
+
*dest++ = *src++;
|
|
472
|
+
*dest++ = *src++;
|
|
473
|
+
*dest = *src;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
void
|
|
478
|
+
Ice::OutputStream::write(const int32_t* begin, const int32_t* end)
|
|
479
|
+
{
|
|
480
|
+
auto sz = static_cast<int32_t>(end - begin);
|
|
360
481
|
writeSize(sz);
|
|
361
|
-
if(sz > 0)
|
|
482
|
+
if (sz > 0)
|
|
362
483
|
{
|
|
363
484
|
Container::size_type pos = b.size();
|
|
364
|
-
resize(pos + static_cast<size_t>(sz) * sizeof(
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
485
|
+
resize(pos + static_cast<size_t>(sz) * sizeof(int32_t));
|
|
486
|
+
if constexpr (endian::native == endian::big)
|
|
487
|
+
{
|
|
488
|
+
const byte* src = reinterpret_cast<const byte*>(begin) + sizeof(int32_t) - 1;
|
|
489
|
+
byte* dest = &(*(b.begin() + pos));
|
|
490
|
+
for (int j = 0; j < sz; ++j)
|
|
491
|
+
{
|
|
492
|
+
*dest++ = *src--;
|
|
493
|
+
*dest++ = *src--;
|
|
494
|
+
*dest++ = *src--;
|
|
495
|
+
*dest++ = *src--;
|
|
496
|
+
src += 2 * sizeof(int32_t);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
else
|
|
369
500
|
{
|
|
370
|
-
|
|
371
|
-
*dest++ = *src--;
|
|
372
|
-
*dest++ = *src--;
|
|
373
|
-
*dest++ = *src--;
|
|
374
|
-
src += 2 * sizeof(Int);
|
|
501
|
+
memcpy(&b[pos], reinterpret_cast<const byte*>(begin), static_cast<size_t>(sz) * sizeof(int32_t));
|
|
375
502
|
}
|
|
376
|
-
#else
|
|
377
|
-
memcpy(&b[pos], reinterpret_cast<const Byte*>(begin), static_cast<size_t>(sz) * sizeof(Int));
|
|
378
|
-
#endif
|
|
379
503
|
}
|
|
380
504
|
}
|
|
381
505
|
|
|
382
506
|
void
|
|
383
|
-
Ice::OutputStream::write(
|
|
507
|
+
Ice::OutputStream::write(int64_t v)
|
|
384
508
|
{
|
|
385
509
|
Container::size_type pos = b.size();
|
|
386
|
-
resize(pos + sizeof(
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
510
|
+
resize(pos + sizeof(int64_t));
|
|
511
|
+
byte* dest = &b[pos];
|
|
512
|
+
if constexpr (endian::native == endian::big)
|
|
513
|
+
{
|
|
514
|
+
const byte* src = reinterpret_cast<const byte*>(&v) + sizeof(std::int64_t) - 1;
|
|
515
|
+
*dest++ = *src--;
|
|
516
|
+
*dest++ = *src--;
|
|
517
|
+
*dest++ = *src--;
|
|
518
|
+
*dest++ = *src--;
|
|
519
|
+
*dest++ = *src--;
|
|
520
|
+
*dest++ = *src--;
|
|
521
|
+
*dest++ = *src--;
|
|
522
|
+
*dest = *src;
|
|
523
|
+
}
|
|
524
|
+
else
|
|
525
|
+
{
|
|
526
|
+
const byte* src = reinterpret_cast<const byte*>(&v);
|
|
527
|
+
*dest++ = *src++;
|
|
528
|
+
*dest++ = *src++;
|
|
529
|
+
*dest++ = *src++;
|
|
530
|
+
*dest++ = *src++;
|
|
531
|
+
*dest++ = *src++;
|
|
532
|
+
*dest++ = *src++;
|
|
533
|
+
*dest++ = *src++;
|
|
534
|
+
*dest = *src;
|
|
535
|
+
}
|
|
409
536
|
}
|
|
410
537
|
|
|
411
538
|
void
|
|
412
|
-
Ice::OutputStream::write(const
|
|
539
|
+
Ice::OutputStream::write(const int64_t* begin, const int64_t* end)
|
|
413
540
|
{
|
|
414
|
-
|
|
541
|
+
auto sz = static_cast<int32_t>(end - begin);
|
|
415
542
|
writeSize(sz);
|
|
416
|
-
if(sz > 0)
|
|
543
|
+
if (sz > 0)
|
|
417
544
|
{
|
|
418
545
|
Container::size_type pos = b.size();
|
|
419
|
-
resize(pos + static_cast<size_t>(sz) * sizeof(
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
546
|
+
resize(pos + static_cast<size_t>(sz) * sizeof(int64_t));
|
|
547
|
+
if constexpr (endian::native == endian::big)
|
|
548
|
+
{
|
|
549
|
+
const byte* src = reinterpret_cast<const byte*>(begin) + sizeof(int64_t) - 1;
|
|
550
|
+
byte* dest = &(*(b.begin() + pos));
|
|
551
|
+
for (int j = 0; j < sz; ++j)
|
|
552
|
+
{
|
|
553
|
+
*dest++ = *src--;
|
|
554
|
+
*dest++ = *src--;
|
|
555
|
+
*dest++ = *src--;
|
|
556
|
+
*dest++ = *src--;
|
|
557
|
+
*dest++ = *src--;
|
|
558
|
+
*dest++ = *src--;
|
|
559
|
+
*dest++ = *src--;
|
|
560
|
+
*dest++ = *src--;
|
|
561
|
+
src += 2 * sizeof(int64_t);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
else
|
|
424
565
|
{
|
|
425
|
-
|
|
426
|
-
*dest++ = *src--;
|
|
427
|
-
*dest++ = *src--;
|
|
428
|
-
*dest++ = *src--;
|
|
429
|
-
*dest++ = *src--;
|
|
430
|
-
*dest++ = *src--;
|
|
431
|
-
*dest++ = *src--;
|
|
432
|
-
*dest++ = *src--;
|
|
433
|
-
src += 2 * sizeof(Long);
|
|
566
|
+
memcpy(&b[pos], reinterpret_cast<const byte*>(begin), static_cast<size_t>(sz) * sizeof(int64_t));
|
|
434
567
|
}
|
|
435
|
-
#else
|
|
436
|
-
memcpy(&b[pos], reinterpret_cast<const Byte*>(begin), static_cast<size_t>(sz) * sizeof(Long));
|
|
437
|
-
#endif
|
|
438
568
|
}
|
|
439
569
|
}
|
|
440
570
|
|
|
441
571
|
void
|
|
442
|
-
Ice::OutputStream::write(
|
|
572
|
+
Ice::OutputStream::write(float v)
|
|
443
573
|
{
|
|
444
574
|
Container::size_type pos = b.size();
|
|
445
|
-
resize(pos + sizeof(
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
575
|
+
resize(pos + sizeof(float));
|
|
576
|
+
byte* dest = &b[pos];
|
|
577
|
+
if constexpr (endian::native == endian::big)
|
|
578
|
+
{
|
|
579
|
+
const byte* src = reinterpret_cast<const byte*>(&v) + sizeof(float) - 1;
|
|
580
|
+
*dest++ = *src--;
|
|
581
|
+
*dest++ = *src--;
|
|
582
|
+
*dest++ = *src--;
|
|
583
|
+
*dest = *src;
|
|
584
|
+
}
|
|
585
|
+
else
|
|
586
|
+
{
|
|
587
|
+
const byte* src = reinterpret_cast<const byte*>(&v);
|
|
588
|
+
*dest++ = *src++;
|
|
589
|
+
*dest++ = *src++;
|
|
590
|
+
*dest++ = *src++;
|
|
591
|
+
*dest = *src;
|
|
592
|
+
}
|
|
460
593
|
}
|
|
461
594
|
|
|
462
595
|
void
|
|
463
|
-
Ice::OutputStream::write(const
|
|
596
|
+
Ice::OutputStream::write(const float* begin, const float* end)
|
|
464
597
|
{
|
|
465
|
-
|
|
598
|
+
auto sz = static_cast<int32_t>(end - begin);
|
|
466
599
|
writeSize(sz);
|
|
467
|
-
if(sz > 0)
|
|
600
|
+
if (sz > 0)
|
|
468
601
|
{
|
|
469
602
|
Container::size_type pos = b.size();
|
|
470
|
-
resize(pos + static_cast<size_t>(sz) * sizeof(
|
|
471
|
-
|
|
472
|
-
const Byte* src = reinterpret_cast<const Byte*>(begin) + sizeof(Float) - 1;
|
|
473
|
-
Byte* dest = &(*(b.begin() + pos));
|
|
474
|
-
for(int j = 0 ; j < sz ; ++j)
|
|
603
|
+
resize(pos + static_cast<size_t>(sz) * sizeof(float));
|
|
604
|
+
if constexpr (endian::native == endian::big)
|
|
475
605
|
{
|
|
476
|
-
*
|
|
477
|
-
*dest
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
606
|
+
const byte* src = reinterpret_cast<const byte*>(begin) + sizeof(float) - 1;
|
|
607
|
+
byte* dest = &(*(b.begin() + pos));
|
|
608
|
+
for (int j = 0; j < sz; ++j)
|
|
609
|
+
{
|
|
610
|
+
*dest++ = *src--;
|
|
611
|
+
*dest++ = *src--;
|
|
612
|
+
*dest++ = *src--;
|
|
613
|
+
*dest++ = *src--;
|
|
614
|
+
src += 2 * sizeof(float);
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
else
|
|
618
|
+
{
|
|
619
|
+
memcpy(&b[pos], reinterpret_cast<const byte*>(begin), static_cast<size_t>(sz) * sizeof(float));
|
|
481
620
|
}
|
|
482
|
-
#else
|
|
483
|
-
memcpy(&b[pos], reinterpret_cast<const Byte*>(begin), static_cast<size_t>(sz) * sizeof(Float));
|
|
484
|
-
#endif
|
|
485
621
|
}
|
|
486
622
|
}
|
|
487
623
|
|
|
488
624
|
void
|
|
489
|
-
Ice::OutputStream::write(
|
|
625
|
+
Ice::OutputStream::write(double v)
|
|
490
626
|
{
|
|
491
627
|
Container::size_type pos = b.size();
|
|
492
|
-
resize(pos + sizeof(
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
628
|
+
resize(pos + sizeof(double));
|
|
629
|
+
byte* dest = &b[pos];
|
|
630
|
+
if constexpr (endian::native == endian::big)
|
|
631
|
+
{
|
|
632
|
+
const byte* src = reinterpret_cast<const byte*>(&v) + sizeof(double) - 1;
|
|
633
|
+
*dest++ = *src--;
|
|
634
|
+
*dest++ = *src--;
|
|
635
|
+
*dest++ = *src--;
|
|
636
|
+
*dest++ = *src--;
|
|
637
|
+
*dest++ = *src--;
|
|
638
|
+
*dest++ = *src--;
|
|
639
|
+
*dest++ = *src--;
|
|
640
|
+
*dest = *src;
|
|
641
|
+
}
|
|
642
|
+
else
|
|
643
|
+
{
|
|
644
|
+
const byte* src = reinterpret_cast<const byte*>(&v);
|
|
645
|
+
*dest++ = *src++;
|
|
646
|
+
*dest++ = *src++;
|
|
647
|
+
*dest++ = *src++;
|
|
648
|
+
*dest++ = *src++;
|
|
649
|
+
*dest++ = *src++;
|
|
650
|
+
*dest++ = *src++;
|
|
651
|
+
*dest++ = *src++;
|
|
652
|
+
*dest = *src;
|
|
653
|
+
}
|
|
515
654
|
}
|
|
516
655
|
|
|
517
656
|
void
|
|
518
|
-
Ice::OutputStream::write(const
|
|
657
|
+
Ice::OutputStream::write(const double* begin, const double* end)
|
|
519
658
|
{
|
|
520
|
-
|
|
659
|
+
auto sz = static_cast<int32_t>(end - begin);
|
|
521
660
|
writeSize(sz);
|
|
522
|
-
if(sz > 0)
|
|
661
|
+
if (sz > 0)
|
|
523
662
|
{
|
|
524
663
|
Container::size_type pos = b.size();
|
|
525
|
-
resize(pos + static_cast<size_t>(sz) * sizeof(
|
|
526
|
-
|
|
527
|
-
const Byte* src = reinterpret_cast<const Byte*>(begin) + sizeof(Double) - 1;
|
|
528
|
-
Byte* dest = &(*(b.begin() + pos));
|
|
529
|
-
for(int j = 0 ; j < sz ; ++j)
|
|
664
|
+
resize(pos + static_cast<size_t>(sz) * sizeof(double));
|
|
665
|
+
if constexpr (endian::native == endian::big)
|
|
530
666
|
{
|
|
531
|
-
*
|
|
532
|
-
*dest
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
667
|
+
const byte* src = reinterpret_cast<const byte*>(begin) + sizeof(double) - 1;
|
|
668
|
+
byte* dest = &(*(b.begin() + pos));
|
|
669
|
+
for (int j = 0; j < sz; ++j)
|
|
670
|
+
{
|
|
671
|
+
*dest++ = *src--;
|
|
672
|
+
*dest++ = *src--;
|
|
673
|
+
*dest++ = *src--;
|
|
674
|
+
*dest++ = *src--;
|
|
675
|
+
*dest++ = *src--;
|
|
676
|
+
*dest++ = *src--;
|
|
677
|
+
*dest++ = *src--;
|
|
678
|
+
*dest++ = *src--;
|
|
679
|
+
src += 2 * sizeof(double);
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
else
|
|
683
|
+
{
|
|
684
|
+
memcpy(&b[pos], reinterpret_cast<const byte*>(begin), static_cast<size_t>(sz) * sizeof(double));
|
|
540
685
|
}
|
|
541
|
-
#else
|
|
542
|
-
memcpy(&b[pos], reinterpret_cast<const Byte*>(begin), static_cast<size_t>(sz) * sizeof(Double));
|
|
543
|
-
#endif
|
|
544
686
|
}
|
|
545
687
|
}
|
|
546
688
|
|
|
@@ -561,103 +703,76 @@ Ice::OutputStream::write(const char*)
|
|
|
561
703
|
void
|
|
562
704
|
Ice::OutputStream::writeConverted(const char* vdata, size_t vsize)
|
|
563
705
|
{
|
|
706
|
+
StringConverterPtr stringConverter = _stringConverter;
|
|
707
|
+
if (!stringConverter)
|
|
708
|
+
{
|
|
709
|
+
stringConverter = getProcessStringConverter();
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
if (!stringConverter)
|
|
713
|
+
{
|
|
714
|
+
// No converter installed; write the string as-is (assumed to be UTF-8 already).
|
|
715
|
+
writeSize(static_cast<int32_t>(vsize));
|
|
716
|
+
Container::size_type position = b.size();
|
|
717
|
+
resize(position + vsize);
|
|
718
|
+
memcpy(&b[position], vdata, vsize);
|
|
719
|
+
return;
|
|
720
|
+
}
|
|
721
|
+
|
|
564
722
|
//
|
|
565
|
-
//
|
|
566
|
-
//
|
|
567
|
-
//
|
|
723
|
+
// Convert the narrow string to UTF-8 using the string converter and write the result to the stream.
|
|
724
|
+
//
|
|
725
|
+
// The worst-case expansion for converting a narrow string to UTF-8 is 3x (e.g., a single byte in Shift_JIS can
|
|
726
|
+
// expand to 3 bytes in UTF-8). We use this upper bound to decide the size encoding:
|
|
727
|
+
// - If vsize <= 254 / 3 (84), the converted string is at most 252 bytes, which always fits in a 1-byte size.
|
|
728
|
+
// - Otherwise, we use the 5-byte size encoding to avoid guessing and memmove fixups.
|
|
568
729
|
//
|
|
569
730
|
try
|
|
570
731
|
{
|
|
571
|
-
|
|
572
|
-
writeSize(guessedSize); // writeSize() only writes the size; it does not reserve any buffer space.
|
|
573
|
-
|
|
574
|
-
size_t firstIndex = b.size();
|
|
575
|
-
StreamUTF8BufferI buffer(*this);
|
|
576
|
-
|
|
577
|
-
Byte* lastByte = ICE_NULLPTR;
|
|
578
|
-
bool converted = false;
|
|
579
|
-
if(_instance)
|
|
580
|
-
{
|
|
581
|
-
const StringConverterPtr& stringConverter = _instance->getStringConverter();
|
|
582
|
-
if(stringConverter)
|
|
583
|
-
{
|
|
584
|
-
lastByte = stringConverter->toUTF8(vdata, vdata + vsize, buffer);
|
|
585
|
-
converted = true;
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
else
|
|
732
|
+
if (vsize <= 254 / 3)
|
|
589
733
|
{
|
|
590
|
-
|
|
591
|
-
|
|
734
|
+
// The maximum UTF-8 size is vsize * 3 <= 252, which fits in a 1-byte size encoding.
|
|
735
|
+
auto sizePos = startOneByteSize();
|
|
736
|
+
|
|
737
|
+
StreamUTF8BufferI buffer(*this);
|
|
738
|
+
byte* lastByte = stringConverter->toUTF8(vdata, vdata + vsize, buffer);
|
|
739
|
+
if (lastByte != b.end())
|
|
592
740
|
{
|
|
593
|
-
lastByte
|
|
594
|
-
converted = true;
|
|
741
|
+
resize(static_cast<size_t>(lastByte - b.begin()));
|
|
595
742
|
}
|
|
596
|
-
}
|
|
597
743
|
|
|
598
|
-
|
|
599
|
-
{
|
|
600
|
-
Container::size_type position = b.size();
|
|
601
|
-
resize(position + vsize);
|
|
602
|
-
memcpy(&b[position], vdata, vsize);
|
|
603
|
-
return;
|
|
744
|
+
endOneByteSize(sizePos);
|
|
604
745
|
}
|
|
605
|
-
|
|
606
|
-
if(lastByte != b.end())
|
|
746
|
+
else
|
|
607
747
|
{
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
748
|
+
// Write the first byte of the 5-byte size encoding, followed by a 4-byte size placeholder.
|
|
749
|
+
write(uint8_t(255));
|
|
750
|
+
auto sizePos = startSize();
|
|
611
751
|
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
// Check against the guess
|
|
616
|
-
//
|
|
617
|
-
if(guessedSize != actualSize)
|
|
618
|
-
{
|
|
619
|
-
if(guessedSize <= 254 && actualSize > 254)
|
|
752
|
+
StreamUTF8BufferI buffer(*this);
|
|
753
|
+
byte* lastByte = stringConverter->toUTF8(vdata, vdata + vsize, buffer);
|
|
754
|
+
if (lastByte != b.end())
|
|
620
755
|
{
|
|
621
|
-
|
|
622
|
-
// Move the UTF-8 sequence 4 bytes further
|
|
623
|
-
// Use memmove instead of memcpy since the source and destination typically overlap.
|
|
624
|
-
//
|
|
625
|
-
resize(b.size() + 4);
|
|
626
|
-
memmove(b.begin() + firstIndex + 4, b.begin() + firstIndex, static_cast<size_t>(actualSize));
|
|
627
|
-
}
|
|
628
|
-
else if(guessedSize > 254 && actualSize <= 254)
|
|
629
|
-
{
|
|
630
|
-
//
|
|
631
|
-
// Move the UTF-8 sequence 4 bytes back
|
|
632
|
-
//
|
|
633
|
-
memmove(b.begin() + firstIndex - 4, b.begin() + firstIndex, static_cast<size_t>(actualSize));
|
|
634
|
-
resize(b.size() - 4);
|
|
756
|
+
resize(static_cast<size_t>(lastByte - b.begin()));
|
|
635
757
|
}
|
|
636
758
|
|
|
637
|
-
|
|
638
|
-
{
|
|
639
|
-
rewriteSize(actualSize, b.begin() + firstIndex - 1);
|
|
640
|
-
}
|
|
641
|
-
else
|
|
642
|
-
{
|
|
643
|
-
rewriteSize(actualSize, b.begin() + firstIndex - 1 - 4);
|
|
644
|
-
}
|
|
759
|
+
endSize(sizePos);
|
|
645
760
|
}
|
|
646
761
|
}
|
|
647
|
-
catch(const
|
|
762
|
+
catch (const Ice::IllegalConversionException& ex)
|
|
648
763
|
{
|
|
649
|
-
throw
|
|
764
|
+
throw MarshalException{__FILE__, __LINE__, string{"failed to marshal a string:\n"} + ex.what()};
|
|
650
765
|
}
|
|
651
766
|
}
|
|
652
767
|
|
|
653
768
|
void
|
|
654
769
|
Ice::OutputStream::write(const string* begin, const string* end, bool convert)
|
|
655
770
|
{
|
|
656
|
-
|
|
771
|
+
auto sz = static_cast<int32_t>(end - begin);
|
|
657
772
|
writeSize(sz);
|
|
658
|
-
if(sz > 0)
|
|
773
|
+
if (sz > 0)
|
|
659
774
|
{
|
|
660
|
-
for(int j = 0; j < sz; ++j)
|
|
775
|
+
for (int j = 0; j < sz; ++j)
|
|
661
776
|
{
|
|
662
777
|
write(begin[j], convert);
|
|
663
778
|
}
|
|
@@ -665,9 +780,9 @@ Ice::OutputStream::write(const string* begin, const string* end, bool convert)
|
|
|
665
780
|
}
|
|
666
781
|
|
|
667
782
|
void
|
|
668
|
-
Ice::OutputStream::write(
|
|
783
|
+
Ice::OutputStream::write(wstring_view v)
|
|
669
784
|
{
|
|
670
|
-
if(v.empty())
|
|
785
|
+
if (v.empty())
|
|
671
786
|
{
|
|
672
787
|
writeSize(0);
|
|
673
788
|
return;
|
|
@@ -680,38 +795,36 @@ Ice::OutputStream::write(const wstring& v)
|
|
|
680
795
|
//
|
|
681
796
|
try
|
|
682
797
|
{
|
|
683
|
-
|
|
798
|
+
auto guessedSize = static_cast<int32_t>(v.size());
|
|
684
799
|
writeSize(guessedSize); // writeSize() only writes the size; it does not reserve any buffer space.
|
|
685
800
|
|
|
686
801
|
size_t firstIndex = b.size();
|
|
687
802
|
StreamUTF8BufferI buffer(*this);
|
|
688
803
|
|
|
689
|
-
|
|
804
|
+
byte* lastByte = nullptr;
|
|
690
805
|
|
|
691
|
-
|
|
692
|
-
if(
|
|
806
|
+
WstringConverterPtr wstringConverter = _wstringConverter;
|
|
807
|
+
if (!wstringConverter)
|
|
693
808
|
{
|
|
694
|
-
|
|
695
|
-
}
|
|
696
|
-
else
|
|
697
|
-
{
|
|
698
|
-
lastByte = getProcessWstringConverter()->toUTF8(v.data(), v.data() + v.size(), buffer);
|
|
809
|
+
wstringConverter = getProcessWstringConverter();
|
|
699
810
|
}
|
|
811
|
+
assert(wstringConverter); // never null
|
|
812
|
+
lastByte = wstringConverter->toUTF8(v.data(), v.data() + v.size(), buffer);
|
|
700
813
|
|
|
701
|
-
if(lastByte != b.end())
|
|
814
|
+
if (lastByte != b.end())
|
|
702
815
|
{
|
|
703
816
|
resize(static_cast<size_t>(lastByte - b.begin()));
|
|
704
817
|
}
|
|
705
818
|
size_t lastIndex = b.size();
|
|
706
819
|
|
|
707
|
-
|
|
820
|
+
auto actualSize = static_cast<int32_t>(lastIndex - firstIndex);
|
|
708
821
|
|
|
709
822
|
//
|
|
710
823
|
// Check against the guess
|
|
711
824
|
//
|
|
712
|
-
if(guessedSize != actualSize)
|
|
825
|
+
if (guessedSize != actualSize)
|
|
713
826
|
{
|
|
714
|
-
if(guessedSize <= 254 && actualSize > 254)
|
|
827
|
+
if (guessedSize <= 254 && actualSize > 254)
|
|
715
828
|
{
|
|
716
829
|
//
|
|
717
830
|
// Move the UTF-8 sequence 4 bytes further
|
|
@@ -720,7 +833,7 @@ Ice::OutputStream::write(const wstring& v)
|
|
|
720
833
|
resize(b.size() + 4);
|
|
721
834
|
memmove(b.begin() + firstIndex + 4, b.begin() + firstIndex, static_cast<size_t>(actualSize));
|
|
722
835
|
}
|
|
723
|
-
else if(guessedSize > 254 && actualSize <= 254)
|
|
836
|
+
else if (guessedSize > 254 && actualSize <= 254)
|
|
724
837
|
{
|
|
725
838
|
//
|
|
726
839
|
// Move the UTF-8 sequence 4 bytes back
|
|
@@ -729,7 +842,7 @@ Ice::OutputStream::write(const wstring& v)
|
|
|
729
842
|
resize(b.size() - 4);
|
|
730
843
|
}
|
|
731
844
|
|
|
732
|
-
if(guessedSize <= 254)
|
|
845
|
+
if (guessedSize <= 254)
|
|
733
846
|
{
|
|
734
847
|
rewriteSize(actualSize, b.begin() + firstIndex - 1);
|
|
735
848
|
}
|
|
@@ -739,20 +852,20 @@ Ice::OutputStream::write(const wstring& v)
|
|
|
739
852
|
}
|
|
740
853
|
}
|
|
741
854
|
}
|
|
742
|
-
catch(const
|
|
855
|
+
catch (const Ice::IllegalConversionException& ex)
|
|
743
856
|
{
|
|
744
|
-
throw
|
|
857
|
+
throw MarshalException{__FILE__, __LINE__, string{"failed to marshal a string:\n"} + ex.what()};
|
|
745
858
|
}
|
|
746
859
|
}
|
|
747
860
|
|
|
748
861
|
void
|
|
749
862
|
Ice::OutputStream::write(const wstring* begin, const wstring* end)
|
|
750
863
|
{
|
|
751
|
-
|
|
864
|
+
auto sz = static_cast<int32_t>(end - begin);
|
|
752
865
|
writeSize(sz);
|
|
753
|
-
if(sz > 0)
|
|
866
|
+
if (sz > 0)
|
|
754
867
|
{
|
|
755
|
-
for(int j = 0; j < sz; ++j)
|
|
868
|
+
for (int j = 0; j < sz; ++j)
|
|
756
869
|
{
|
|
757
870
|
write(begin[j]);
|
|
758
871
|
}
|
|
@@ -760,35 +873,30 @@ Ice::OutputStream::write(const wstring* begin, const wstring* end)
|
|
|
760
873
|
}
|
|
761
874
|
|
|
762
875
|
void
|
|
763
|
-
|
|
764
|
-
Ice::OutputStream::writeProxy(const shared_ptr<ObjectPrx>& v)
|
|
765
|
-
#else
|
|
766
|
-
Ice::OutputStream::write(const ObjectPrx& v)
|
|
767
|
-
#endif
|
|
876
|
+
Ice::OutputStream::writeProxy(const ObjectPrx& v)
|
|
768
877
|
{
|
|
769
|
-
|
|
770
|
-
{
|
|
771
|
-
v->_write(*this);
|
|
772
|
-
}
|
|
773
|
-
else
|
|
774
|
-
{
|
|
775
|
-
Identity ident;
|
|
776
|
-
write(ident);
|
|
777
|
-
}
|
|
878
|
+
v->_write(*this);
|
|
778
879
|
}
|
|
779
880
|
|
|
780
881
|
void
|
|
781
|
-
Ice::OutputStream::
|
|
882
|
+
Ice::OutputStream::writeNullProxy()
|
|
782
883
|
{
|
|
783
|
-
|
|
884
|
+
Identity ident;
|
|
885
|
+
write(ident);
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
void
|
|
889
|
+
Ice::OutputStream::writeEnum(int32_t v, int32_t maxValue)
|
|
890
|
+
{
|
|
891
|
+
if (getEncoding() == Encoding_1_0)
|
|
784
892
|
{
|
|
785
|
-
if(maxValue < 127)
|
|
893
|
+
if (maxValue < 127)
|
|
786
894
|
{
|
|
787
|
-
write(static_cast<
|
|
895
|
+
write(static_cast<uint8_t>(v));
|
|
788
896
|
}
|
|
789
|
-
else if(maxValue < 32767)
|
|
897
|
+
else if (maxValue < 32767)
|
|
790
898
|
{
|
|
791
|
-
write(static_cast<
|
|
899
|
+
write(static_cast<int16_t>(v));
|
|
792
900
|
}
|
|
793
901
|
else
|
|
794
902
|
{
|
|
@@ -805,21 +913,23 @@ void
|
|
|
805
913
|
Ice::OutputStream::writeException(const UserException& e)
|
|
806
914
|
{
|
|
807
915
|
initEncaps();
|
|
916
|
+
// Exceptions are always encoded with the sliced format.
|
|
917
|
+
_currentEncaps->format = FormatType::SlicedFormat;
|
|
808
918
|
_currentEncaps->encoder->write(e);
|
|
809
919
|
}
|
|
810
920
|
|
|
811
921
|
bool
|
|
812
|
-
Ice::OutputStream::writeOptImpl(
|
|
922
|
+
Ice::OutputStream::writeOptImpl(int32_t tag, OptionalFormat type)
|
|
813
923
|
{
|
|
814
|
-
if(getEncoding() == Encoding_1_0)
|
|
924
|
+
if (getEncoding() == Encoding_1_0)
|
|
815
925
|
{
|
|
816
926
|
return false; // Optional members aren't supported with the 1.0 encoding.
|
|
817
927
|
}
|
|
818
928
|
|
|
819
|
-
|
|
820
|
-
if(tag < 30)
|
|
929
|
+
auto v = static_cast<uint8_t>(type);
|
|
930
|
+
if (tag < 30)
|
|
821
931
|
{
|
|
822
|
-
v |= static_cast<
|
|
932
|
+
v |= static_cast<uint8_t>(tag << 3);
|
|
823
933
|
write(v);
|
|
824
934
|
}
|
|
825
935
|
else
|
|
@@ -832,48 +942,37 @@ Ice::OutputStream::writeOptImpl(Int tag, OptionalFormat type)
|
|
|
832
942
|
}
|
|
833
943
|
|
|
834
944
|
void
|
|
835
|
-
Ice::OutputStream::finished(vector<
|
|
945
|
+
Ice::OutputStream::finished(vector<byte>& bytes)
|
|
836
946
|
{
|
|
837
|
-
vector<
|
|
947
|
+
vector<byte>(b.begin(), b.end()).swap(bytes);
|
|
838
948
|
}
|
|
839
949
|
|
|
840
|
-
pair<const
|
|
950
|
+
pair<const byte*, const byte*>
|
|
841
951
|
Ice::OutputStream::finished()
|
|
842
952
|
{
|
|
843
|
-
if(b.empty())
|
|
953
|
+
if (b.empty())
|
|
844
954
|
{
|
|
845
|
-
return
|
|
955
|
+
return {nullptr, nullptr};
|
|
846
956
|
}
|
|
847
957
|
else
|
|
848
958
|
{
|
|
849
|
-
return
|
|
959
|
+
return {&b[0], &b[0] + b.size()};
|
|
850
960
|
}
|
|
851
961
|
}
|
|
852
962
|
|
|
853
|
-
void
|
|
854
|
-
Ice::OutputStream::throwEncapsulationException(const char* file, int line)
|
|
855
|
-
{
|
|
856
|
-
throw EncapsulationException(file, line);
|
|
857
|
-
}
|
|
858
|
-
|
|
859
963
|
void
|
|
860
964
|
Ice::OutputStream::initEncaps()
|
|
861
965
|
{
|
|
862
|
-
if(!_currentEncaps) // Lazy initialization.
|
|
966
|
+
if (!_currentEncaps) // Lazy initialization.
|
|
863
967
|
{
|
|
864
968
|
_currentEncaps = &_preAllocatedEncaps;
|
|
865
969
|
_currentEncaps->start = b.size();
|
|
866
970
|
_currentEncaps->encoding = _encoding;
|
|
867
971
|
}
|
|
868
972
|
|
|
869
|
-
if(_currentEncaps->
|
|
973
|
+
if (!_currentEncaps->encoder) // Lazy initialization.
|
|
870
974
|
{
|
|
871
|
-
_currentEncaps->
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
if(!_currentEncaps->encoder) // Lazy initialization.
|
|
875
|
-
{
|
|
876
|
-
if(_currentEncaps->encoding == Encoding_1_0)
|
|
975
|
+
if (_currentEncaps->encoding == Encoding_1_0)
|
|
877
976
|
{
|
|
878
977
|
_currentEncaps->encoder = new EncapsEncoder10(this, _currentEncaps);
|
|
879
978
|
}
|
|
@@ -884,33 +983,31 @@ Ice::OutputStream::initEncaps()
|
|
|
884
983
|
}
|
|
885
984
|
}
|
|
886
985
|
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
// Out of line to avoid weak vtable
|
|
890
|
-
}
|
|
986
|
+
// Out of line to avoid weak vtable
|
|
987
|
+
Ice::OutputStream::EncapsEncoder::~EncapsEncoder() = default;
|
|
891
988
|
|
|
892
|
-
|
|
893
|
-
Ice::OutputStream::EncapsEncoder::registerTypeId(
|
|
989
|
+
int32_t
|
|
990
|
+
Ice::OutputStream::EncapsEncoder::registerTypeId(string_view typeId)
|
|
894
991
|
{
|
|
895
|
-
|
|
896
|
-
if(p != _typeIdMap.end())
|
|
992
|
+
auto p = _typeIdMap.find(typeId);
|
|
993
|
+
if (p != _typeIdMap.end())
|
|
897
994
|
{
|
|
898
995
|
return p->second;
|
|
899
996
|
}
|
|
900
997
|
else
|
|
901
998
|
{
|
|
902
|
-
_typeIdMap.insert(make_pair(typeId, ++_typeIdIndex));
|
|
999
|
+
_typeIdMap.insert(make_pair(string{typeId}, ++_typeIdIndex));
|
|
903
1000
|
return -1;
|
|
904
1001
|
}
|
|
905
1002
|
}
|
|
906
1003
|
|
|
907
1004
|
void
|
|
908
|
-
Ice::OutputStream::EncapsEncoder10::write(const
|
|
1005
|
+
Ice::OutputStream::EncapsEncoder10::write(const shared_ptr<Value>& v)
|
|
909
1006
|
{
|
|
910
1007
|
//
|
|
911
1008
|
// Object references are encoded as a negative integer in 1.0.
|
|
912
1009
|
//
|
|
913
|
-
if(v)
|
|
1010
|
+
if (v)
|
|
914
1011
|
{
|
|
915
1012
|
_stream->write(-registerValue(v));
|
|
916
1013
|
}
|
|
@@ -934,7 +1031,7 @@ Ice::OutputStream::EncapsEncoder10::write(const UserException& v)
|
|
|
934
1031
|
bool usesClasses = v._usesClasses();
|
|
935
1032
|
_stream->write(usesClasses);
|
|
936
1033
|
v._write(_stream);
|
|
937
|
-
if(usesClasses)
|
|
1034
|
+
if (usesClasses)
|
|
938
1035
|
{
|
|
939
1036
|
writePendingValues();
|
|
940
1037
|
}
|
|
@@ -949,12 +1046,12 @@ Ice::OutputStream::EncapsEncoder10::startInstance(SliceType sliceType, const Sli
|
|
|
949
1046
|
void
|
|
950
1047
|
Ice::OutputStream::EncapsEncoder10::endInstance()
|
|
951
1048
|
{
|
|
952
|
-
if(_sliceType == ValueSlice)
|
|
1049
|
+
if (_sliceType == ValueSlice)
|
|
953
1050
|
{
|
|
954
1051
|
//
|
|
955
1052
|
// Write the Object slice.
|
|
956
1053
|
//
|
|
957
|
-
startSlice(
|
|
1054
|
+
startSlice(Value::ice_staticId(), -1, true);
|
|
958
1055
|
_stream->writeSize(0); // For compatibility with the old AFM.
|
|
959
1056
|
endSlice();
|
|
960
1057
|
}
|
|
@@ -962,17 +1059,17 @@ Ice::OutputStream::EncapsEncoder10::endInstance()
|
|
|
962
1059
|
}
|
|
963
1060
|
|
|
964
1061
|
void
|
|
965
|
-
Ice::OutputStream::EncapsEncoder10::startSlice(
|
|
1062
|
+
Ice::OutputStream::EncapsEncoder10::startSlice(string_view typeId, int, bool /*last*/)
|
|
966
1063
|
{
|
|
967
1064
|
//
|
|
968
1065
|
// For instance slices, encode a boolean to indicate how the type ID
|
|
969
1066
|
// is encoded and the type ID either as a string or index. For
|
|
970
1067
|
// exception slices, always encode the type ID as a string.
|
|
971
1068
|
//
|
|
972
|
-
if(_sliceType == ValueSlice)
|
|
1069
|
+
if (_sliceType == ValueSlice)
|
|
973
1070
|
{
|
|
974
|
-
|
|
975
|
-
if(index < 0)
|
|
1071
|
+
int32_t index = registerTypeId(typeId);
|
|
1072
|
+
if (index < 0)
|
|
976
1073
|
{
|
|
977
1074
|
_stream->write(false);
|
|
978
1075
|
_stream->write(typeId, false);
|
|
@@ -988,7 +1085,7 @@ Ice::OutputStream::EncapsEncoder10::startSlice(const string& typeId, int, bool /
|
|
|
988
1085
|
_stream->write(typeId, false);
|
|
989
1086
|
}
|
|
990
1087
|
|
|
991
|
-
_stream->write(
|
|
1088
|
+
_stream->write(int32_t(0)); // Placeholder for the slice length.
|
|
992
1089
|
|
|
993
1090
|
_writeSlice = _stream->b.size();
|
|
994
1091
|
}
|
|
@@ -999,67 +1096,51 @@ Ice::OutputStream::EncapsEncoder10::endSlice()
|
|
|
999
1096
|
//
|
|
1000
1097
|
// Write the slice length.
|
|
1001
1098
|
//
|
|
1002
|
-
|
|
1003
|
-
|
|
1099
|
+
auto sz = static_cast<int32_t>(_stream->b.size() - _writeSlice + sizeof(int32_t));
|
|
1100
|
+
byte* dest = &(*(_stream->b.begin() + _writeSlice - sizeof(int32_t)));
|
|
1004
1101
|
_stream->write(sz, dest);
|
|
1005
1102
|
}
|
|
1006
1103
|
|
|
1007
1104
|
void
|
|
1008
1105
|
Ice::OutputStream::EncapsEncoder10::writePendingValues()
|
|
1009
1106
|
{
|
|
1010
|
-
while(!_toBeMarshaledMap.empty())
|
|
1107
|
+
while (!_toBeMarshaledMap.empty())
|
|
1011
1108
|
{
|
|
1012
1109
|
//
|
|
1013
|
-
// Consider the to be
|
|
1110
|
+
// Consider the to be marshaled instances as marshaled now,
|
|
1014
1111
|
// this is necessary to avoid adding again the "to be
|
|
1015
|
-
//
|
|
1112
|
+
// marshaled instances" into _toBeMarshaledMap while writing
|
|
1016
1113
|
// instances.
|
|
1017
1114
|
//
|
|
1018
1115
|
_marshaledMap.insert(_toBeMarshaledMap.begin(), _toBeMarshaledMap.end());
|
|
1019
1116
|
|
|
1020
1117
|
PtrToIndexMap savedMap;
|
|
1021
1118
|
savedMap.swap(_toBeMarshaledMap);
|
|
1022
|
-
_stream->writeSize(static_cast<
|
|
1023
|
-
for(
|
|
1119
|
+
_stream->writeSize(static_cast<int32_t>(savedMap.size()));
|
|
1120
|
+
for (const auto& entry : savedMap)
|
|
1024
1121
|
{
|
|
1025
|
-
//
|
|
1026
1122
|
// Ask the instance to marshal itself. Any new class
|
|
1027
1123
|
// instances that are triggered by the classes marshaled
|
|
1028
1124
|
// are added to toBeMarshaledMap.
|
|
1029
|
-
|
|
1030
|
-
_stream->write(p->second);
|
|
1125
|
+
_stream->write(entry.second);
|
|
1031
1126
|
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
p->first->ice_preMarshal();
|
|
1035
|
-
}
|
|
1036
|
-
catch(const std::exception& ex)
|
|
1037
|
-
{
|
|
1038
|
-
Warning out(_stream->instance()->initializationData().logger);
|
|
1039
|
-
out << "std::exception raised by ice_preMarshal:\n" << ex;
|
|
1040
|
-
}
|
|
1041
|
-
catch(...)
|
|
1042
|
-
{
|
|
1043
|
-
Warning out(_stream->instance()->initializationData().logger);
|
|
1044
|
-
out << "unknown exception raised by ice_preMarshal";
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
p->first->_iceWrite(_stream);
|
|
1127
|
+
entry.first->ice_preMarshal();
|
|
1128
|
+
entry.first->_iceWrite(_stream);
|
|
1048
1129
|
}
|
|
1049
1130
|
}
|
|
1050
1131
|
_stream->writeSize(0); // Zero marker indicates end of sequence of sequences of instances.
|
|
1051
1132
|
}
|
|
1052
1133
|
|
|
1053
|
-
|
|
1054
|
-
Ice::OutputStream::EncapsEncoder10::registerValue(const
|
|
1134
|
+
int32_t
|
|
1135
|
+
Ice::OutputStream::EncapsEncoder10::registerValue(const shared_ptr<Value>& v)
|
|
1055
1136
|
{
|
|
1056
1137
|
assert(v);
|
|
1057
1138
|
|
|
1058
1139
|
//
|
|
1059
1140
|
// Look for this instance in the to-be-marshaled map.
|
|
1060
1141
|
//
|
|
1061
|
-
|
|
1062
|
-
if(p != _toBeMarshaledMap.end())
|
|
1142
|
+
auto p = _toBeMarshaledMap.find(v);
|
|
1143
|
+
if (p != _toBeMarshaledMap.end())
|
|
1063
1144
|
{
|
|
1064
1145
|
return p->second;
|
|
1065
1146
|
}
|
|
@@ -1067,8 +1148,8 @@ Ice::OutputStream::EncapsEncoder10::registerValue(const ValuePtr& v)
|
|
|
1067
1148
|
//
|
|
1068
1149
|
// Didn't find it, try the marshaled map next.
|
|
1069
1150
|
//
|
|
1070
|
-
|
|
1071
|
-
if(q != _marshaledMap.end())
|
|
1151
|
+
auto q = _marshaledMap.find(v);
|
|
1152
|
+
if (q != _marshaledMap.end())
|
|
1072
1153
|
{
|
|
1073
1154
|
return q->second;
|
|
1074
1155
|
}
|
|
@@ -1082,13 +1163,13 @@ Ice::OutputStream::EncapsEncoder10::registerValue(const ValuePtr& v)
|
|
|
1082
1163
|
}
|
|
1083
1164
|
|
|
1084
1165
|
void
|
|
1085
|
-
Ice::OutputStream::EncapsEncoder11::write(const
|
|
1166
|
+
Ice::OutputStream::EncapsEncoder11::write(const shared_ptr<Value>& v)
|
|
1086
1167
|
{
|
|
1087
|
-
if(!v)
|
|
1168
|
+
if (!v)
|
|
1088
1169
|
{
|
|
1089
1170
|
_stream->writeSize(0); // Nil reference.
|
|
1090
1171
|
}
|
|
1091
|
-
else if(_current && _encaps->format ==
|
|
1172
|
+
else if (_current && _encaps->format == FormatType::SlicedFormat)
|
|
1092
1173
|
{
|
|
1093
1174
|
//
|
|
1094
1175
|
// If writing an instance within a slice and using the sliced
|
|
@@ -1097,11 +1178,11 @@ Ice::OutputStream::EncapsEncoder11::write(const ValuePtr& v)
|
|
|
1097
1178
|
// each slice and is always read (even if the Slice is
|
|
1098
1179
|
// unknown).
|
|
1099
1180
|
//
|
|
1100
|
-
|
|
1101
|
-
if(p == _current->indirectionMap.end())
|
|
1181
|
+
auto p = _current->indirectionMap.find(v);
|
|
1182
|
+
if (p == _current->indirectionMap.end())
|
|
1102
1183
|
{
|
|
1103
1184
|
_current->indirectionTable.push_back(v);
|
|
1104
|
-
|
|
1185
|
+
auto idx = static_cast<int32_t>(_current->indirectionTable.size()); // Position + 1 (0 is reserved for nil)
|
|
1105
1186
|
_current->indirectionMap.insert(make_pair(v, idx));
|
|
1106
1187
|
_stream->writeSize(idx);
|
|
1107
1188
|
}
|
|
@@ -1125,7 +1206,7 @@ Ice::OutputStream::EncapsEncoder11::write(const UserException& v)
|
|
|
1125
1206
|
void
|
|
1126
1207
|
Ice::OutputStream::EncapsEncoder11::startInstance(SliceType sliceType, const SlicedDataPtr& data)
|
|
1127
1208
|
{
|
|
1128
|
-
if(!_current)
|
|
1209
|
+
if (!_current)
|
|
1129
1210
|
{
|
|
1130
1211
|
_current = &_preAllocatedInstanceData;
|
|
1131
1212
|
}
|
|
@@ -1136,7 +1217,7 @@ Ice::OutputStream::EncapsEncoder11::startInstance(SliceType sliceType, const Sli
|
|
|
1136
1217
|
_current->sliceType = sliceType;
|
|
1137
1218
|
_current->firstSlice = true;
|
|
1138
1219
|
|
|
1139
|
-
if(data)
|
|
1220
|
+
if (data)
|
|
1140
1221
|
{
|
|
1141
1222
|
writeSlicedData(data);
|
|
1142
1223
|
}
|
|
@@ -1149,46 +1230,46 @@ Ice::OutputStream::EncapsEncoder11::endInstance()
|
|
|
1149
1230
|
}
|
|
1150
1231
|
|
|
1151
1232
|
void
|
|
1152
|
-
Ice::OutputStream::EncapsEncoder11::startSlice(
|
|
1233
|
+
Ice::OutputStream::EncapsEncoder11::startSlice(string_view typeId, int compactId, bool last)
|
|
1153
1234
|
{
|
|
1154
1235
|
assert(_current->indirectionTable.empty() && _current->indirectionMap.empty());
|
|
1155
1236
|
|
|
1156
1237
|
_current->sliceFlagsPos = _stream->b.size();
|
|
1157
1238
|
|
|
1158
1239
|
_current->sliceFlags = 0;
|
|
1159
|
-
if(_encaps->format ==
|
|
1240
|
+
if (_encaps->format == FormatType::SlicedFormat)
|
|
1160
1241
|
{
|
|
1161
1242
|
_current->sliceFlags |= FLAG_HAS_SLICE_SIZE; // Encode the slice size if using the sliced format.
|
|
1162
1243
|
}
|
|
1163
|
-
if(last)
|
|
1244
|
+
if (last)
|
|
1164
1245
|
{
|
|
1165
1246
|
_current->sliceFlags |= FLAG_IS_LAST_SLICE; // This is the last slice.
|
|
1166
1247
|
}
|
|
1167
1248
|
|
|
1168
|
-
_stream->write(
|
|
1249
|
+
_stream->write(std::uint8_t(0)); // Placeholder for the slice flags
|
|
1169
1250
|
|
|
1170
1251
|
//
|
|
1171
1252
|
// For instance slices, encode the flag and the type ID either as a
|
|
1172
1253
|
// string or index. For exception slices, always encode the type
|
|
1173
1254
|
// ID a string.
|
|
1174
1255
|
//
|
|
1175
|
-
if(_current->sliceType == ValueSlice)
|
|
1256
|
+
if (_current->sliceType == ValueSlice)
|
|
1176
1257
|
{
|
|
1177
1258
|
//
|
|
1178
1259
|
// Encode the type ID (only in the first slice for the compact
|
|
1179
1260
|
// encoding).
|
|
1180
1261
|
//
|
|
1181
|
-
if(_encaps->format ==
|
|
1262
|
+
if (_encaps->format == FormatType::SlicedFormat || _current->firstSlice)
|
|
1182
1263
|
{
|
|
1183
|
-
if(compactId
|
|
1264
|
+
if (compactId != -1)
|
|
1184
1265
|
{
|
|
1185
1266
|
_current->sliceFlags |= FLAG_HAS_TYPE_ID_COMPACT;
|
|
1186
1267
|
_stream->writeSize(compactId);
|
|
1187
1268
|
}
|
|
1188
1269
|
else
|
|
1189
1270
|
{
|
|
1190
|
-
|
|
1191
|
-
if(index < 0)
|
|
1271
|
+
int32_t index = registerTypeId(typeId);
|
|
1272
|
+
if (index < 0)
|
|
1192
1273
|
{
|
|
1193
1274
|
_current->sliceFlags |= FLAG_HAS_TYPE_ID_STRING;
|
|
1194
1275
|
_stream->write(typeId, false);
|
|
@@ -1206,9 +1287,9 @@ Ice::OutputStream::EncapsEncoder11::startSlice(const string& typeId, int compact
|
|
|
1206
1287
|
_stream->write(typeId, false);
|
|
1207
1288
|
}
|
|
1208
1289
|
|
|
1209
|
-
if(_current->sliceFlags & FLAG_HAS_SLICE_SIZE)
|
|
1290
|
+
if (_current->sliceFlags & FLAG_HAS_SLICE_SIZE)
|
|
1210
1291
|
{
|
|
1211
|
-
_stream->write(
|
|
1292
|
+
_stream->write(int32_t(0)); // Placeholder for the slice length.
|
|
1212
1293
|
}
|
|
1213
1294
|
|
|
1214
1295
|
_current->writeSlice = _stream->b.size();
|
|
@@ -1223,7 +1304,7 @@ Ice::OutputStream::EncapsEncoder11::endSlice()
|
|
|
1223
1304
|
// were encoded. Note that the optional members are encoded before
|
|
1224
1305
|
// the indirection table and are included in the slice size.
|
|
1225
1306
|
//
|
|
1226
|
-
if(_current->sliceFlags & FLAG_HAS_OPTIONAL_MEMBERS)
|
|
1307
|
+
if (_current->sliceFlags & FLAG_HAS_OPTIONAL_MEMBERS)
|
|
1227
1308
|
{
|
|
1228
1309
|
_stream->write(OPTIONAL_END_MARKER);
|
|
1229
1310
|
}
|
|
@@ -1231,27 +1312,27 @@ Ice::OutputStream::EncapsEncoder11::endSlice()
|
|
|
1231
1312
|
//
|
|
1232
1313
|
// Write the slice length if necessary.
|
|
1233
1314
|
//
|
|
1234
|
-
if(_current->sliceFlags & FLAG_HAS_SLICE_SIZE)
|
|
1315
|
+
if (_current->sliceFlags & FLAG_HAS_SLICE_SIZE)
|
|
1235
1316
|
{
|
|
1236
|
-
|
|
1237
|
-
|
|
1317
|
+
auto sz = static_cast<int32_t>(_stream->b.size() - _current->writeSlice + sizeof(int32_t));
|
|
1318
|
+
byte* dest = &(*(_stream->b.begin() + _current->writeSlice - sizeof(int32_t)));
|
|
1238
1319
|
_stream->write(sz, dest);
|
|
1239
1320
|
}
|
|
1240
1321
|
|
|
1241
1322
|
//
|
|
1242
1323
|
// Only write the indirection table if it contains entries.
|
|
1243
1324
|
//
|
|
1244
|
-
if(!_current->indirectionTable.empty())
|
|
1325
|
+
if (!_current->indirectionTable.empty())
|
|
1245
1326
|
{
|
|
1246
|
-
assert(_encaps->format ==
|
|
1327
|
+
assert(_encaps->format == FormatType::SlicedFormat);
|
|
1247
1328
|
_current->sliceFlags |= FLAG_HAS_INDIRECTION_TABLE;
|
|
1248
1329
|
|
|
1249
1330
|
//
|
|
1250
1331
|
// Write the indirect instance table.
|
|
1251
1332
|
//
|
|
1252
|
-
_stream->writeSize(static_cast<
|
|
1333
|
+
_stream->writeSize(static_cast<int32_t>(_current->indirectionTable.size()));
|
|
1253
1334
|
ValueList::const_iterator p;
|
|
1254
|
-
for(p = _current->indirectionTable.begin(); p != _current->indirectionTable.end(); ++p)
|
|
1335
|
+
for (p = _current->indirectionTable.begin(); p != _current->indirectionTable.end(); ++p)
|
|
1255
1336
|
{
|
|
1256
1337
|
writeInstance(*p);
|
|
1257
1338
|
}
|
|
@@ -1262,20 +1343,20 @@ Ice::OutputStream::EncapsEncoder11::endSlice()
|
|
|
1262
1343
|
//
|
|
1263
1344
|
// Finally, update the slice flags.
|
|
1264
1345
|
//
|
|
1265
|
-
|
|
1266
|
-
*dest = _current->sliceFlags;
|
|
1346
|
+
byte* dest = &(*(_stream->b.begin() + _current->sliceFlagsPos));
|
|
1347
|
+
*dest = byte{_current->sliceFlags};
|
|
1267
1348
|
}
|
|
1268
1349
|
|
|
1269
1350
|
bool
|
|
1270
|
-
Ice::OutputStream::EncapsEncoder11::writeOptional(
|
|
1351
|
+
Ice::OutputStream::EncapsEncoder11::writeOptional(int32_t tag, Ice::OptionalFormat format)
|
|
1271
1352
|
{
|
|
1272
|
-
if(!_current)
|
|
1353
|
+
if (!_current)
|
|
1273
1354
|
{
|
|
1274
1355
|
return _stream->writeOptImpl(tag, format);
|
|
1275
1356
|
}
|
|
1276
1357
|
else
|
|
1277
1358
|
{
|
|
1278
|
-
if(_stream->writeOptImpl(tag, format))
|
|
1359
|
+
if (_stream->writeOptImpl(tag, format))
|
|
1279
1360
|
{
|
|
1280
1361
|
_current->sliceFlags |= FLAG_HAS_OPTIONAL_MEMBERS;
|
|
1281
1362
|
return true;
|
|
@@ -1298,21 +1379,21 @@ Ice::OutputStream::EncapsEncoder11::writeSlicedData(const SlicedDataPtr& slicedD
|
|
|
1298
1379
|
// essentially "slices" the instance into the most-derived type
|
|
1299
1380
|
// known by the sender.
|
|
1300
1381
|
//
|
|
1301
|
-
if(_encaps->format !=
|
|
1382
|
+
if (_encaps->format != FormatType::SlicedFormat)
|
|
1302
1383
|
{
|
|
1303
1384
|
return;
|
|
1304
1385
|
}
|
|
1305
1386
|
|
|
1306
|
-
for(
|
|
1387
|
+
for (const auto& slice : slicedData->slices)
|
|
1307
1388
|
{
|
|
1308
|
-
startSlice(
|
|
1389
|
+
startSlice(slice->typeId, slice->compactId, slice->isLastSlice);
|
|
1309
1390
|
|
|
1310
1391
|
//
|
|
1311
1392
|
// Write the bytes associated with this slice.
|
|
1312
1393
|
//
|
|
1313
|
-
_stream->writeBlob(
|
|
1394
|
+
_stream->writeBlob(slice->bytes);
|
|
1314
1395
|
|
|
1315
|
-
if(
|
|
1396
|
+
if (slice->hasOptionalMembers)
|
|
1316
1397
|
{
|
|
1317
1398
|
_current->sliceFlags |= FLAG_HAS_OPTIONAL_MEMBERS;
|
|
1318
1399
|
}
|
|
@@ -1320,22 +1401,22 @@ Ice::OutputStream::EncapsEncoder11::writeSlicedData(const SlicedDataPtr& slicedD
|
|
|
1320
1401
|
//
|
|
1321
1402
|
// Make sure to also re-write the instance indirection table.
|
|
1322
1403
|
//
|
|
1323
|
-
_current->indirectionTable =
|
|
1404
|
+
_current->indirectionTable = slice->instances;
|
|
1324
1405
|
|
|
1325
1406
|
endSlice();
|
|
1326
1407
|
}
|
|
1327
1408
|
}
|
|
1328
1409
|
|
|
1329
1410
|
void
|
|
1330
|
-
Ice::OutputStream::EncapsEncoder11::writeInstance(const
|
|
1411
|
+
Ice::OutputStream::EncapsEncoder11::writeInstance(const shared_ptr<Value>& v)
|
|
1331
1412
|
{
|
|
1332
1413
|
assert(v);
|
|
1333
1414
|
|
|
1334
1415
|
//
|
|
1335
1416
|
// If the instance was already marshaled, just write it's ID.
|
|
1336
1417
|
//
|
|
1337
|
-
|
|
1338
|
-
if(q != _marshaledMap.end())
|
|
1418
|
+
auto q = _marshaledMap.find(v);
|
|
1419
|
+
if (q != _marshaledMap.end())
|
|
1339
1420
|
{
|
|
1340
1421
|
_stream->writeSize(q->second);
|
|
1341
1422
|
return;
|
|
@@ -1347,21 +1428,7 @@ Ice::OutputStream::EncapsEncoder11::writeInstance(const ValuePtr& v)
|
|
|
1347
1428
|
//
|
|
1348
1429
|
_marshaledMap.insert(make_pair(v, ++_valueIdIndex));
|
|
1349
1430
|
|
|
1350
|
-
|
|
1351
|
-
{
|
|
1352
|
-
v->ice_preMarshal();
|
|
1353
|
-
}
|
|
1354
|
-
catch(const std::exception& ex)
|
|
1355
|
-
{
|
|
1356
|
-
Warning out(_stream->instance()->initializationData().logger);
|
|
1357
|
-
out << "std::exception raised by ice_preMarshal:\n" << ex;
|
|
1358
|
-
}
|
|
1359
|
-
catch(...)
|
|
1360
|
-
{
|
|
1361
|
-
Warning out(_stream->instance()->initializationData().logger);
|
|
1362
|
-
out << "unknown exception raised by ice_preMarshal";
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1431
|
+
v->ice_preMarshal();
|
|
1365
1432
|
_stream->writeSize(1); // Object instance marker.
|
|
1366
1433
|
v->_iceWrite(_stream);
|
|
1367
1434
|
}
|