Skip to content

Commit

Permalink
Update Version.ice and related files in C++ (#1975)
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardnormier authored Mar 22, 2024
1 parent c354678 commit 61bf5ef
Show file tree
Hide file tree
Showing 42 changed files with 366 additions and 463 deletions.
38 changes: 0 additions & 38 deletions cpp/include/Ice/EncodingVersion.h

This file was deleted.

2 changes: 1 addition & 1 deletion cpp/include/Ice/Ice.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
# include "ObjectAdapter.h"
# include "Plugin.h"
# include "Properties.h"
# include "Protocol.h"
# include "ProxyFunctions.h"
# include "RegisterPlugins.h"
# include "ServantLocator.h"
# include "SlicedData.h"
# include "StringConverter.h"
# include "UUID.h"
# include "VersionFunctions.h"

// Generated header files:
# include "Ice/EndpointTypes.h"
Expand Down
1 change: 0 additions & 1 deletion cpp/include/Ice/Initialize.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "LoggerF.h"
#include "InstrumentationF.h"
#include "Ice/BuiltinSequences.h"
#include "Ice/Version.h"
#include "Plugin.h"
#include "BatchRequestInterceptor.h"
#include "ValueFactory.h"
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/Ice/InputStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "LoggerF.h"
#include "ValueFactory.h"
#include "Buffer.h"
#include "EncodingVersion.h"
#include "Ice/Version.h"
#include "SlicedDataF.h"
#include "UserExceptionFactory.h"
#include "ValueFactory.h"
Expand Down
1 change: 0 additions & 1 deletion cpp/include/Ice/LocalException.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef ICE_LOCAL_EXCEPTION_H
#define ICE_LOCAL_EXCEPTION_H

#include "EncodingVersion.h"
#include "Exception.h"
#include "Ice/BuiltinSequences.h"
#include "Ice/Identity.h"
Expand Down
13 changes: 2 additions & 11 deletions cpp/include/Ice/OutgoingAsync.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "ObserverHelper.h"
#include "LocalException.h"
#include "Proxy.h"
#include "Protocol.h"

#include <cassert>
#include <exception>
Expand Down Expand Up @@ -74,17 +73,9 @@ namespace IceInternal
void cancel();

void
attachRemoteObserver(const Ice::ConnectionInfoPtr& c, const Ice::EndpointPtr& endpt, std::int32_t requestId)
{
const std::int32_t size = static_cast<std::int32_t>(_os.b.size() - headerSize - 4);
_childObserver.attach(getObserver().getRemoteObserver(c, endpt, requestId, size));
}
attachRemoteObserver(const Ice::ConnectionInfoPtr& c, const Ice::EndpointPtr& endpt, std::int32_t requestId);

void attachCollocatedObserver(const Ice::ObjectAdapterPtr& adapter, std::int32_t requestId)
{
const std::int32_t size = static_cast<std::int32_t>(_os.b.size() - headerSize - 4);
_childObserver.attach(getObserver().getCollocatedObserver(adapter, requestId, size));
}
void attachCollocatedObserver(const Ice::ObjectAdapterPtr& adapter, std::int32_t requestId);

Ice::OutputStream* getOs() { return &_os; }

Expand Down
2 changes: 1 addition & 1 deletion cpp/include/Ice/OutputStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "ValueF.h"
#include "ProxyF.h"
#include "Buffer.h"
#include "EncodingVersion.h"
#include "Ice/Version.h"
#include "SlicedDataF.h"
#include "StreamableTraits.h"
#include "Ice/Format.h"
Expand Down
257 changes: 0 additions & 257 deletions cpp/include/Ice/Protocol.h

This file was deleted.

14 changes: 13 additions & 1 deletion cpp/include/Ice/StreamHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,19 @@ namespace Ice
}
};

// Specializations for EncodingVersion
// Specializations for ProtocolVersion and EncodingVersion

template<> struct StreamableTraits<ProtocolVersion>
{
static const StreamHelperCategory helper = StreamHelperCategoryStruct;
static const int minWireSize = 2;
static const bool fixedLength = true;
};

template<> struct StreamReader<ProtocolVersion>
{
static void read(InputStream* istr, ProtocolVersion& v) { istr->readAll(v.major, v.minor); }
};

template<> struct StreamableTraits<EncodingVersion>
{
Expand Down
Loading

0 comments on commit 61bf5ef

Please sign in to comment.