zeroc-ice 3.6.5 → 3.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/ICE_LICENSE +17 -17
- data/LICENSE +12 -12
- data/bin/slice2rb +1 -6
- data/ext/Communicator.cpp +223 -61
- data/ext/Communicator.h +1 -6
- data/ext/Config.h +23 -7
- data/ext/Connection.cpp +108 -76
- data/ext/Connection.h +4 -6
- data/ext/Endpoint.cpp +16 -54
- data/ext/Endpoint.h +1 -6
- data/ext/ImplicitContext.cpp +1 -10
- data/ext/ImplicitContext.h +1 -6
- data/ext/Init.cpp +4 -6
- data/ext/Logger.cpp +1 -6
- data/ext/Logger.h +1 -6
- data/ext/Operation.cpp +38 -54
- data/ext/Operation.h +1 -6
- data/ext/Properties.cpp +3 -8
- data/ext/Properties.h +1 -6
- data/ext/Proxy.cpp +111 -70
- data/ext/Proxy.h +1 -6
- data/ext/Slice.cpp +5 -20
- data/ext/Slice.h +1 -6
- data/ext/Types.cpp +313 -224
- data/ext/Types.h +118 -71
- data/ext/Util.cpp +69 -36
- data/ext/Util.h +117 -42
- data/ext/ValueFactoryManager.cpp +440 -0
- data/ext/ValueFactoryManager.h +95 -0
- data/ext/extconf.rb +52 -48
- data/ext/ice/cpp/include/Ice/Application.h +275 -105
- data/ext/ice/cpp/include/Ice/AsyncResult.h +124 -337
- data/ext/ice/cpp/include/Ice/AsyncResultF.h +4 -7
- data/ext/ice/cpp/include/Ice/BatchRequestInterceptor.h +39 -16
- data/ext/ice/cpp/include/Ice/BatchRequestQueueF.h +1 -6
- data/ext/ice/cpp/include/Ice/Buffer.h +10 -15
- data/ext/ice/cpp/include/Ice/CommunicatorAsync.h +56 -17
- data/ext/ice/cpp/include/Ice/Comparable.h +205 -0
- data/ext/ice/cpp/include/Ice/Config.h +16 -39
- data/ext/ice/cpp/include/Ice/ConnectionAsync.h +203 -16
- data/ext/ice/cpp/include/Ice/ConnectionIF.h +7 -6
- data/ext/ice/cpp/include/Ice/ConsoleUtil.h +23 -0
- data/ext/ice/cpp/include/Ice/DefaultValueFactory.h +57 -0
- data/ext/ice/cpp/include/Ice/DispatchInterceptor.h +20 -12
- data/ext/ice/cpp/include/Ice/Dispatcher.h +35 -19
- data/ext/ice/cpp/include/Ice/DynamicLibrary.h +7 -10
- data/ext/ice/cpp/include/Ice/DynamicLibraryF.h +1 -6
- data/ext/ice/cpp/include/Ice/Exception.h +110 -63
- data/ext/ice/cpp/include/Ice/ExceptionHelpers.h +74 -0
- data/ext/ice/cpp/include/Ice/FactoryTable.h +22 -18
- data/ext/ice/cpp/include/Ice/FactoryTableInit.h +28 -31
- data/ext/ice/cpp/include/Ice/Format.h +17 -18
- data/ext/ice/cpp/include/Ice/Functional.h +38 -38
- data/ext/ice/cpp/include/Ice/GCObject.h +9 -10
- data/ext/ice/cpp/include/Ice/Handle.h +6 -16
- data/ext/ice/cpp/include/Ice/Ice.h +9 -10
- data/ext/ice/cpp/include/Ice/IconvStringConverter.h +377 -0
- data/ext/ice/cpp/include/Ice/Incoming.h +132 -38
- data/ext/ice/cpp/include/Ice/IncomingAsync.h +109 -31
- data/ext/ice/cpp/include/Ice/IncomingAsyncF.h +7 -6
- data/ext/ice/cpp/include/Ice/Initialize.h +872 -60
- data/ext/ice/cpp/include/Ice/InputStream.h +1514 -0
- data/ext/ice/cpp/include/Ice/InstanceF.h +1 -7
- data/ext/ice/cpp/include/Ice/InterfaceByValue.h +57 -0
- data/ext/ice/cpp/include/Ice/LocalObject.h +13 -14
- data/ext/ice/cpp/include/Ice/LocalObjectF.h +1 -6
- data/ext/ice/cpp/include/Ice/LoggerUtil.h +56 -24
- data/ext/ice/cpp/include/Ice/MetricsAdminI.h +124 -71
- data/ext/ice/cpp/include/Ice/MetricsFunctional.h +25 -10
- data/ext/ice/cpp/include/Ice/MetricsObserverI.h +116 -32
- data/ext/ice/cpp/include/Ice/NativePropertiesAdmin.h +61 -30
- data/ext/ice/cpp/include/Ice/Object.h +413 -78
- data/ext/ice/cpp/include/Ice/ObjectF.h +12 -8
- data/ext/ice/cpp/include/Ice/ObserverHelper.h +18 -13
- data/ext/ice/cpp/include/Ice/Optional.h +1114 -0
- data/ext/ice/cpp/include/Ice/OutgoingAsync.h +684 -89
- data/ext/ice/cpp/include/Ice/OutgoingAsyncF.h +12 -11
- data/ext/ice/cpp/include/Ice/OutputStream.h +1092 -0
- data/ext/ice/cpp/include/Ice/Protocol.h +49 -17
- data/ext/ice/cpp/include/Ice/Proxy.h +3438 -745
- data/ext/ice/cpp/include/Ice/ProxyF.h +13 -38
- data/ext/ice/cpp/include/Ice/ProxyFactoryF.h +1 -6
- data/ext/ice/cpp/include/Ice/ProxyHandle.h +43 -55
- data/ext/ice/cpp/include/Ice/ReferenceF.h +1 -6
- data/ext/ice/cpp/include/Ice/RegisterPlugins.h +84 -12
- data/ext/ice/cpp/include/Ice/RequestHandlerF.h +10 -9
- data/ext/ice/cpp/include/Ice/ResponseHandlerF.h +6 -6
- data/ext/ice/cpp/include/Ice/SHA1.h +42 -0
- data/ext/ice/cpp/include/Ice/ServantManagerF.h +1 -6
- data/ext/ice/cpp/include/Ice/Service.h +273 -154
- data/ext/ice/cpp/include/Ice/SliceChecksums.h +5 -6
- data/ext/ice/cpp/include/Ice/SlicedData.h +121 -53
- data/ext/ice/cpp/include/Ice/SlicedDataF.h +17 -11
- data/ext/ice/cpp/include/Ice/StreamHelpers.h +453 -140
- data/ext/ice/cpp/include/Ice/StringConverter.h +78 -0
- data/ext/ice/cpp/include/Ice/ThreadPoolF.h +1 -6
- data/ext/ice/cpp/include/Ice/UUID.h +19 -0
- data/ext/ice/cpp/include/{IceUtil → Ice}/UniquePtr.h +22 -28
- data/ext/ice/cpp/include/Ice/UniqueRef.h +97 -0
- data/ext/ice/cpp/include/Ice/UserExceptionFactory.h +45 -13
- data/ext/ice/cpp/include/Ice/Value.h +139 -0
- data/ext/ice/cpp/include/Ice/ValueF.h +21 -0
- data/ext/ice/cpp/include/IceSSL/Config.h +8 -28
- data/ext/ice/cpp/include/IceSSL/IceSSL.h +17 -11
- data/ext/ice/cpp/include/IceSSL/OpenSSL.h +147 -0
- data/ext/ice/cpp/include/IceSSL/Plugin.h +461 -448
- data/ext/ice/cpp/include/IceSSL/SChannel.h +72 -0
- data/ext/ice/cpp/include/IceSSL/SecureTransport.h +72 -0
- data/ext/ice/cpp/include/IceSSL/UWP.h +62 -0
- data/ext/ice/cpp/include/IceUtil/Atomic.h +7 -14
- data/ext/ice/cpp/include/IceUtil/Cond.h +17 -23
- data/ext/ice/cpp/include/IceUtil/Config.h +166 -46
- data/ext/ice/cpp/include/IceUtil/ConsoleUtil.h +92 -0
- data/ext/ice/cpp/include/IceUtil/CountDownLatch.h +5 -10
- data/ext/ice/cpp/include/IceUtil/CtrlCHandler.h +63 -41
- data/ext/ice/cpp/include/IceUtil/DisableWarnings.h +5 -13
- data/ext/ice/cpp/include/IceUtil/Exception.h +284 -75
- data/ext/ice/cpp/include/IceUtil/FileUtil.h +143 -0
- data/ext/ice/cpp/include/IceUtil/Functional.h +4 -6
- data/ext/ice/cpp/include/IceUtil/Handle.h +11 -16
- data/ext/ice/cpp/include/IceUtil/IceUtil.h +4 -15
- data/ext/ice/cpp/include/IceUtil/InputUtil.h +3 -8
- data/ext/ice/cpp/include/IceUtil/Iterator.h +2 -7
- data/ext/ice/cpp/include/IceUtil/Lock.h +8 -15
- data/ext/ice/cpp/include/IceUtil/Monitor.h +1 -7
- data/ext/ice/cpp/include/IceUtil/Mutex.h +19 -23
- data/ext/ice/cpp/include/IceUtil/MutexProtocol.h +2 -7
- data/ext/ice/cpp/include/IceUtil/MutexPtrLock.h +4 -9
- data/ext/ice/cpp/include/IceUtil/MutexPtrTryLock.h +4 -9
- data/ext/ice/cpp/include/IceUtil/Optional.h +134 -23
- data/ext/ice/cpp/include/IceUtil/Options.h +17 -23
- data/ext/ice/cpp/include/IceUtil/OutputUtil.h +61 -37
- data/ext/ice/cpp/include/IceUtil/PopDisableWarnings.h +6 -11
- data/ext/ice/cpp/include/IceUtil/PushDisableWarnings.h +18 -15
- data/ext/ice/cpp/include/IceUtil/Random.h +39 -8
- data/ext/ice/cpp/include/IceUtil/RecMutex.h +7 -13
- data/ext/ice/cpp/include/IceUtil/ResourceConfig.h +53 -0
- data/ext/ice/cpp/include/IceUtil/ScannerConfig.h +10 -15
- data/ext/ice/cpp/include/IceUtil/ScopedArray.h +8 -7
- data/ext/ice/cpp/include/IceUtil/Shared.h +5 -12
- data/ext/ice/cpp/{src → include}/IceUtil/StopWatch.h +2 -7
- data/ext/ice/cpp/include/IceUtil/StringConverter.h +146 -126
- data/ext/ice/cpp/include/IceUtil/StringUtil.h +32 -26
- data/ext/ice/cpp/include/IceUtil/Thread.h +10 -17
- data/ext/ice/cpp/include/IceUtil/ThreadException.h +33 -47
- data/ext/ice/cpp/include/IceUtil/Time.h +3 -8
- data/ext/ice/cpp/include/IceUtil/Timer.h +18 -18
- data/ext/ice/cpp/include/IceUtil/UUID.h +6 -7
- data/ext/ice/cpp/include/IceUtil/UndefSysMacros.h +1 -6
- data/ext/ice/cpp/include/generated/Ice/BuiltinSequences.h +170 -0
- data/ext/ice/cpp/include/generated/Ice/Communicator.h +1156 -0
- data/ext/ice/cpp/include/{Ice → generated/Ice}/CommunicatorF.h +51 -16
- data/ext/ice/cpp/include/generated/Ice/Connection.h +1660 -0
- data/ext/ice/cpp/include/generated/Ice/ConnectionF.h +119 -0
- data/ext/ice/cpp/include/generated/Ice/Current.h +322 -0
- data/ext/ice/cpp/include/generated/Ice/Endpoint.h +943 -0
- data/ext/ice/cpp/include/generated/Ice/EndpointF.h +166 -0
- data/ext/ice/cpp/include/generated/Ice/EndpointTypes.h +118 -0
- data/ext/ice/cpp/include/{Ice → generated/Ice}/FacetMap.h +31 -15
- data/ext/ice/cpp/include/generated/Ice/Identity.h +264 -0
- data/ext/ice/cpp/include/generated/Ice/ImplicitContext.h +278 -0
- data/ext/ice/cpp/include/{Ice → generated/Ice}/ImplicitContextF.h +51 -16
- data/ext/ice/cpp/include/generated/Ice/Instrumentation.h +1143 -0
- data/ext/ice/cpp/include/generated/Ice/InstrumentationF.h +128 -0
- data/ext/ice/cpp/include/generated/Ice/LocalException.h +7041 -0
- data/ext/ice/cpp/include/generated/Ice/Locator.h +3850 -0
- data/ext/ice/cpp/include/generated/Ice/LocatorF.h +147 -0
- data/ext/ice/cpp/include/generated/Ice/Logger.h +231 -0
- data/ext/ice/cpp/include/{Ice → generated/Ice}/LoggerF.h +51 -16
- data/ext/ice/cpp/include/generated/Ice/Metrics.h +4717 -0
- data/ext/ice/cpp/include/generated/Ice/ObjectAdapter.h +1175 -0
- data/ext/ice/cpp/include/{Ice → generated/Ice}/ObjectAdapterF.h +51 -16
- data/ext/ice/cpp/include/generated/Ice/ObjectFactory.h +197 -0
- data/ext/ice/cpp/include/generated/Ice/Plugin.h +306 -0
- data/ext/ice/cpp/include/generated/Ice/PluginF.h +110 -0
- data/ext/ice/cpp/include/generated/Ice/Process.h +971 -0
- data/ext/ice/cpp/include/generated/Ice/ProcessF.h +125 -0
- data/ext/ice/cpp/include/generated/Ice/Properties.h +446 -0
- data/ext/ice/cpp/include/generated/Ice/PropertiesAdmin.h +1360 -0
- data/ext/ice/cpp/include/generated/Ice/PropertiesF.h +134 -0
- data/ext/ice/cpp/include/generated/Ice/RemoteLogger.h +2689 -0
- data/ext/ice/cpp/include/generated/Ice/Router.h +1838 -0
- data/ext/ice/cpp/include/generated/Ice/RouterF.h +125 -0
- data/ext/ice/cpp/include/generated/Ice/ServantLocator.h +299 -0
- data/ext/ice/cpp/include/{Ice → generated/Ice}/ServantLocatorF.h +51 -16
- data/ext/ice/cpp/include/{Ice → generated/Ice}/SliceChecksumDict.h +34 -14
- data/ext/ice/cpp/include/generated/Ice/ValueFactory.h +318 -0
- data/ext/ice/cpp/include/generated/Ice/Version.h +357 -0
- data/ext/ice/cpp/include/generated/IceSSL/ConnectionInfo.h +223 -0
- data/ext/ice/cpp/include/generated/IceSSL/ConnectionInfoF.h +101 -0
- data/ext/ice/cpp/include/generated/IceSSL/EndpointInfo.h +181 -0
- data/ext/ice/cpp/src/Ice/ACM.cpp +38 -27
- data/ext/ice/cpp/src/Ice/ACM.h +9 -7
- data/ext/ice/cpp/src/Ice/ACMF.h +30 -0
- data/ext/ice/cpp/src/Ice/Acceptor.cpp +6 -6
- data/ext/ice/cpp/src/Ice/Acceptor.h +4 -8
- data/ext/ice/cpp/src/Ice/AcceptorF.h +1 -6
- data/ext/ice/cpp/src/Ice/ArgVector.cpp +59 -0
- data/ext/ice/cpp/src/Ice/ArgVector.h +36 -0
- data/ext/ice/cpp/src/Ice/AsyncResult.cpp +15 -544
- data/ext/ice/cpp/src/Ice/Base64.cpp +22 -28
- data/ext/ice/cpp/src/Ice/Base64.h +1 -6
- data/ext/ice/cpp/src/Ice/BatchRequestQueue.cpp +41 -18
- data/ext/ice/cpp/src/Ice/BatchRequestQueue.h +15 -15
- data/ext/ice/cpp/src/Ice/Buffer.cpp +75 -18
- data/ext/ice/cpp/src/Ice/BuiltinSequences.cpp +21 -12
- data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +86 -197
- data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.h +17 -23
- data/ext/ice/cpp/src/Ice/Communicator.cpp +43 -15
- data/ext/ice/cpp/src/Ice/CommunicatorF.cpp +28 -11
- data/ext/ice/cpp/src/Ice/CommunicatorI.cpp +318 -117
- data/ext/ice/cpp/src/Ice/CommunicatorI.h +95 -40
- data/ext/ice/cpp/src/{IceUtil → Ice}/Cond.cpp +3 -8
- data/ext/ice/cpp/src/Ice/ConnectRequestHandler.cpp +55 -122
- data/ext/ice/cpp/src/Ice/ConnectRequestHandler.h +15 -31
- data/ext/ice/cpp/src/Ice/ConnectRequestHandlerF.h +6 -7
- data/ext/ice/cpp/src/Ice/Connection.cpp +111 -20
- data/ext/ice/cpp/src/Ice/ConnectionF.cpp +28 -11
- data/ext/ice/cpp/src/Ice/ConnectionFactory.cpp +300 -107
- data/ext/ice/cpp/src/Ice/ConnectionFactory.h +44 -28
- data/ext/ice/cpp/src/Ice/ConnectionFactoryF.h +30 -0
- data/ext/ice/cpp/src/Ice/ConnectionI.cpp +785 -713
- data/ext/ice/cpp/src/Ice/ConnectionI.h +105 -80
- data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.cpp +2 -20
- data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.h +5 -9
- data/ext/ice/cpp/src/Ice/Connector.cpp +6 -6
- data/ext/ice/cpp/src/Ice/Connector.h +4 -8
- data/ext/ice/cpp/src/Ice/ConnectorF.h +1 -6
- data/ext/ice/cpp/src/{IceUtil → Ice}/CountDownLatch.cpp +4 -9
- data/ext/ice/cpp/src/Ice/Current.cpp +30 -12
- data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +10 -16
- data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.h +1 -6
- data/ext/ice/cpp/src/Ice/DefaultsAndOverridesF.h +1 -6
- data/ext/ice/cpp/src/Ice/DispatchInterceptor.cpp +13 -25
- data/ext/ice/cpp/src/Ice/DynamicLibrary.cpp +34 -28
- data/ext/ice/cpp/src/Ice/Endpoint.cpp +107 -19
- data/ext/ice/cpp/src/Ice/EndpointF.cpp +28 -11
- data/ext/ice/cpp/src/Ice/EndpointFactory.cpp +152 -6
- data/ext/ice/cpp/src/Ice/EndpointFactory.h +72 -11
- data/ext/ice/cpp/src/Ice/EndpointFactoryF.h +1 -6
- data/ext/ice/cpp/src/Ice/EndpointFactoryManager.cpp +41 -36
- data/ext/ice/cpp/src/Ice/EndpointFactoryManager.h +10 -9
- data/ext/ice/cpp/src/Ice/EndpointFactoryManagerF.h +1 -6
- data/ext/ice/cpp/src/Ice/EndpointI.cpp +18 -7
- data/ext/ice/cpp/src/Ice/EndpointI.h +39 -18
- data/ext/ice/cpp/src/Ice/EndpointIF.h +18 -10
- data/ext/ice/cpp/src/Ice/EndpointTypes.cpp +19 -12
- data/ext/ice/cpp/src/Ice/EventHandler.cpp +6 -9
- data/ext/ice/cpp/src/Ice/EventHandler.h +13 -13
- data/ext/ice/cpp/src/Ice/EventHandlerF.h +5 -7
- data/ext/ice/cpp/src/Ice/Exception.cpp +102 -98
- data/ext/ice/cpp/src/Ice/FacetMap.cpp +21 -12
- data/ext/ice/cpp/src/Ice/FactoryTable.cpp +37 -33
- data/ext/ice/cpp/src/Ice/FactoryTableInit.cpp +2 -9
- data/ext/ice/cpp/src/Ice/GCObject.cpp +29 -31
- data/ext/ice/cpp/src/Ice/HashUtil.h +3 -9
- data/ext/ice/cpp/src/Ice/HttpParser.cpp +1 -7
- data/ext/ice/cpp/src/Ice/HttpParser.h +1 -6
- data/ext/ice/cpp/src/Ice/IPEndpointI.cpp +128 -111
- data/ext/ice/cpp/src/Ice/IPEndpointI.h +23 -19
- data/ext/ice/cpp/src/Ice/IPEndpointIF.h +6 -7
- data/ext/ice/cpp/src/Ice/IconvStringConverter.cpp +51 -0
- data/ext/ice/cpp/src/Ice/Identity.cpp +25 -16
- data/ext/ice/cpp/src/Ice/ImplicitContext.cpp +41 -13
- data/ext/ice/cpp/src/Ice/ImplicitContextF.cpp +28 -11
- data/ext/ice/cpp/src/Ice/ImplicitContextI.cpp +11 -28
- data/ext/ice/cpp/src/Ice/ImplicitContextI.h +7 -10
- data/ext/ice/cpp/src/Ice/Incoming.cpp +284 -255
- data/ext/ice/cpp/src/Ice/IncomingAsync.cpp +104 -214
- data/ext/ice/cpp/src/Ice/IncomingRequest.h +5 -9
- data/ext/ice/cpp/src/Ice/Initialize.cpp +309 -193
- data/ext/ice/cpp/src/Ice/InputStream.cpp +2726 -0
- data/ext/ice/cpp/src/Ice/Instance.cpp +243 -262
- data/ext/ice/cpp/src/Ice/Instance.h +30 -23
- data/ext/ice/cpp/src/Ice/Instrumentation.cpp +137 -23
- data/ext/ice/cpp/src/Ice/InstrumentationF.cpp +28 -11
- data/ext/ice/cpp/src/Ice/InstrumentationI.cpp +118 -105
- data/ext/ice/cpp/src/Ice/InstrumentationI.h +30 -36
- data/ext/ice/cpp/src/Ice/LocalException.cpp +1191 -422
- data/ext/ice/cpp/src/Ice/LocalObject.cpp +1 -7
- data/ext/ice/cpp/src/Ice/Locator.cpp +1282 -1222
- data/ext/ice/cpp/src/Ice/LocatorF.cpp +30 -12
- data/ext/ice/cpp/src/Ice/LocatorInfo.cpp +150 -186
- data/ext/ice/cpp/src/Ice/LocatorInfo.h +31 -36
- data/ext/ice/cpp/src/Ice/LocatorInfoF.h +1 -6
- data/ext/ice/cpp/src/Ice/Logger.cpp +39 -12
- data/ext/ice/cpp/src/Ice/LoggerAdminI.cpp +182 -88
- data/ext/ice/cpp/src/Ice/LoggerAdminI.h +4 -9
- data/ext/ice/cpp/src/Ice/LoggerF.cpp +28 -11
- data/ext/ice/cpp/src/Ice/LoggerI.cpp +26 -55
- data/ext/ice/cpp/src/Ice/LoggerI.h +7 -18
- data/ext/ice/cpp/src/Ice/LoggerUtil.cpp +10 -17
- data/ext/ice/cpp/src/Ice/Metrics.cpp +1280 -1107
- data/ext/ice/cpp/src/Ice/MetricsAdminI.cpp +58 -33
- data/ext/ice/cpp/src/Ice/MetricsObserverI.cpp +1 -7
- data/ext/ice/cpp/src/Ice/Network.cpp +753 -408
- data/ext/ice/cpp/src/Ice/Network.h +99 -36
- data/ext/ice/cpp/src/Ice/NetworkF.h +2 -7
- data/ext/ice/cpp/src/Ice/NetworkProxy.cpp +20 -19
- data/ext/ice/cpp/src/Ice/NetworkProxy.h +5 -7
- data/ext/ice/cpp/src/Ice/NetworkProxyF.h +1 -6
- data/ext/ice/cpp/src/Ice/OSLogLoggerI.cpp +57 -0
- data/ext/ice/cpp/src/Ice/OSLogLoggerI.h +40 -0
- data/ext/ice/cpp/src/Ice/Object.cpp +227 -232
- data/ext/ice/cpp/src/Ice/ObjectAdapter.cpp +45 -13
- data/ext/ice/cpp/src/Ice/ObjectAdapterF.cpp +28 -11
- data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.cpp +83 -33
- data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.h +13 -12
- data/ext/ice/cpp/src/Ice/ObjectAdapterFactoryF.h +25 -0
- data/ext/ice/cpp/src/Ice/ObjectAdapterI.cpp +298 -191
- data/ext/ice/cpp/src/Ice/ObjectAdapterI.h +44 -39
- data/ext/ice/cpp/src/Ice/ObjectFactory.cpp +41 -13
- data/ext/ice/cpp/src/Ice/ObserverHelper.cpp +9 -37
- data/ext/ice/cpp/src/Ice/OpaqueEndpointI.cpp +67 -67
- data/ext/ice/cpp/src/Ice/OpaqueEndpointI.h +15 -11
- data/ext/ice/cpp/src/Ice/OutgoingAsync.cpp +801 -366
- data/ext/ice/cpp/src/Ice/OutputStream.cpp +1367 -0
- data/ext/ice/cpp/src/Ice/Plugin.cpp +52 -14
- data/ext/ice/cpp/src/Ice/PluginF.cpp +28 -11
- data/ext/ice/cpp/src/Ice/PluginManagerI.cpp +27 -51
- data/ext/ice/cpp/src/Ice/PluginManagerI.h +7 -13
- data/ext/ice/cpp/src/Ice/Process.cpp +294 -128
- data/ext/ice/cpp/src/Ice/ProcessF.cpp +30 -12
- data/ext/ice/cpp/src/Ice/Properties.cpp +42 -15
- data/ext/ice/cpp/src/Ice/PropertiesAdmin.cpp +382 -340
- data/ext/ice/cpp/src/Ice/PropertiesAdminI.cpp +83 -24
- data/ext/ice/cpp/src/Ice/PropertiesAdminI.h +29 -10
- data/ext/ice/cpp/src/Ice/PropertiesF.cpp +30 -12
- data/ext/ice/cpp/src/Ice/PropertiesI.cpp +46 -57
- data/ext/ice/cpp/src/Ice/PropertiesI.h +18 -26
- data/ext/ice/cpp/src/Ice/PropertyNames.cpp +112 -19
- data/ext/ice/cpp/src/Ice/PropertyNames.h +4 -7
- data/ext/ice/cpp/src/Ice/Protocol.cpp +6 -19
- data/ext/ice/cpp/src/Ice/ProtocolInstance.cpp +37 -7
- data/ext/ice/cpp/src/Ice/ProtocolInstance.h +9 -25
- data/ext/ice/cpp/src/Ice/ProtocolInstanceF.h +1 -6
- data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.cpp +6 -6
- data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.h +3 -6
- data/ext/ice/cpp/src/Ice/ProtocolPluginFacadeF.h +1 -6
- data/ext/ice/cpp/src/Ice/Proxy.cpp +729 -957
- data/ext/ice/cpp/src/Ice/ProxyFactory.cpp +33 -38
- data/ext/ice/cpp/src/Ice/ProxyFactory.h +16 -16
- data/ext/ice/cpp/src/Ice/Reference.cpp +190 -106
- data/ext/ice/cpp/src/Ice/Reference.h +39 -28
- data/ext/ice/cpp/src/Ice/ReferenceFactory.cpp +69 -118
- data/ext/ice/cpp/src/Ice/ReferenceFactory.h +12 -17
- data/ext/ice/cpp/src/Ice/ReferenceFactoryF.h +1 -6
- data/ext/ice/cpp/src/Ice/RegisterPluginsInit.cpp +19 -9
- data/ext/ice/cpp/src/Ice/RegisterPluginsInit.h +1 -6
- data/ext/ice/cpp/src/Ice/RemoteLogger.cpp +766 -565
- data/ext/ice/cpp/src/Ice/ReplyStatus.h +1 -6
- data/ext/ice/cpp/src/Ice/RequestHandler.cpp +5 -8
- data/ext/ice/cpp/src/Ice/RequestHandler.h +10 -18
- data/ext/ice/cpp/src/Ice/RequestHandlerFactory.cpp +10 -11
- data/ext/ice/cpp/src/Ice/RequestHandlerFactory.h +2 -7
- data/ext/ice/cpp/src/Ice/ResponseHandler.cpp +3 -11
- data/ext/ice/cpp/src/Ice/ResponseHandler.h +16 -12
- data/ext/ice/cpp/src/Ice/RetryQueue.cpp +12 -20
- data/ext/ice/cpp/src/Ice/RetryQueue.h +7 -11
- data/ext/ice/cpp/src/Ice/RetryQueueF.h +1 -6
- data/ext/ice/cpp/src/Ice/Router.cpp +614 -492
- data/ext/ice/cpp/src/Ice/RouterF.cpp +30 -12
- data/ext/ice/cpp/src/Ice/RouterInfo.cpp +93 -99
- data/ext/ice/cpp/src/Ice/RouterInfo.h +42 -38
- data/ext/ice/cpp/src/Ice/RouterInfoF.h +1 -6
- data/ext/ice/cpp/src/{IceUtil → Ice}/SHA1.cpp +23 -28
- data/ext/ice/cpp/src/Ice/Selector.cpp +948 -855
- data/ext/ice/cpp/src/Ice/Selector.h +100 -152
- data/ext/ice/cpp/src/Ice/ServantLocator.cpp +41 -13
- data/ext/ice/cpp/src/Ice/ServantLocatorF.cpp +28 -11
- data/ext/ice/cpp/src/Ice/ServantManager.cpp +24 -45
- data/ext/ice/cpp/src/Ice/ServantManager.h +1 -6
- data/ext/ice/cpp/src/Ice/SharedContext.h +2 -7
- data/ext/ice/cpp/src/Ice/SliceChecksumDict.cpp +21 -12
- data/ext/ice/cpp/src/Ice/SliceChecksums.cpp +2 -7
- data/ext/ice/cpp/src/Ice/SlicedData.cpp +72 -25
- data/ext/ice/cpp/src/Ice/StreamSocket.cpp +208 -76
- data/ext/ice/cpp/src/Ice/StreamSocket.h +13 -9
- data/ext/ice/cpp/src/Ice/StringConverterPlugin.cpp +57 -22
- data/ext/ice/cpp/src/Ice/StringUtil.h +30 -0
- data/ext/ice/cpp/src/Ice/SysLoggerI.cpp +6 -7
- data/ext/ice/cpp/src/Ice/SysLoggerI.h +2 -8
- data/ext/ice/cpp/src/Ice/SystemdJournalI.cpp +66 -0
- data/ext/ice/cpp/src/Ice/SystemdJournalI.h +39 -0
- data/ext/ice/cpp/src/Ice/TcpAcceptor.cpp +169 -49
- data/ext/ice/cpp/src/Ice/TcpAcceptor.h +12 -10
- data/ext/ice/cpp/src/Ice/TcpConnector.cpp +6 -12
- data/ext/ice/cpp/src/Ice/TcpConnector.h +1 -7
- data/ext/ice/cpp/src/Ice/TcpEndpointI.cpp +51 -46
- data/ext/ice/cpp/src/Ice/TcpEndpointI.h +12 -14
- data/ext/ice/cpp/src/Ice/TcpTransceiver.cpp +17 -32
- data/ext/ice/cpp/src/Ice/TcpTransceiver.h +7 -15
- data/ext/ice/cpp/src/{IceUtil → Ice}/Thread.cpp +41 -54
- data/ext/ice/cpp/src/Ice/ThreadPool.cpp +242 -274
- data/ext/ice/cpp/src/Ice/ThreadPool.h +46 -48
- data/ext/ice/cpp/src/{IceUtil → Ice}/Timer.cpp +38 -26
- data/ext/ice/cpp/src/Ice/TraceLevels.cpp +2 -7
- data/ext/ice/cpp/src/Ice/TraceLevels.h +1 -6
- data/ext/ice/cpp/src/Ice/TraceLevelsF.h +2 -7
- data/ext/ice/cpp/src/Ice/TraceUtil.cpp +53 -36
- data/ext/ice/cpp/src/Ice/TraceUtil.h +13 -11
- data/ext/ice/cpp/src/Ice/Transceiver.cpp +1 -7
- data/ext/ice/cpp/src/Ice/Transceiver.h +8 -12
- data/ext/ice/cpp/src/Ice/TransceiverF.h +3 -8
- data/ext/ice/cpp/src/Ice/UdpConnector.cpp +5 -13
- data/ext/ice/cpp/src/Ice/UdpConnector.h +1 -7
- data/ext/ice/cpp/src/Ice/UdpEndpointI.cpp +118 -60
- data/ext/ice/cpp/src/Ice/UdpEndpointI.h +13 -10
- data/ext/ice/cpp/src/Ice/UdpTransceiver.cpp +177 -236
- data/ext/ice/cpp/src/Ice/UdpTransceiver.h +15 -22
- data/ext/ice/cpp/src/Ice/Value.cpp +76 -0
- data/ext/ice/cpp/src/Ice/ValueFactory.cpp +83 -0
- data/ext/ice/cpp/src/Ice/ValueFactoryManagerI.cpp +61 -0
- data/ext/ice/cpp/src/Ice/ValueFactoryManagerI.h +37 -0
- data/ext/ice/cpp/src/Ice/Version.cpp +25 -20
- data/ext/ice/cpp/src/Ice/VirtualShared.h +38 -0
- data/ext/ice/cpp/src/Ice/WSAcceptor.cpp +3 -14
- data/ext/ice/cpp/src/Ice/WSAcceptor.h +3 -12
- data/ext/ice/cpp/src/Ice/WSConnector.cpp +5 -16
- data/ext/ice/cpp/src/Ice/WSConnector.h +3 -11
- data/ext/ice/cpp/src/Ice/WSEndpoint.cpp +188 -89
- data/ext/ice/cpp/src/Ice/WSEndpoint.h +22 -37
- data/ext/ice/cpp/src/Ice/WSTransceiver.cpp +65 -66
- data/ext/ice/cpp/src/Ice/WSTransceiver.h +7 -27
- data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.cpp +596 -281
- data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.h +1383 -543
- data/ext/ice/cpp/src/IceDiscovery/LocatorI.cpp +89 -32
- data/ext/ice/cpp/src/IceDiscovery/LocatorI.h +59 -28
- data/ext/ice/cpp/src/IceDiscovery/LookupI.cpp +315 -66
- data/ext/ice/cpp/src/IceDiscovery/LookupI.h +83 -41
- data/ext/ice/cpp/src/IceDiscovery/PluginI.cpp +57 -64
- data/ext/ice/cpp/src/IceDiscovery/PluginI.h +3 -8
- data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.cpp +450 -172
- data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.h +863 -406
- data/ext/ice/cpp/src/IceLocatorDiscovery/Plugin.h +47 -0
- data/ext/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +636 -144
- data/ext/ice/cpp/src/IceSSL/AcceptorI.cpp +20 -173
- data/ext/ice/cpp/src/IceSSL/AcceptorI.h +8 -22
- data/ext/ice/cpp/src/IceSSL/CertificateI.cpp +279 -0
- data/ext/ice/cpp/src/IceSSL/CertificateI.h +64 -0
- data/ext/ice/cpp/src/IceSSL/ConnectionInfo.cpp +42 -17
- data/ext/ice/cpp/src/IceSSL/ConnectionInfoF.cpp +61 -0
- data/ext/ice/cpp/src/IceSSL/ConnectorI.cpp +15 -64
- data/ext/ice/cpp/src/IceSSL/ConnectorI.h +6 -18
- data/ext/ice/cpp/src/IceSSL/EndpointI.cpp +207 -204
- data/ext/ice/cpp/src/IceSSL/EndpointI.h +43 -40
- data/ext/ice/cpp/src/IceSSL/EndpointInfo.cpp +42 -16
- data/ext/ice/cpp/src/IceSSL/Instance.cpp +1 -11
- data/ext/ice/cpp/src/IceSSL/Instance.h +7 -12
- data/ext/ice/cpp/src/IceSSL/InstanceF.h +11 -12
- data/ext/ice/cpp/src/IceSSL/OpenSSLCertificateI.cpp +583 -0
- data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +134 -115
- data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.h +59 -0
- data/ext/ice/cpp/src/IceSSL/OpenSSLEngineF.h +27 -0
- data/ext/ice/cpp/src/IceSSL/OpenSSLPluginI.cpp +127 -0
- data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +477 -182
- data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.h +32 -26
- data/ext/ice/cpp/src/IceSSL/OpenSSLUtil.cpp +286 -0
- data/ext/ice/cpp/src/IceSSL/OpenSSLUtil.h +58 -0
- data/ext/ice/cpp/src/IceSSL/PluginI.cpp +71 -46
- data/ext/ice/cpp/src/IceSSL/PluginI.h +13 -23
- data/ext/ice/cpp/src/IceSSL/RFC2253.cpp +9 -60
- data/ext/ice/cpp/src/IceSSL/RFC2253.h +7 -12
- data/ext/ice/cpp/src/IceSSL/SChannelCertificateI.cpp +580 -0
- data/ext/ice/cpp/src/IceSSL/SChannelEngine.cpp +523 -74
- data/ext/ice/cpp/src/IceSSL/SChannelEngine.h +123 -0
- data/ext/ice/cpp/src/IceSSL/SChannelEngineF.h +31 -0
- data/ext/ice/cpp/src/IceSSL/SChannelPluginI.cpp +73 -0
- data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.cpp +187 -221
- data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.h +24 -26
- data/ext/ice/cpp/src/IceSSL/SSLEngine.cpp +97 -94
- data/ext/ice/cpp/src/IceSSL/SSLEngine.h +26 -192
- data/ext/ice/cpp/src/IceSSL/SSLEngineF.h +4 -24
- data/ext/ice/cpp/src/IceSSL/SecureTransportCertificateI.cpp +868 -0
- data/ext/ice/cpp/src/IceSSL/SecureTransportEngine.cpp +69 -201
- data/ext/ice/cpp/src/IceSSL/SecureTransportEngine.h +59 -0
- data/ext/ice/cpp/src/IceSSL/SecureTransportEngineF.h +29 -0
- data/ext/ice/cpp/src/IceSSL/SecureTransportPluginI.cpp +75 -0
- data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +174 -161
- data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.h +29 -33
- data/ext/ice/cpp/src/IceSSL/SecureTransportUtil.cpp +864 -0
- data/ext/ice/cpp/src/IceSSL/SecureTransportUtil.h +45 -0
- data/ext/ice/cpp/src/IceSSL/TrustManager.cpp +12 -22
- data/ext/ice/cpp/src/IceSSL/TrustManager.h +4 -9
- data/ext/ice/cpp/src/IceSSL/TrustManagerF.h +3 -8
- data/ext/ice/cpp/src/IceSSL/UWPCertificateI.cpp +266 -0
- data/ext/ice/cpp/src/IceSSL/UWPEngine.cpp +338 -0
- data/ext/ice/cpp/src/IceSSL/UWPEngine.h +41 -0
- data/ext/ice/cpp/src/IceSSL/UWPEngineF.h +26 -0
- data/ext/ice/cpp/src/IceSSL/UWPPluginI.cpp +89 -0
- data/ext/ice/cpp/src/IceSSL/UWPTransceiverI.cpp +383 -0
- data/ext/ice/cpp/src/IceSSL/UWPTransceiverI.h +71 -0
- data/ext/ice/cpp/src/IceSSL/Util.cpp +71 -1260
- data/ext/ice/cpp/src/IceSSL/Util.h +48 -142
- data/ext/ice/cpp/src/IceUtil/ConsoleUtil.cpp +157 -0
- data/ext/ice/cpp/src/IceUtil/ConvertUTF.cpp +22 -27
- data/ext/ice/cpp/src/IceUtil/ConvertUTF.h +34 -31
- data/ext/ice/cpp/src/IceUtil/CtrlCHandler.cpp +22 -36
- data/ext/ice/cpp/src/IceUtil/FileUtil.cpp +30 -126
- data/ext/ice/cpp/src/IceUtil/InputUtil.cpp +1 -6
- data/ext/ice/cpp/src/IceUtil/MutexProtocol.cpp +1 -6
- data/ext/ice/cpp/src/IceUtil/Options.cpp +20 -33
- data/ext/ice/cpp/src/IceUtil/OutputUtil.cpp +47 -21
- data/ext/ice/cpp/src/IceUtil/Random.cpp +15 -20
- data/ext/ice/cpp/src/IceUtil/RecMutex.cpp +4 -19
- data/ext/ice/cpp/src/IceUtil/Shared.cpp +8 -8
- data/ext/ice/cpp/src/IceUtil/StringConverter.cpp +501 -269
- data/ext/ice/cpp/src/IceUtil/StringUtil.cpp +582 -244
- data/ext/ice/cpp/src/IceUtil/ThreadException.cpp +37 -79
- data/ext/ice/cpp/src/IceUtil/Time.cpp +6 -11
- data/ext/ice/cpp/src/IceUtil/UUID.cpp +17 -22
- data/ext/ice/cpp/src/IceUtil/Unicode.cpp +97 -101
- data/ext/ice/cpp/src/IceUtil/Unicode.h +21 -40
- data/ext/ice/cpp/src/IceUtil/UtilException.cpp +839 -0
- data/ext/ice/cpp/src/Slice/CPlusPlusUtil.cpp +894 -234
- data/ext/ice/cpp/src/Slice/CPlusPlusUtil.h +72 -0
- data/ext/ice/cpp/src/Slice/Checksum.cpp +2 -7
- data/ext/ice/cpp/src/Slice/Checksum.h +21 -0
- data/ext/ice/cpp/src/Slice/FileTracker.cpp +25 -83
- data/ext/ice/cpp/{include → src}/Slice/FileTracker.h +9 -14
- data/ext/ice/cpp/src/Slice/Grammar.cpp +1981 -1944
- data/ext/ice/cpp/src/Slice/Grammar.h +39 -19
- data/ext/ice/cpp/src/Slice/GrammarUtil.h +14 -20
- data/ext/ice/cpp/src/Slice/JavaUtil.cpp +2752 -1948
- data/ext/ice/cpp/src/Slice/JavaUtil.h +398 -0
- data/ext/ice/cpp/src/Slice/MD5.cpp +1 -6
- data/ext/ice/cpp/src/Slice/MD5.h +1 -6
- data/ext/ice/cpp/src/Slice/MD5I.cpp +8 -1
- data/ext/ice/cpp/src/Slice/MD5I.h +1 -1
- data/ext/ice/cpp/src/Slice/PHPUtil.cpp +17 -20
- data/ext/ice/cpp/src/Slice/PHPUtil.h +36 -0
- data/ext/ice/cpp/src/Slice/Parser.cpp +1190 -426
- data/ext/ice/cpp/{include → src}/Slice/Parser.h +143 -91
- data/ext/ice/cpp/src/Slice/Preprocessor.cpp +67 -36
- data/ext/ice/cpp/{include → src}/Slice/Preprocessor.h +8 -18
- data/ext/ice/cpp/src/Slice/Python.cpp +218 -111
- data/ext/ice/cpp/src/Slice/PythonUtil.cpp +787 -699
- data/ext/ice/cpp/src/Slice/PythonUtil.h +70 -0
- data/ext/ice/cpp/src/Slice/Ruby.cpp +42 -43
- data/ext/ice/cpp/src/Slice/RubyUtil.cpp +175 -445
- data/ext/ice/cpp/{include → src}/Slice/RubyUtil.h +6 -11
- data/ext/ice/cpp/src/Slice/Scanner.cpp +390 -399
- data/ext/ice/cpp/src/Slice/{Util.cpp → SliceUtil.cpp} +36 -69
- data/ext/ice/cpp/src/Slice/StringLiteralUtil.cpp +456 -0
- data/ext/ice/cpp/src/Slice/Util.h +50 -0
- data/ice.gemspec +2 -9
- data/lib/Glacier2.rb +1 -6
- data/lib/Glacier2/Metrics.rb +6 -50
- data/lib/Glacier2/PermissionsVerifier.rb +23 -99
- data/lib/Glacier2/PermissionsVerifierF.rb +2 -7
- data/lib/Glacier2/Router.rb +31 -78
- data/lib/Glacier2/RouterF.rb +2 -7
- data/lib/Glacier2/SSLInfo.rb +3 -11
- data/lib/Glacier2/Session.rb +87 -311
- data/lib/Ice.rb +84 -58
- data/lib/Ice/BuiltinSequences.rb +3 -8
- data/lib/Ice/Communicator.rb +54 -61
- data/lib/Ice/CommunicatorF.rb +2 -7
- data/lib/Ice/Connection.rb +152 -166
- data/lib/Ice/ConnectionF.rb +2 -7
- data/lib/Ice/Current.rb +3 -15
- data/lib/Ice/Endpoint.rb +56 -137
- data/lib/Ice/EndpointF.rb +2 -7
- data/lib/Ice/EndpointTypes.rb +2 -11
- data/lib/Ice/FacetMap.rb +3 -8
- data/lib/Ice/Identity.rb +4 -12
- data/lib/Ice/ImplicitContext.rb +4 -38
- data/lib/Ice/ImplicitContextF.rb +2 -7
- data/lib/Ice/Instrumentation.rb +22 -279
- data/lib/Ice/InstrumentationF.rb +2 -7
- data/lib/Ice/LocalException.rb +94 -145
- data/lib/Ice/Locator.rb +50 -169
- data/lib/Ice/LocatorF.rb +2 -7
- data/lib/Ice/Logger.rb +4 -38
- data/lib/Ice/LoggerF.rb +2 -7
- data/lib/Ice/Metrics.rb +60 -420
- data/lib/Ice/ObjectAdapter.rb +29 -0
- data/lib/Ice/ObjectAdapterF.rb +2 -7
- data/lib/Ice/ObjectFactory.rb +4 -34
- data/lib/Ice/Plugin.rb +6 -64
- data/lib/Ice/PluginF.rb +2 -7
- data/lib/Ice/Process.rb +15 -56
- data/lib/Ice/ProcessF.rb +2 -7
- data/lib/Ice/Properties.rb +4 -45
- data/lib/Ice/PropertiesAdmin.rb +18 -60
- data/lib/Ice/PropertiesF.rb +2 -7
- data/lib/Ice/RemoteLogger.rb +33 -119
- data/lib/Ice/Router.rb +28 -105
- data/lib/Ice/RouterF.rb +2 -7
- data/lib/Ice/ServantLocator.rb +26 -0
- data/lib/Ice/ServantLocatorF.rb +24 -0
- data/lib/Ice/SliceChecksumDict.rb +2 -7
- data/lib/Ice/ValueFactory.rb +28 -0
- data/lib/Ice/Version.rb +4 -15
- data/lib/IceBox.rb +1 -6
- data/lib/IceBox/IceBox.rb +43 -152
- data/lib/IceGrid.rb +1 -9
- data/lib/IceGrid/Admin.rb +550 -431
- data/lib/IceGrid/Descriptor.rb +61 -533
- data/lib/IceGrid/Exception.rb +23 -49
- data/lib/IceGrid/FileParser.rb +13 -54
- data/lib/IceGrid/PluginFacade.rb +35 -0
- data/lib/IceGrid/Registry.rb +150 -62
- data/lib/IceGrid/Session.rb +24 -68
- data/lib/IceGrid/UserAccountMapper.rb +13 -54
- data/lib/IcePatch2.rb +1 -6
- data/lib/IcePatch2/FileInfo.rb +4 -15
- data/lib/IcePatch2/FileServer.rb +32 -80
- data/lib/IceStorm.rb +1 -6
- data/lib/IceStorm/IceStorm.rb +78 -210
- data/lib/IceStorm/Metrics.rb +10 -93
- data/slice/Glacier2/Metrics.ice +20 -10
- data/slice/Glacier2/PermissionsVerifier.ice +19 -12
- data/slice/Glacier2/PermissionsVerifierF.ice +16 -9
- data/slice/Glacier2/Router.ice +19 -13
- data/slice/Glacier2/RouterF.ice +16 -9
- data/slice/Glacier2/SSLInfo.ice +17 -10
- data/slice/Glacier2/Session.ice +24 -18
- data/slice/Ice/BuiltinSequences.ice +18 -9
- data/slice/Ice/Communicator.ice +180 -64
- data/slice/Ice/CommunicatorF.ice +18 -9
- data/slice/Ice/Connection.ice +208 -75
- data/slice/Ice/ConnectionF.ice +18 -9
- data/slice/Ice/Current.ice +37 -28
- data/slice/Ice/Endpoint.ice +73 -21
- data/slice/Ice/EndpointF.ice +19 -10
- data/slice/Ice/EndpointTypes.ice +21 -13
- data/slice/Ice/FacetMap.ice +19 -10
- data/slice/Ice/Identity.ice +24 -10
- data/slice/Ice/ImplicitContext.ice +41 -33
- data/slice/Ice/ImplicitContextF.ice +17 -9
- data/slice/Ice/Instrumentation.ice +37 -30
- data/slice/Ice/InstrumentationF.ice +19 -10
- data/slice/Ice/LocalException.ice +118 -112
- data/slice/Ice/Locator.ice +28 -21
- data/slice/Ice/LocatorF.ice +18 -9
- data/slice/Ice/Logger.ice +26 -18
- data/slice/Ice/LoggerF.ice +18 -9
- data/slice/Ice/Metrics.ice +42 -30
- data/slice/Ice/ObjectAdapter.ice +88 -53
- data/slice/Ice/ObjectAdapterF.ice +18 -9
- data/slice/Ice/ObjectFactory.ice +28 -17
- data/slice/Ice/Plugin.ice +25 -13
- data/slice/Ice/PluginF.ice +22 -9
- data/slice/Ice/Process.ice +20 -11
- data/slice/Ice/ProcessF.ice +18 -9
- data/slice/Ice/Properties.ice +42 -28
- data/slice/Ice/PropertiesAdmin.ice +20 -10
- data/slice/Ice/PropertiesF.ice +18 -9
- data/slice/Ice/RemoteLogger.ice +23 -19
- data/slice/Ice/Router.ice +28 -13
- data/slice/Ice/RouterF.ice +18 -9
- data/slice/Ice/ServantLocator.ice +40 -29
- data/slice/Ice/ServantLocatorF.ice +18 -9
- data/slice/Ice/SliceChecksumDict.ice +18 -9
- data/slice/Ice/ValueFactory.ice +132 -0
- data/slice/Ice/Version.ice +20 -10
- data/slice/IceBT/ConnectionInfo.ice +58 -0
- data/slice/IceBT/EndpointInfo.ice +56 -0
- data/slice/IceBT/Types.ice +44 -0
- data/slice/IceBox/IceBox.ice +45 -27
- data/slice/IceDiscovery/IceDiscovery.ice +75 -10
- data/slice/IceGrid/Admin.ice +410 -44
- data/slice/IceGrid/Descriptor.ice +47 -34
- data/slice/IceGrid/Exception.ice +43 -32
- data/slice/IceGrid/FileParser.ice +21 -12
- data/slice/IceGrid/PluginFacade.ice +26 -18
- data/slice/IceGrid/Registry.ice +150 -21
- data/slice/IceGrid/Session.ice +25 -17
- data/slice/IceGrid/UserAccountMapper.ice +23 -14
- data/slice/IceIAP/ConnectionInfo.ice +73 -0
- data/slice/IceIAP/EndpointInfo.ice +67 -0
- data/slice/IceLocatorDiscovery/IceLocatorDiscovery.ice +19 -12
- data/slice/IcePatch2/FileInfo.ice +19 -13
- data/slice/IcePatch2/FileServer.ice +27 -18
- data/slice/IceSSL/ConnectionInfo.ice +27 -23
- data/slice/IceSSL/ConnectionInfoF.ice +30 -0
- data/slice/IceSSL/EndpointInfo.ice +21 -36
- data/slice/IceStorm/IceStorm.ice +33 -24
- data/slice/IceStorm/Metrics.ice +19 -11
- metadata +148 -120
- data/ext/ObjectFactory.cpp +0 -140
- data/ext/ObjectFactory.h +0 -50
- data/ext/ice/cpp/include/Ice/ACMF.h +0 -30
- data/ext/ice/cpp/include/Ice/BasicStream.h +0 -1335
- data/ext/ice/cpp/include/Ice/BuiltinSequences.h +0 -82
- data/ext/ice/cpp/include/Ice/Communicator.h +0 -200
- data/ext/ice/cpp/include/Ice/Connection.h +0 -497
- data/ext/ice/cpp/include/Ice/ConnectionF.h +0 -74
- data/ext/ice/cpp/include/Ice/ConnectionFactoryF.h +0 -30
- data/ext/ice/cpp/include/Ice/Current.h +0 -102
- data/ext/ice/cpp/include/Ice/DefaultObjectFactory.h +0 -48
- data/ext/ice/cpp/include/Ice/DeprecatedStringConverter.h +0 -62
- data/ext/ice/cpp/include/Ice/Endpoint.h +0 -341
- data/ext/ice/cpp/include/Ice/EndpointF.h +0 -93
- data/ext/ice/cpp/include/Ice/EndpointTypes.h +0 -82
- data/ext/ice/cpp/include/Ice/Identity.h +0 -168
- data/ext/ice/cpp/include/Ice/ImplicitContext.h +0 -102
- data/ext/ice/cpp/include/Ice/Instrumentation.h +0 -365
- data/ext/ice/cpp/include/Ice/InstrumentationF.h +0 -75
- data/ext/ice/cpp/include/Ice/LocalException.h +0 -1030
- data/ext/ice/cpp/include/Ice/Locator.h +0 -2193
- data/ext/ice/cpp/include/Ice/LocatorF.h +0 -93
- data/ext/ice/cpp/include/Ice/Logger.h +0 -100
- data/ext/ice/cpp/include/Ice/Metrics.h +0 -2974
- data/ext/ice/cpp/include/Ice/ObjectAdapter.h +0 -168
- data/ext/ice/cpp/include/Ice/ObjectAdapterFactoryF.h +0 -26
- data/ext/ice/cpp/include/Ice/ObjectFactory.h +0 -92
- data/ext/ice/cpp/include/Ice/ObjectFactoryF.h +0 -66
- data/ext/ice/cpp/include/Ice/ObjectFactoryManagerF.h +0 -26
- data/ext/ice/cpp/include/Ice/Outgoing.h +0 -225
- data/ext/ice/cpp/include/Ice/Plugin.h +0 -125
- data/ext/ice/cpp/include/Ice/PluginF.h +0 -70
- data/ext/ice/cpp/include/Ice/Process.h +0 -574
- data/ext/ice/cpp/include/Ice/ProcessF.h +0 -83
- data/ext/ice/cpp/include/Ice/Properties.h +0 -136
- data/ext/ice/cpp/include/Ice/PropertiesAdmin.h +0 -830
- data/ext/ice/cpp/include/Ice/PropertiesF.h +0 -87
- data/ext/ice/cpp/include/Ice/RemoteLogger.h +0 -1500
- data/ext/ice/cpp/include/Ice/Router.h +0 -1159
- data/ext/ice/cpp/include/Ice/RouterF.h +0 -83
- data/ext/ice/cpp/include/Ice/ServantLocator.h +0 -96
- data/ext/ice/cpp/include/Ice/Stream.h +0 -447
- data/ext/ice/cpp/include/Ice/StreamF.h +0 -30
- data/ext/ice/cpp/include/Ice/Version.h +0 -262
- data/ext/ice/cpp/include/IceSSL/ConnectionInfo.h +0 -158
- data/ext/ice/cpp/include/IceSSL/EndpointInfo.h +0 -142
- data/ext/ice/cpp/include/IceUtil/AbstractMutex.h +0 -119
- data/ext/ice/cpp/include/IceUtil/Cache.h +0 -362
- data/ext/ice/cpp/include/IceUtil/IconvStringConverter.h +0 -302
- data/ext/ice/cpp/include/IceUtil/SHA1.h +0 -47
- data/ext/ice/cpp/include/Slice/CPlusPlusUtil.h +0 -65
- data/ext/ice/cpp/include/Slice/Checksum.h +0 -26
- data/ext/ice/cpp/include/Slice/CsUtil.h +0 -92
- data/ext/ice/cpp/include/Slice/DotNetNames.h +0 -34
- data/ext/ice/cpp/include/Slice/JavaUtil.h +0 -279
- data/ext/ice/cpp/include/Slice/ObjCUtil.h +0 -127
- data/ext/ice/cpp/include/Slice/PHPUtil.h +0 -50
- data/ext/ice/cpp/include/Slice/PythonUtil.h +0 -64
- data/ext/ice/cpp/include/Slice/Util.h +0 -56
- data/ext/ice/cpp/src/Ice/BasicStream.cpp +0 -3428
- data/ext/ice/cpp/src/Ice/DeprecatedStringConverter.cpp +0 -62
- data/ext/ice/cpp/src/Ice/ObjectFactoryF.cpp +0 -44
- data/ext/ice/cpp/src/Ice/ObjectFactoryManager.cpp +0 -139
- data/ext/ice/cpp/src/Ice/ObjectFactoryManager.h +0 -43
- data/ext/ice/cpp/src/Ice/Outgoing.cpp +0 -694
- data/ext/ice/cpp/src/Ice/Stream.cpp +0 -53
- data/ext/ice/cpp/src/Ice/StreamI.cpp +0 -832
- data/ext/ice/cpp/src/Ice/StreamI.h +0 -198
- data/ext/ice/cpp/src/IceSSL/Certificate.cpp +0 -1336
- data/ext/ice/cpp/src/IceUtil/ArgVector.cpp +0 -64
- data/ext/ice/cpp/src/IceUtil/ArgVector.h +0 -41
- data/ext/ice/cpp/src/IceUtil/Exception.cpp +0 -792
- data/ext/ice/cpp/src/IceUtil/FileUtil.h +0 -185
- data/ext/ice/cpp/src/Slice/CsUtil.cpp +0 -2660
- data/ext/ice/cpp/src/Slice/DotNetNames.cpp +0 -146
- data/ext/ice/cpp/src/Slice/ObjCUtil.cpp +0 -1310
- data/lib/Ice/ObjectFactoryF.rb +0 -29
- data/lib/IceGrid/Locator.rb +0 -106
- data/lib/IceGrid/Observer.rb +0 -572
- data/lib/IceGrid/Query.rb +0 -169
- data/slice/Freeze/BackgroundSaveEvictor.ice +0 -111
- data/slice/Freeze/CatalogData.ice +0 -49
- data/slice/Freeze/Connection.ice +0 -121
- data/slice/Freeze/ConnectionF.ice +0 -20
- data/slice/Freeze/DB.ice +0 -37
- data/slice/Freeze/Evictor.ice +0 -346
- data/slice/Freeze/EvictorF.ice +0 -22
- data/slice/Freeze/EvictorStorage.ice +0 -72
- data/slice/Freeze/Exception.ice +0 -100
- data/slice/Freeze/Transaction.ice +0 -58
- data/slice/Freeze/TransactionalEvictor.ice +0 -50
- data/slice/Ice/ObjectFactoryF.ice +0 -21
- data/slice/IceGrid/Locator.ice +0 -57
- data/slice/IceGrid/Observer.ice +0 -395
- data/slice/IceGrid/Query.ice +0 -131
data/ext/Proxy.h
CHANGED
@@ -1,11 +1,6 @@
|
|
1
|
-
// **********************************************************************
|
2
1
|
//
|
3
|
-
// Copyright (c)
|
2
|
+
// Copyright (c) ZeroC, Inc. All rights reserved.
|
4
3
|
//
|
5
|
-
// This copy of Ice is licensed to you under the terms described in the
|
6
|
-
// ICE_LICENSE file included in this distribution.
|
7
|
-
//
|
8
|
-
// **********************************************************************
|
9
4
|
|
10
5
|
#ifndef ICE_RUBY_PROXY_H
|
11
6
|
#define ICE_RUBY_PROXY_H
|
data/ext/Slice.cpp
CHANGED
@@ -1,11 +1,6 @@
|
|
1
|
-
// **********************************************************************
|
2
1
|
//
|
3
|
-
// Copyright (c)
|
2
|
+
// Copyright (c) ZeroC, Inc. All rights reserved.
|
4
3
|
//
|
5
|
-
// This copy of Ice is licensed to you under the terms described in the
|
6
|
-
// ICE_LICENSE file included in this distribution.
|
7
|
-
//
|
8
|
-
// **********************************************************************
|
9
4
|
|
10
5
|
#include <Slice.h>
|
11
6
|
#include <Util.h>
|
@@ -21,7 +16,7 @@ using namespace Slice::Ruby;
|
|
21
16
|
|
22
17
|
extern "C"
|
23
18
|
VALUE
|
24
|
-
IceRuby_loadSlice(int argc, VALUE* argv, VALUE self)
|
19
|
+
IceRuby_loadSlice(int argc, VALUE* argv, VALUE /*self*/)
|
25
20
|
{
|
26
21
|
ICE_RUBY_TRY
|
27
22
|
{
|
@@ -163,7 +158,7 @@ IceRuby_loadSlice(int argc, VALUE* argv, VALUE self)
|
|
163
158
|
|
164
159
|
extern "C"
|
165
160
|
VALUE
|
166
|
-
IceRuby_compile(int argc, VALUE* argv, VALUE self)
|
161
|
+
IceRuby_compile(int argc, VALUE* argv, VALUE /*self*/)
|
167
162
|
{
|
168
163
|
ICE_RUBY_TRY
|
169
164
|
{
|
@@ -187,22 +182,12 @@ IceRuby_compile(int argc, VALUE* argv, VALUE self)
|
|
187
182
|
}
|
188
183
|
catch(const std::exception& ex)
|
189
184
|
{
|
190
|
-
|
191
|
-
rc = EXIT_FAILURE;
|
192
|
-
}
|
193
|
-
catch(const std::string& msg)
|
194
|
-
{
|
195
|
-
getErrorStream() << argSeq[0] << ": error:" << msg << endl;
|
196
|
-
rc = EXIT_FAILURE;
|
197
|
-
}
|
198
|
-
catch(const char* msg)
|
199
|
-
{
|
200
|
-
getErrorStream() << argSeq[0] << ": error:" << msg << endl;
|
185
|
+
cerr << argSeq[0] << ": error:" << ex.what() << endl;
|
201
186
|
rc = EXIT_FAILURE;
|
202
187
|
}
|
203
188
|
catch(...)
|
204
189
|
{
|
205
|
-
|
190
|
+
cerr << argSeq[0] << ": error:" << "unknown exception" << endl;
|
206
191
|
rc = EXIT_FAILURE;
|
207
192
|
}
|
208
193
|
return INT2FIX(rc);
|
data/ext/Slice.h
CHANGED
@@ -1,11 +1,6 @@
|
|
1
|
-
// **********************************************************************
|
2
1
|
//
|
3
|
-
// Copyright (c)
|
2
|
+
// Copyright (c) ZeroC, Inc. All rights reserved.
|
4
3
|
//
|
5
|
-
// This copy of Ice is licensed to you under the terms described in the
|
6
|
-
// ICE_LICENSE file included in this distribution.
|
7
|
-
//
|
8
|
-
// **********************************************************************
|
9
4
|
|
10
5
|
#ifndef ICE_RUBY_SLICE_H
|
11
6
|
#define ICE_RUBY_SLICE_H
|
data/ext/Types.cpp
CHANGED
@@ -1,11 +1,6 @@
|
|
1
|
-
// **********************************************************************
|
2
1
|
//
|
3
|
-
// Copyright (c)
|
2
|
+
// Copyright (c) ZeroC, Inc. All rights reserved.
|
4
3
|
//
|
5
|
-
// This copy of Ice is licensed to you under the terms described in the
|
6
|
-
// ICE_LICENSE file included in this distribution.
|
7
|
-
//
|
8
|
-
// **********************************************************************
|
9
4
|
|
10
5
|
#include <Types.h>
|
11
6
|
#include <Proxy.h>
|
@@ -13,7 +8,9 @@
|
|
13
8
|
#include <IceUtil/InputUtil.h>
|
14
9
|
#include <IceUtil/OutputUtil.h>
|
15
10
|
#include <IceUtil/ScopedArray.h>
|
11
|
+
#include <Ice/InputStream.h>
|
16
12
|
#include <Ice/LocalException.h>
|
13
|
+
#include <Ice/OutputStream.h>
|
17
14
|
#include <Ice/SlicedData.h>
|
18
15
|
#include <list>
|
19
16
|
#include <limits>
|
@@ -63,22 +60,6 @@ public:
|
|
63
60
|
};
|
64
61
|
static InfoMapDestroyer infoMapDestroyer;
|
65
62
|
|
66
|
-
class ReadObjectCallback : public Ice::ReadObjectCallback
|
67
|
-
{
|
68
|
-
public:
|
69
|
-
|
70
|
-
ReadObjectCallback(const ClassInfoPtr&, const UnmarshalCallbackPtr&, VALUE, void*);
|
71
|
-
|
72
|
-
virtual void invoke(const Ice::ObjectPtr&);
|
73
|
-
|
74
|
-
private:
|
75
|
-
|
76
|
-
ClassInfoPtr _info;
|
77
|
-
UnmarshalCallbackPtr _cb;
|
78
|
-
VALUE _target;
|
79
|
-
void* _closure;
|
80
|
-
};
|
81
|
-
|
82
63
|
string
|
83
64
|
escapeString(const string& str)
|
84
65
|
{
|
@@ -94,9 +75,9 @@ escapeString(const string& str)
|
|
94
75
|
{
|
95
76
|
if(charSet.find(*c) == charSet.end())
|
96
77
|
{
|
97
|
-
unsigned char uc = *c;
|
78
|
+
unsigned char uc = static_cast<unsigned char>(*c); // char may be signed, so make it positive
|
98
79
|
ostringstream s;
|
99
|
-
s << "\\";
|
80
|
+
s << "\\"; // Print as octal if not in basic source character set
|
100
81
|
s.width(3);
|
101
82
|
s.fill('0');
|
102
83
|
s << oct;
|
@@ -184,16 +165,16 @@ addExceptionInfo(const string& id, const ExceptionInfoPtr& info)
|
|
184
165
|
}
|
185
166
|
|
186
167
|
//
|
187
|
-
//
|
168
|
+
// StreamUtil implementation
|
188
169
|
//
|
189
|
-
VALUE IceRuby::
|
190
|
-
VALUE IceRuby::
|
170
|
+
VALUE IceRuby::StreamUtil::_slicedDataType = Qnil;
|
171
|
+
VALUE IceRuby::StreamUtil::_sliceInfoType = Qnil;
|
191
172
|
|
192
|
-
IceRuby::
|
173
|
+
IceRuby::StreamUtil::StreamUtil()
|
193
174
|
{
|
194
175
|
}
|
195
176
|
|
196
|
-
IceRuby::
|
177
|
+
IceRuby::StreamUtil::~StreamUtil()
|
197
178
|
{
|
198
179
|
//
|
199
180
|
// Make sure we break any cycles among the ObjectReaders in preserved slices.
|
@@ -204,35 +185,41 @@ IceRuby::SlicedDataUtil::~SlicedDataUtil()
|
|
204
185
|
for(Ice::SliceInfoSeq::const_iterator q = slicedData->slices.begin(); q != slicedData->slices.end(); ++q)
|
205
186
|
{
|
206
187
|
//
|
207
|
-
// Don't just call (*q)->
|
208
|
-
// to the
|
188
|
+
// Don't just call (*q)->instances.clear(), as releasing references
|
189
|
+
// to the instances could have unexpected side effects. We exchange
|
209
190
|
// the vector into a temporary and then let the temporary fall out
|
210
191
|
// of scope.
|
211
192
|
//
|
212
193
|
vector<Ice::ObjectPtr> tmp;
|
213
|
-
tmp.swap((*q)->
|
194
|
+
tmp.swap((*q)->instances);
|
214
195
|
}
|
215
196
|
}
|
216
197
|
}
|
217
198
|
|
218
199
|
void
|
219
|
-
IceRuby::
|
200
|
+
IceRuby::StreamUtil::add(const ReadObjectCallbackPtr& callback)
|
201
|
+
{
|
202
|
+
_callbacks.push_back(callback);
|
203
|
+
}
|
204
|
+
|
205
|
+
void
|
206
|
+
IceRuby::StreamUtil::add(const ObjectReaderPtr& reader)
|
220
207
|
{
|
221
208
|
assert(reader->getSlicedData());
|
222
209
|
_readers.insert(reader);
|
223
210
|
}
|
224
211
|
|
225
212
|
void
|
226
|
-
IceRuby::
|
213
|
+
IceRuby::StreamUtil::updateSlicedData()
|
227
214
|
{
|
228
215
|
for(set<ObjectReaderPtr>::iterator p = _readers.begin(); p != _readers.end(); ++p)
|
229
216
|
{
|
230
|
-
|
217
|
+
setSlicedDataMember((*p)->getObject(), (*p)->getSlicedData());
|
231
218
|
}
|
232
219
|
}
|
233
220
|
|
234
221
|
void
|
235
|
-
IceRuby::
|
222
|
+
IceRuby::StreamUtil::setSlicedDataMember(VALUE obj, const Ice::SlicedDataPtr& slicedData)
|
236
223
|
{
|
237
224
|
//
|
238
225
|
// Create a Ruby equivalent of the SlicedData object.
|
@@ -253,8 +240,7 @@ IceRuby::SlicedDataUtil::setMember(VALUE obj, const Ice::SlicedDataPtr& slicedDa
|
|
253
240
|
|
254
241
|
volatile VALUE sd = callRuby(rb_class_new_instance, 0, static_cast<VALUE*>(0), _slicedDataType);
|
255
242
|
|
256
|
-
|
257
|
-
volatile VALUE slices = createArray(sz);
|
243
|
+
volatile VALUE slices = createArray(static_cast<long>(slicedData->slices.size()));
|
258
244
|
|
259
245
|
callRuby(rb_iv_set, sd, "@slices", slices);
|
260
246
|
|
@@ -284,27 +270,29 @@ IceRuby::SlicedDataUtil::setMember(VALUE obj, const Ice::SlicedDataPtr& slicedDa
|
|
284
270
|
//
|
285
271
|
// bytes
|
286
272
|
//
|
287
|
-
volatile VALUE bytes = callRuby(rb_str_new,
|
273
|
+
volatile VALUE bytes = callRuby(rb_str_new,
|
274
|
+
(*p)->bytes.empty() ? 0 : reinterpret_cast<const char*>(&(*p)->bytes[0]),
|
275
|
+
static_cast<long>((*p)->bytes.size()));
|
288
276
|
callRuby(rb_iv_set, slice, "@bytes", bytes);
|
289
277
|
|
290
278
|
//
|
291
|
-
//
|
279
|
+
// instances
|
292
280
|
//
|
293
|
-
volatile VALUE
|
294
|
-
callRuby(rb_iv_set, slice, "@
|
281
|
+
volatile VALUE instances = createArray(static_cast<long>((*p)->instances.size()));
|
282
|
+
callRuby(rb_iv_set, slice, "@instances", instances);
|
295
283
|
|
296
284
|
int j = 0;
|
297
|
-
for(vector<Ice::ObjectPtr>::iterator q = (*p)->
|
285
|
+
for(vector<Ice::ObjectPtr>::iterator q = (*p)->instances.begin(); q != (*p)->instances.end(); ++q)
|
298
286
|
{
|
299
287
|
//
|
300
|
-
// Each element in the
|
288
|
+
// Each element in the instances list is an instance of ObjectReader that wraps a Ruby object.
|
301
289
|
//
|
302
290
|
assert(*q);
|
303
291
|
ObjectReaderPtr r = ObjectReaderPtr::dynamicCast(*q);
|
304
292
|
assert(r);
|
305
293
|
VALUE o = r->getObject();
|
306
294
|
assert(o != Qnil); // Should be non-nil.
|
307
|
-
RARRAY_ASET(
|
295
|
+
RARRAY_ASET(instances, j, o);
|
308
296
|
j++;
|
309
297
|
}
|
310
298
|
|
@@ -327,7 +315,7 @@ IceRuby::SlicedDataUtil::setMember(VALUE obj, const Ice::SlicedDataPtr& slicedDa
|
|
327
315
|
// named _ice_slicedData which is an instance of the Ruby class Ice::SlicedData.
|
328
316
|
//
|
329
317
|
Ice::SlicedDataPtr
|
330
|
-
IceRuby::
|
318
|
+
IceRuby::StreamUtil::getSlicedDataMember(VALUE obj, ObjectMap* objectMap)
|
331
319
|
{
|
332
320
|
Ice::SlicedDataPtr slicedData;
|
333
321
|
|
@@ -369,27 +357,27 @@ IceRuby::SlicedDataUtil::getMember(VALUE obj, ObjectMap* objectMap)
|
|
369
357
|
info->bytes.swap(vtmp);
|
370
358
|
}
|
371
359
|
|
372
|
-
volatile VALUE
|
373
|
-
assert(TYPE(
|
374
|
-
long osz = RARRAY_LEN(
|
360
|
+
volatile VALUE instances = callRuby(rb_iv_get, s, "@instances");
|
361
|
+
assert(TYPE(instances) == T_ARRAY);
|
362
|
+
long osz = RARRAY_LEN(instances);
|
375
363
|
for(long j = 0; j < osz; ++j)
|
376
364
|
{
|
377
|
-
VALUE o = RARRAY_AREF(
|
365
|
+
VALUE o = RARRAY_AREF(instances, j);
|
378
366
|
|
379
367
|
Ice::ObjectPtr writer;
|
380
368
|
|
381
|
-
ObjectMap::iterator
|
382
|
-
if(
|
369
|
+
ObjectMap::iterator k = objectMap->find(o);
|
370
|
+
if(k == objectMap->end())
|
383
371
|
{
|
384
|
-
writer = new ObjectWriter(o, objectMap);
|
372
|
+
writer = new ObjectWriter(o, objectMap, 0);
|
385
373
|
objectMap->insert(ObjectMap::value_type(o, writer));
|
386
374
|
}
|
387
375
|
else
|
388
376
|
{
|
389
|
-
writer =
|
377
|
+
writer = k->second;
|
390
378
|
}
|
391
379
|
|
392
|
-
info->
|
380
|
+
info->instances.push_back(writer);
|
393
381
|
}
|
394
382
|
|
395
383
|
volatile VALUE hasOptionalMembers = callRuby(rb_iv_get, s, "@hasOptionalMembers");
|
@@ -546,7 +534,7 @@ IceRuby::PrimitiveInfo::optionalFormat() const
|
|
546
534
|
}
|
547
535
|
|
548
536
|
void
|
549
|
-
IceRuby::PrimitiveInfo::marshal(VALUE p,
|
537
|
+
IceRuby::PrimitiveInfo::marshal(VALUE p, Ice::OutputStream* os, ObjectMap*, bool)
|
550
538
|
{
|
551
539
|
switch(kind)
|
552
540
|
{
|
@@ -603,8 +591,8 @@ IceRuby::PrimitiveInfo::marshal(VALUE p, const Ice::OutputStreamPtr& os, ObjectM
|
|
603
591
|
#if defined(_MSC_VER) && (_MSC_VER <= 1700)
|
604
592
|
_finite(val) &&
|
605
593
|
#else
|
606
|
-
isfinite(d) &&
|
607
|
-
#endif
|
594
|
+
isfinite(d) &&
|
595
|
+
#endif
|
608
596
|
(d > numeric_limits<float>::max() || d < -numeric_limits<float>::max()))
|
609
597
|
{
|
610
598
|
throw RubyException(rb_eTypeError, "value is out of range for a float");
|
@@ -626,14 +614,18 @@ IceRuby::PrimitiveInfo::marshal(VALUE p, const Ice::OutputStreamPtr& os, ObjectM
|
|
626
614
|
case PrimitiveInfo::KindString:
|
627
615
|
{
|
628
616
|
string val = getString(p);
|
629
|
-
|
617
|
+
#ifdef HAVE_RUBY_ENCODING_H
|
618
|
+
os->write(val, false); // Bypass string conversion.
|
619
|
+
#else
|
620
|
+
os->write(val, true);
|
621
|
+
#endif
|
630
622
|
break;
|
631
623
|
}
|
632
624
|
}
|
633
625
|
}
|
634
626
|
|
635
627
|
void
|
636
|
-
IceRuby::PrimitiveInfo::unmarshal(
|
628
|
+
IceRuby::PrimitiveInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& cb, VALUE target,
|
637
629
|
void* closure, bool)
|
638
630
|
{
|
639
631
|
volatile VALUE val = Qnil;
|
@@ -691,7 +683,11 @@ IceRuby::PrimitiveInfo::unmarshal(const Ice::InputStreamPtr& is, const Unmarshal
|
|
691
683
|
case PrimitiveInfo::KindString:
|
692
684
|
{
|
693
685
|
string str;
|
694
|
-
|
686
|
+
#ifdef HAVE_RUBY_ENCODING_H
|
687
|
+
is->read(str, false); // Bypass string conversion.
|
688
|
+
#else
|
689
|
+
is->read(str, true);
|
690
|
+
#endif
|
695
691
|
val = createString(str);
|
696
692
|
break;
|
697
693
|
}
|
@@ -822,7 +818,7 @@ IceRuby::EnumInfo::optionalFormat() const
|
|
822
818
|
}
|
823
819
|
|
824
820
|
void
|
825
|
-
IceRuby::EnumInfo::marshal(VALUE p,
|
821
|
+
IceRuby::EnumInfo::marshal(VALUE p, Ice::OutputStream* os, ObjectMap*, bool)
|
826
822
|
{
|
827
823
|
assert(callRuby(rb_obj_is_instance_of, p, rubyClass) == Qtrue); // validate() should have caught this.
|
828
824
|
|
@@ -840,7 +836,7 @@ IceRuby::EnumInfo::marshal(VALUE p, const Ice::OutputStreamPtr& os, ObjectMap*,
|
|
840
836
|
}
|
841
837
|
|
842
838
|
void
|
843
|
-
IceRuby::EnumInfo::unmarshal(
|
839
|
+
IceRuby::EnumInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& cb, VALUE target, void* closure,
|
844
840
|
bool)
|
845
841
|
{
|
846
842
|
Ice::Int val = is->readEnum(maxValue);
|
@@ -1003,7 +999,7 @@ IceRuby::StructInfo::usesClasses() const
|
|
1003
999
|
}
|
1004
1000
|
|
1005
1001
|
void
|
1006
|
-
IceRuby::StructInfo::marshal(VALUE p,
|
1002
|
+
IceRuby::StructInfo::marshal(VALUE p, Ice::OutputStream* os, ObjectMap* objectMap, bool optional)
|
1007
1003
|
{
|
1008
1004
|
assert(NIL_P(p) || callRuby(rb_obj_is_kind_of, p, rubyClass) == Qtrue); // validate() should have caught this.
|
1009
1005
|
|
@@ -1017,7 +1013,7 @@ IceRuby::StructInfo::marshal(VALUE p, const Ice::OutputStreamPtr& os, ObjectMap*
|
|
1017
1013
|
p = _nullMarshalValue;
|
1018
1014
|
}
|
1019
1015
|
|
1020
|
-
Ice::OutputStream::size_type sizePos =
|
1016
|
+
Ice::OutputStream::size_type sizePos = 0;
|
1021
1017
|
if(optional)
|
1022
1018
|
{
|
1023
1019
|
if(_variableLength)
|
@@ -1049,7 +1045,7 @@ IceRuby::StructInfo::marshal(VALUE p, const Ice::OutputStreamPtr& os, ObjectMap*
|
|
1049
1045
|
}
|
1050
1046
|
|
1051
1047
|
void
|
1052
|
-
IceRuby::StructInfo::unmarshal(
|
1048
|
+
IceRuby::StructInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& cb, VALUE target,
|
1053
1049
|
void* closure, bool optional)
|
1054
1050
|
{
|
1055
1051
|
volatile VALUE obj = callRuby(rb_class_new_instance, 0, static_cast<VALUE*>(0), rubyClass);
|
@@ -1157,8 +1153,8 @@ IceRuby::SequenceInfo::validate(VALUE val)
|
|
1157
1153
|
return true;
|
1158
1154
|
}
|
1159
1155
|
}
|
1160
|
-
ID
|
1161
|
-
return callRuby(rb_respond_to, val,
|
1156
|
+
ID rbid = rb_intern("to_ary");
|
1157
|
+
return callRuby(rb_respond_to, val, rbid) != 0;
|
1162
1158
|
}
|
1163
1159
|
|
1164
1160
|
bool
|
@@ -1186,13 +1182,13 @@ IceRuby::SequenceInfo::usesClasses() const
|
|
1186
1182
|
}
|
1187
1183
|
|
1188
1184
|
void
|
1189
|
-
IceRuby::SequenceInfo::marshal(VALUE p,
|
1185
|
+
IceRuby::SequenceInfo::marshal(VALUE p, Ice::OutputStream* os, ObjectMap* objectMap, bool optional)
|
1190
1186
|
{
|
1191
1187
|
PrimitiveInfoPtr pi = PrimitiveInfoPtr::dynamicCast(elementType);
|
1192
1188
|
|
1193
1189
|
volatile VALUE arr = Qnil;
|
1194
1190
|
|
1195
|
-
Ice::OutputStream::size_type sizePos =
|
1191
|
+
Ice::OutputStream::size_type sizePos = 0;
|
1196
1192
|
if(optional)
|
1197
1193
|
{
|
1198
1194
|
if(elementType->variableLength())
|
@@ -1264,7 +1260,7 @@ IceRuby::SequenceInfo::marshal(VALUE p, const Ice::OutputStreamPtr& os, ObjectMa
|
|
1264
1260
|
}
|
1265
1261
|
|
1266
1262
|
void
|
1267
|
-
IceRuby::SequenceInfo::unmarshal(
|
1263
|
+
IceRuby::SequenceInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& cb, VALUE target,
|
1268
1264
|
void* closure, bool optional)
|
1269
1265
|
{
|
1270
1266
|
if(optional)
|
@@ -1363,7 +1359,7 @@ IceRuby::SequenceInfo::destroy()
|
|
1363
1359
|
}
|
1364
1360
|
|
1365
1361
|
void
|
1366
|
-
IceRuby::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, VALUE p,
|
1362
|
+
IceRuby::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, VALUE p, Ice::OutputStream* os)
|
1367
1363
|
{
|
1368
1364
|
volatile VALUE arr = Qnil;
|
1369
1365
|
volatile VALUE str = Qnil;
|
@@ -1400,10 +1396,10 @@ IceRuby::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, VALU
|
|
1400
1396
|
case PrimitiveInfo::KindBool:
|
1401
1397
|
{
|
1402
1398
|
long sz = RARRAY_LEN(arr);
|
1403
|
-
Ice::BoolSeq seq(sz);
|
1399
|
+
Ice::BoolSeq seq(static_cast<size_t>(sz));
|
1404
1400
|
for(long i = 0; i < sz; ++i)
|
1405
1401
|
{
|
1406
|
-
seq[i] = RTEST(RARRAY_AREF(arr, i));
|
1402
|
+
seq[static_cast<size_t>(i)] = RTEST(RARRAY_AREF(arr, i));
|
1407
1403
|
}
|
1408
1404
|
os->write(seq);
|
1409
1405
|
break;
|
@@ -1426,7 +1422,7 @@ IceRuby::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, VALU
|
|
1426
1422
|
else
|
1427
1423
|
{
|
1428
1424
|
long sz = RARRAY_LEN(arr);
|
1429
|
-
Ice::ByteSeq seq(sz);
|
1425
|
+
Ice::ByteSeq seq(static_cast<size_t>(sz));
|
1430
1426
|
for(long i = 0; i < sz; ++i)
|
1431
1427
|
{
|
1432
1428
|
long val = getInteger(RARRAY_AREF(arr, i));
|
@@ -1434,16 +1430,16 @@ IceRuby::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, VALU
|
|
1434
1430
|
{
|
1435
1431
|
throw RubyException(rb_eTypeError, "invalid value for element %ld of sequence<byte>", i);
|
1436
1432
|
}
|
1437
|
-
seq[i] = static_cast<Ice::Byte>(val);
|
1433
|
+
seq[static_cast<size_t>(i)] = static_cast<Ice::Byte>(val);
|
1438
1434
|
}
|
1439
|
-
os->write(
|
1435
|
+
os->write(seq);
|
1440
1436
|
}
|
1441
1437
|
break;
|
1442
1438
|
}
|
1443
1439
|
case PrimitiveInfo::KindShort:
|
1444
1440
|
{
|
1445
1441
|
long sz = RARRAY_LEN(arr);
|
1446
|
-
Ice::ShortSeq seq(sz);
|
1442
|
+
Ice::ShortSeq seq(static_cast<size_t>(sz));
|
1447
1443
|
for(long i = 0; i < sz; ++i)
|
1448
1444
|
{
|
1449
1445
|
long val = getInteger(RARRAY_AREF(arr, i));
|
@@ -1451,15 +1447,15 @@ IceRuby::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, VALU
|
|
1451
1447
|
{
|
1452
1448
|
throw RubyException(rb_eTypeError, "invalid value for element %ld of sequence<short>", i);
|
1453
1449
|
}
|
1454
|
-
seq[i] = static_cast<Ice::Short>(val);
|
1450
|
+
seq[static_cast<size_t>(i)] = static_cast<Ice::Short>(val);
|
1455
1451
|
}
|
1456
|
-
os->write(
|
1452
|
+
os->write(seq);
|
1457
1453
|
break;
|
1458
1454
|
}
|
1459
1455
|
case PrimitiveInfo::KindInt:
|
1460
1456
|
{
|
1461
1457
|
long sz = RARRAY_LEN(arr);
|
1462
|
-
Ice::IntSeq seq(sz);
|
1458
|
+
Ice::IntSeq seq(static_cast<size_t>(sz));
|
1463
1459
|
for(long i = 0; i < sz; ++i)
|
1464
1460
|
{
|
1465
1461
|
long val = getInteger(RARRAY_AREF(arr, i));
|
@@ -1467,26 +1463,26 @@ IceRuby::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, VALU
|
|
1467
1463
|
{
|
1468
1464
|
throw RubyException(rb_eTypeError, "invalid value for element %ld of sequence<int>", i);
|
1469
1465
|
}
|
1470
|
-
seq[i] = static_cast<Ice::Int>(val);
|
1466
|
+
seq[static_cast<size_t>(i)] = static_cast<Ice::Int>(val);
|
1471
1467
|
}
|
1472
|
-
os->write(
|
1468
|
+
os->write(seq);
|
1473
1469
|
break;
|
1474
1470
|
}
|
1475
1471
|
case PrimitiveInfo::KindLong:
|
1476
1472
|
{
|
1477
1473
|
long sz = RARRAY_LEN(arr);
|
1478
|
-
Ice::LongSeq seq(sz);
|
1474
|
+
Ice::LongSeq seq(static_cast<size_t>(sz));
|
1479
1475
|
for(long i = 0; i < sz; ++i)
|
1480
1476
|
{
|
1481
|
-
seq[i] = getLong(RARRAY_AREF(arr, i));
|
1477
|
+
seq[static_cast<size_t>(i)] = getLong(RARRAY_AREF(arr, i));
|
1482
1478
|
}
|
1483
|
-
os->write(
|
1479
|
+
os->write(seq);
|
1484
1480
|
break;
|
1485
1481
|
}
|
1486
1482
|
case PrimitiveInfo::KindFloat:
|
1487
1483
|
{
|
1488
1484
|
long sz = RARRAY_LEN(arr);
|
1489
|
-
Ice::FloatSeq seq(sz);
|
1485
|
+
Ice::FloatSeq seq(static_cast<size_t>(sz));
|
1490
1486
|
for(long i = 0; i < sz; ++i)
|
1491
1487
|
{
|
1492
1488
|
volatile VALUE v = callRuby(rb_Float, RARRAY_AREF(arr, i));
|
@@ -1495,15 +1491,15 @@ IceRuby::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, VALU
|
|
1495
1491
|
throw RubyException(rb_eTypeError, "unable to convert array element %ld to a float", i);
|
1496
1492
|
}
|
1497
1493
|
assert(TYPE(v) == T_FLOAT);
|
1498
|
-
seq[i] = static_cast<Ice::Float>(RFLOAT_VALUE(v));
|
1494
|
+
seq[static_cast<size_t>(i)] = static_cast<Ice::Float>(RFLOAT_VALUE(v));
|
1499
1495
|
}
|
1500
|
-
os->write(
|
1496
|
+
os->write(seq);
|
1501
1497
|
break;
|
1502
1498
|
}
|
1503
1499
|
case PrimitiveInfo::KindDouble:
|
1504
1500
|
{
|
1505
1501
|
long sz = RARRAY_LEN(arr);
|
1506
|
-
Ice::DoubleSeq seq(sz);
|
1502
|
+
Ice::DoubleSeq seq(static_cast<size_t>(sz));
|
1507
1503
|
for(long i = 0; i < sz; ++i)
|
1508
1504
|
{
|
1509
1505
|
volatile VALUE v = callRuby(rb_Float, RARRAY_AREF(arr, i));
|
@@ -1512,27 +1508,38 @@ IceRuby::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, VALU
|
|
1512
1508
|
throw RubyException(rb_eTypeError, "unable to convert array element %ld to a double", i);
|
1513
1509
|
}
|
1514
1510
|
assert(TYPE(v) == T_FLOAT);
|
1515
|
-
seq[i] = RFLOAT_VALUE(v);
|
1511
|
+
seq[static_cast<size_t>(i)] = RFLOAT_VALUE(v);
|
1516
1512
|
}
|
1517
|
-
os->write(
|
1513
|
+
os->write(seq);
|
1518
1514
|
break;
|
1519
1515
|
}
|
1520
1516
|
case PrimitiveInfo::KindString:
|
1521
1517
|
{
|
1522
1518
|
long sz = RARRAY_LEN(arr);
|
1523
|
-
Ice::StringSeq seq(sz);
|
1519
|
+
Ice::StringSeq seq(static_cast<size_t>(sz));
|
1524
1520
|
for(long i = 0; i < sz; ++i)
|
1525
1521
|
{
|
1526
|
-
seq[i] = getString(RARRAY_AREF(arr, i));
|
1522
|
+
seq[static_cast<size_t>(i)] = getString(RARRAY_AREF(arr, i));
|
1523
|
+
}
|
1524
|
+
if(seq.empty())
|
1525
|
+
{
|
1526
|
+
os->write(seq);
|
1527
|
+
}
|
1528
|
+
else
|
1529
|
+
{
|
1530
|
+
#ifdef HAVE_RUBY_ENCODING_H
|
1531
|
+
os->write(&seq[0], &seq[0] + seq.size(), false); // Bypass string conversion.
|
1532
|
+
#else
|
1533
|
+
os->write(&seq[0], &seq[0] + seq.size(), true);
|
1534
|
+
#endif
|
1527
1535
|
}
|
1528
|
-
os->write(seq, true);
|
1529
1536
|
break;
|
1530
1537
|
}
|
1531
1538
|
}
|
1532
1539
|
}
|
1533
1540
|
|
1534
1541
|
void
|
1535
|
-
IceRuby::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi,
|
1542
|
+
IceRuby::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, Ice::InputStream* is,
|
1536
1543
|
const UnmarshalCallbackPtr& cb, VALUE target, void* closure)
|
1537
1544
|
{
|
1538
1545
|
volatile VALUE result = Qnil;
|
@@ -1651,16 +1658,17 @@ IceRuby::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, co
|
|
1651
1658
|
case PrimitiveInfo::KindString:
|
1652
1659
|
{
|
1653
1660
|
Ice::StringSeq seq;
|
1661
|
+
#ifdef HAVE_RUBY_ENCODING_H
|
1662
|
+
is->read(seq, false); // Bypass string conversion.
|
1663
|
+
#else
|
1654
1664
|
is->read(seq, true);
|
1665
|
+
#endif
|
1655
1666
|
long sz = static_cast<long>(seq.size());
|
1656
1667
|
result = createArray(sz);
|
1657
1668
|
|
1658
|
-
|
1669
|
+
for(long i = 0; i < sz; ++i)
|
1659
1670
|
{
|
1660
|
-
|
1661
|
-
{
|
1662
|
-
RARRAY_ASET(result, i, createString(seq[i]));
|
1663
|
-
}
|
1671
|
+
RARRAY_ASET(result, i, createString(seq[static_cast<size_t>(i)]));
|
1664
1672
|
}
|
1665
1673
|
break;
|
1666
1674
|
}
|
@@ -1697,8 +1705,8 @@ IceRuby::DictionaryInfo::validate(VALUE val)
|
|
1697
1705
|
{
|
1698
1706
|
return true;
|
1699
1707
|
}
|
1700
|
-
ID
|
1701
|
-
return callRuby(rb_respond_to, val,
|
1708
|
+
ID rbid = rb_intern("to_hash");
|
1709
|
+
return callRuby(rb_respond_to, val, rbid) != 0;
|
1702
1710
|
}
|
1703
1711
|
|
1704
1712
|
bool
|
@@ -1729,7 +1737,7 @@ namespace
|
|
1729
1737
|
{
|
1730
1738
|
struct DictionaryMarshalIterator : public IceRuby::HashIterator
|
1731
1739
|
{
|
1732
|
-
DictionaryMarshalIterator(const IceRuby::DictionaryInfoPtr& d,
|
1740
|
+
DictionaryMarshalIterator(const IceRuby::DictionaryInfoPtr& d, Ice::OutputStream* o, IceRuby::ObjectMap* m)
|
1733
1741
|
: dict(d), os(o), objectMap(m)
|
1734
1742
|
{
|
1735
1743
|
}
|
@@ -1740,13 +1748,13 @@ struct DictionaryMarshalIterator : public IceRuby::HashIterator
|
|
1740
1748
|
}
|
1741
1749
|
|
1742
1750
|
IceRuby::DictionaryInfoPtr dict;
|
1743
|
-
Ice::
|
1751
|
+
Ice::OutputStream* os;
|
1744
1752
|
IceRuby::ObjectMap* objectMap;
|
1745
1753
|
};
|
1746
1754
|
}
|
1747
1755
|
|
1748
1756
|
void
|
1749
|
-
IceRuby::DictionaryInfo::marshal(VALUE p,
|
1757
|
+
IceRuby::DictionaryInfo::marshal(VALUE p, Ice::OutputStream* os, ObjectMap* objectMap, bool optional)
|
1750
1758
|
{
|
1751
1759
|
volatile VALUE hash = Qnil;
|
1752
1760
|
|
@@ -1759,10 +1767,10 @@ IceRuby::DictionaryInfo::marshal(VALUE p, const Ice::OutputStreamPtr& os, Object
|
|
1759
1767
|
}
|
1760
1768
|
}
|
1761
1769
|
|
1762
|
-
|
1770
|
+
Ice::Int sz = 0;
|
1763
1771
|
if(!NIL_P(hash))
|
1764
1772
|
{
|
1765
|
-
sz = RHASH_SIZE(hash);
|
1773
|
+
sz = static_cast<Ice::Int>(RHASH_SIZE(hash));
|
1766
1774
|
}
|
1767
1775
|
|
1768
1776
|
Ice::OutputStream::size_type sizePos = 0;
|
@@ -1799,7 +1807,7 @@ IceRuby::DictionaryInfo::marshal(VALUE p, const Ice::OutputStreamPtr& os, Object
|
|
1799
1807
|
}
|
1800
1808
|
|
1801
1809
|
void
|
1802
|
-
IceRuby::DictionaryInfo::marshalElement(VALUE key, VALUE value,
|
1810
|
+
IceRuby::DictionaryInfo::marshalElement(VALUE key, VALUE value, Ice::OutputStream* os, ObjectMap* objectMap)
|
1803
1811
|
{
|
1804
1812
|
if(!keyType->validate(key))
|
1805
1813
|
{
|
@@ -1816,7 +1824,7 @@ IceRuby::DictionaryInfo::marshalElement(VALUE key, VALUE value, const Ice::Outpu
|
|
1816
1824
|
}
|
1817
1825
|
|
1818
1826
|
void
|
1819
|
-
IceRuby::DictionaryInfo::unmarshal(
|
1827
|
+
IceRuby::DictionaryInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& cb, VALUE target,
|
1820
1828
|
void* closure, bool optional)
|
1821
1829
|
{
|
1822
1830
|
if(optional)
|
@@ -1952,7 +1960,7 @@ IceRuby::DictionaryInfo::destroy()
|
|
1952
1960
|
// ClassInfo implementation.
|
1953
1961
|
//
|
1954
1962
|
IceRuby::ClassInfo::ClassInfo(VALUE ident, bool loc) :
|
1955
|
-
compactId(-1), isBase(false), isLocal(loc),
|
1963
|
+
compactId(-1), isBase(false), isLocal(loc), preserve(false), interface(false), rubyClass(Qnil), typeObj(Qnil),
|
1956
1964
|
defined(false)
|
1957
1965
|
{
|
1958
1966
|
const_cast<string&>(id) = getString(ident);
|
@@ -1968,7 +1976,7 @@ IceRuby::ClassInfo::ClassInfo(VALUE ident, bool loc) :
|
|
1968
1976
|
}
|
1969
1977
|
|
1970
1978
|
void
|
1971
|
-
IceRuby::ClassInfo::define(VALUE t, VALUE compact, VALUE
|
1979
|
+
IceRuby::ClassInfo::define(VALUE t, VALUE compact, VALUE pres, VALUE intf, VALUE b, VALUE m)
|
1972
1980
|
{
|
1973
1981
|
if(!NIL_P(b))
|
1974
1982
|
{
|
@@ -1977,23 +1985,9 @@ IceRuby::ClassInfo::define(VALUE t, VALUE compact, VALUE abstr, VALUE pres, VALU
|
|
1977
1985
|
}
|
1978
1986
|
|
1979
1987
|
const_cast<Ice::Int&>(compactId) = static_cast<Ice::Int>(getInteger(compact));
|
1980
|
-
const_cast<bool&>(isAbstract) = RTEST(abstr);
|
1981
1988
|
const_cast<bool&>(preserve) = RTEST(pres);
|
1982
|
-
|
1983
|
-
long n;
|
1984
|
-
volatile VALUE arr;
|
1985
|
-
|
1986
|
-
arr = callRuby(rb_check_array_type, i);
|
1987
|
-
assert(!NIL_P(arr));
|
1988
|
-
for(n = 0; n < RARRAY_LEN(arr); ++n)
|
1989
|
-
{
|
1990
|
-
ClassInfoPtr iface = ClassInfoPtr::dynamicCast(getType(RARRAY_AREF(arr, n)));
|
1991
|
-
assert(iface);
|
1992
|
-
const_cast<ClassInfoList&>(interfaces).push_back(iface);
|
1993
|
-
}
|
1994
|
-
|
1989
|
+
const_cast<bool&>(interface) = RTEST(intf);
|
1995
1990
|
convertDataMembers(m, const_cast<DataMemberList&>(members), const_cast<DataMemberList&>(optionalMembers), true);
|
1996
|
-
|
1997
1991
|
const_cast<VALUE&>(rubyClass) = t;
|
1998
1992
|
const_cast<bool&>(defined) = true;
|
1999
1993
|
}
|
@@ -2042,7 +2036,7 @@ IceRuby::ClassInfo::validate(VALUE val)
|
|
2042
2036
|
assert(!NIL_P(type));
|
2043
2037
|
ClassInfoPtr info = ClassInfoPtr::dynamicCast(getType(type));
|
2044
2038
|
assert(info);
|
2045
|
-
return info->isA(this);
|
2039
|
+
return this->interface || info->isA(this);
|
2046
2040
|
}
|
2047
2041
|
|
2048
2042
|
bool
|
@@ -2070,7 +2064,7 @@ IceRuby::ClassInfo::usesClasses() const
|
|
2070
2064
|
}
|
2071
2065
|
|
2072
2066
|
void
|
2073
|
-
IceRuby::ClassInfo::marshal(VALUE p,
|
2067
|
+
IceRuby::ClassInfo::marshal(VALUE p, Ice::OutputStream* os, ObjectMap* objectMap, bool)
|
2074
2068
|
{
|
2075
2069
|
if(!defined)
|
2076
2070
|
{
|
@@ -2079,7 +2073,8 @@ IceRuby::ClassInfo::marshal(VALUE p, const Ice::OutputStreamPtr& os, ObjectMap*
|
|
2079
2073
|
|
2080
2074
|
if(NIL_P(p))
|
2081
2075
|
{
|
2082
|
-
|
2076
|
+
Ice::ObjectPtr nil;
|
2077
|
+
os->write(nil);
|
2083
2078
|
return;
|
2084
2079
|
}
|
2085
2080
|
|
@@ -2094,7 +2089,7 @@ IceRuby::ClassInfo::marshal(VALUE p, const Ice::OutputStreamPtr& os, ObjectMap*
|
|
2094
2089
|
ObjectMap::iterator q = objectMap->find(p);
|
2095
2090
|
if(q == objectMap->end())
|
2096
2091
|
{
|
2097
|
-
writer = new ObjectWriter(p, objectMap);
|
2092
|
+
writer = new ObjectWriter(p, objectMap, this);
|
2098
2093
|
objectMap->insert(ObjectMap::value_type(p, writer));
|
2099
2094
|
}
|
2100
2095
|
else
|
@@ -2105,19 +2100,40 @@ IceRuby::ClassInfo::marshal(VALUE p, const Ice::OutputStreamPtr& os, ObjectMap*
|
|
2105
2100
|
//
|
2106
2101
|
// Give the writer to the stream. The stream will eventually call write() on it.
|
2107
2102
|
//
|
2108
|
-
os->
|
2103
|
+
os->write(writer);
|
2104
|
+
}
|
2105
|
+
|
2106
|
+
namespace
|
2107
|
+
{
|
2108
|
+
|
2109
|
+
void
|
2110
|
+
patchObject(void* addr, const Ice::ObjectPtr& v)
|
2111
|
+
{
|
2112
|
+
ReadObjectCallback* cb = static_cast<ReadObjectCallback*>(addr);
|
2113
|
+
assert(cb);
|
2114
|
+
cb->invoke(v);
|
2115
|
+
}
|
2116
|
+
|
2109
2117
|
}
|
2110
2118
|
|
2111
2119
|
void
|
2112
|
-
IceRuby::ClassInfo::unmarshal(
|
2113
|
-
void* closure, bool)
|
2120
|
+
IceRuby::ClassInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& cb, VALUE target, void* closure, bool)
|
2114
2121
|
{
|
2115
2122
|
if(!defined)
|
2116
2123
|
{
|
2117
2124
|
throw RubyException(rb_eRuntimeError, "class %s is declared but not defined", id.c_str());
|
2118
2125
|
}
|
2119
2126
|
|
2120
|
-
|
2127
|
+
//
|
2128
|
+
// This callback is notified when the Slice value is actually read. The StreamUtil object
|
2129
|
+
// attached to the stream keeps a reference to the callback object to ensure it lives
|
2130
|
+
// long enough.
|
2131
|
+
//
|
2132
|
+
ReadObjectCallbackPtr rocb = new ReadObjectCallback(this, cb, target, closure);
|
2133
|
+
StreamUtil* util = reinterpret_cast<StreamUtil*>(is->getClosure());
|
2134
|
+
assert(util);
|
2135
|
+
util->add(rocb);
|
2136
|
+
is->read(patchObject, rocb.get());
|
2121
2137
|
}
|
2122
2138
|
|
2123
2139
|
void
|
@@ -2190,7 +2206,6 @@ void
|
|
2190
2206
|
IceRuby::ClassInfo::destroy()
|
2191
2207
|
{
|
2192
2208
|
const_cast<ClassInfoPtr&>(base) = 0;
|
2193
|
-
const_cast<ClassInfoList&>(interfaces).clear();
|
2194
2209
|
if(!members.empty())
|
2195
2210
|
{
|
2196
2211
|
DataMemberList ml = members;
|
@@ -2264,40 +2279,40 @@ IceRuby::ClassInfo::isA(const ClassInfoPtr& info)
|
|
2264
2279
|
{
|
2265
2280
|
return true;
|
2266
2281
|
}
|
2267
|
-
else if(base && base->isA(info))
|
2268
|
-
{
|
2269
|
-
return true;
|
2270
|
-
}
|
2271
|
-
else if(!interfaces.empty())
|
2272
|
-
{
|
2273
|
-
for(ClassInfoList::const_iterator p = interfaces.begin(); p != interfaces.end(); ++p)
|
2274
|
-
{
|
2275
|
-
if((*p)->isA(info))
|
2276
|
-
{
|
2277
|
-
return true;
|
2278
|
-
}
|
2279
|
-
}
|
2280
|
-
}
|
2281
2282
|
|
2282
|
-
return
|
2283
|
+
return base && base->isA(info);
|
2283
2284
|
}
|
2284
2285
|
|
2285
2286
|
//
|
2286
2287
|
// ProxyInfo implementation.
|
2287
2288
|
//
|
2288
2289
|
IceRuby::ProxyInfo::ProxyInfo(VALUE ident) :
|
2289
|
-
rubyClass(Qnil), typeObj(Qnil)
|
2290
|
+
isBase(false), rubyClass(Qnil), typeObj(Qnil)
|
2290
2291
|
{
|
2291
2292
|
const_cast<string&>(id) = getString(ident);
|
2293
|
+
const_cast<bool&>(isBase) = id == "::Ice::Object";
|
2292
2294
|
const_cast<VALUE&>(typeObj) = createType(this);
|
2293
2295
|
}
|
2294
2296
|
|
2295
2297
|
void
|
2296
|
-
IceRuby::ProxyInfo::define(VALUE t, VALUE i)
|
2298
|
+
IceRuby::ProxyInfo::define(VALUE t, VALUE b, VALUE i)
|
2297
2299
|
{
|
2300
|
+
if(!NIL_P(b))
|
2301
|
+
{
|
2302
|
+
const_cast<ProxyInfoPtr&>(base) = ProxyInfoPtr::dynamicCast(getType(b));
|
2303
|
+
assert(base);
|
2304
|
+
}
|
2305
|
+
|
2306
|
+
volatile VALUE arr = callRuby(rb_check_array_type, i);
|
2307
|
+
assert(!NIL_P(arr));
|
2308
|
+
for(int n = 0; n < RARRAY_LEN(arr); ++n)
|
2309
|
+
{
|
2310
|
+
ProxyInfoPtr iface = ProxyInfoPtr::dynamicCast(getType(RARRAY_AREF(arr, n)));
|
2311
|
+
assert(iface);
|
2312
|
+
const_cast<ProxyInfoList&>(interfaces).push_back(iface);
|
2313
|
+
}
|
2314
|
+
|
2298
2315
|
const_cast<VALUE&>(rubyClass) = t;
|
2299
|
-
const_cast<ClassInfoPtr&>(classInfo) = ClassInfoPtr::dynamicCast(getType(i));
|
2300
|
-
assert(classInfo);
|
2301
2316
|
}
|
2302
2317
|
|
2303
2318
|
string
|
@@ -2320,7 +2335,7 @@ IceRuby::ProxyInfo::validate(VALUE val)
|
|
2320
2335
|
assert(!NIL_P(type));
|
2321
2336
|
ProxyInfoPtr info = ProxyInfoPtr::dynamicCast(getType(type));
|
2322
2337
|
assert(info);
|
2323
|
-
return info->
|
2338
|
+
return info->isA(this);
|
2324
2339
|
}
|
2325
2340
|
return true;
|
2326
2341
|
}
|
@@ -2344,9 +2359,9 @@ IceRuby::ProxyInfo::optionalFormat() const
|
|
2344
2359
|
}
|
2345
2360
|
|
2346
2361
|
void
|
2347
|
-
IceRuby::ProxyInfo::marshal(VALUE p,
|
2362
|
+
IceRuby::ProxyInfo::marshal(VALUE p, Ice::OutputStream* os, ObjectMap*, bool optional)
|
2348
2363
|
{
|
2349
|
-
Ice::OutputStream::size_type sizePos =
|
2364
|
+
Ice::OutputStream::size_type sizePos = 0;
|
2350
2365
|
if(optional)
|
2351
2366
|
{
|
2352
2367
|
sizePos = os->startSize();
|
@@ -2369,7 +2384,7 @@ IceRuby::ProxyInfo::marshal(VALUE p, const Ice::OutputStreamPtr& os, ObjectMap*,
|
|
2369
2384
|
}
|
2370
2385
|
|
2371
2386
|
void
|
2372
|
-
IceRuby::ProxyInfo::unmarshal(
|
2387
|
+
IceRuby::ProxyInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& cb, VALUE target,
|
2373
2388
|
void* closure, bool optional)
|
2374
2389
|
{
|
2375
2390
|
if(optional)
|
@@ -2414,28 +2429,63 @@ IceRuby::ProxyInfo::print(VALUE value, IceUtilInternal::Output& out, PrintObject
|
|
2414
2429
|
}
|
2415
2430
|
}
|
2416
2431
|
|
2432
|
+
bool
|
2433
|
+
IceRuby::ProxyInfo::isA(const ProxyInfoPtr& info)
|
2434
|
+
{
|
2435
|
+
//
|
2436
|
+
// Return true if this class has an is-a relationship with info.
|
2437
|
+
//
|
2438
|
+
if(info->isBase)
|
2439
|
+
{
|
2440
|
+
return true;
|
2441
|
+
}
|
2442
|
+
else if(this == info.get())
|
2443
|
+
{
|
2444
|
+
return true;
|
2445
|
+
}
|
2446
|
+
else if(base && base->isA(info))
|
2447
|
+
{
|
2448
|
+
return true;
|
2449
|
+
}
|
2450
|
+
else if(!interfaces.empty())
|
2451
|
+
{
|
2452
|
+
for(ProxyInfoList::const_iterator p = interfaces.begin(); p != interfaces.end(); ++p)
|
2453
|
+
{
|
2454
|
+
if((*p)->isA(info))
|
2455
|
+
{
|
2456
|
+
return true;
|
2457
|
+
}
|
2458
|
+
}
|
2459
|
+
}
|
2460
|
+
|
2461
|
+
return false;
|
2462
|
+
}
|
2463
|
+
|
2417
2464
|
void
|
2418
2465
|
IceRuby::ProxyInfo::destroy()
|
2419
2466
|
{
|
2420
|
-
const_cast<
|
2467
|
+
const_cast<ProxyInfoPtr&>(base) = 0;
|
2468
|
+
const_cast<ProxyInfoList&>(interfaces).clear();
|
2421
2469
|
}
|
2422
2470
|
|
2423
2471
|
//
|
2424
2472
|
// ObjectWriter implementation.
|
2425
2473
|
//
|
2426
|
-
IceRuby::ObjectWriter::ObjectWriter(VALUE object, ObjectMap* objectMap) :
|
2427
|
-
_object(object), _map(objectMap)
|
2474
|
+
IceRuby::ObjectWriter::ObjectWriter(VALUE object, ObjectMap* objectMap, const ClassInfoPtr& formal) :
|
2475
|
+
_object(object), _map(objectMap), _formal(formal)
|
2428
2476
|
{
|
2429
2477
|
//
|
2430
2478
|
// Mark the object as in use for the lifetime of this wrapper.
|
2431
2479
|
//
|
2432
2480
|
rb_gc_register_address(&_object);
|
2433
|
-
|
2434
|
-
|
2435
|
-
|
2436
|
-
|
2437
|
-
|
2438
|
-
|
2481
|
+
if(!_formal || !_formal->interface)
|
2482
|
+
{
|
2483
|
+
volatile VALUE cls = CLASS_OF(object);
|
2484
|
+
volatile VALUE type = callRuby(rb_const_get, cls, rb_intern("ICE_TYPE"));
|
2485
|
+
assert(!NIL_P(type));
|
2486
|
+
_info = ClassInfoPtr::dynamicCast(getType(type));
|
2487
|
+
assert(_info);
|
2488
|
+
}
|
2439
2489
|
}
|
2440
2490
|
|
2441
2491
|
IceRuby::ObjectWriter::~ObjectWriter()
|
@@ -2454,41 +2504,55 @@ IceRuby::ObjectWriter::ice_preMarshal()
|
|
2454
2504
|
}
|
2455
2505
|
|
2456
2506
|
void
|
2457
|
-
IceRuby::ObjectWriter::
|
2507
|
+
IceRuby::ObjectWriter::_iceWrite(Ice::OutputStream* os) const
|
2458
2508
|
{
|
2459
2509
|
Ice::SlicedDataPtr slicedData;
|
2460
2510
|
|
2461
|
-
if(_info->preserve)
|
2511
|
+
if(_info && _info->preserve)
|
2462
2512
|
{
|
2463
2513
|
//
|
2464
2514
|
// Retrieve the SlicedData object that we stored as a hidden member of the Ruby object.
|
2465
2515
|
//
|
2466
|
-
slicedData =
|
2516
|
+
slicedData = StreamUtil::getSlicedDataMember(_object, const_cast<ObjectMap*>(_map));
|
2467
2517
|
}
|
2468
2518
|
|
2469
|
-
os->
|
2470
|
-
|
2471
|
-
if(_info->id != "::Ice::UnknownSlicedObject")
|
2519
|
+
os->startValue(slicedData);
|
2520
|
+
if(_formal && _formal->interface)
|
2472
2521
|
{
|
2473
|
-
|
2474
|
-
|
2522
|
+
ID op = rb_intern("ice_id");
|
2523
|
+
string id = getString(callRuby(rb_funcall, _object, op, 0));
|
2524
|
+
os->startSlice(id, -1, true);
|
2525
|
+
os->endSlice();
|
2526
|
+
}
|
2527
|
+
else
|
2528
|
+
{
|
2529
|
+
if(_info->id != "::Ice::UnknownSlicedValue")
|
2475
2530
|
{
|
2476
|
-
|
2531
|
+
ClassInfoPtr info = _info;
|
2532
|
+
while(info)
|
2533
|
+
{
|
2534
|
+
os->startSlice(info->id, info->compactId, !info->base);
|
2477
2535
|
|
2478
|
-
|
2479
|
-
|
2536
|
+
writeMembers(os, info->members);
|
2537
|
+
writeMembers(os, info->optionalMembers); // The optional members have already been sorted by tag.
|
2480
2538
|
|
2481
|
-
|
2539
|
+
os->endSlice();
|
2482
2540
|
|
2483
|
-
|
2541
|
+
info = info->base;
|
2542
|
+
}
|
2484
2543
|
}
|
2485
2544
|
}
|
2545
|
+
os->endValue();
|
2546
|
+
}
|
2486
2547
|
|
2487
|
-
|
2548
|
+
void
|
2549
|
+
IceRuby::ObjectWriter::_iceRead(Ice::InputStream*)
|
2550
|
+
{
|
2551
|
+
assert(false);
|
2488
2552
|
}
|
2489
2553
|
|
2490
2554
|
void
|
2491
|
-
IceRuby::ObjectWriter::writeMembers(
|
2555
|
+
IceRuby::ObjectWriter::writeMembers(Ice::OutputStream* os, const DataMemberList& members) const
|
2492
2556
|
{
|
2493
2557
|
for(DataMemberList::const_iterator q = members.begin(); q != members.end(); ++q)
|
2494
2558
|
{
|
@@ -2539,11 +2603,17 @@ IceRuby::ObjectReader::ice_postUnmarshal()
|
|
2539
2603
|
}
|
2540
2604
|
|
2541
2605
|
void
|
2542
|
-
IceRuby::ObjectReader::
|
2606
|
+
IceRuby::ObjectReader::_iceWrite(Ice::OutputStream*) const
|
2543
2607
|
{
|
2544
|
-
|
2608
|
+
assert(false);
|
2609
|
+
}
|
2610
|
+
|
2611
|
+
void
|
2612
|
+
IceRuby::ObjectReader::_iceRead(Ice::InputStream* is)
|
2613
|
+
{
|
2614
|
+
is->startValue();
|
2545
2615
|
|
2546
|
-
const bool unknown = _info->id == "::Ice::
|
2616
|
+
const bool unknown = _info->id == "::Ice::UnknownSlicedValue";
|
2547
2617
|
|
2548
2618
|
//
|
2549
2619
|
// Unmarshal the slices of a user-defined class.
|
@@ -2585,16 +2655,16 @@ IceRuby::ObjectReader::read(const Ice::InputStreamPtr& is)
|
|
2585
2655
|
}
|
2586
2656
|
}
|
2587
2657
|
|
2588
|
-
_slicedData = is->
|
2658
|
+
_slicedData = is->endValue(_info->preserve);
|
2589
2659
|
|
2590
2660
|
if(_slicedData)
|
2591
2661
|
{
|
2592
|
-
|
2662
|
+
StreamUtil* util = reinterpret_cast<StreamUtil*>(is->getClosure());
|
2593
2663
|
assert(util);
|
2594
2664
|
util->add(this);
|
2595
2665
|
|
2596
2666
|
//
|
2597
|
-
// Define the "unknownTypeId" member for an instance of
|
2667
|
+
// Define the "unknownTypeId" member for an instance of UnknownSlicedValue.
|
2598
2668
|
//
|
2599
2669
|
if(unknown)
|
2600
2670
|
{
|
@@ -2666,7 +2736,7 @@ IceRuby::ReadObjectCallback::invoke(const Ice::ObjectPtr& p)
|
|
2666
2736
|
// Verify that the unmarshaled object is compatible with the formal type.
|
2667
2737
|
//
|
2668
2738
|
volatile VALUE obj = reader->getObject();
|
2669
|
-
if(!_info->validate(obj))
|
2739
|
+
if(!_info->interface && !_info->validate(obj))
|
2670
2740
|
{
|
2671
2741
|
Ice::UnexpectedObjectException ex(__FILE__, __LINE__);
|
2672
2742
|
ex.reason = "unmarshaled object is not an instance of " + _info->id;
|
@@ -2687,7 +2757,7 @@ IceRuby::ReadObjectCallback::invoke(const Ice::ObjectPtr& p)
|
|
2687
2757
|
// ExceptionInfo implementation.
|
2688
2758
|
//
|
2689
2759
|
VALUE
|
2690
|
-
IceRuby::ExceptionInfo::unmarshal(
|
2760
|
+
IceRuby::ExceptionInfo::unmarshal(Ice::InputStream* is)
|
2691
2761
|
{
|
2692
2762
|
volatile VALUE obj = callRuby(rb_class_new_instance, 0, static_cast<VALUE*>(0), rubyClass);
|
2693
2763
|
|
@@ -2797,8 +2867,8 @@ IceRuby::ExceptionInfo::printMembers(VALUE value, IceUtilInternal::Output& out,
|
|
2797
2867
|
//
|
2798
2868
|
// ExceptionReader implementation.
|
2799
2869
|
//
|
2800
|
-
IceRuby::ExceptionReader::ExceptionReader(const
|
2801
|
-
|
2870
|
+
IceRuby::ExceptionReader::ExceptionReader(const ExceptionInfoPtr& info) :
|
2871
|
+
_info(info)
|
2802
2872
|
{
|
2803
2873
|
}
|
2804
2874
|
|
@@ -2807,34 +2877,20 @@ IceRuby::ExceptionReader::~ExceptionReader()
|
|
2807
2877
|
{
|
2808
2878
|
}
|
2809
2879
|
|
2810
|
-
void
|
2811
|
-
IceRuby::ExceptionReader::read(const Ice::InputStreamPtr& is) const
|
2812
|
-
{
|
2813
|
-
is->startException();
|
2814
|
-
|
2815
|
-
const_cast<VALUE&>(_ex) = _info->unmarshal(is);
|
2816
|
-
|
2817
|
-
const_cast<Ice::SlicedDataPtr&>(_slicedData) = is->endException(_info->preserve);
|
2818
|
-
}
|
2819
|
-
|
2820
|
-
bool
|
2821
|
-
IceRuby::ExceptionReader::usesClasses() const
|
2822
|
-
{
|
2823
|
-
return _info->usesClasses;
|
2824
|
-
}
|
2825
|
-
|
2826
2880
|
string
|
2827
|
-
IceRuby::ExceptionReader::
|
2881
|
+
IceRuby::ExceptionReader::ice_id() const
|
2828
2882
|
{
|
2829
2883
|
return _info->id;
|
2830
2884
|
}
|
2831
2885
|
|
2886
|
+
#ifndef ICE_CPP11_MAPPING
|
2832
2887
|
Ice::UserException*
|
2833
2888
|
IceRuby::ExceptionReader::ice_clone() const
|
2834
2889
|
{
|
2835
2890
|
assert(false);
|
2836
2891
|
return 0;
|
2837
2892
|
}
|
2893
|
+
#endif
|
2838
2894
|
|
2839
2895
|
void
|
2840
2896
|
IceRuby::ExceptionReader::ice_throw() const
|
@@ -2842,6 +2898,28 @@ IceRuby::ExceptionReader::ice_throw() const
|
|
2842
2898
|
throw *this;
|
2843
2899
|
}
|
2844
2900
|
|
2901
|
+
void
|
2902
|
+
IceRuby::ExceptionReader::_write(Ice::OutputStream*) const
|
2903
|
+
{
|
2904
|
+
assert(false);
|
2905
|
+
}
|
2906
|
+
|
2907
|
+
void
|
2908
|
+
IceRuby::ExceptionReader::_read(Ice::InputStream* is)
|
2909
|
+
{
|
2910
|
+
is->startException();
|
2911
|
+
|
2912
|
+
const_cast<VALUE&>(_ex) = _info->unmarshal(is);
|
2913
|
+
|
2914
|
+
const_cast<Ice::SlicedDataPtr&>(_slicedData) = is->endException(_info->preserve);
|
2915
|
+
}
|
2916
|
+
|
2917
|
+
bool
|
2918
|
+
IceRuby::ExceptionReader::_usesClasses() const
|
2919
|
+
{
|
2920
|
+
return _info->usesClasses;
|
2921
|
+
}
|
2922
|
+
|
2845
2923
|
VALUE
|
2846
2924
|
IceRuby::ExceptionReader::getException() const
|
2847
2925
|
{
|
@@ -3026,14 +3104,16 @@ IceRuby_defineException(VALUE /*self*/, VALUE id, VALUE type, VALUE preserve, VA
|
|
3026
3104
|
|
3027
3105
|
extern "C"
|
3028
3106
|
VALUE
|
3029
|
-
IceRuby_TypeInfo_defineProxy(VALUE self, VALUE type, VALUE
|
3107
|
+
IceRuby_TypeInfo_defineProxy(VALUE self, VALUE type, VALUE base, VALUE interfaces)
|
3030
3108
|
{
|
3031
3109
|
ICE_RUBY_TRY
|
3032
3110
|
{
|
3033
3111
|
ProxyInfoPtr info = ProxyInfoPtr::dynamicCast(getType(self));
|
3034
3112
|
assert(info);
|
3035
3113
|
|
3036
|
-
info->define(type,
|
3114
|
+
info->define(type, base, interfaces);
|
3115
|
+
rb_define_const(type, "ICE_TYPE", self);
|
3116
|
+
rb_define_const(type, "ICE_ID", createString(info->id));
|
3037
3117
|
}
|
3038
3118
|
ICE_RUBY_CATCH
|
3039
3119
|
return Qnil;
|
@@ -3041,22 +3121,31 @@ IceRuby_TypeInfo_defineProxy(VALUE self, VALUE type, VALUE classInfo)
|
|
3041
3121
|
|
3042
3122
|
extern "C"
|
3043
3123
|
VALUE
|
3044
|
-
IceRuby_TypeInfo_defineClass(VALUE self, VALUE type, VALUE compactId, VALUE
|
3045
|
-
VALUE
|
3124
|
+
IceRuby_TypeInfo_defineClass(VALUE self, VALUE type, VALUE compactId, VALUE preserve, VALUE interface, VALUE base,
|
3125
|
+
VALUE members)
|
3046
3126
|
{
|
3047
3127
|
ICE_RUBY_TRY
|
3048
3128
|
{
|
3049
3129
|
ClassInfoPtr info = ClassInfoPtr::dynamicCast(getType(self));
|
3050
3130
|
assert(info);
|
3051
3131
|
|
3052
|
-
info->define(type, compactId,
|
3132
|
+
info->define(type, compactId, preserve, interface, base, members);
|
3133
|
+
|
3134
|
+
if(info->compactId != -1)
|
3135
|
+
{
|
3136
|
+
CompactIdMap::iterator q = _compactIdMap.find(info->compactId);
|
3137
|
+
if(q != _compactIdMap.end())
|
3138
|
+
{
|
3139
|
+
_compactIdMap.erase(q);
|
3140
|
+
}
|
3141
|
+
_compactIdMap.insert(CompactIdMap::value_type(info->compactId, info));
|
3142
|
+
}
|
3053
3143
|
|
3054
|
-
|
3055
|
-
if(q != _compactIdMap.end())
|
3144
|
+
if(type != Qnil && !info->interface)
|
3056
3145
|
{
|
3057
|
-
|
3146
|
+
rb_define_const(type, "ICE_TYPE", self);
|
3147
|
+
rb_define_const(type, "ICE_ID", createString(info->id));
|
3058
3148
|
}
|
3059
|
-
_compactIdMap.insert(CompactIdMap::value_type(info->compactId, info));
|
3060
3149
|
}
|
3061
3150
|
ICE_RUBY_CATCH
|
3062
3151
|
return Qnil;
|
@@ -3085,17 +3174,17 @@ IceRuby_stringify(VALUE /*self*/, VALUE obj, VALUE type)
|
|
3085
3174
|
|
3086
3175
|
extern "C"
|
3087
3176
|
VALUE
|
3088
|
-
IceRuby_stringifyException(VALUE /*self*/, VALUE
|
3177
|
+
IceRuby_stringifyException(VALUE /*self*/, VALUE exc)
|
3089
3178
|
{
|
3090
3179
|
ICE_RUBY_TRY
|
3091
3180
|
{
|
3092
|
-
volatile VALUE cls = CLASS_OF(
|
3181
|
+
volatile VALUE cls = CLASS_OF(exc);
|
3093
3182
|
volatile VALUE type = callRuby(rb_const_get, cls, rb_intern("ICE_TYPE"));
|
3094
3183
|
ExceptionInfoPtr info = getException(type);
|
3095
3184
|
|
3096
3185
|
ostringstream ostr;
|
3097
3186
|
IceUtilInternal::Output out(ostr);
|
3098
|
-
info->print(
|
3187
|
+
info->print(exc, out);
|
3099
3188
|
|
3100
3189
|
string str = ostr.str();
|
3101
3190
|
return createString(str);
|
@@ -3159,8 +3248,8 @@ IceRuby::initTypes(VALUE iceModule)
|
|
3159
3248
|
rb_define_module_function(iceModule, "__declareLocalClass", CAST_METHOD(IceRuby_declareLocalClass), 1);
|
3160
3249
|
rb_define_module_function(iceModule, "__defineException", CAST_METHOD(IceRuby_defineException), 5);
|
3161
3250
|
|
3162
|
-
rb_define_method(_typeInfoClass, "defineClass", CAST_METHOD(IceRuby_TypeInfo_defineClass),
|
3163
|
-
rb_define_method(_typeInfoClass, "defineProxy", CAST_METHOD(IceRuby_TypeInfo_defineProxy),
|
3251
|
+
rb_define_method(_typeInfoClass, "defineClass", CAST_METHOD(IceRuby_TypeInfo_defineClass), 6);
|
3252
|
+
rb_define_method(_typeInfoClass, "defineProxy", CAST_METHOD(IceRuby_TypeInfo_defineProxy), 3);
|
3164
3253
|
|
3165
3254
|
rb_define_module_function(iceModule, "__stringify", CAST_METHOD(IceRuby_stringify), 2);
|
3166
3255
|
rb_define_module_function(iceModule, "__stringifyException", CAST_METHOD(IceRuby_stringifyException), 1);
|