zeroc-ice 3.8.1 → 3.8.3
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 +26 -9
- data/dist/IceRuby/Config.h +0 -12
- data/dist/IceRuby/Connection.cpp +18 -9
- data/dist/IceRuby/DefaultSliceLoader.h +1 -1
- data/dist/IceRuby/Endpoint.cpp +21 -8
- data/dist/IceRuby/Operation.cpp +29 -11
- data/dist/IceRuby/Properties.cpp +3 -4
- data/dist/IceRuby/Proxy.cpp +11 -19
- data/dist/IceRuby/RubySliceLoader.cpp +1 -1
- data/dist/IceRuby/RubySliceLoader.h +6 -0
- data/dist/IceRuby/Types.cpp +162 -138
- data/dist/IceRuby/Types.h +68 -28
- data/dist/IceRuby/Util.cpp +14 -78
- data/dist/IceRuby/Util.h +7 -17
- data/dist/ice/cpp/include/Ice/Communicator.h +31 -8
- data/dist/ice/cpp/include/Ice/Config.h +2 -2
- data/dist/ice/cpp/include/Ice/Connection.h +24 -8
- data/dist/ice/cpp/include/Ice/CtrlCHandler.h +1 -1
- data/dist/ice/cpp/include/Ice/Demangle.h +1 -1
- data/dist/ice/cpp/include/Ice/Endpoint.h +4 -4
- data/dist/ice/cpp/include/Ice/Initialize.h +4 -4
- data/dist/ice/cpp/include/Ice/InputStream.h +5 -5
- data/dist/ice/cpp/include/Ice/Instrumentation.h +13 -7
- data/dist/ice/cpp/include/Ice/LocalExceptions.h +26 -5
- data/dist/ice/cpp/include/Ice/Logger.h +7 -0
- data/dist/ice/cpp/include/Ice/LoggerUtil.h +1 -1
- data/dist/ice/cpp/include/Ice/Object.h +10 -8
- data/dist/ice/cpp/include/Ice/ObjectAdapter.h +1 -1
- data/dist/ice/cpp/include/Ice/OutgoingAsync.h +5 -2
- data/dist/ice/cpp/include/Ice/OutgoingResponse.h +2 -1
- data/dist/ice/cpp/include/Ice/OutputStream.h +14 -11
- data/dist/ice/cpp/include/Ice/PluginFactory.h +1 -1
- data/dist/ice/cpp/include/Ice/Properties.h +3 -3
- data/dist/ice/cpp/include/Ice/Proxy.h +192 -50
- data/dist/ice/cpp/include/Ice/SSL/ClientAuthenticationOptions.h +3 -3
- data/dist/ice/cpp/include/Ice/SSL/EndpointInfo.h +1 -1
- data/dist/ice/cpp/include/Ice/SSL/ServerAuthenticationOptions.h +5 -5
- data/dist/ice/cpp/include/Ice/ServantLocator.h +1 -1
- data/dist/ice/cpp/include/Ice/Service.h +2 -5
- data/dist/ice/cpp/include/Ice/SliceLoader.h +1 -1
- data/dist/ice/cpp/include/Ice/SlicedData.h +5 -3
- data/dist/ice/cpp/include/Ice/StreamHelpers.h +1 -1
- data/dist/ice/cpp/include/Ice/StreamableTraits.h +2 -2
- data/dist/ice/cpp/include/Ice/StringConverter.h +2 -3
- data/dist/ice/cpp/include/Ice/StringUtil.h +2 -7
- data/dist/ice/cpp/include/Ice/UUID.h +1 -0
- data/dist/ice/cpp/include/Ice/Value.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/BuiltinSequences.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Context.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/EndpointTypes.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Identity.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Locator.h +57 -23
- data/dist/ice/cpp/include/generated/Ice/LocatorRegistry.h +38 -11
- data/dist/ice/cpp/include/generated/Ice/Metrics.h +99 -44
- data/dist/ice/cpp/include/generated/Ice/OperationMode.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Process.h +34 -8
- data/dist/ice/cpp/include/generated/Ice/PropertiesAdmin.h +42 -11
- data/dist/ice/cpp/include/generated/Ice/PropertyDict.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/RemoteLogger.h +93 -40
- data/dist/ice/cpp/include/generated/Ice/ReplyStatus.h +8 -4
- data/dist/ice/cpp/include/generated/Ice/Router.h +55 -19
- data/dist/ice/cpp/include/generated/Ice/SliceChecksumDict.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Version.h +2 -2
- data/dist/ice/cpp/include/generated/IceDiscovery/Lookup.h +66 -14
- data/dist/ice/cpp/include/generated/IceLocatorDiscovery/Lookup.h +34 -8
- data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_all.cpp +1 -1
- data/dist/ice/cpp/src/Ice/Base64.cpp +47 -137
- data/dist/ice/cpp/src/Ice/Base64.h +2 -2
- data/dist/ice/cpp/src/Ice/BatchRequestQueue.cpp +28 -13
- data/dist/ice/cpp/src/Ice/BatchRequestQueue.h +5 -1
- data/dist/ice/cpp/src/Ice/Buffer.cpp +1 -1
- data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +6 -4
- data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.h +1 -1
- data/dist/ice/cpp/src/Ice/Communicator.cpp +4 -3
- data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.cpp +8 -0
- data/dist/ice/cpp/src/Ice/ConnectRequestHandler.cpp +5 -15
- data/dist/ice/cpp/src/Ice/ConnectRequestHandler.h +1 -1
- data/dist/ice/cpp/src/Ice/ConnectionFactory.cpp +6 -8
- data/dist/ice/cpp/src/Ice/ConnectionFactory.h +0 -3
- data/dist/ice/cpp/src/Ice/ConnectionI.cpp +121 -108
- data/dist/ice/cpp/src/Ice/ConnectionI.h +12 -9
- data/dist/ice/cpp/src/Ice/ConsoleUtil.cpp +1 -1
- data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +10 -14
- data/dist/ice/cpp/src/Ice/EndpointI.h +1 -1
- data/dist/ice/cpp/src/Ice/FileUtil.cpp +15 -79
- data/dist/ice/cpp/src/Ice/FileUtil.h +0 -3
- data/dist/ice/cpp/src/Ice/FixedRequestHandler.cpp +1 -1
- data/dist/ice/cpp/src/Ice/FixedRequestHandler.h +1 -1
- data/dist/ice/cpp/src/Ice/HttpParser.h +0 -2
- data/dist/ice/cpp/src/Ice/IPEndpointI.cpp +4 -0
- data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp +6 -3
- data/dist/ice/cpp/src/Ice/IncomingRequest.cpp +2 -4
- data/dist/ice/cpp/src/Ice/InputStream.cpp +50 -33
- data/dist/ice/cpp/src/Ice/Instance.cpp +73 -50
- data/dist/ice/cpp/src/Ice/Instance.h +1 -6
- data/dist/ice/cpp/src/Ice/LocalExceptions.cpp +7 -1
- data/dist/ice/cpp/src/Ice/LocatorInfo.cpp +2 -2
- data/dist/ice/cpp/src/Ice/LoggerAdminI.cpp +13 -18
- data/dist/ice/cpp/src/Ice/LoggerI.cpp +1 -1
- data/dist/ice/cpp/src/Ice/LoggerI.h +2 -2
- data/dist/ice/cpp/src/Ice/MetricsAdminI.h +6 -1
- data/dist/ice/cpp/src/Ice/MetricsObserverI.h +22 -18
- data/dist/ice/cpp/src/Ice/NativePropertiesAdmin.cpp +5 -2
- data/dist/ice/cpp/src/Ice/Network.cpp +168 -103
- data/dist/ice/cpp/src/Ice/Network.h +12 -7
- data/dist/ice/cpp/src/Ice/NetworkProxy.cpp +17 -6
- data/dist/ice/cpp/src/Ice/NetworkProxy.h +2 -1
- data/dist/ice/cpp/src/Ice/Object.cpp +1 -1
- data/dist/ice/cpp/src/Ice/ObjectAdapterI.cpp +56 -19
- data/dist/ice/cpp/src/Ice/OpaqueEndpointI.cpp +10 -10
- data/dist/ice/cpp/src/Ice/Options.cpp +7 -2
- data/dist/ice/cpp/src/Ice/OutgoingAsync.cpp +2 -2
- data/dist/ice/cpp/src/Ice/OutgoingResponse.cpp +127 -127
- data/dist/ice/cpp/src/Ice/OutgoingResponseInternal.h +21 -0
- data/dist/ice/cpp/src/Ice/OutputStream.cpp +50 -65
- data/dist/ice/cpp/src/Ice/PluginManagerI.cpp +7 -1
- data/dist/ice/cpp/src/Ice/Properties.cpp +26 -16
- data/dist/ice/cpp/src/Ice/PropertyNames.cpp +2 -1
- data/dist/ice/cpp/src/Ice/PropertyUtil.cpp +1 -1
- data/dist/ice/cpp/src/Ice/ProtocolInstance.cpp +0 -11
- data/dist/ice/cpp/src/Ice/ProtocolInstance.h +1 -2
- data/dist/ice/cpp/src/Ice/Proxy.cpp +9 -1
- data/dist/ice/cpp/src/Ice/ProxyAsync.cpp +110 -13
- data/dist/ice/cpp/src/Ice/ProxyFunctions.cpp +4 -4
- data/dist/ice/cpp/src/Ice/Random.cpp +68 -7
- data/dist/ice/cpp/src/Ice/Random.h +6 -2
- data/dist/ice/cpp/src/Ice/Reference.cpp +37 -26
- data/dist/ice/cpp/src/Ice/Reference.h +3 -0
- data/dist/ice/cpp/src/Ice/ReferenceFactory.cpp +26 -13
- data/dist/ice/cpp/src/Ice/RequestHandler.h +3 -1
- data/dist/ice/cpp/src/Ice/RequestHandlerCache.cpp +1 -1
- data/dist/ice/cpp/src/Ice/RequestHandlerCache.h +1 -1
- data/dist/ice/cpp/src/Ice/ResourceConfig.h +3 -3
- data/dist/ice/cpp/src/Ice/RetryQueue.cpp +8 -12
- data/dist/ice/cpp/src/Ice/SHA1.cpp +11 -11
- data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.cpp +0 -6
- data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.h +0 -6
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.cpp +27 -12
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.h +1 -2
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.cpp +77 -27
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.h +2 -1
- data/dist/ice/cpp/src/Ice/SSL/RFC2253.cpp +2 -2
- data/dist/ice/cpp/src/Ice/SSL/SSLEndpointI.cpp +1 -1
- data/dist/ice/cpp/src/Ice/SSL/SSLEngine.h +1 -4
- data/dist/ice/cpp/src/Ice/SSL/SSLUtil.cpp +39 -34
- data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.cpp +165 -80
- data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.h +1 -5
- data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.cpp +73 -33
- data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.h +0 -1
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.cpp +110 -17
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.h +7 -2
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.cpp +9 -3
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.cpp +73 -51
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.h +0 -8
- data/dist/ice/cpp/src/Ice/Selector.cpp +13 -11
- data/dist/ice/cpp/src/Ice/ServantManager.cpp +3 -3
- data/dist/ice/cpp/src/Ice/Service.cpp +33 -115
- data/dist/ice/cpp/src/Ice/StreamSocket.cpp +33 -40
- data/dist/ice/cpp/src/Ice/StreamSocket.h +4 -4
- data/dist/ice/cpp/src/Ice/StringConverter.cpp +1 -1
- data/dist/ice/cpp/src/Ice/StringUtil.cpp +12 -21
- data/dist/ice/cpp/src/Ice/SysLoggerI.cpp +136 -100
- data/dist/ice/cpp/src/Ice/SysLoggerI.h +7 -3
- data/dist/ice/cpp/src/Ice/SystemdJournalI.cpp +1 -1
- data/dist/ice/cpp/src/Ice/TcpAcceptor.cpp +7 -7
- data/dist/ice/cpp/src/Ice/TcpAcceptor.h +2 -1
- data/dist/ice/cpp/src/Ice/TcpBufSize.h +40 -0
- data/dist/ice/cpp/src/Ice/TcpConnector.cpp +5 -2
- data/dist/ice/cpp/src/Ice/TcpConnector.h +2 -0
- data/dist/ice/cpp/src/Ice/TcpEndpointI.cpp +2 -2
- data/dist/ice/cpp/src/Ice/TcpTransceiver.cpp +6 -2
- data/dist/ice/cpp/src/Ice/ThreadPool.cpp +2 -8
- data/dist/ice/cpp/src/Ice/ThreadPool.h +0 -2
- data/dist/ice/cpp/src/Ice/Timer.cpp +7 -3
- data/dist/ice/cpp/src/Ice/UUID.cpp +1 -2
- data/dist/ice/cpp/src/Ice/UdpEndpointI.cpp +6 -3
- data/dist/ice/cpp/src/Ice/UdpTransceiver.cpp +136 -123
- data/dist/ice/cpp/src/Ice/UdpTransceiver.h +3 -4
- data/dist/ice/cpp/src/Ice/WSAcceptor.cpp +8 -3
- data/dist/ice/cpp/src/Ice/WSAcceptor.h +5 -1
- data/dist/ice/cpp/src/Ice/WSEndpoint.cpp +45 -2
- data/dist/ice/cpp/src/Ice/WSTransceiver.cpp +214 -34
- data/dist/ice/cpp/src/Ice/WSTransceiver.h +13 -2
- data/dist/ice/cpp/src/Ice/generated/BuiltinSequences.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Context.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/EndpointTypes.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Identity.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Locator.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/LocatorRegistry.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Metrics.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/OperationMode.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Process.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/PropertiesAdmin.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/PropertyDict.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/RemoteLogger.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/ReplyStatus.cpp +4 -2
- data/dist/ice/cpp/src/Ice/generated/Router.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/SliceChecksumDict.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Version.cpp +2 -2
- data/dist/ice/cpp/src/IceDiscovery/LookupI.cpp +47 -9
- data/dist/ice/cpp/src/IceDiscovery/LookupI.h +8 -3
- data/dist/ice/cpp/src/IceDiscovery/generated/Lookup.cpp +2 -2
- data/dist/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +43 -14
- data/dist/ice/cpp/src/IceLocatorDiscovery/generated/Lookup.cpp +2 -2
- data/dist/ice/cpp/src/Slice/DocCommentParser.cpp +32 -26
- data/dist/ice/cpp/src/Slice/DocCommentParser.h +6 -4
- data/dist/ice/cpp/src/Slice/FileTracker.cpp +3 -11
- data/dist/ice/cpp/src/Slice/FileTracker.h +0 -2
- data/dist/ice/cpp/src/Slice/Grammar.cpp +211 -210
- data/dist/ice/cpp/src/Slice/MetadataValidation.cpp +34 -14
- data/dist/ice/cpp/src/Slice/MetadataValidation.h +3 -2
- data/dist/ice/cpp/src/Slice/Parser.cpp +145 -97
- data/dist/ice/cpp/src/Slice/Parser.h +22 -8
- data/dist/ice/cpp/src/Slice/Preprocessor.cpp +77 -29
- data/dist/ice/cpp/src/Slice/Preprocessor.h +0 -3
- data/dist/ice/cpp/src/Slice/Scanner.cpp +3 -3
- data/dist/ice/cpp/src/Slice/SliceUtil.cpp +203 -172
- data/dist/ice/cpp/src/Slice/StringLiteralUtil.cpp +0 -2
- data/dist/ice/cpp/src/Slice/Util.h +21 -12
- data/dist/ice/cpp/src/slice2rb/Ruby.cpp +7 -3
- data/dist/ice/cpp/src/slice2rb/RubyUtil.cpp +26 -20
- data/dist/ice/cpp/src/slice2rb/RubyUtil.h +10 -13
- data/dist/ice/slice/Glacier2/Router.ice +3 -3
- data/dist/ice/slice/Ice/Identity.ice +3 -0
- data/dist/ice/slice/Ice/Locator.ice +6 -5
- data/dist/ice/slice/Ice/LocatorRegistry.ice +3 -0
- data/dist/ice/slice/Ice/Metrics.ice +7 -6
- data/dist/ice/slice/Ice/OperationMode.ice +8 -0
- data/dist/ice/slice/Ice/Process.ice +3 -0
- data/dist/ice/slice/Ice/RemoteLogger.ice +5 -5
- data/dist/ice/slice/Ice/ReplyStatus.ice +13 -0
- data/dist/ice/slice/IceGrid/Admin.ice +9 -9
- data/dist/ice/slice/IceGrid/Descriptor.ice +5 -5
- data/dist/ice/slice/IceStorm/Metrics.ice +1 -1
- data/dist/lib/Glacier2/Metrics.rb +1 -1
- data/dist/lib/Glacier2/PermissionsVerifier.rb +3 -3
- data/dist/lib/Glacier2/Router.rb +9 -9
- data/dist/lib/Glacier2/SSLInfo.rb +1 -1
- data/dist/lib/Glacier2/Session.rb +15 -15
- data/dist/lib/Ice/BuiltinSequences.rb +1 -1
- data/dist/lib/Ice/CompressBatch.rb +1 -2
- data/dist/lib/Ice/Context.rb +1 -1
- data/dist/lib/Ice/EndpointSelectionType.rb +1 -2
- data/dist/lib/Ice/EndpointTypes.rb +1 -1
- data/dist/lib/Ice/Identity.rb +1 -1
- data/dist/lib/Ice/IdentitySpaceship.rb +1 -0
- data/dist/lib/Ice/LocalExceptions.rb +3 -0
- data/dist/lib/Ice/Locator.rb +5 -5
- data/dist/lib/Ice/LocatorRegistry.rb +4 -4
- data/dist/lib/Ice/Metrics.rb +7 -7
- data/dist/lib/Ice/OperationMode.rb +2 -3
- data/dist/lib/Ice/Process.rb +3 -3
- data/dist/lib/Ice/PropertiesAdmin.rb +4 -4
- data/dist/lib/Ice/PropertyDict.rb +1 -1
- data/dist/lib/Ice/ProxyFunctions.rb +8 -4
- data/dist/lib/Ice/RemoteLogger.rb +7 -8
- data/dist/lib/Ice/ReplyStatus.rb +4 -4
- data/dist/lib/Ice/Router.rb +5 -5
- data/dist/lib/Ice/SliceChecksumDict.rb +1 -1
- data/dist/lib/Ice/SliceUtil.rb +2 -2
- data/dist/lib/Ice/Struct.rb +1 -0
- data/dist/lib/Ice/ToStringMode.rb +1 -2
- data/dist/lib/Ice/Value.rb +2 -2
- data/dist/lib/Ice/Version.rb +1 -1
- data/dist/lib/IceBox/ServiceManager.rb +8 -8
- data/dist/lib/IceGrid/Admin.rb +85 -86
- data/dist/lib/IceGrid/Descriptor.rb +1 -1
- data/dist/lib/IceGrid/Exception.rb +1 -1
- data/dist/lib/IceGrid/FileParser.rb +2 -2
- data/dist/lib/IceGrid/Registry.rb +14 -15
- data/dist/lib/IceGrid/Session.rb +7 -7
- data/dist/lib/IceGrid/UserAccountMapper.rb +2 -2
- data/dist/lib/IceStorm/IceStorm.rb +16 -16
- data/dist/lib/IceStorm/Metrics.rb +1 -1
- data/extconf.rb +1 -1
- data/ice.gemspec +3 -3
- metadata +5 -5
- data/dist/ice/cpp/src/Ice/DLLMain.cpp +0 -40
- data/dist/ice/cpp/src/Ice/UndefSysMacros.h +0 -37
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright (c) ZeroC, Inc.
|
|
2
2
|
|
|
3
|
-
// slice2cpp version 3.8.
|
|
3
|
+
// slice2cpp version 3.8.3
|
|
4
4
|
// <auto-generated>Generated from Slice file 'RemoteLogger.ice'.</auto-generated>
|
|
5
5
|
|
|
6
6
|
#ifndef ICE_API_EXPORTS
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
# if ICE_INT_VERSION % 100 >= 50
|
|
34
34
|
# error Beta header file detected
|
|
35
35
|
# endif
|
|
36
|
-
# if ICE_INT_VERSION % 100 <
|
|
36
|
+
# if ICE_INT_VERSION % 100 < 3
|
|
37
37
|
# error Ice patch level mismatch!
|
|
38
38
|
# endif
|
|
39
39
|
#endif
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright (c) ZeroC, Inc.
|
|
2
2
|
|
|
3
|
-
// slice2cpp version 3.8.
|
|
3
|
+
// slice2cpp version 3.8.3
|
|
4
4
|
// <auto-generated>Generated from Slice file 'ReplyStatus.ice'.</auto-generated>
|
|
5
5
|
|
|
6
6
|
#ifndef ICE_API_EXPORTS
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
# if ICE_INT_VERSION % 100 >= 50
|
|
35
35
|
# error Beta header file detected
|
|
36
36
|
# endif
|
|
37
|
-
# if ICE_INT_VERSION % 100 <
|
|
37
|
+
# if ICE_INT_VERSION % 100 < 3
|
|
38
38
|
# error Ice patch level mismatch!
|
|
39
39
|
# endif
|
|
40
40
|
#endif
|
|
@@ -64,6 +64,8 @@ Ice::operator<<(std::ostream& os, ReplyStatus value)
|
|
|
64
64
|
return os << "InvalidData";
|
|
65
65
|
case ReplyStatus::Unauthorized:
|
|
66
66
|
return os << "Unauthorized";
|
|
67
|
+
case ReplyStatus::NotSupported:
|
|
68
|
+
return os << "NotSupported";
|
|
67
69
|
default:
|
|
68
70
|
return os << static_cast<std::int32_t>(value);
|
|
69
71
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright (c) ZeroC, Inc.
|
|
2
2
|
|
|
3
|
-
// slice2cpp version 3.8.
|
|
3
|
+
// slice2cpp version 3.8.3
|
|
4
4
|
// <auto-generated>Generated from Slice file 'Router.ice'.</auto-generated>
|
|
5
5
|
|
|
6
6
|
#ifndef ICE_API_EXPORTS
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
# if ICE_INT_VERSION % 100 >= 50
|
|
34
34
|
# error Beta header file detected
|
|
35
35
|
# endif
|
|
36
|
-
# if ICE_INT_VERSION % 100 <
|
|
36
|
+
# if ICE_INT_VERSION % 100 < 3
|
|
37
37
|
# error Ice patch level mismatch!
|
|
38
38
|
# endif
|
|
39
39
|
#endif
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright (c) ZeroC, Inc.
|
|
2
2
|
|
|
3
|
-
// slice2cpp version 3.8.
|
|
3
|
+
// slice2cpp version 3.8.3
|
|
4
4
|
// <auto-generated>Generated from Slice file 'SliceChecksumDict.ice'.</auto-generated>
|
|
5
5
|
|
|
6
6
|
#ifndef ICE_API_EXPORTS
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
# if ICE_INT_VERSION % 100 >= 50
|
|
34
34
|
# error Beta header file detected
|
|
35
35
|
# endif
|
|
36
|
-
# if ICE_INT_VERSION % 100 <
|
|
36
|
+
# if ICE_INT_VERSION % 100 < 3
|
|
37
37
|
# error Ice patch level mismatch!
|
|
38
38
|
# endif
|
|
39
39
|
#endif
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright (c) ZeroC, Inc.
|
|
2
2
|
|
|
3
|
-
// slice2cpp version 3.8.
|
|
3
|
+
// slice2cpp version 3.8.3
|
|
4
4
|
// <auto-generated>Generated from Slice file 'Version.ice'.</auto-generated>
|
|
5
5
|
|
|
6
6
|
#ifndef ICE_API_EXPORTS
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
# if ICE_INT_VERSION % 100 >= 50
|
|
35
35
|
# error Beta header file detected
|
|
36
36
|
# endif
|
|
37
|
-
# if ICE_INT_VERSION % 100 <
|
|
37
|
+
# if ICE_INT_VERSION % 100 < 3
|
|
38
38
|
# error Ice patch level mismatch!
|
|
39
39
|
# endif
|
|
40
40
|
#endif
|
|
@@ -30,6 +30,7 @@ IceDiscovery::Request::retry()
|
|
|
30
30
|
void
|
|
31
31
|
IceDiscovery::Request::invoke(const string& domainId, const vector<pair<LookupPrx, LookupReplyPrx>>& lookups)
|
|
32
32
|
{
|
|
33
|
+
++_generation;
|
|
33
34
|
_lookupCount = lookups.size();
|
|
34
35
|
_failureCount = 0;
|
|
35
36
|
Ice::Identity id;
|
|
@@ -42,8 +43,15 @@ IceDiscovery::Request::invoke(const string& domainId, const vector<pair<LookupPr
|
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
bool
|
|
45
|
-
IceDiscovery::Request::exception()
|
|
46
|
+
IceDiscovery::Request::exception(size_t generation)
|
|
46
47
|
{
|
|
48
|
+
// Ignore a delayed failure from an earlier invocation round: it must not count against the current round, which
|
|
49
|
+
// reset _failureCount and may still have outstanding lookups.
|
|
50
|
+
if (generation != _generation)
|
|
51
|
+
{
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
|
|
47
55
|
// If all the invocations on all the lookup proxies failed, report it to the locator.
|
|
48
56
|
if (++_failureCount == _lookupCount)
|
|
49
57
|
{
|
|
@@ -69,7 +77,17 @@ AdapterRequest::AdapterRequest(const LookupIPtr& lookup, const std::string& adap
|
|
|
69
77
|
bool
|
|
70
78
|
AdapterRequest::retry()
|
|
71
79
|
{
|
|
72
|
-
|
|
80
|
+
if (_proxies.empty() && --_retryCount >= 0)
|
|
81
|
+
{
|
|
82
|
+
// We only reach here with _proxies empty, i.e. no replica-group response arrived. _latency is set only
|
|
83
|
+
// together with inserting into _proxies, so the latency timer is not running.
|
|
84
|
+
assert(_latency == chrono::nanoseconds::zero());
|
|
85
|
+
|
|
86
|
+
// Restart the replica-group latency window so it's measured from this round rather than from request creation.
|
|
87
|
+
_start = chrono::steady_clock::now();
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
return false;
|
|
73
91
|
}
|
|
74
92
|
|
|
75
93
|
bool
|
|
@@ -77,6 +95,7 @@ AdapterRequest::response(const ObjectPrx& proxy, bool isReplicaGroup)
|
|
|
77
95
|
{
|
|
78
96
|
if (isReplicaGroup)
|
|
79
97
|
{
|
|
98
|
+
_proxies.insert(proxy);
|
|
80
99
|
if (_latency == chrono::nanoseconds::zero())
|
|
81
100
|
{
|
|
82
101
|
_latency = chrono::duration_cast<chrono::nanoseconds>(chrono::steady_clock::now() - _start) *
|
|
@@ -84,7 +103,6 @@ AdapterRequest::response(const ObjectPrx& proxy, bool isReplicaGroup)
|
|
|
84
103
|
_lookup->timer()->cancel(shared_from_this());
|
|
85
104
|
_lookup->timer()->schedule(shared_from_this(), _latency);
|
|
86
105
|
}
|
|
87
|
-
_proxies.insert(proxy);
|
|
88
106
|
return false;
|
|
89
107
|
}
|
|
90
108
|
finished(proxy);
|
|
@@ -127,7 +145,8 @@ AdapterRequest::invokeWithLookup(const string& domainId, const LookupPrx& lookup
|
|
|
127
145
|
_id,
|
|
128
146
|
lookupReply,
|
|
129
147
|
nullptr,
|
|
130
|
-
[self = shared_from_this()
|
|
148
|
+
[self = shared_from_this(), generation = _generation](exception_ptr ex)
|
|
149
|
+
{ self->_lookup->adapterRequestException(self, ex, generation); });
|
|
131
150
|
}
|
|
132
151
|
|
|
133
152
|
void
|
|
@@ -155,7 +174,8 @@ ObjectRequest::invokeWithLookup(const string& domainId, const LookupPrx& lookup,
|
|
|
155
174
|
_id,
|
|
156
175
|
lookupReply,
|
|
157
176
|
nullptr,
|
|
158
|
-
[self = shared_from_this()
|
|
177
|
+
[self = shared_from_this(), generation = _generation](exception_ptr ex)
|
|
178
|
+
{ self->_lookup->objectRequestException(self, ex, generation); });
|
|
159
179
|
}
|
|
160
180
|
|
|
161
181
|
void
|
|
@@ -173,6 +193,24 @@ LookupI::LookupI(LocatorRegistryIPtr registry, const LookupPrx& lookup, const Ic
|
|
|
173
193
|
_domainId(properties->getIceProperty("IceDiscovery.DomainId")),
|
|
174
194
|
_timer(IceInternal::getInstanceTimer(lookup->ice_getCommunicator()))
|
|
175
195
|
{
|
|
196
|
+
if (_timeout <= chrono::milliseconds::zero())
|
|
197
|
+
{
|
|
198
|
+
throw PropertyException{__FILE__, __LINE__, "property 'IceDiscovery.Timeout' must be greater than 0"};
|
|
199
|
+
}
|
|
200
|
+
if (_retryCount < 0)
|
|
201
|
+
{
|
|
202
|
+
throw PropertyException{
|
|
203
|
+
__FILE__,
|
|
204
|
+
__LINE__,
|
|
205
|
+
"property 'IceDiscovery.RetryCount' must be greater than or equal to 0"};
|
|
206
|
+
}
|
|
207
|
+
if (_latencyMultiplier < 1)
|
|
208
|
+
{
|
|
209
|
+
throw PropertyException{
|
|
210
|
+
__FILE__,
|
|
211
|
+
__LINE__,
|
|
212
|
+
"property 'IceDiscovery.LatencyMultiplier' must be greater than or equal to 1"};
|
|
213
|
+
}
|
|
176
214
|
}
|
|
177
215
|
|
|
178
216
|
void
|
|
@@ -390,7 +428,7 @@ LookupI::objectRequestTimedOut(const ObjectRequestPtr& request)
|
|
|
390
428
|
}
|
|
391
429
|
|
|
392
430
|
void
|
|
393
|
-
LookupI::adapterRequestException(const AdapterRequestPtr& request, exception_ptr ex)
|
|
431
|
+
LookupI::adapterRequestException(const AdapterRequestPtr& request, exception_ptr ex, size_t generation)
|
|
394
432
|
{
|
|
395
433
|
lock_guard lock(_mutex);
|
|
396
434
|
auto p = _adapterRequests.find(request->getId());
|
|
@@ -399,7 +437,7 @@ LookupI::adapterRequestException(const AdapterRequestPtr& request, exception_ptr
|
|
|
399
437
|
return;
|
|
400
438
|
}
|
|
401
439
|
|
|
402
|
-
if (request->exception())
|
|
440
|
+
if (request->exception(generation))
|
|
403
441
|
{
|
|
404
442
|
if (_warnOnce)
|
|
405
443
|
{
|
|
@@ -448,7 +486,7 @@ LookupI::adapterRequestTimedOut(const AdapterRequestPtr& request)
|
|
|
448
486
|
}
|
|
449
487
|
|
|
450
488
|
void
|
|
451
|
-
LookupI::objectRequestException(const ObjectRequestPtr& request, exception_ptr ex)
|
|
489
|
+
LookupI::objectRequestException(const ObjectRequestPtr& request, exception_ptr ex, size_t generation)
|
|
452
490
|
{
|
|
453
491
|
lock_guard lock(_mutex);
|
|
454
492
|
auto p = _objectRequests.find(request->getId());
|
|
@@ -457,7 +495,7 @@ LookupI::objectRequestException(const ObjectRequestPtr& request, exception_ptr e
|
|
|
457
495
|
return;
|
|
458
496
|
}
|
|
459
497
|
|
|
460
|
-
if (request->exception())
|
|
498
|
+
if (request->exception(generation))
|
|
461
499
|
{
|
|
462
500
|
if (_warnOnce)
|
|
463
501
|
{
|
|
@@ -22,7 +22,7 @@ namespace IceDiscovery
|
|
|
22
22
|
|
|
23
23
|
virtual bool retry();
|
|
24
24
|
void invoke(const std::string&, const std::vector<std::pair<LookupPrx, LookupReplyPrx>>&);
|
|
25
|
-
bool exception();
|
|
25
|
+
bool exception(size_t generation);
|
|
26
26
|
[[nodiscard]] std::string getRequestId() const;
|
|
27
27
|
|
|
28
28
|
virtual void finished(const std::optional<Ice::ObjectPrx>&) = 0;
|
|
@@ -35,6 +35,11 @@ namespace IceDiscovery
|
|
|
35
35
|
int _retryCount;
|
|
36
36
|
size_t _lookupCount{0};
|
|
37
37
|
size_t _failureCount{0};
|
|
38
|
+
|
|
39
|
+
// Incremented on each invoke() (i.e. each retry round). The exception callbacks capture the value current when
|
|
40
|
+
// they were sent, so a delayed failure from an earlier round can be ignored instead of counting against the
|
|
41
|
+
// current round.
|
|
42
|
+
size_t _generation{0};
|
|
38
43
|
};
|
|
39
44
|
using RequestPtr = std::shared_ptr<Request>;
|
|
40
45
|
|
|
@@ -128,9 +133,9 @@ namespace IceDiscovery
|
|
|
128
133
|
void foundAdapter(const std::string&, const std::string&, const Ice::ObjectPrx&, bool);
|
|
129
134
|
|
|
130
135
|
void adapterRequestTimedOut(const AdapterRequestPtr&);
|
|
131
|
-
void adapterRequestException(const AdapterRequestPtr&, std::exception_ptr);
|
|
136
|
+
void adapterRequestException(const AdapterRequestPtr&, std::exception_ptr, size_t generation);
|
|
132
137
|
void objectRequestTimedOut(const ObjectRequestPtr&);
|
|
133
|
-
void objectRequestException(const ObjectRequestPtr&, std::exception_ptr);
|
|
138
|
+
void objectRequestException(const ObjectRequestPtr&, std::exception_ptr, size_t generation);
|
|
134
139
|
|
|
135
140
|
const IceInternal::TimerPtr& timer() { return _timer; }
|
|
136
141
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright (c) ZeroC, Inc.
|
|
2
2
|
|
|
3
|
-
// slice2cpp version 3.8.
|
|
3
|
+
// slice2cpp version 3.8.3
|
|
4
4
|
// <auto-generated>Generated from Slice file 'Lookup.ice'.</auto-generated>
|
|
5
5
|
|
|
6
6
|
#define ICE_BUILDING_GENERATED_CODE
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
# if ICE_INT_VERSION % 100 >= 50
|
|
31
31
|
# error Beta header file detected
|
|
32
32
|
# endif
|
|
33
|
-
# if ICE_INT_VERSION % 100 <
|
|
33
|
+
# if ICE_INT_VERSION % 100 < 3
|
|
34
34
|
# error Ice patch level mismatch!
|
|
35
35
|
# endif
|
|
36
36
|
#endif
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
#include "../Ice/Network.h" // For getInterfacesForMulticast
|
|
4
4
|
#include "../Ice/Timer.h"
|
|
5
|
+
#include "Ice/LocalExceptions.h"
|
|
5
6
|
#include "Ice/LoggerUtil.h"
|
|
6
7
|
#include "IceLocatorDiscovery/IceLocatorDiscovery.h"
|
|
7
8
|
#include "IceLocatorDiscovery/Lookup.h"
|
|
@@ -76,16 +77,16 @@ namespace
|
|
|
76
77
|
|
|
77
78
|
vector<Ice::LocatorPrx> getLocators(const string&, const chrono::milliseconds&);
|
|
78
79
|
|
|
79
|
-
void exception(std::exception_ptr);
|
|
80
|
+
void exception(std::exception_ptr, size_t generation);
|
|
80
81
|
|
|
81
82
|
private:
|
|
82
83
|
void runTimerTask() final;
|
|
83
84
|
|
|
84
85
|
LookupPrx _lookup;
|
|
85
86
|
vector<pair<LookupPrx, LookupReplyPrx>> _lookups;
|
|
86
|
-
chrono::milliseconds _timeout;
|
|
87
|
-
int _retryCount;
|
|
88
|
-
chrono::milliseconds _retryDelay;
|
|
87
|
+
const chrono::milliseconds _timeout;
|
|
88
|
+
const int _retryCount;
|
|
89
|
+
const chrono::milliseconds _retryDelay;
|
|
89
90
|
const IceInternal::TimerPtr _timer;
|
|
90
91
|
const int _traceLevel;
|
|
91
92
|
|
|
@@ -99,6 +100,10 @@ namespace
|
|
|
99
100
|
bool _pending{false};
|
|
100
101
|
int _pendingRetryCount{0};
|
|
101
102
|
size_t _failureCount{0};
|
|
103
|
+
// Incremented at the start of each lookup round. The findLocatorAsync exception callbacks capture the value
|
|
104
|
+
// current when they were sent, so a delayed failure from an earlier round is ignored instead of counting
|
|
105
|
+
// against the current round.
|
|
106
|
+
size_t _generation{0};
|
|
102
107
|
bool _warnOnce{true};
|
|
103
108
|
vector<RequestPtr> _pendingRequests;
|
|
104
109
|
std::mutex _mutex;
|
|
@@ -316,7 +321,7 @@ Request::invoke(const Ice::LocatorPrx& l)
|
|
|
316
321
|
}
|
|
317
322
|
else
|
|
318
323
|
{
|
|
319
|
-
outPair.first =
|
|
324
|
+
outPair.first = outParams.data();
|
|
320
325
|
outPair.second = outPair.first + outParams.size();
|
|
321
326
|
}
|
|
322
327
|
self->response(ok, outPair);
|
|
@@ -377,6 +382,11 @@ Request::exception(std::exception_ptr ex)
|
|
|
377
382
|
catch (...)
|
|
378
383
|
{
|
|
379
384
|
_exception = ex;
|
|
385
|
+
// This catch-all is reached only from the asynchronous ice_invokeAsync completion (which runs off
|
|
386
|
+
// LocatorI::_mutex), never synchronously from Request::invoke: the local exceptions ice_invokeAsync can throw
|
|
387
|
+
// synchronously (caught by Request::invoke's own catch clause and passed to exception() in-line) are all
|
|
388
|
+
// handled by the specific catch clauses above. That matters because the retry below re-enters
|
|
389
|
+
// LocatorI::invoke and re-locks the non-recursive LocatorI::_mutex.
|
|
380
390
|
_locator->invoke(_locatorPrx, shared_from_this()); // Retry with new locator proxy
|
|
381
391
|
}
|
|
382
392
|
}
|
|
@@ -396,17 +406,26 @@ LocatorI::LocatorI(
|
|
|
396
406
|
_locator(lookup->ice_getCommunicator()->getDefaultLocator()),
|
|
397
407
|
_voidLocator(std::move(voidLocator))
|
|
398
408
|
{
|
|
399
|
-
if (_timeout
|
|
409
|
+
if (_timeout <= chrono::milliseconds::zero())
|
|
400
410
|
{
|
|
401
|
-
|
|
411
|
+
throw Ice::PropertyException{
|
|
412
|
+
__FILE__,
|
|
413
|
+
__LINE__,
|
|
414
|
+
"property 'IceLocatorDiscovery.Timeout' must be greater than 0"};
|
|
402
415
|
}
|
|
403
416
|
if (_retryCount < 0)
|
|
404
417
|
{
|
|
405
|
-
|
|
418
|
+
throw Ice::PropertyException{
|
|
419
|
+
__FILE__,
|
|
420
|
+
__LINE__,
|
|
421
|
+
"property 'IceLocatorDiscovery.RetryCount' must be greater than or equal to 0"};
|
|
406
422
|
}
|
|
407
423
|
if (_retryDelay < chrono::milliseconds::zero())
|
|
408
424
|
{
|
|
409
|
-
|
|
425
|
+
throw Ice::PropertyException{
|
|
426
|
+
__FILE__,
|
|
427
|
+
__LINE__,
|
|
428
|
+
"property 'IceLocatorDiscovery.RetryDelay' must be greater than or equal to 0"};
|
|
410
429
|
}
|
|
411
430
|
}
|
|
412
431
|
|
|
@@ -533,8 +552,8 @@ LocatorI::foundLocator(const Ice::LocatorPrx& locator)
|
|
|
533
552
|
out << "received Ice locator with different instance name:\n";
|
|
534
553
|
out << "using = '" << _locator->ice_getIdentity().category << "'\n";
|
|
535
554
|
out << "received = '" << locator->ice_getIdentity().category << "'\n";
|
|
536
|
-
out << "This is typically the case if multiple Ice locators with different";
|
|
537
|
-
out << "instance names are deployed and the property
|
|
555
|
+
out << "This is typically the case if multiple Ice locators with different ";
|
|
556
|
+
out << "instance names are deployed and the property 'IceLocatorDiscovery.InstanceName' ";
|
|
538
557
|
out << "is not set.";
|
|
539
558
|
}
|
|
540
559
|
return;
|
|
@@ -624,6 +643,7 @@ LocatorI::invoke(const optional<Ice::LocatorPrx>& locator, const RequestPtr& req
|
|
|
624
643
|
{
|
|
625
644
|
_pending = true;
|
|
626
645
|
_failureCount = 0;
|
|
646
|
+
++_generation;
|
|
627
647
|
_pendingRetryCount = _retryCount;
|
|
628
648
|
try
|
|
629
649
|
{
|
|
@@ -642,7 +662,8 @@ LocatorI::invoke(const optional<Ice::LocatorPrx>& locator, const RequestPtr& req
|
|
|
642
662
|
_instanceName,
|
|
643
663
|
l.second,
|
|
644
664
|
nullptr,
|
|
645
|
-
[self = shared_from_this()](exception_ptr ex)
|
|
665
|
+
[self = shared_from_this(), generation = _generation](exception_ptr ex)
|
|
666
|
+
{ self->exception(ex, generation); });
|
|
646
667
|
}
|
|
647
668
|
_timer->schedule(shared_from_this(), _timeout);
|
|
648
669
|
}
|
|
@@ -672,9 +693,15 @@ LocatorI::invoke(const optional<Ice::LocatorPrx>& locator, const RequestPtr& req
|
|
|
672
693
|
}
|
|
673
694
|
|
|
674
695
|
void
|
|
675
|
-
LocatorI::exception(std::exception_ptr ex)
|
|
696
|
+
LocatorI::exception(std::exception_ptr ex, size_t generation)
|
|
676
697
|
{
|
|
677
698
|
lock_guard lock(_mutex);
|
|
699
|
+
// Ignore a delayed failure from an earlier lookup round: it must not count against the current round, which reset
|
|
700
|
+
// _failureCount and may still have outstanding lookups.
|
|
701
|
+
if (generation != _generation)
|
|
702
|
+
{
|
|
703
|
+
return;
|
|
704
|
+
}
|
|
678
705
|
if (++_failureCount == _lookups.size() && _pending)
|
|
679
706
|
{
|
|
680
707
|
//
|
|
@@ -757,13 +784,15 @@ LocatorI::runTimerTask()
|
|
|
757
784
|
}
|
|
758
785
|
}
|
|
759
786
|
_failureCount = 0;
|
|
787
|
+
++_generation;
|
|
760
788
|
for (const auto& l : _lookups)
|
|
761
789
|
{
|
|
762
790
|
l.first->findLocatorAsync(
|
|
763
791
|
_instanceName,
|
|
764
792
|
l.second,
|
|
765
793
|
nullptr,
|
|
766
|
-
[self = shared_from_this()](exception_ptr ex)
|
|
794
|
+
[self = shared_from_this(), generation = _generation](exception_ptr ex)
|
|
795
|
+
{ self->exception(ex, generation); });
|
|
767
796
|
}
|
|
768
797
|
_timer->schedule(shared_from_this(), _timeout);
|
|
769
798
|
return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright (c) ZeroC, Inc.
|
|
2
2
|
|
|
3
|
-
// slice2cpp version 3.8.
|
|
3
|
+
// slice2cpp version 3.8.3
|
|
4
4
|
// <auto-generated>Generated from Slice file 'Lookup.ice'.</auto-generated>
|
|
5
5
|
|
|
6
6
|
#define ICE_BUILDING_GENERATED_CODE
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
# if ICE_INT_VERSION % 100 >= 50
|
|
31
31
|
# error Beta header file detected
|
|
32
32
|
# endif
|
|
33
|
-
# if ICE_INT_VERSION % 100 <
|
|
33
|
+
# if ICE_INT_VERSION % 100 < 3
|
|
34
34
|
# error Ice patch level mismatch!
|
|
35
35
|
# endif
|
|
36
36
|
#endif
|
|
@@ -60,9 +60,9 @@ DocCommentFormatter::formatCode(const string& rawText)
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
string
|
|
63
|
-
DocCommentFormatter::formatParamRef(const string&
|
|
63
|
+
DocCommentFormatter::formatParamRef(const string& paramName, const ParameterPtr&)
|
|
64
64
|
{
|
|
65
|
-
return formatCode(
|
|
65
|
+
return formatCode(paramName);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
string
|
|
@@ -210,25 +210,19 @@ namespace
|
|
|
210
210
|
{
|
|
211
211
|
// Then we perform additional parsing to extract the name...
|
|
212
212
|
|
|
213
|
-
auto nameStart =
|
|
213
|
+
auto nameStart = doc.find_first_not_of(ws);
|
|
214
214
|
if (nameStart == string::npos)
|
|
215
215
|
{
|
|
216
|
-
return false; // Malformed line,
|
|
216
|
+
return false; // Malformed line, missing the name part after the tag. Ignore this line.
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
return false; // Malformed line, ignore it.
|
|
223
|
-
}
|
|
224
|
-
name = line.substr(nameStart, nameEnd - nameStart);
|
|
219
|
+
// If there's no whitespace after the name, that means the name runs to the end of the line.
|
|
220
|
+
auto nameEnd = doc.find_first_of(ws, nameStart);
|
|
221
|
+
name = (nameEnd == string::npos) ? doc.substr(nameStart) : doc.substr(nameStart, nameEnd - nameStart);
|
|
225
222
|
|
|
226
|
-
//
|
|
227
|
-
auto
|
|
228
|
-
|
|
229
|
-
{
|
|
230
|
-
doc = line.substr(docSplitPos);
|
|
231
|
-
}
|
|
223
|
+
// If there's any non-whitespace characters after the name, store them in the `doc` string.
|
|
224
|
+
auto docStart = doc.find_first_not_of(ws, nameEnd);
|
|
225
|
+
doc = (docStart == string::npos) ? "" : doc.substr(docStart);
|
|
232
226
|
|
|
233
227
|
return true;
|
|
234
228
|
}
|
|
@@ -291,12 +285,12 @@ namespace
|
|
|
291
285
|
openingEnd = (openingEnd == string::npos ? line.size() : openingEnd);
|
|
292
286
|
auto count = openingEnd - pos;
|
|
293
287
|
|
|
294
|
-
// Find the closing
|
|
288
|
+
// Find the closing delimiter, starting for the end of the opening delimiter.
|
|
295
289
|
auto delimiter = string(count, '`');
|
|
296
290
|
auto closingStart = line.find(delimiter, openingEnd);
|
|
297
291
|
if (closingStart == string::npos)
|
|
298
292
|
{
|
|
299
|
-
// No matching
|
|
293
|
+
// No matching delimiter was found. Emit a warning, then skip to the next line. This one is broken.
|
|
300
294
|
const string msg = "unterminated code span: missing closing backtick delimiter";
|
|
301
295
|
p->unit()->warning(p->file(), p->line(), InvalidComment, msg);
|
|
302
296
|
|
|
@@ -325,12 +319,24 @@ namespace
|
|
|
325
319
|
const string linkTag = "{@link ";
|
|
326
320
|
|
|
327
321
|
auto endpos = line.find('}', pos);
|
|
328
|
-
if (endpos
|
|
322
|
+
if (endpos == string::npos)
|
|
323
|
+
{
|
|
324
|
+
// No closing brace was found. Emit a warning, then skip to the next line. This one is broken.
|
|
325
|
+
const string msg = "unterminated link tag: missing closing '}'";
|
|
326
|
+
p->unit()->warning(p->file(), p->line(), InvalidComment, msg);
|
|
327
|
+
|
|
328
|
+
pos = line.size();
|
|
329
|
+
}
|
|
330
|
+
else
|
|
329
331
|
{
|
|
330
|
-
// Extract the linked-to identifier.
|
|
332
|
+
// Extract the linked-to identifier, trimming any whitespace around it.
|
|
333
|
+
string linkText;
|
|
331
334
|
auto identStart = line.find_first_not_of(" \t", pos + linkTag.size());
|
|
332
|
-
|
|
333
|
-
|
|
335
|
+
if (identStart < endpos)
|
|
336
|
+
{
|
|
337
|
+
auto identEnd = line.find_last_not_of(" \t", endpos - 1);
|
|
338
|
+
linkText = line.substr(identStart, identEnd - identStart + 1);
|
|
339
|
+
}
|
|
334
340
|
|
|
335
341
|
// Then erase the entire '{@link foo}' tag from the comment.
|
|
336
342
|
line.erase(pos, endpos - pos + 1);
|
|
@@ -397,19 +403,19 @@ namespace
|
|
|
397
403
|
// Extract the parameter's name and check if matches an operation parameter.
|
|
398
404
|
// If it does, make sure to use the mapped name instead of the Slice name.
|
|
399
405
|
string parameterName = line.substr(nameStart, nameEnd - nameStart);
|
|
406
|
+
ParameterPtr parameterPtr = nullptr;
|
|
400
407
|
if (auto operationTarget = dynamic_pointer_cast<Operation>(p))
|
|
401
408
|
{
|
|
402
|
-
bool doesParameterExist = false;
|
|
403
409
|
for (const auto& param : operationTarget->parameters())
|
|
404
410
|
{
|
|
405
411
|
if (param->name() == parameterName)
|
|
406
412
|
{
|
|
407
413
|
parameterName = param->mappedName();
|
|
408
|
-
|
|
414
|
+
parameterPtr = param;
|
|
409
415
|
break;
|
|
410
416
|
}
|
|
411
417
|
}
|
|
412
|
-
if (
|
|
418
|
+
if (parameterPtr == nullptr)
|
|
413
419
|
{
|
|
414
420
|
string opName = operationTarget->name();
|
|
415
421
|
string msg = "No parameter named '" + parameterName + "' exists on operation '" + opName + "'";
|
|
@@ -422,7 +428,7 @@ namespace
|
|
|
422
428
|
}
|
|
423
429
|
|
|
424
430
|
// Format the parameter's name and insert it in-place of the original '@p name'.
|
|
425
|
-
const string formattedParamName = formatter.formatParamRef(parameterName);
|
|
431
|
+
const string formattedParamName = formatter.formatParamRef(parameterName, parameterPtr);
|
|
426
432
|
line.erase(pos, nameEnd - pos);
|
|
427
433
|
line.insert(pos, formattedParamName);
|
|
428
434
|
|
|
@@ -27,12 +27,14 @@ namespace Slice
|
|
|
27
27
|
[[nodiscard]] virtual std::string formatCode(const std::string& rawText);
|
|
28
28
|
|
|
29
29
|
/// This function is called by the doc-comment parser to map '@p' tags into each language's syntax.
|
|
30
|
-
/// @param
|
|
31
|
-
///
|
|
30
|
+
/// @param paramName If @p paramPtr is non-null, this is the mapped name of the parameter being referenced.
|
|
31
|
+
/// Otherwise, this is the identifier after '@p', taken verbatim from the doc-comment.
|
|
32
|
+
/// @param paramPtr A pointer to the parameter that is being referenced, or `nullptr` if it doesn't exist.
|
|
33
|
+
/// @return A properly formatted parameter reference in the target language. The doc-comment parser will
|
|
32
34
|
/// replace the entire "@p <rawParamName>" string with the returned value.
|
|
33
35
|
//
|
|
34
36
|
// By default we just emit the parameter's name in code formatting.
|
|
35
|
-
[[nodiscard]] virtual std::string formatParamRef(const std::string&
|
|
37
|
+
[[nodiscard]] virtual std::string formatParamRef(const std::string& paramName, const ParameterPtr& paramPtr);
|
|
36
38
|
|
|
37
39
|
/// This function is called by the doc-comment parser to map doc-links ('{@link <rawLink>}') into each
|
|
38
40
|
/// language's syntax.
|
|
@@ -46,7 +48,7 @@ namespace Slice
|
|
|
46
48
|
|
|
47
49
|
/// This function is called by the doc-comment parser to map see-also references ('@see <rawLink>') into each
|
|
48
50
|
/// language's syntax.
|
|
49
|
-
/// @param rawLink The
|
|
51
|
+
/// @param rawLink The reference's raw text, taken verbatim from the doc-comment.
|
|
50
52
|
/// @param source A pointer to the Slice element that the doc-comment (and reference) are written on.
|
|
51
53
|
/// @param target A pointer to the Slice element that is being referenced, or `nullptr` if it doesn't exist.
|
|
52
54
|
/// @return A properly formatted see-also-link in the target language. This value will be stored in the
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
#include "FileTracker.h"
|
|
4
4
|
#include "../Ice/ConsoleUtil.h"
|
|
5
5
|
#include "../Ice/FileUtil.h"
|
|
6
|
+
#include "Util.h"
|
|
6
7
|
|
|
7
8
|
#include <cassert>
|
|
8
9
|
|
|
@@ -29,20 +30,11 @@ Slice::FileTracker::instance()
|
|
|
29
30
|
void
|
|
30
31
|
Slice::FileTracker::setSource(const string& source)
|
|
31
32
|
{
|
|
32
|
-
_source = source;
|
|
33
33
|
pair<map<string, list<string>>::iterator, bool> p = _generated.insert(make_pair(source, list<string>()));
|
|
34
34
|
assert(p.second);
|
|
35
35
|
_curr = p.first;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
void
|
|
39
|
-
Slice::FileTracker::error()
|
|
40
|
-
{
|
|
41
|
-
assert(_curr != _generated.end());
|
|
42
|
-
_generated.erase(_curr);
|
|
43
|
-
_curr = _generated.end();
|
|
44
|
-
}
|
|
45
|
-
|
|
46
38
|
void
|
|
47
39
|
Slice::FileTracker::addFile(const string& file)
|
|
48
40
|
{
|
|
@@ -84,10 +76,10 @@ Slice::FileTracker::dumpxml()
|
|
|
84
76
|
{
|
|
85
77
|
if (!p.second.empty())
|
|
86
78
|
{
|
|
87
|
-
consoleOut << endl << " <source name=\"" << p.first << "\">";
|
|
79
|
+
consoleOut << endl << " <source name=\"" << escapeXMLAttribute(p.first) << "\">";
|
|
88
80
|
for (const auto& q : p.second)
|
|
89
81
|
{
|
|
90
|
-
consoleOut << endl << " <file name=\"" << q << "\"/>";
|
|
82
|
+
consoleOut << endl << " <file name=\"" << escapeXMLAttribute(q) << "\"/>";
|
|
91
83
|
}
|
|
92
84
|
consoleOut << endl << " </source>";
|
|
93
85
|
}
|
|
@@ -30,13 +30,11 @@ namespace Slice
|
|
|
30
30
|
void setSource(const std::string& source);
|
|
31
31
|
void addFile(const std::string& file);
|
|
32
32
|
void addDirectory(const std::string& dir);
|
|
33
|
-
void error();
|
|
34
33
|
void cleanup();
|
|
35
34
|
void dumpxml();
|
|
36
35
|
|
|
37
36
|
private:
|
|
38
37
|
std::list<std::pair<std::string, bool>> _files;
|
|
39
|
-
std::string _source;
|
|
40
38
|
std::map<std::string, std::list<std::string>> _generated;
|
|
41
39
|
std::map<std::string, std::list<std::string>>::iterator _curr;
|
|
42
40
|
};
|