summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2016-11-12 18:25:33 -0500
committerBernard Normier <bernard@zeroc.com>2016-11-12 18:25:33 -0500
commit838539aff5bf3f37f4d9a6f33713824e98fa3db3 (patch)
tree57cac4a47a00697d6f0011d9aff8f76d6994f2ed /cpp/src
parentMSBuild project updates (diff)
downloadice-838539aff5bf3f37f4d9a6f33713824e98fa3db3.tar.bz2
ice-838539aff5bf3f37f4d9a6f33713824e98fa3db3.tar.xz
ice-838539aff5bf3f37f4d9a6f33713824e98fa3db3.zip
Replaced non-public double underscores in C++
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/AsyncResult.cpp14
-rw-r--r--cpp/src/Ice/CommunicatorI.cpp20
-rw-r--r--cpp/src/Ice/CommunicatorI.h2
-rw-r--r--cpp/src/Ice/ConnectRequestHandler.cpp2
-rw-r--r--cpp/src/Ice/ConnectionI.cpp20
-rw-r--r--cpp/src/Ice/ConnectionI.h2
-rw-r--r--cpp/src/Ice/DispatchInterceptor.cpp2
-rw-r--r--cpp/src/Ice/Exception.cpp22
-rw-r--r--cpp/src/Ice/GCObject.cpp18
-rw-r--r--cpp/src/Ice/Incoming.cpp10
-rw-r--r--cpp/src/Ice/InputStream.cpp6
-rw-r--r--cpp/src/Ice/LocatorInfo.cpp14
-rw-r--r--cpp/src/Ice/LoggerUtil.cpp16
-rw-r--r--cpp/src/Ice/Object.cpp129
-rw-r--r--cpp/src/Ice/ObjectAdapterI.cpp4
-rw-r--r--cpp/src/Ice/ObserverHelper.cpp4
-rw-r--r--cpp/src/Ice/OutgoingAsync.cpp64
-rw-r--r--cpp/src/Ice/OutputStream.cpp12
-rw-r--r--cpp/src/Ice/Proxy.cpp326
-rw-r--r--cpp/src/Ice/ProxyFactory.cpp4
-rw-r--r--cpp/src/Ice/Reference.cpp6
-rw-r--r--cpp/src/Ice/RequestHandlerFactory.cpp4
-rw-r--r--cpp/src/Ice/RouterInfo.cpp6
-rw-r--r--cpp/src/Ice/SlicedData.cpp20
-rw-r--r--cpp/src/Ice/Value.cpp14
-rw-r--r--cpp/src/Slice/CPlusPlusUtil.cpp102
-rw-r--r--cpp/src/Slice/CPlusPlusUtil.h8
-rw-r--r--cpp/src/Slice/Parser.cpp17
-rw-r--r--cpp/src/Slice/Parser.h2
-rw-r--r--cpp/src/slice2cpp/Gen.cpp816
30 files changed, 851 insertions, 835 deletions
diff --git a/cpp/src/Ice/AsyncResult.cpp b/cpp/src/Ice/AsyncResult.cpp
index 60e5ac65773..bc19855bdb7 100644
--- a/cpp/src/Ice/AsyncResult.cpp
+++ b/cpp/src/Ice/AsyncResult.cpp
@@ -24,9 +24,9 @@ AsyncResult::~AsyncResult()
}
void
-AsyncResult::__check(const AsyncResultPtr& r, const IceProxy::Ice::Object* prx, const string& operation)
+AsyncResult::check(const AsyncResultPtr& r, const IceProxy::Ice::Object* prx, const string& operation)
{
- __check(r, operation);
+ check(r, operation);
if(r->getProxy().get() != prx)
{
throw IceUtil::IllegalArgumentException(__FILE__, __LINE__, "Proxy for call to end_" + operation +
@@ -36,9 +36,9 @@ AsyncResult::__check(const AsyncResultPtr& r, const IceProxy::Ice::Object* prx,
}
void
-AsyncResult::__check(const AsyncResultPtr& r, const Ice::Communicator* com, const string& operation)
+AsyncResult::check(const AsyncResultPtr& r, const Ice::Communicator* com, const string& operation)
{
- __check(r, operation);
+ check(r, operation);
if(r->getCommunicator().get() != com)
{
throw IceUtil::IllegalArgumentException(__FILE__, __LINE__, "Communicator for call to end_" + operation +
@@ -48,9 +48,9 @@ AsyncResult::__check(const AsyncResultPtr& r, const Ice::Communicator* com, cons
}
void
-AsyncResult::__check(const AsyncResultPtr& r, const Ice::Connection* con, const string& operation)
+AsyncResult::check(const AsyncResultPtr& r, const Ice::Connection* con, const string& operation)
{
- __check(r, operation);
+ check(r, operation);
if(r->getConnection().get() != con)
{
throw IceUtil::IllegalArgumentException(__FILE__, __LINE__, "Connection for call to end_" + operation +
@@ -60,7 +60,7 @@ AsyncResult::__check(const AsyncResultPtr& r, const Ice::Connection* con, const
}
void
-AsyncResult::__check(const AsyncResultPtr& r, const string& operation)
+AsyncResult::check(const AsyncResultPtr& r, const string& operation)
{
if(!r)
{
diff --git a/cpp/src/Ice/CommunicatorI.cpp b/cpp/src/Ice/CommunicatorI.cpp
index 99c332f629e..a6678b4bd3f 100644
--- a/cpp/src/Ice/CommunicatorI.cpp
+++ b/cpp/src/Ice/CommunicatorI.cpp
@@ -204,7 +204,7 @@ Ice::CommunicatorI::getValueFactoryManager() const
namespace
{
-const ::std::string __flushBatchRequests_name = "flushBatchRequests";
+const ::std::string flushBatchRequests_name = "flushBatchRequests";
}
@@ -230,7 +230,7 @@ Ice::CommunicatorI::flushBatchRequestsAsync(function<void(exception_ptr)> ex, fu
}
};
auto outAsync = make_shared<CommunicatorFlushBatchLambda>(_instance, ex, sent);
- outAsync->invoke(__flushBatchRequests_name);
+ outAsync->invoke(flushBatchRequests_name);
return [outAsync]() { outAsync->cancel(); };
}
@@ -245,24 +245,24 @@ Ice::CommunicatorI::flushBatchRequests()
AsyncResultPtr
Ice::CommunicatorI::begin_flushBatchRequests()
{
- return __begin_flushBatchRequests(::IceInternal::__dummyCallback, 0);
+ return _iceI_begin_flushBatchRequests(::IceInternal::dummyCallback, 0);
}
AsyncResultPtr
Ice::CommunicatorI::begin_flushBatchRequests(const CallbackPtr& cb, const LocalObjectPtr& cookie)
{
- return __begin_flushBatchRequests(cb, cookie);
+ return _iceI_begin_flushBatchRequests(cb, cookie);
}
AsyncResultPtr
Ice::CommunicatorI::begin_flushBatchRequests(const Callback_Communicator_flushBatchRequestsPtr& cb,
const LocalObjectPtr& cookie)
{
- return __begin_flushBatchRequests(cb, cookie);
+ return _iceI_begin_flushBatchRequests(cb, cookie);
}
AsyncResultPtr
-Ice::CommunicatorI::__begin_flushBatchRequests(const IceInternal::CallbackBasePtr& cb, const LocalObjectPtr& cookie)
+Ice::CommunicatorI::_iceI_begin_flushBatchRequests(const IceInternal::CallbackBasePtr& cb, const LocalObjectPtr& cookie)
{
class CommunicatorFlushBatchAsyncWithCallback : public CommunicatorFlushBatchAsync, public CallbackCompletion
{
@@ -285,7 +285,7 @@ Ice::CommunicatorI::__begin_flushBatchRequests(const IceInternal::CallbackBasePt
virtual const std::string&
getOperation() const
{
- return __flushBatchRequests_name;
+ return flushBatchRequests_name;
}
private:
@@ -294,15 +294,15 @@ Ice::CommunicatorI::__begin_flushBatchRequests(const IceInternal::CallbackBasePt
};
CommunicatorFlushBatchAsyncPtr result = new CommunicatorFlushBatchAsyncWithCallback(this, _instance, cb, cookie);
- result->invoke(__flushBatchRequests_name);
+ result->invoke(flushBatchRequests_name);
return result;
}
void
Ice::CommunicatorI::end_flushBatchRequests(const AsyncResultPtr& r)
{
- AsyncResult::__check(r, this, __flushBatchRequests_name);
- r->__wait();
+ AsyncResult::check(r, this, flushBatchRequests_name);
+ r->waitForResponse();
}
#endif
diff --git a/cpp/src/Ice/CommunicatorI.h b/cpp/src/Ice/CommunicatorI.h
index e75037bf72b..767923b7346 100644
--- a/cpp/src/Ice/CommunicatorI.h
+++ b/cpp/src/Ice/CommunicatorI.h
@@ -113,7 +113,7 @@ private:
friend ICE_API ::IceUtil::TimerPtr IceInternal::getInstanceTimer(const ::Ice::CommunicatorPtr&);
#ifndef ICE_CPP11_MAPPING
- AsyncResultPtr __begin_flushBatchRequests(const IceInternal::CallbackBasePtr&, const LocalObjectPtr&);
+ AsyncResultPtr _iceI_begin_flushBatchRequests(const IceInternal::CallbackBasePtr&, const LocalObjectPtr&);
#endif
const ::IceInternal::InstancePtr _instance;
diff --git a/cpp/src/Ice/ConnectRequestHandler.cpp b/cpp/src/Ice/ConnectRequestHandler.cpp
index f68ec2c0770..e8b5acbd486 100644
--- a/cpp/src/Ice/ConnectRequestHandler.cpp
+++ b/cpp/src/Ice/ConnectRequestHandler.cpp
@@ -316,7 +316,7 @@ ConnectRequestHandler::flushRequests()
_requestHandler = ICE_MAKE_SHARED(ConnectionRequestHandler, _reference, _connection, _compress);
for(set<Ice::ObjectPrxPtr>::const_iterator p = _proxies.begin(); p != _proxies.end(); ++p)
{
- (*p)->__updateRequestHandler(ICE_SHARED_FROM_THIS, _requestHandler);
+ (*p)->_updateRequestHandler(ICE_SHARED_FROM_THIS, _requestHandler);
}
}
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp
index ce042d87ba5..9e2c6042043 100644
--- a/cpp/src/Ice/ConnectionI.cpp
+++ b/cpp/src/Ice/ConnectionI.cpp
@@ -44,7 +44,7 @@ Ice::LocalObject* Ice::upCast(ConnectionI* p) { return p; }
namespace
{
-const ::std::string __flushBatchRequests_name = "flushBatchRequests";
+const ::std::string flushBatchRequests_name = "flushBatchRequests";
class TimeoutCallback : public IceUtil::TimerTask
{
@@ -718,7 +718,7 @@ Ice::ConnectionI::flushBatchRequestsAsync(::std::function<void(::std::exception_
}
};
auto outAsync = make_shared<ConnectionFlushBatchLambda>(ICE_SHARED_FROM_THIS, _instance, ex, sent);
- outAsync->invoke(__flushBatchRequests_name);
+ outAsync->invoke(flushBatchRequests_name);
return [outAsync]() { outAsync->cancel(); };
}
#else
@@ -731,24 +731,24 @@ Ice::ConnectionI::flushBatchRequests()
AsyncResultPtr
Ice::ConnectionI::begin_flushBatchRequests()
{
- return __begin_flushBatchRequests(__dummyCallback, 0);
+ return _iceI_begin_flushBatchRequests(dummyCallback, 0);
}
AsyncResultPtr
Ice::ConnectionI::begin_flushBatchRequests(const CallbackPtr& cb, const LocalObjectPtr& cookie)
{
- return __begin_flushBatchRequests(cb, cookie);
+ return _iceI_begin_flushBatchRequests(cb, cookie);
}
AsyncResultPtr
Ice::ConnectionI::begin_flushBatchRequests(const Callback_Connection_flushBatchRequestsPtr& cb,
const LocalObjectPtr& cookie)
{
- return __begin_flushBatchRequests(cb, cookie);
+ return _iceI_begin_flushBatchRequests(cb, cookie);
}
AsyncResultPtr
-Ice::ConnectionI::__begin_flushBatchRequests(const CallbackBasePtr& cb, const LocalObjectPtr& cookie)
+Ice::ConnectionI::_iceI_begin_flushBatchRequests(const CallbackBasePtr& cb, const LocalObjectPtr& cookie)
{
class ConnectionFlushBatchAsyncWithCallback : public ConnectionFlushBatchAsync, public CallbackCompletion
{
@@ -780,7 +780,7 @@ Ice::ConnectionI::__begin_flushBatchRequests(const CallbackBasePtr& cb, const Lo
virtual const std::string&
getOperation() const
{
- return __flushBatchRequests_name;
+ return flushBatchRequests_name;
}
private:
@@ -790,15 +790,15 @@ Ice::ConnectionI::__begin_flushBatchRequests(const CallbackBasePtr& cb, const Lo
};
ConnectionFlushBatchAsyncPtr result = new ConnectionFlushBatchAsyncWithCallback(this, _communicator, _instance, cb, cookie);
- result->invoke(__flushBatchRequests_name);
+ result->invoke(flushBatchRequests_name);
return result;
}
void
Ice::ConnectionI::end_flushBatchRequests(const AsyncResultPtr& r)
{
- AsyncResult::__check(r, this, __flushBatchRequests_name);
- r->__wait();
+ AsyncResult::check(r, this, flushBatchRequests_name);
+ r->waitForResponse();
}
#endif
diff --git a/cpp/src/Ice/ConnectionI.h b/cpp/src/Ice/ConnectionI.h
index ef277ee7c9a..6c0f49f6c08 100644
--- a/cpp/src/Ice/ConnectionI.h
+++ b/cpp/src/Ice/ConnectionI.h
@@ -307,7 +307,7 @@ private:
void reap();
#ifndef ICE_CPP11_MAPPING
- AsyncResultPtr __begin_flushBatchRequests(const IceInternal::CallbackBasePtr&, const LocalObjectPtr&);
+ AsyncResultPtr _iceI_begin_flushBatchRequests(const IceInternal::CallbackBasePtr&, const LocalObjectPtr&);
#endif
Ice::CommunicatorPtr _communicator;
diff --git a/cpp/src/Ice/DispatchInterceptor.cpp b/cpp/src/Ice/DispatchInterceptor.cpp
index b9d87096848..c178829aebf 100644
--- a/cpp/src/Ice/DispatchInterceptor.cpp
+++ b/cpp/src/Ice/DispatchInterceptor.cpp
@@ -15,7 +15,7 @@ using namespace Ice;
using namespace IceInternal;
bool
-Ice::DispatchInterceptor::__dispatch(IceInternal::Incoming& in, const Current& /*current*/)
+Ice::DispatchInterceptor::_iceDispatch(IceInternal::Incoming& in, const Current& /*current*/)
{
try
{
diff --git a/cpp/src/Ice/Exception.cpp b/cpp/src/Ice/Exception.cpp
index 95136f5339a..460ff4dd809 100644
--- a/cpp/src/Ice/Exception.cpp
+++ b/cpp/src/Ice/Exception.cpp
@@ -106,7 +106,7 @@ throwMarshalException(const char* file, int line, const string& reason)
namespace
{
-const string __Ice__UserException_ids[] =
+const string userException_ids[] =
{
"::Ice::UserException"
};
@@ -116,7 +116,7 @@ const string __Ice__UserException_ids[] =
const std::string&
Ice::UserException::ice_staticId()
{
- return __Ice__UserException_ids[0];
+ return userException_ids[0];
}
#ifdef ICE_CPP11_MAPPING
@@ -128,23 +128,23 @@ Ice::UserException::ice_clone() const
#endif
void
-Ice::UserException::__write(::Ice::OutputStream* os) const
+Ice::UserException::_write(::Ice::OutputStream* os) const
{
os->startException(0);
- __writeImpl(os);
+ _writeImpl(os);
os->endException();
}
void
-Ice::UserException::__read(::Ice::InputStream* is)
+Ice::UserException::_read(::Ice::InputStream* is)
{
is->startException();
- __readImpl(is);
+ _readImpl(is);
is->endException(false);
}
bool
-Ice::UserException::__usesClasses() const
+Ice::UserException::_usesClasses() const
{
return false;
}
@@ -173,7 +173,7 @@ Ice::LocalException::ice_clone() const
namespace
{
-const string __Ice__LocalException_ids[] =
+const string localException_ids[] =
{
"::Ice::LocalException"
};
@@ -183,7 +183,7 @@ const string __Ice__LocalException_ids[] =
const std::string&
Ice::LocalException::ice_staticId()
{
- return __Ice__LocalException_ids[0];
+ return localException_ids[0];
}
Ice::SystemException::SystemException(const char* file, int line) :
@@ -209,7 +209,7 @@ Ice::SystemException::ice_clone() const
namespace
{
-const string __Ice__SystemException_ids[] =
+const string systemException_ids[] =
{
"::Ice::SystemException"
};
@@ -219,7 +219,7 @@ const string __Ice__SystemException_ids[] =
const std::string&
Ice::SystemException::ice_staticId()
{
- return __Ice__SystemException_ids[0];
+ return systemException_ids[0];
}
void
diff --git a/cpp/src/Ice/GCObject.cpp b/cpp/src/Ice/GCObject.cpp
index a78ebbc8f50..6dfcdc76bdd 100644
--- a/cpp/src/Ice/GCObject.cpp
+++ b/cpp/src/Ice/GCObject.cpp
@@ -142,10 +142,10 @@ DecreaseRefCounts::visit(GCObject* obj)
GCCountMap::iterator p = _counts.find(obj);
if(p == _counts.end())
{
- _counts.insert(make_pair(obj, obj->__getRefUnsafe() - 1));
+ _counts.insert(make_pair(obj, obj->_iceGetRefUnsafe() - 1));
if(obj->__hasFlag(GCObject::Collectable))
{
- obj->__gcVisitMembers(*this);
+ obj->_iceGcVisitMembers(*this);
}
}
else
@@ -179,7 +179,7 @@ RestoreRefCountsIfReachable::visit(GCObject* obj)
// reachable children.
//
_counts.erase(p);
- obj->__gcVisitMembers(*this);
+ obj->_iceGcVisitMembers(*this);
}
else if(p->second == 0)
{
@@ -189,7 +189,7 @@ RestoreRefCountsIfReachable::visit(GCObject* obj)
// being visited again.
//
p->second = -1;
- obj->__gcVisitMembers(*this);
+ obj->_iceGcVisitMembers(*this);
}
else if(p->second > 0)
{
@@ -201,7 +201,7 @@ RestoreRefCountsIfReachable::visit(GCObject* obj)
_counts.erase(p);
_reachable = true;
- obj->__gcVisitMembers(*this);
+ obj->_iceGcVisitMembers(*this);
_reachable = false;
}
return false;
@@ -234,7 +234,7 @@ MarkCollectable::visit(GCObject* obj)
_p.push(obj);
_s.push(obj);
- obj->__gcVisitMembers(_neighborsVisitor);
+ obj->_iceGcVisitMembers(_neighborsVisitor);
if(_p.top() == obj)
{
@@ -290,7 +290,7 @@ ClearCollectable::visit(GCObject* obj)
if(obj->__hasFlag(GCObject::Collectable))
{
obj->__clearFlag(GCObject::Collectable | GCObject::CycleMember);
- obj->__gcVisitMembers(*this);
+ obj->_iceGcVisitMembers(*this);
}
return false;
}
@@ -356,7 +356,7 @@ IceInternal::GCObject::__setNoDelete(bool b)
}
bool
-GCObject::__gcVisit(GCVisitor& v)
+GCObject::_iceGcVisit(GCVisitor& v)
{
return v.visit(this);
}
@@ -436,7 +436,7 @@ GCObject::collect(IceUtilInternal::MutexPtrLock<IceUtil::Mutex>& lock)
}
for(GCCountMap::const_iterator p = counts.begin(); p != counts.end(); ++p)
{
- p->first->__gcVisitMembers(clearMembers);
+ p->first->_iceGcVisitMembers(clearMembers);
}
for(GCCountMap::const_iterator p = counts.begin(); p != counts.end(); ++p)
{
diff --git a/cpp/src/Ice/Incoming.cpp b/cpp/src/Ice/Incoming.cpp
index da4bb25cbc6..3db0c3ae2a1 100644
--- a/cpp/src/Ice/Incoming.cpp
+++ b/cpp/src/Ice/Incoming.cpp
@@ -39,11 +39,11 @@ extern bool printStackTraces;
#ifdef ICE_CPP11_MAPPING
Ice::MarshaledResult::MarshaledResult(const Ice::Current& current) :
- __os(make_shared<Ice::OutputStream>(current.adapter->getCommunicator(), Ice::currentProtocolEncoding))
+ ostr(make_shared<Ice::OutputStream>(current.adapter->getCommunicator(), Ice::currentProtocolEncoding))
{
- __os->writeBlob(replyHdr, sizeof(replyHdr));
- __os->write(current.requestId);
- __os->write(replyOK);
+ ostr->writeBlob(replyHdr, sizeof(replyHdr));
+ ostr->write(current.requestId);
+ ostr->write(replyOK);
}
#endif
@@ -732,7 +732,7 @@ IceInternal::Incoming::invoke(const ServantManagerPtr& servantManager, InputStre
//
// Dispatch in the incoming call
//
- _servant->__dispatch(*this, _current);
+ _servant->_iceDispatch(*this, _current);
//
// If the request was not dispatched asynchronously, send the response.
diff --git a/cpp/src/Ice/InputStream.cpp b/cpp/src/Ice/InputStream.cpp
index 132012b07b2..9389fb247b5 100644
--- a/cpp/src/Ice/InputStream.cpp
+++ b/cpp/src/Ice/InputStream.cpp
@@ -1899,7 +1899,7 @@ Ice::InputStream::EncapsDecoder::unmarshal(Int index, const Ice::ValuePtr& v)
//
// Read the object.
//
- v->__read(_stream);
+ v->_iceRead(_stream);
//
// Patch all instances now that the object is unmarshaled.
@@ -2034,7 +2034,7 @@ Ice::InputStream::EncapsDecoder10::throwException(ICE_IN(ICE_USER_EXCEPTION_FACT
}
catch(UserException& ex)
{
- ex.__read(_stream);
+ ex._read(_stream);
if(usesClasses)
{
readPendingValues();
@@ -2329,7 +2329,7 @@ Ice::InputStream::EncapsDecoder11::throwException(ICE_IN(ICE_USER_EXCEPTION_FACT
}
catch(UserException& ex)
{
- ex.__read(_stream);
+ ex._read(_stream);
throw;
// Never reached.
diff --git a/cpp/src/Ice/LocatorInfo.cpp b/cpp/src/Ice/LocatorInfo.cpp
index 74f65e2d808..181382909f2 100644
--- a/cpp/src/Ice/LocatorInfo.cpp
+++ b/cpp/src/Ice/LocatorInfo.cpp
@@ -351,7 +351,7 @@ IceInternal::LocatorInfo::RequestCallback::response(const LocatorInfoPtr& locato
vector<EndpointIPtr> endpoints;
if(proxy)
{
- ReferencePtr r = proxy->__reference();
+ ReferencePtr r = proxy->_getReference();
if(_ref->isWellKnown() && !isSupported(_ref->getEncoding(), r->getEncoding()))
{
//
@@ -482,7 +482,7 @@ IceInternal::LocatorInfo::Request::getEndpoints(const ReferencePtr& ref,
vector<EndpointIPtr> endpoints;
if(_proxy)
{
- ReferencePtr r = _proxy->__reference();
+ ReferencePtr r = _proxy->_getReference();
if(!r->isIndirect())
{
endpoints = r->getEndpoints();
@@ -924,7 +924,7 @@ IceInternal::LocatorInfo::finishRequest(const ReferencePtr& ref,
const Ice::ObjectPrxPtr& proxy,
bool notRegistered)
{
- if(!proxy || proxy->__reference()->isIndirect())
+ if(!proxy || proxy->_getReference()->isIndirect())
{
//
// Remove the cached references of well-known objects for which we tried
@@ -938,9 +938,9 @@ IceInternal::LocatorInfo::finishRequest(const ReferencePtr& ref,
if(!ref->isWellKnown())
{
- if(proxy && !proxy->__reference()->isIndirect()) // Cache the adapter endpoints.
+ if(proxy && !proxy->_getReference()->isIndirect()) // Cache the adapter endpoints.
{
- _table->addAdapterEndpoints(ref->getAdapterId(), proxy->__reference()->getEndpoints());
+ _table->addAdapterEndpoints(ref->getAdapterId(), proxy->_getReference()->getEndpoints());
}
else if(notRegistered) // If the adapter isn't registered anymore, remove it from the cache.
{
@@ -953,9 +953,9 @@ IceInternal::LocatorInfo::finishRequest(const ReferencePtr& ref,
}
else
{
- if(proxy && !proxy->__reference()->isWellKnown()) // Cache the well-known object reference.
+ if(proxy && !proxy->_getReference()->isWellKnown()) // Cache the well-known object reference.
{
- _table->addObjectReference(ref->getIdentity(), proxy->__reference());
+ _table->addObjectReference(ref->getIdentity(), proxy->_getReference());
}
else if(notRegistered) // If the well-known object isn't registered anymore, remove it from the cache.
{
diff --git a/cpp/src/Ice/LoggerUtil.cpp b/cpp/src/Ice/LoggerUtil.cpp
index 13dd1eae363..b26bf629837 100644
--- a/cpp/src/Ice/LoggerUtil.cpp
+++ b/cpp/src/Ice/LoggerUtil.cpp
@@ -26,19 +26,19 @@ extern bool printStackTraces;
string
Ice::LoggerOutputBase::str() const
{
- return _str.str();
+ return _os.str();
}
ostringstream&
-Ice::LoggerOutputBase::__str()
+Ice::LoggerOutputBase::_stream()
{
- return _str;
+ return _os;
}
Ice::LoggerOutputBase&
Ice::operator<<(Ice::LoggerOutputBase& out, ios_base& (*val)(ios_base&))
{
- out.__str() << val;
+ out._stream() << val;
return out;
}
@@ -47,11 +47,11 @@ Ice::loggerInsert(Ice::LoggerOutputBase& out, const IceUtil::Exception& ex)
{
if(IceUtilInternal::printStackTraces)
{
- out.__str() << ex.what() << '\n' << ex.ice_stackTrace();
+ out._stream() << ex.what() << '\n' << ex.ice_stackTrace();
}
else
{
- out.__str() << ex.what();
+ out._stream() << ex.what();
}
return out;
}
@@ -71,12 +71,12 @@ Ice::Trace::~Trace()
void
Ice::Trace::flush()
{
- string s = __str().str();
+ string s = _stream().str();
if(!s.empty())
{
_logger->trace(_category, s);
}
- __str().str("");
+ _stream().str("");
}
diff --git a/cpp/src/Ice/Object.cpp b/cpp/src/Ice/Object.cpp
index 197c54e1918..0ff14084d0d 100644
--- a/cpp/src/Ice/Object.cpp
+++ b/cpp/src/Ice/Object.cpp
@@ -27,7 +27,7 @@ const Current noExplicitCurrent = Current();
Object* Ice::upCast(Object* p) { return p; }
void
-Ice::__patch(ObjectPtr& obj, const ObjectPtr& v)
+Ice::_icePatchObjectPtr(ObjectPtr& obj, const ObjectPtr& v)
{
obj = v;
}
@@ -48,11 +48,19 @@ Ice::Object::operator<(const Object& r) const
namespace
{
-const string __Ice__Object_ids[] =
+const string object_ids[] =
{
"::Ice::Object"
};
+const string object_all[] =
+{
+ "ice_id",
+ "ice_ids",
+ "ice_isA",
+ "ice_ping"
+};
+
}
#ifndef ICE_CPP11_MAPPING
@@ -74,7 +82,7 @@ Ice::Object::ice_isA(string s, const Current&) const
Ice::Object::ice_isA(const string& s, const Current&) const
#endif
{
- return s == __Ice__Object_ids[0];
+ return s == object_ids[0];
}
void
@@ -86,7 +94,7 @@ Ice::Object::ice_ping(const Current&) const
vector<string>
Ice::Object::ice_ids(const Current&) const
{
- return vector<string>(&__Ice__Object_ids[0], &__Ice__Object_ids[1]);
+ return vector<string>(&object_ids[0], &object_ids[1]);
}
#ifdef ICE_CPP11_MAPPING
@@ -96,13 +104,13 @@ const string&
#endif
Ice::Object::ice_id(const Current&) const
{
- return __Ice__Object_ids[0];
+ return object_ids[0];
}
const ::std::string&
Ice::Object::ice_staticId()
{
- return __Ice__Object_ids[0];
+ return object_ids[0];
}
#ifndef ICE_CPP11_MAPPING
@@ -115,64 +123,55 @@ Ice::Object::ice_clone() const
#endif
bool
-Ice::Object::___ice_isA(Incoming& __inS, const Current& __current)
+Ice::Object::_iceD_ice_isA(Incoming& inS, const Current& current)
{
- InputStream* __is = __inS.startReadParams();
- string __id;
- __is->read(__id, false);
- __inS.endReadParams();
+ InputStream* istr = inS.startReadParams();
+ string iceP_id;
+ istr->read(iceP_id, false);
+ inS.endReadParams();
#ifdef ICE_CPP11_MAPPING
- bool __ret = ice_isA(move(__id), __current);
+ bool ret = ice_isA(move(iceP_id), current);
#else
- bool __ret = ice_isA(__id, __current);
+ bool ret = ice_isA(iceP_id, current);
#endif
- OutputStream* __os = __inS.startWriteParams();
- __os->write(__ret);
- __inS.endWriteParams();
+ OutputStream* ostr = inS.startWriteParams();
+ ostr->write(ret);
+ inS.endWriteParams();
return false;
}
bool
-Ice::Object::___ice_ping(Incoming& __inS, const Current& __current)
+Ice::Object::_iceD_ice_ping(Incoming& inS, const Current& current)
{
- __inS.readEmptyParams();
- ice_ping(__current);
- __inS.writeEmptyParams();
+ inS.readEmptyParams();
+ ice_ping(current);
+ inS.writeEmptyParams();
return false;
}
bool
-Ice::Object::___ice_ids(Incoming& __inS, const Current& __current)
+Ice::Object::_iceD_ice_ids(Incoming& inS, const Current& current)
{
- __inS.readEmptyParams();
- vector<string> __ret = ice_ids(__current);
- OutputStream* __os = __inS.startWriteParams();
- __os->write(&__ret[0], &__ret[0] + __ret.size(), false);
- __inS.endWriteParams();
+ inS.readEmptyParams();
+ vector<string> ret = ice_ids(current);
+ OutputStream* ostr = inS.startWriteParams();
+ ostr->write(&ret[0], &ret[0] + ret.size(), false);
+ inS.endWriteParams();
return false;
}
bool
-Ice::Object::___ice_id(Incoming& __inS, const Current& __current)
+Ice::Object::_iceD_ice_id(Incoming& inS, const Current& current)
{
- __inS.readEmptyParams();
- string __ret = ice_id(__current);
- OutputStream* __os = __inS.startWriteParams();
- __os->write(__ret, false);
- __inS.endWriteParams();
+ inS.readEmptyParams();
+ string ret = ice_id(current);
+ OutputStream* ostr = inS.startWriteParams();
+ ostr->write(ret, false);
+ inS.endWriteParams();
return false;
}
-string Ice::Object::__all[] =
-{
- "ice_id",
- "ice_ids",
- "ice_isA",
- "ice_ping"
-};
-
-
bool
#ifdef ICE_CPP11_MAPPING
Ice::Object::ice_dispatch(Request& request, std::function<bool()> r, std::function<bool(std::exception_ptr)> e)
@@ -193,7 +192,7 @@ Ice::Object::ice_dispatch(Request& request, const DispatchInterceptorAsyncCallba
#endif
try
{
- return __dispatch(in, in.getCurrent());
+ return _iceDispatch(in, in.getCurrent());
in.pop();
}
catch(...)
@@ -204,37 +203,37 @@ Ice::Object::ice_dispatch(Request& request, const DispatchInterceptorAsyncCallba
}
else
{
- return __dispatch(in, in.getCurrent());
+ return _iceDispatch(in, in.getCurrent());
}
}
bool
-Ice::Object::__dispatch(Incoming& in, const Current& current)
+Ice::Object::_iceDispatch(Incoming& in, const Current& current)
{
- pair<string*, string*> r = equal_range(__all, __all + sizeof(__all) / sizeof(string), current.operation);
+ pair<const string*, const string*> r = equal_range(object_all, object_all + sizeof(object_all) / sizeof(string), current.operation);
if(r.first == r.second)
{
throw OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
}
- switch(r.first - __all)
+ switch(r.first - object_all)
{
case 0:
{
- return ___ice_id(in, current);
+ return _iceD_ice_id(in, current);
}
case 1:
{
- return ___ice_ids(in, current);
+ return _iceD_ice_ids(in, current);
}
case 2:
{
- return ___ice_isA(in, current);
+ return _iceD_ice_isA(in, current);
}
case 3:
{
- return ___ice_ping(in, current);
+ return _iceD_ice_ping(in, current);
}
default:
{
@@ -256,18 +255,18 @@ Ice::Object::ice_postUnmarshal()
}
void
-Ice::Object::__write(Ice::OutputStream* os) const
+Ice::Object::_iceWrite(Ice::OutputStream* os) const
{
os->startValue(0);
- __writeImpl(os);
+ _iceWriteImpl(os);
os->endValue();
}
void
-Ice::Object::__read(Ice::InputStream* is)
+Ice::Object::_iceRead(Ice::InputStream* is)
{
is->startValue();
- __readImpl(is);
+ _iceReadImpl(is);
is->endValue(false);
}
@@ -311,7 +310,7 @@ operationModeToString(OperationMode mode)
}
void
-Ice::Object::__checkMode(OperationMode expected, OperationMode received)
+Ice::Object::_iceCheckMode(OperationMode expected, OperationMode received)
{
if(expected != received)
{
@@ -330,19 +329,19 @@ Ice::Object::__checkMode(OperationMode expected, OperationMode received)
else
{
Ice::MarshalException ex(__FILE__, __LINE__);
- std::ostringstream __reason;
- __reason << "unexpected operation mode. expected = "
- << operationModeToString(expected)
- << " received = "
- << operationModeToString(received);
- ex.reason = __reason.str();
+ std::ostringstream reason;
+ reason << "unexpected operation mode. expected = "
+ << operationModeToString(expected)
+ << " received = "
+ << operationModeToString(received);
+ ex.reason = reason.str();
throw ex;
}
}
}
bool
-Ice::Blobject::__dispatch(Incoming& in, const Current& current)
+Ice::Blobject::_iceDispatch(Incoming& in, const Current& current)
{
const Byte* inEncaps;
Int sz;
@@ -361,7 +360,7 @@ Ice::Blobject::__dispatch(Incoming& in, const Current& current)
}
bool
-Ice::BlobjectArray::__dispatch(Incoming& in, const Current& current)
+Ice::BlobjectArray::_iceDispatch(Incoming& in, const Current& current)
{
pair<const Byte*, const Byte*> inEncaps;
Int sz;
@@ -381,7 +380,7 @@ Ice::BlobjectArray::__dispatch(Incoming& in, const Current& current)
}
bool
-Ice::BlobjectAsync::__dispatch(Incoming& in, const Current& current)
+Ice::BlobjectAsync::_iceDispatch(Incoming& in, const Current& current)
{
const Byte* inEncaps;
Int sz;
@@ -409,7 +408,7 @@ Ice::BlobjectAsync::__dispatch(Incoming& in, const Current& current)
}
bool
-Ice::BlobjectArrayAsync::__dispatch(Incoming& in, const Current& current)
+Ice::BlobjectArrayAsync::_iceDispatch(Incoming& in, const Current& current)
{
pair<const Byte*, const Byte*> inEncaps;
Int sz;
diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp
index 0631186769d..22c8ea8d380 100644
--- a/cpp/src/Ice/ObjectAdapterI.cpp
+++ b/cpp/src/Ice/ObjectAdapterI.cpp
@@ -537,7 +537,7 @@ Ice::ObjectAdapterI::findByProxy(const ObjectPrxPtr& proxy) const
checkForDeactivation();
- ReferencePtr ref = proxy->__reference();
+ ReferencePtr ref = proxy->_getReference();
return findFacet(ref->getIdentity(), ref->getFacet());
}
@@ -712,7 +712,7 @@ Ice::ObjectAdapterI::isLocal(const ObjectPrxPtr& proxy) const
// it can be called for AMI invocations if the proxy has no delegate set yet.
//
- ReferencePtr ref = proxy->__reference();
+ ReferencePtr ref = proxy->_getReference();
if(ref->isWellKnown())
{
//
diff --git a/cpp/src/Ice/ObserverHelper.cpp b/cpp/src/Ice/ObserverHelper.cpp
index 6b88a0d68de..262b5446efc 100644
--- a/cpp/src/Ice/ObserverHelper.cpp
+++ b/cpp/src/Ice/ObserverHelper.cpp
@@ -18,7 +18,7 @@ using namespace Ice::Instrumentation;
IceInternal::InvocationObserver::InvocationObserver(const Ice::ObjectPrxPtr& proxy, const string& op, const Context& ctx)
{
- const CommunicatorObserverPtr& obsv = proxy->__reference()->getInstance()->initializationData().observer;
+ const CommunicatorObserverPtr& obsv = proxy->_getReference()->getInstance()->initializationData().observer;
if(!obsv)
{
return;
@@ -40,7 +40,7 @@ IceInternal::InvocationObserver::InvocationObserver(IceInternal::Instance* insta
void
IceInternal::InvocationObserver::attach(const Ice::ObjectPrxPtr& proxy, const string& op, const Context& ctx)
{
- const CommunicatorObserverPtr& obsv = proxy->__reference()->getInstance()->initializationData().observer;
+ const CommunicatorObserverPtr& obsv = proxy->_getReference()->getInstance()->initializationData().observer;
if(!obsv)
{
return;
diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp
index d7ffc2f4d6d..060f9019e72 100644
--- a/cpp/src/Ice/OutgoingAsync.cpp
+++ b/cpp/src/Ice/OutgoingAsync.cpp
@@ -474,7 +474,7 @@ OutgoingAsyncBase::throwLocalException() const
}
bool
-OutgoingAsyncBase::__wait()
+OutgoingAsyncBase::waitForResponse()
{
Lock sync(_m);
if(_state & EndCalled)
@@ -495,32 +495,32 @@ OutgoingAsyncBase::__wait()
}
Ice::InputStream*
-OutgoingAsyncBase::__startReadParams()
+OutgoingAsyncBase::startReadParams()
{
_is.startEncapsulation();
return &_is;
}
void
-OutgoingAsyncBase::__endReadParams()
+OutgoingAsyncBase::endReadParams()
{
_is.endEncapsulation();
}
void
-OutgoingAsyncBase::__readEmptyParams()
+OutgoingAsyncBase::readEmptyParams()
{
_is.skipEmptyEncapsulation();
}
void
-OutgoingAsyncBase::__readParamEncaps(const ::Ice::Byte*& encaps, ::Ice::Int& sz)
+OutgoingAsyncBase::readParamEncaps(const ::Ice::Byte*& encaps, ::Ice::Int& sz)
{
_is.readEncapsulation(encaps, sz);
}
void
-OutgoingAsyncBase::__throwUserException()
+OutgoingAsyncBase::throwUserException()
{
try
{
@@ -574,7 +574,7 @@ ProxyOutgoingAsyncBase::exception(const Exception& exc)
}
_cachedConnection = 0;
- if(_proxy->__reference()->getInvocationTimeout() == -2)
+ if(_proxy->_getReference()->getInvocationTimeout() == -2)
{
_instance->timer()->cancel(ICE_SHARED_FROM_THIS);
}
@@ -590,7 +590,7 @@ ProxyOutgoingAsyncBase::exception(const Exception& exc)
// the retry interval is 0. This method can be called with the
// connection locked so we can't just retry here.
//
- _instance->retryQueue()->add(ICE_SHARED_FROM_THIS, _proxy->__handleException(exc, _handler, _mode, _sent, _cnt));
+ _instance->retryQueue()->add(ICE_SHARED_FROM_THIS, _proxy->_handleException(exc, _handler, _mode, _sent, _cnt));
return false;
}
catch(const Exception& ex)
@@ -602,7 +602,7 @@ ProxyOutgoingAsyncBase::exception(const Exception& exc)
void
ProxyOutgoingAsyncBase::cancelable(const CancellationHandlerPtr& handler)
{
- if(_proxy->__reference()->getInvocationTimeout() == -2 && _cachedConnection)
+ if(_proxy->_getReference()->getInvocationTimeout() == -2 && _cachedConnection)
{
const int timeout = _cachedConnection->timeout();
if(timeout > 0)
@@ -624,7 +624,7 @@ ProxyOutgoingAsyncBase::retryException(const Exception& ex)
// require could end up waiting for the flush of the
// connection to be done.
//
- _proxy->__updateRequestHandler(_handler, 0); // Clear request handler and always retry.
+ _proxy->_updateRequestHandler(_handler, 0); // Clear request handler and always retry.
_instance->retryQueue()->add(ICE_SHARED_FROM_THIS, 0);
}
catch(const Ice::Exception& exc)
@@ -677,7 +677,7 @@ ProxyOutgoingAsyncBase::getCommunicator() const
#endif
ProxyOutgoingAsyncBase::ProxyOutgoingAsyncBase(const ObjectPrxPtr& prx) :
- OutgoingAsyncBase(prx->__reference()->getInstance()),
+ OutgoingAsyncBase(prx->_getReference()->getInstance()),
_proxy(prx),
_mode(ICE_ENUM(OperationMode, Normal)),
_cnt(0),
@@ -696,7 +696,7 @@ ProxyOutgoingAsyncBase::invokeImpl(bool userThread)
{
if(userThread)
{
- int invocationTimeout = _proxy->__reference()->getInvocationTimeout();
+ int invocationTimeout = _proxy->_getReference()->getInvocationTimeout();
if(invocationTimeout > 0)
{
_instance->timer()->schedule(ICE_SHARED_FROM_THIS, IceUtil::Time::milliSeconds(invocationTimeout));
@@ -712,7 +712,7 @@ ProxyOutgoingAsyncBase::invokeImpl(bool userThread)
try
{
_sent = false;
- _handler = _proxy->__getRequestHandler();
+ _handler = _proxy->_getRequestHandler();
AsyncStatus status = _handler->sendAsyncRequest(ICE_SHARED_FROM_THIS);
if(status & AsyncStatusSent)
{
@@ -736,7 +736,7 @@ ProxyOutgoingAsyncBase::invokeImpl(bool userThread)
}
catch(const RetryException&)
{
- _proxy->__updateRequestHandler(_handler, 0); // Clear request handler and always retry.
+ _proxy->_updateRequestHandler(_handler, 0); // Clear request handler and always retry.
}
catch(const Exception& ex)
{
@@ -745,7 +745,7 @@ ProxyOutgoingAsyncBase::invokeImpl(bool userThread)
_childObserver.failed(ex.ice_id());
_childObserver.detach();
}
- int interval = _proxy->__handleException(ex, _handler, _mode, _sent, _cnt);
+ int interval = _proxy->_handleException(ex, _handler, _mode, _sent, _cnt);
if(interval > 0)
{
_instance->retryQueue()->add(ICE_SHARED_FROM_THIS, interval);
@@ -781,7 +781,7 @@ ProxyOutgoingAsyncBase::sentImpl(bool done)
_sent = true;
if(done)
{
- if(_proxy->__reference()->getInvocationTimeout() != -1)
+ if(_proxy->_getReference()->getInvocationTimeout() != -1)
{
_instance->timer()->cancel(ICE_SHARED_FROM_THIS);
}
@@ -792,7 +792,7 @@ ProxyOutgoingAsyncBase::sentImpl(bool done)
bool
ProxyOutgoingAsyncBase::exceptionImpl(const Exception& ex)
{
- if(_proxy->__reference()->getInvocationTimeout() != -1)
+ if(_proxy->_getReference()->getInvocationTimeout() != -1)
{
_instance->timer()->cancel(ICE_SHARED_FROM_THIS);
}
@@ -802,7 +802,7 @@ ProxyOutgoingAsyncBase::exceptionImpl(const Exception& ex)
bool
ProxyOutgoingAsyncBase::responseImpl(bool ok)
{
- if(_proxy->__reference()->getInvocationTimeout() != -1)
+ if(_proxy->_getReference()->getInvocationTimeout() != -1)
{
_instance->timer()->cancel(ICE_SHARED_FROM_THIS);
}
@@ -812,7 +812,7 @@ ProxyOutgoingAsyncBase::responseImpl(bool ok)
void
ProxyOutgoingAsyncBase::runTimerTask()
{
- if(_proxy->__reference()->getInvocationTimeout() == -2)
+ if(_proxy->_getReference()->getInvocationTimeout() == -2)
{
cancel(ConnectionTimeoutException(__FILE__, __LINE__));
}
@@ -824,7 +824,7 @@ ProxyOutgoingAsyncBase::runTimerTask()
OutgoingAsync::OutgoingAsync(const ObjectPrxPtr& prx, bool synchronous) :
ProxyOutgoingAsyncBase(prx),
- _encoding(getCompatibleEncoding(prx->__reference()->getEncoding())),
+ _encoding(getCompatibleEncoding(prx->_getReference()->getEncoding())),
_synchronous(synchronous)
{
}
@@ -832,12 +832,12 @@ OutgoingAsync::OutgoingAsync(const ObjectPrxPtr& prx, bool synchronous) :
void
OutgoingAsync::prepare(const string& operation, OperationMode mode, const Context& context)
{
- checkSupportedProtocol(getCompatibleProtocol(_proxy->__reference()->getProtocol()));
+ checkSupportedProtocol(getCompatibleProtocol(_proxy->_getReference()->getProtocol()));
_mode = mode;
_observer.attach(_proxy, operation, context);
- switch(_proxy->__reference()->getMode())
+ switch(_proxy->_getReference()->getMode())
{
case Reference::ModeTwoway:
case Reference::ModeOneway:
@@ -850,12 +850,12 @@ OutgoingAsync::prepare(const string& operation, OperationMode mode, const Contex
case Reference::ModeBatchOneway:
case Reference::ModeBatchDatagram:
{
- _proxy->__getBatchRequestQueue()->prepareBatchRequest(&_os);
+ _proxy->_getBatchRequestQueue()->prepareBatchRequest(&_os);
break;
}
}
- Reference* ref = _proxy->__reference().get();
+ Reference* ref = _proxy->_getReference().get();
_os.write(ref->getIdentity());
@@ -1068,7 +1068,7 @@ OutgoingAsync::invokeCollocated(CollocatedRequestHandler* handler)
void
OutgoingAsync::abort(const Exception& ex)
{
- const Reference::Mode mode = _proxy->__reference()->getMode();
+ const Reference::Mode mode = _proxy->_getReference()->getMode();
if(mode == Reference::ModeBatchOneway || mode == Reference::ModeBatchDatagram)
{
//
@@ -1076,7 +1076,7 @@ OutgoingAsync::abort(const Exception& ex)
// must notify the connection about that we give up ownership
// of the batch stream.
//
- _proxy->__getBatchRequestQueue()->abortBatchRequest(&_os);
+ _proxy->_getBatchRequestQueue()->abortBatchRequest(&_os);
}
ProxyOutgoingAsyncBase::abort(ex);
@@ -1085,11 +1085,11 @@ OutgoingAsync::abort(const Exception& ex)
void
OutgoingAsync::invoke(const string& operation)
{
- const Reference::Mode mode = _proxy->__reference()->getMode();
+ const Reference::Mode mode = _proxy->_getReference()->getMode();
if(mode == Reference::ModeBatchOneway || mode == Reference::ModeBatchDatagram)
{
_sentSynchronously = true;
- _proxy->__getBatchRequestQueue()->finishBatchRequest(&_os, _proxy, operation);
+ _proxy->_getBatchRequestQueue()->finishBatchRequest(&_os, _proxy, operation);
responseImpl(true);
return; // Don't call sent/completed callback for batch AMI requests
}
@@ -1194,9 +1194,9 @@ ProxyFlushBatchAsync::invokeCollocated(CollocatedRequestHandler* handler)
void
ProxyFlushBatchAsync::invoke(const string& operation)
{
- checkSupportedProtocol(getCompatibleProtocol(_proxy->__reference()->getProtocol()));
+ checkSupportedProtocol(getCompatibleProtocol(_proxy->_getReference()->getProtocol()));
_observer.attach(_proxy, operation, ::Ice::noExplicitContext);
- _batchRequestNum = _proxy->__getBatchRequestQueue()->swap(&_os);
+ _batchRequestNum = _proxy->_getBatchRequestQueue()->swap(&_os);
invokeImpl(true); // userThread = true
}
@@ -1496,7 +1496,7 @@ namespace
//
// Dummy class derived from CallbackBase
-// We use this class for the __dummyCallback extern pointer in OutgoingAsync. In turn,
+// We use this class for the dummyCallback extern pointer in OutgoingAsync. In turn,
// this allows us to test whether the user supplied a null delegate instance to the
// generated begin_ method without having to generate a separate test to throw IllegalArgumentException
// in the inlined versions of the begin_ method. In other words, this reduces the amount of generated
@@ -1550,7 +1550,7 @@ public:
// versus the generated inline version of the begin_ method having
// passed a pointer to the dummy delegate.
//
-CallbackBasePtr IceInternal::__dummyCallback = new DummyCallback;
+CallbackBasePtr IceInternal::dummyCallback = new DummyCallback;
CallbackBase::~CallbackBase()
{
diff --git a/cpp/src/Ice/OutputStream.cpp b/cpp/src/Ice/OutputStream.cpp
index 4850b0f5474..4c80fe57604 100644
--- a/cpp/src/Ice/OutputStream.cpp
+++ b/cpp/src/Ice/OutputStream.cpp
@@ -800,7 +800,7 @@ Ice::OutputStream::write(const ObjectPrx& v)
{
if(v)
{
- v->__write(*this);
+ v->_write(*this);
}
else
{
@@ -963,9 +963,9 @@ Ice::OutputStream::EncapsEncoder10::write(const UserException& v)
// This allows reading the pending instances even if some part of
// the exception was sliced.
//
- bool usesClasses = v.__usesClasses();
+ bool usesClasses = v._usesClasses();
_stream->write(usesClasses);
- v.__write(_stream);
+ v._write(_stream);
if(usesClasses)
{
writePendingValues();
@@ -1076,7 +1076,7 @@ Ice::OutputStream::EncapsEncoder10::writePendingValues()
out << "unknown exception raised by ice_preMarshal";
}
- p->first->__write(_stream);
+ p->first->_iceWrite(_stream);
}
}
_stream->writeSize(0); // Zero marker indicates end of sequence of sequences of instances.
@@ -1151,7 +1151,7 @@ Ice::OutputStream::EncapsEncoder11::write(const ValuePtr& v)
void
Ice::OutputStream::EncapsEncoder11::write(const UserException& v)
{
- v.__write(_stream);
+ v._write(_stream);
}
void
@@ -1395,5 +1395,5 @@ Ice::OutputStream::EncapsEncoder11::writeInstance(const ValuePtr& v)
}
_stream->writeSize(1); // Object instance marker.
- v->__write(_stream);
+ v->_iceWrite(_stream);
}
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp
index 5555d4214a1..4c36e74e369 100644
--- a/cpp/src/Ice/Proxy.cpp
+++ b/cpp/src/Ice/Proxy.cpp
@@ -68,11 +68,11 @@ operator==(const ObjectPrx& lhs, const ObjectPrx& rhs)
}
void
-Ice::ObjectPrx::__ice_isA(const shared_ptr<IceInternal::OutgoingAsyncT<bool>>& outAsync,
+Ice::ObjectPrx::_iceI_isA(const shared_ptr<IceInternal::OutgoingAsyncT<bool>>& outAsync,
const string& typeId,
const Context& ctx)
{
- __checkTwowayOnly(ice_isA_name);
+ _checkTwowayOnly(ice_isA_name);
outAsync->invoke(ice_isA_name, OperationMode::Nonmutating, DefaultFormat, ctx,
[&](Ice::OutputStream* os)
{
@@ -82,15 +82,15 @@ Ice::ObjectPrx::__ice_isA(const shared_ptr<IceInternal::OutgoingAsyncT<bool>>& o
}
void
-Ice::ObjectPrx::__ice_ping(const shared_ptr<IceInternal::OutgoingAsyncT<void>>& outAsync, const Context& ctx)
+Ice::ObjectPrx::_iceI_ping(const shared_ptr<IceInternal::OutgoingAsyncT<void>>& outAsync, const Context& ctx)
{
outAsync->invoke(ice_ping_name, OperationMode::Nonmutating, DefaultFormat, ctx, nullptr, nullptr);
}
void
-Ice::ObjectPrx::__ice_ids(const shared_ptr<IceInternal::OutgoingAsyncT<vector<string>>>& outAsync, const Context& ctx)
+Ice::ObjectPrx::_iceI_ids(const shared_ptr<IceInternal::OutgoingAsyncT<vector<string>>>& outAsync, const Context& ctx)
{
- __checkTwowayOnly(ice_ids_name);
+ _checkTwowayOnly(ice_ids_name);
outAsync->invoke(ice_ids_name, OperationMode::Nonmutating, DefaultFormat, ctx, nullptr, nullptr,
[](Ice::InputStream* stream)
{
@@ -101,9 +101,9 @@ Ice::ObjectPrx::__ice_ids(const shared_ptr<IceInternal::OutgoingAsyncT<vector<st
}
void
-Ice::ObjectPrx::__ice_id(const shared_ptr<IceInternal::OutgoingAsyncT<string>>& outAsync, const Context& ctx)
+Ice::ObjectPrx::_iceI_id(const shared_ptr<IceInternal::OutgoingAsyncT<string>>& outAsync, const Context& ctx)
{
- __checkTwowayOnly(ice_id_name);
+ _checkTwowayOnly(ice_id_name);
outAsync->invoke(ice_id_name, OperationMode::Nonmutating, DefaultFormat, ctx, nullptr, nullptr,
[](Ice::InputStream* stream)
{
@@ -114,19 +114,19 @@ Ice::ObjectPrx::__ice_id(const shared_ptr<IceInternal::OutgoingAsyncT<string>>&
}
void
-Ice::ObjectPrx::__ice_getConnection(const shared_ptr<IceInternal::ProxyGetConnection>& outAsync)
+Ice::ObjectPrx::_iceI_getConnection(const shared_ptr<IceInternal::ProxyGetConnection>& outAsync)
{
outAsync->invoke(ice_getConnection_name);
}
void
-Ice::ObjectPrx::__ice_flushBatchRequests(const shared_ptr<IceInternal::ProxyFlushBatchAsync>& outAsync)
+Ice::ObjectPrx::_iceI_flushBatchRequests(const shared_ptr<IceInternal::ProxyFlushBatchAsync>& outAsync)
{
outAsync->invoke(ice_flushBatchRequests_name);
}
void
-Ice::ObjectPrx::__checkTwowayOnly(const string& name) const
+Ice::ObjectPrx::_checkTwowayOnly(const string& name) const
{
//
// No mutex lock necessary, there is nothing mutable in this operation.
@@ -141,7 +141,7 @@ Ice::ObjectPrx::__checkTwowayOnly(const string& name) const
shared_ptr<ObjectPrx>
-Ice::ObjectPrx::__newInstance() const
+Ice::ObjectPrx::_newInstance() const
{
return createProxy<ObjectPrx>();
}
@@ -193,164 +193,164 @@ IceProxy::Ice::Object::operator<(const Object& r) const
}
Ice::AsyncResultPtr
-IceProxy::Ice::Object::__begin_ice_isA(const string& typeId,
- const Context& ctx,
- const ::IceInternal::CallbackBasePtr& del,
- const ::Ice::LocalObjectPtr& cookie,
- bool sync)
-{
- __checkTwowayOnly(ice_isA_name, sync);
- OutgoingAsyncPtr __result = new CallbackOutgoing(this, ice_isA_name, del, cookie, sync);
+IceProxy::Ice::Object::_iceI_begin_ice_isA(const string& typeId,
+ const Context& ctx,
+ const ::IceInternal::CallbackBasePtr& del,
+ const ::Ice::LocalObjectPtr& cookie,
+ bool sync)
+{
+ _checkTwowayOnly(ice_isA_name, sync);
+ OutgoingAsyncPtr result = new CallbackOutgoing(this, ice_isA_name, del, cookie, sync);
try
{
- __result->prepare(ice_isA_name, Nonmutating, ctx);
- ::Ice::OutputStream* __os = __result->startWriteParams(DefaultFormat);
- __os->write(typeId, false);
- __result->endWriteParams();
- __result->invoke(ice_isA_name);
+ result->prepare(ice_isA_name, Nonmutating, ctx);
+ ::Ice::OutputStream* ostr = result->startWriteParams(DefaultFormat);
+ ostr->write(typeId, false);
+ result->endWriteParams();
+ result->invoke(ice_isA_name);
}
- catch(const Exception& __ex)
+ catch(const Exception& ex)
{
- __result->abort(__ex);
+ result->abort(ex);
}
- return __result;
+ return result;
}
bool
-IceProxy::Ice::Object::end_ice_isA(const AsyncResultPtr& __result)
+IceProxy::Ice::Object::end_ice_isA(const AsyncResultPtr& result)
{
- AsyncResult::__check(__result, this, ice_isA_name);
- bool __ok = __result->__wait();
- if(!__ok)
+ AsyncResult::check(result, this, ice_isA_name);
+ bool ok = result->waitForResponse();
+ if(!ok)
{
try
{
- __result->__throwUserException();
+ result->throwUserException();
}
- catch(const UserException& __ex)
+ catch(const UserException& ex)
{
- throw UnknownUserException(__FILE__, __LINE__, __ex.ice_id());
+ throw UnknownUserException(__FILE__, __LINE__, ex.ice_id());
}
}
- bool __ret;
- ::Ice::InputStream* __is = __result->__startReadParams();
- __is->read(__ret);
- __result->__endReadParams();
- return __ret;
+ bool ret;
+ ::Ice::InputStream* istr = result->startReadParams();
+ istr->read(ret);
+ result->endReadParams();
+ return ret;
}
AsyncResultPtr
-IceProxy::Ice::Object::__begin_ice_ping(const Context& ctx,
+IceProxy::Ice::Object::_iceI_begin_ice_ping(const Context& ctx,
const ::IceInternal::CallbackBasePtr& del,
const ::Ice::LocalObjectPtr& cookie,
bool sync)
{
- OutgoingAsyncPtr __result = new CallbackOutgoing(this, ice_ping_name, del, cookie, sync);
+ OutgoingAsyncPtr result = new CallbackOutgoing(this, ice_ping_name, del, cookie, sync);
try
{
- __result->prepare(ice_ping_name, Nonmutating, ctx);
- __result->writeEmptyParams();
- __result->invoke(ice_ping_name);
+ result->prepare(ice_ping_name, Nonmutating, ctx);
+ result->writeEmptyParams();
+ result->invoke(ice_ping_name);
}
- catch(const Exception& __ex)
+ catch(const Exception& ex)
{
- __result->abort(__ex);
+ result->abort(ex);
}
- return __result;
+ return result;
}
void
-IceProxy::Ice::Object::end_ice_ping(const AsyncResultPtr& __result)
+IceProxy::Ice::Object::end_ice_ping(const AsyncResultPtr& result)
{
- __end(__result, ice_ping_name);
+ _end(result, ice_ping_name);
}
AsyncResultPtr
-IceProxy::Ice::Object::__begin_ice_ids(const Context& ctx,
+IceProxy::Ice::Object::_iceI_begin_ice_ids(const Context& ctx,
const ::IceInternal::CallbackBasePtr& del,
const ::Ice::LocalObjectPtr& cookie,
bool sync)
{
- __checkTwowayOnly(ice_ids_name, sync);
- OutgoingAsyncPtr __result = new CallbackOutgoing(this, ice_ids_name, del, cookie, sync);
+ _checkTwowayOnly(ice_ids_name, sync);
+ OutgoingAsyncPtr result = new CallbackOutgoing(this, ice_ids_name, del, cookie, sync);
try
{
- __result->prepare(ice_ids_name, Nonmutating, ctx);
- __result->writeEmptyParams();
- __result->invoke(ice_ids_name);
+ result->prepare(ice_ids_name, Nonmutating, ctx);
+ result->writeEmptyParams();
+ result->invoke(ice_ids_name);
}
- catch(const Exception& __ex)
+ catch(const Exception& ex)
{
- __result->abort(__ex);
+ result->abort(ex);
}
- return __result;
+ return result;
}
vector<string>
-IceProxy::Ice::Object::end_ice_ids(const AsyncResultPtr& __result)
+IceProxy::Ice::Object::end_ice_ids(const AsyncResultPtr& result)
{
- AsyncResult::__check(__result, this, ice_ids_name);
- bool __ok = __result->__wait();
- if(!__ok)
+ AsyncResult::check(result, this, ice_ids_name);
+ bool ok = result->waitForResponse();
+ if(!ok)
{
try
{
- __result->__throwUserException();
+ result->throwUserException();
}
- catch(const UserException& __ex)
+ catch(const UserException& ex)
{
- throw UnknownUserException(__FILE__, __LINE__, __ex.ice_id());
+ throw UnknownUserException(__FILE__, __LINE__, ex.ice_id());
}
}
- vector<string> __ret;
- ::Ice::InputStream* __is = __result->__startReadParams();
- __is->read(__ret, false);
- __result->__endReadParams();
- return __ret;
+ vector<string> ret;
+ ::Ice::InputStream* istr = result->startReadParams();
+ istr->read(ret, false);
+ result->endReadParams();
+ return ret;
}
AsyncResultPtr
-IceProxy::Ice::Object::__begin_ice_id(const Context& ctx,
+IceProxy::Ice::Object::_iceI_begin_ice_id(const Context& ctx,
const ::IceInternal::CallbackBasePtr& del,
const ::Ice::LocalObjectPtr& cookie,
bool sync)
{
- __checkTwowayOnly(ice_id_name, sync);
- OutgoingAsyncPtr __result = new CallbackOutgoing(this, ice_id_name, del, cookie, sync);
+ _checkTwowayOnly(ice_id_name, sync);
+ OutgoingAsyncPtr result = new CallbackOutgoing(this, ice_id_name, del, cookie, sync);
try
{
- __result->prepare(ice_id_name, Nonmutating, ctx);
- __result->writeEmptyParams();
- __result->invoke(ice_id_name);
+ result->prepare(ice_id_name, Nonmutating, ctx);
+ result->writeEmptyParams();
+ result->invoke(ice_id_name);
}
- catch(const Exception& __ex)
+ catch(const Exception& ex)
{
- __result->abort(__ex);
+ result->abort(ex);
}
- return __result;
+ return result;
}
string
-IceProxy::Ice::Object::end_ice_id(const AsyncResultPtr& __result)
+IceProxy::Ice::Object::end_ice_id(const AsyncResultPtr& result)
{
- AsyncResult::__check(__result, this, ice_id_name);
- bool __ok = __result->__wait();
- if(!__ok)
+ AsyncResult::check(result, this, ice_id_name);
+ bool ok = result->waitForResponse();
+ if(!ok)
{
try
{
- __result->__throwUserException();
+ result->throwUserException();
}
- catch(const UserException& __ex)
+ catch(const UserException& ex)
{
- throw UnknownUserException(__FILE__, __LINE__, __ex.ice_id());
+ throw UnknownUserException(__FILE__, __LINE__, ex.ice_id());
}
}
- string __ret;
- ::Ice::InputStream* __is = __result->__startReadParams();
- __is->read(__ret, false);
- __result->__endReadParams();
- return __ret;
+ string ret;
+ ::Ice::InputStream* istr = result->startReadParams();
+ istr->read(ret, false);
+ result->endReadParams();
+ return ret;
}
bool
@@ -374,7 +374,7 @@ IceProxy::Ice::Object::ice_invoke(const string& operation,
}
AsyncResultPtr
-IceProxy::Ice::Object::__begin_ice_invoke(const string& operation,
+IceProxy::Ice::Object::_iceI_begin_ice_invoke(const string& operation,
OperationMode mode,
const vector<Byte>& inEncaps,
const Context& ctx,
@@ -392,26 +392,26 @@ IceProxy::Ice::Object::__begin_ice_invoke(const string& operation,
inPair.first = &inEncaps[0];
inPair.second = inPair.first + inEncaps.size();
}
- return __begin_ice_invoke(operation, mode, inPair, ctx, del, cookie);
+ return _iceI_begin_ice_invoke(operation, mode, inPair, ctx, del, cookie);
}
bool
-IceProxy::Ice::Object::end_ice_invoke(vector<Byte>& outEncaps, const AsyncResultPtr& __result)
+IceProxy::Ice::Object::end_ice_invoke(vector<Byte>& outEncaps, const AsyncResultPtr& result)
{
- AsyncResult::__check(__result, this, ice_invoke_name);
- bool ok = __result->__wait();
+ AsyncResult::check(result, this, ice_invoke_name);
+ bool ok = result->waitForResponse();
if(_reference->getMode() == Reference::ModeTwoway)
{
const Byte* v;
Int sz;
- __result->__readParamEncaps(v, sz);
+ result->readParamEncaps(v, sz);
vector<Byte>(v, v + sz).swap(outEncaps);
}
return ok;
}
AsyncResultPtr
-IceProxy::Ice::Object::__begin_ice_invoke(const string& operation,
+IceProxy::Ice::Object::_iceI_begin_ice_invoke(const string& operation,
OperationMode mode,
const pair<const Byte*, const Byte*>& inEncaps,
const Context& ctx,
@@ -419,36 +419,36 @@ IceProxy::Ice::Object::__begin_ice_invoke(const string& operation,
const ::Ice::LocalObjectPtr& cookie,
bool sync)
{
- OutgoingAsyncPtr __result = new CallbackOutgoing(this, ice_invoke_name, del, cookie, sync);
+ OutgoingAsyncPtr result = new CallbackOutgoing(this, ice_invoke_name, del, cookie, sync);
try
{
- __result->prepare(operation, mode, ctx);
- __result->writeParamEncaps(inEncaps.first, static_cast<Int>(inEncaps.second - inEncaps.first));
- __result->invoke(operation);
+ result->prepare(operation, mode, ctx);
+ result->writeParamEncaps(inEncaps.first, static_cast<Int>(inEncaps.second - inEncaps.first));
+ result->invoke(operation);
}
- catch(const Exception& __ex)
+ catch(const Exception& ex)
{
- __result->abort(__ex);
+ result->abort(ex);
}
- return __result;
+ return result;
}
bool
-IceProxy::Ice::Object::___end_ice_invoke(pair<const Byte*, const Byte*>& outEncaps, const AsyncResultPtr& __result)
+IceProxy::Ice::Object::_iceI_end_ice_invoke(pair<const Byte*, const Byte*>& outEncaps, const AsyncResultPtr& result)
{
- AsyncResult::__check(__result, this, ice_invoke_name);
- bool ok = __result->__wait();
+ AsyncResult::check(result, this, ice_invoke_name);
+ bool ok = result->waitForResponse();
if(_reference->getMode() == Reference::ModeTwoway)
{
Int sz;
- __result->__readParamEncaps(outEncaps.first, sz);
+ result->readParamEncaps(outEncaps.first, sz);
outEncaps.second = outEncaps.first + sz;
}
return ok;
}
::Ice::AsyncResultPtr
-IceProxy::Ice::Object::__begin_ice_flushBatchRequests(const ::IceInternal::CallbackBasePtr& del,
+IceProxy::Ice::Object::_iceI_begin_ice_flushBatchRequests(const ::IceInternal::CallbackBasePtr& del,
const ::Ice::LocalObjectPtr& cookie)
{
class ProxyFlushBatchAsyncWithCallback : public ProxyFlushBatchAsync, public CallbackCompletion
@@ -485,29 +485,29 @@ IceProxy::Ice::Object::__begin_ice_flushBatchRequests(const ::IceInternal::Callb
void
IceProxy::Ice::Object::end_ice_flushBatchRequests(const AsyncResultPtr& result)
{
- AsyncResult::__check(result, this, ice_flushBatchRequests_name);
- result->__wait();
+ AsyncResult::check(result, this, ice_flushBatchRequests_name);
+ result->waitForResponse();
}
void
-IceProxy::Ice::Object::__end(const ::Ice::AsyncResultPtr& __result, const std::string& operation) const
+IceProxy::Ice::Object::_end(const ::Ice::AsyncResultPtr& result, const std::string& operation) const
{
- AsyncResult::__check(__result, this, operation);
- bool __ok = __result->__wait();
+ AsyncResult::check(result, this, operation);
+ bool ok = result->waitForResponse();
if(_reference->getMode() == Reference::ModeTwoway)
{
- if(!__ok)
+ if(!ok)
{
try
{
- __result->__throwUserException();
+ result->throwUserException();
}
- catch(const UserException& __ex)
+ catch(const UserException& ex)
{
- throw UnknownUserException(__FILE__, __LINE__, __ex.ice_id());
+ throw UnknownUserException(__FILE__, __LINE__, ex.ice_id());
}
}
- __result->__readEmptyParams();
+ result->readEmptyParams();
}
}
@@ -528,13 +528,13 @@ operator<<(ostream& os, const ::IceProxy::Ice::Object& p)
}
IceProxy::Ice::Object*
-IceProxy::Ice::Object::__newInstance() const
+IceProxy::Ice::Object::_newInstance() const
{
return new Object;
}
AsyncResultPtr
-IceProxy::Ice::Object::__begin_ice_getConnection(const ::IceInternal::CallbackBasePtr& del,
+IceProxy::Ice::Object::_iceI_begin_ice_getConnection(const ::IceInternal::CallbackBasePtr& del,
const ::Ice::LocalObjectPtr& cookie)
{
class ProxyGetConnectionWithCallback : public ProxyGetConnection, public CallbackCompletion
@@ -569,15 +569,15 @@ IceProxy::Ice::Object::__begin_ice_getConnection(const ::IceInternal::CallbackBa
}
ConnectionPtr
-IceProxy::Ice::Object::end_ice_getConnection(const AsyncResultPtr& __result)
+IceProxy::Ice::Object::end_ice_getConnection(const AsyncResultPtr& result)
{
- AsyncResult::__check(__result, this, ice_getConnection_name);
- __result->__wait();
- return __result->getConnection();
+ AsyncResult::check(result, this, ice_getConnection_name);
+ result->waitForResponse();
+ return result->getConnection();
}
void
-IceProxy::Ice::Object::__checkTwowayOnly(const string& name, bool sync) const
+IceProxy::Ice::Object::_checkTwowayOnly(const string& name, bool sync) const
{
//
// No mutex lock necessary, there is nothing mutable in this operation.
@@ -649,7 +649,7 @@ ICE_OBJECT_PRX::ice_getContext() const
ObjectPrxPtr
ICE_OBJECT_PRX::ice_context(const Context& newContext) const
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(_reference->changeContext(newContext));
return proxy;
}
@@ -694,7 +694,7 @@ ICE_OBJECT_PRX::ice_adapterId(const string& newAdapterId) const
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(_reference->changeAdapterId(newAdapterId));
return proxy;
}
@@ -727,7 +727,7 @@ ICE_OBJECT_PRX::ice_endpoints(const EndpointSeq& newEndpoints) const
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(_reference->changeEndpoints(endpoints));
return proxy;
}
@@ -754,7 +754,7 @@ ICE_OBJECT_PRX::ice_locatorCacheTimeout(Int newTimeout) const
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(_reference->changeLocatorCacheTimeout(newTimeout));
return proxy;
}
@@ -775,7 +775,7 @@ ICE_OBJECT_PRX::ice_connectionCached(bool newCache) const
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(_reference->changeCacheConnection(newCache));
return proxy;
}
@@ -796,7 +796,7 @@ ICE_OBJECT_PRX::ice_endpointSelection(EndpointSelectionType newType) const
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(_reference->changeEndpointSelection(newType));
return proxy;
}
@@ -817,7 +817,7 @@ ICE_OBJECT_PRX::ice_secure(bool b) const
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(_reference->changeSecure(b));
return proxy;
}
@@ -838,7 +838,7 @@ ICE_OBJECT_PRX::ice_encodingVersion(const ::Ice::EncodingVersion& encoding) cons
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(_reference->changeEncoding(encoding));
return proxy;
}
@@ -859,7 +859,7 @@ ICE_OBJECT_PRX::ice_preferSecure(bool b) const
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(_reference->changePreferSecure(b));
return proxy;
}
@@ -886,7 +886,7 @@ ICE_OBJECT_PRX::ice_router(const RouterPrxPtr& router) const
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(ref);
return proxy;
}
@@ -913,7 +913,7 @@ ICE_OBJECT_PRX::ice_locator(const LocatorPrxPtr& locator) const
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(ref);
return proxy;
}
@@ -934,7 +934,7 @@ ICE_OBJECT_PRX::ice_collocationOptimized(bool b) const
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(_reference->changeCollocationOptimized(b));
return proxy;
}
@@ -961,7 +961,7 @@ ICE_OBJECT_PRX::ice_invocationTimeout(Int newTimeout) const
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(_reference->changeInvocationTimeout(newTimeout));
return proxy;
}
@@ -976,7 +976,7 @@ ICE_OBJECT_PRX::ice_twoway() const
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(_reference->changeMode(Reference::ModeTwoway));
return proxy;
}
@@ -997,7 +997,7 @@ ICE_OBJECT_PRX::ice_oneway() const
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(_reference->changeMode(Reference::ModeOneway));
return proxy;
}
@@ -1018,7 +1018,7 @@ ICE_OBJECT_PRX::ice_batchOneway() const
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(_reference->changeMode(Reference::ModeBatchOneway));
return proxy;
}
@@ -1039,7 +1039,7 @@ ICE_OBJECT_PRX::ice_datagram() const
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(_reference->changeMode(Reference::ModeDatagram));
return proxy;
}
@@ -1060,7 +1060,7 @@ ICE_OBJECT_PRX::ice_batchDatagram() const
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(_reference->changeMode(Reference::ModeBatchDatagram));
return proxy;
}
@@ -1082,7 +1082,7 @@ ICE_OBJECT_PRX::ice_compress(bool b) const
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(ref);
return proxy;
}
@@ -1104,7 +1104,7 @@ ICE_OBJECT_PRX::ice_timeout(int t) const
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(ref);
return proxy;
}
@@ -1120,7 +1120,7 @@ ICE_OBJECT_PRX::ice_connectionId(const string& id) const
}
else
{
- ObjectPrxPtr proxy = __newInstance();
+ ObjectPrxPtr proxy = _newInstance();
proxy->setup(ref);
return proxy;
}
@@ -1135,17 +1135,17 @@ ICE_OBJECT_PRX::ice_getConnectionId() const
ConnectionPtr
ICE_OBJECT_PRX::ice_getCachedConnection() const
{
- RequestHandlerPtr __handler;
+ RequestHandlerPtr handler;
{
IceUtil::Mutex::Lock sync(_mutex);
- __handler = _requestHandler;
+ handler = _requestHandler;
}
- if(__handler)
+ if(handler)
{
try
{
- return __handler->getConnection();
+ return handler->getConnection();
}
catch(const LocalException&)
{
@@ -1169,13 +1169,13 @@ ICE_OBJECT_PRX::setup(const ReferencePtr& ref)
}
int
-ICE_OBJECT_PRX::__handleException(const Exception& ex,
+ICE_OBJECT_PRX::_handleException(const Exception& ex,
const RequestHandlerPtr& handler,
OperationMode mode,
bool sent,
int& cnt)
{
- __updateRequestHandler(handler, 0); // Clear the request handler
+ _updateRequestHandler(handler, 0); // Clear the request handler
//
// We only retry local exception, system exceptions aren't retried.
@@ -1218,7 +1218,7 @@ ICE_OBJECT_PRX::__handleException(const Exception& ex,
}
::IceInternal::RequestHandlerPtr
-ICE_OBJECT_PRX::__getRequestHandler()
+ICE_OBJECT_PRX::_getRequestHandler()
{
RequestHandlerPtr handler;
if(_reference->getCacheConnection())
@@ -1233,7 +1233,7 @@ ICE_OBJECT_PRX::__getRequestHandler()
}
IceInternal::BatchRequestQueuePtr
-ICE_OBJECT_PRX::__getBatchRequestQueue()
+ICE_OBJECT_PRX::_getBatchRequestQueue()
{
IceUtil::Mutex::Lock sync(_mutex);
if(!_batchRequestQueue)
@@ -1244,7 +1244,7 @@ ICE_OBJECT_PRX::__getBatchRequestQueue()
}
::IceInternal::RequestHandlerPtr
-ICE_OBJECT_PRX::__setRequestHandler(const ::IceInternal::RequestHandlerPtr& handler)
+ICE_OBJECT_PRX::_setRequestHandler(const ::IceInternal::RequestHandlerPtr& handler)
{
if(_reference->getCacheConnection())
{
@@ -1259,7 +1259,7 @@ ICE_OBJECT_PRX::__setRequestHandler(const ::IceInternal::RequestHandlerPtr& hand
}
void
-ICE_OBJECT_PRX::__updateRequestHandler(const ::IceInternal::RequestHandlerPtr& previous,
+ICE_OBJECT_PRX::_updateRequestHandler(const ::IceInternal::RequestHandlerPtr& previous,
const ::IceInternal::RequestHandlerPtr& handler)
{
if(_reference->getCacheConnection() && previous)
@@ -1280,7 +1280,7 @@ ICE_OBJECT_PRX::__updateRequestHandler(const ::IceInternal::RequestHandlerPtr& p
}
void
-ICE_OBJECT_PRX::__copyFrom(const ObjectPrxPtr& from)
+ICE_OBJECT_PRX::_copyFrom(const ObjectPrxPtr& from)
{
IceUtil::Mutex::Lock sync(from->_mutex);
_reference = from->_reference;
@@ -1305,16 +1305,16 @@ ICE_OBJECT_PRX::ice_toString() const
}
Int
-ICE_OBJECT_PRX::__hash() const
+ICE_OBJECT_PRX::_hash() const
{
return _reference->hash();
}
void
-ICE_OBJECT_PRX::__write(OutputStream& os) const
+ICE_OBJECT_PRX::_write(OutputStream& os) const
{
- os.write(__reference()->getIdentity());
- __reference()->streamWrite(&os);
+ os.write(_getReference()->getIdentity());
+ _getReference()->streamWrite(&os);
}
bool
diff --git a/cpp/src/Ice/ProxyFactory.cpp b/cpp/src/Ice/ProxyFactory.cpp
index b0037fa9ce5..eba949508b6 100644
--- a/cpp/src/Ice/ProxyFactory.cpp
+++ b/cpp/src/Ice/ProxyFactory.cpp
@@ -41,7 +41,7 @@ IceInternal::ProxyFactory::proxyToString(const ObjectPrxPtr& proxy) const
{
if(proxy)
{
- return proxy->__reference()->toString();
+ return proxy->_getReference()->toString();
}
else
{
@@ -62,7 +62,7 @@ IceInternal::ProxyFactory::proxyToProperty(const ObjectPrxPtr& proxy, const stri
{
if(proxy)
{
- return proxy->__reference()->toProperty(prefix);
+ return proxy->_getReference()->toProperty(prefix);
}
else
{
diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp
index a82b68507b0..8ec124a1c41 100644
--- a/cpp/src/Ice/Reference.cpp
+++ b/cpp/src/Ice/Reference.cpp
@@ -815,7 +815,7 @@ IceInternal::FixedReference::getRequestHandler(const Ice::ObjectPrxPtr& proxy) c
}
ReferencePtr ref = const_cast<FixedReference*>(this);
- return proxy->__setRequestHandler(ICE_MAKE_SHARED(ConnectionRequestHandler, ref, _fixedConnection, compress));
+ return proxy->_setRequestHandler(ICE_MAKE_SHARED(ConnectionRequestHandler, ref, _fixedConnection, compress));
}
BatchRequestQueuePtr
@@ -1269,7 +1269,7 @@ IceInternal::RoutableReference::toProperty(const string& prefix) const
}
if(_routerInfo)
{
- PropertyDict routerProperties = _routerInfo->getRouter()->__reference()->toProperty(prefix + ".Router");
+ PropertyDict routerProperties = _routerInfo->getRouter()->_getReference()->toProperty(prefix + ".Router");
for(PropertyDict::const_iterator p = routerProperties.begin(); p != routerProperties.end(); ++p)
{
properties[p->first] = p->second;
@@ -1278,7 +1278,7 @@ IceInternal::RoutableReference::toProperty(const string& prefix) const
if(_locatorInfo)
{
- PropertyDict locatorProperties = _locatorInfo->getLocator()->__reference()->toProperty(prefix + ".Locator");
+ PropertyDict locatorProperties = _locatorInfo->getLocator()->_getReference()->toProperty(prefix + ".Locator");
for(PropertyDict::const_iterator p = locatorProperties.begin(); p != locatorProperties.end(); ++p)
{
properties[p->first] = p->second;
diff --git a/cpp/src/Ice/RequestHandlerFactory.cpp b/cpp/src/Ice/RequestHandlerFactory.cpp
index 414d1001220..ff8e0413a90 100644
--- a/cpp/src/Ice/RequestHandlerFactory.cpp
+++ b/cpp/src/Ice/RequestHandlerFactory.cpp
@@ -30,7 +30,7 @@ IceInternal::RequestHandlerFactory::getRequestHandler(const RoutableReferencePtr
Ice::ObjectAdapterPtr adapter = _instance->objectAdapterFactory()->findObjectAdapter(proxy);
if(adapter)
{
- return proxy->__setRequestHandler(ICE_MAKE_SHARED(CollocatedRequestHandler, ref, adapter));
+ return proxy->_setRequestHandler(ICE_MAKE_SHARED(CollocatedRequestHandler, ref, adapter));
}
}
@@ -64,7 +64,7 @@ IceInternal::RequestHandlerFactory::getRequestHandler(const RoutableReferencePtr
ref->getConnection(handler.get());
#endif
}
- return proxy->__setRequestHandler(handler->connect(proxy));
+ return proxy->_setRequestHandler(handler->connect(proxy));
}
void
diff --git a/cpp/src/Ice/RouterInfo.cpp b/cpp/src/Ice/RouterInfo.cpp
index b205b057d7a..3367a743077 100644
--- a/cpp/src/Ice/RouterInfo.cpp
+++ b/cpp/src/Ice/RouterInfo.cpp
@@ -335,7 +335,7 @@ IceInternal::RouterInfo::setClientEndpoints(const Ice::ObjectPrxPtr& proxy)
//
// If getClientProxy() return nil, use router endpoints.
//
- _clientEndpoints = _router->__reference()->getEndpoints();
+ _clientEndpoints = _router->_getReference()->getEndpoints();
}
else
{
@@ -351,7 +351,7 @@ IceInternal::RouterInfo::setClientEndpoints(const Ice::ObjectPrxPtr& proxy)
clientProxy = clientProxy->ice_timeout(_router->ice_getConnection()->timeout());
}
- _clientEndpoints = clientProxy->__reference()->getEndpoints();
+ _clientEndpoints = clientProxy->_getReference()->getEndpoints();
}
}
return _clientEndpoints;
@@ -372,7 +372,7 @@ IceInternal::RouterInfo::setServerEndpoints(const Ice::ObjectPrxPtr& /*serverPro
serverProxy = serverProxy->ice_router(0); // The server proxy cannot be routed.
- _serverEndpoints = serverProxy->__reference()->getEndpoints();
+ _serverEndpoints = serverProxy->_getReference()->getEndpoints();
}
return _serverEndpoints;
}
diff --git a/cpp/src/Ice/SlicedData.cpp b/cpp/src/Ice/SlicedData.cpp
index 6a433ffbe4d..551c18cfdef 100644
--- a/cpp/src/Ice/SlicedData.cpp
+++ b/cpp/src/Ice/SlicedData.cpp
@@ -33,7 +33,7 @@ Ice::SlicedData::SlicedData(const SliceInfoSeq& seq) :
#ifndef ICE_CPP11_MAPPING
void
-Ice::SlicedData::__gcVisitMembers(IceInternal::GCVisitor& visitor)
+Ice::SlicedData::_iceGcVisitMembers(IceInternal::GCVisitor& visitor)
{
//
// Iterate over the object references in each preserved slice.
@@ -42,7 +42,7 @@ Ice::SlicedData::__gcVisitMembers(IceInternal::GCVisitor& visitor)
{
for(vector<ObjectPtr>::iterator q = (*p)->instances.begin(); q != (*p)->instances.end(); ++q)
{
- if(q->get()->__gcVisit(visitor))
+ if(q->get()->_iceGcVisit(visitor))
{
*q = 0;
}
@@ -51,11 +51,11 @@ Ice::SlicedData::__gcVisitMembers(IceInternal::GCVisitor& visitor)
}
void
-Ice::UnknownSlicedValue::__gcVisitMembers(IceInternal::GCVisitor& _v)
+Ice::UnknownSlicedValue::_iceGcVisitMembers(IceInternal::GCVisitor& _v)
{
if(_slicedData)
{
- _slicedData->__gcVisitMembers(_v);
+ _slicedData->_iceGcVisitMembers(_v);
}
}
@@ -78,17 +78,17 @@ Ice::UnknownSlicedValue::getSlicedData() const
}
void
-Ice::UnknownSlicedValue::__write(Ice::OutputStream* __os) const
+Ice::UnknownSlicedValue::_iceWrite(Ice::OutputStream* ostr) const
{
- __os->startValue(_slicedData);
- __os->endValue();
+ ostr->startValue(_slicedData);
+ ostr->endValue();
}
void
-Ice::UnknownSlicedValue::__read(Ice::InputStream* __is)
+Ice::UnknownSlicedValue::_iceRead(Ice::InputStream* istr)
{
- __is->startValue();
- _slicedData = __is->endValue(true);
+ istr->startValue();
+ _slicedData = istr->endValue(true);
}
#ifdef ICE_CPP11_MAPPING
diff --git a/cpp/src/Ice/Value.cpp b/cpp/src/Ice/Value.cpp
index f5a7f6b1bbf..204895d5e65 100644
--- a/cpp/src/Ice/Value.cpp
+++ b/cpp/src/Ice/Value.cpp
@@ -29,25 +29,25 @@ Ice::Value::ice_postUnmarshal()
}
void
-Ice::Value::__write(Ice::OutputStream* os) const
+Ice::Value::_iceWrite(Ice::OutputStream* os) const
{
os->startValue(0);
- __writeImpl(os);
+ _iceWriteImpl(os);
os->endValue();
}
void
-Ice::Value::__read(Ice::InputStream* is)
+Ice::Value::_iceRead(Ice::InputStream* is)
{
is->startValue();
- __readImpl(is);
+ _iceReadImpl(is);
is->endValue(false);
}
namespace
{
-const string __Ice__Object_ids[] =
+const string object_ids[] =
{
"::Ice::Object"
};
@@ -57,13 +57,13 @@ const string __Ice__Object_ids[] =
string
Ice::Value::ice_id() const
{
- return __Ice__Object_ids[0];
+ return object_ids[0];
}
const string&
Ice::Value::ice_staticId()
{
- return __Ice__Object_ids[0];
+ return object_ids[0];
}
ValuePtr
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp
index 4ae02b9372f..60bd5257b1f 100644
--- a/cpp/src/Slice/CPlusPlusUtil.cpp
+++ b/cpp/src/Slice/CPlusPlusUtil.cpp
@@ -217,7 +217,7 @@ writeParamAllocateCode(Output& out, const TypePtr& type, bool optional, const st
{
s = toOptional(s, typeCtx);
}
- out << nl << s << " ___" << fixedName << ";";
+ out << nl << s << ' ' << fixedName << "_tmp_;";
}
}
}
@@ -228,7 +228,7 @@ writeParamEndCode(Output& out, const TypePtr& type, bool optional, const string&
{
string objPrefix = obj.empty() ? obj : obj + ".";
string paramName = objPrefix + fixedName;
- string escapedParamName = objPrefix + "___" + fixedName;
+ string escapedParamName = objPrefix + fixedName + "_tmp_";
SequencePtr seq = SequencePtr::dynamicCast(type);
if(seq)
@@ -317,13 +317,18 @@ writeParamEndCode(Output& out, const TypePtr& type, bool optional, const string&
void
writeMarshalUnmarshalParams(Output& out, const ParamDeclList& params, const OperationPtr& op, bool marshal,
- bool prepend, int typeCtx, const string& retP = "", const string& obj = "")
+ bool prepend, int typeCtx, const string& customStream = "", const string& retP = "", const string& obj = "")
{
string prefix = prepend ? paramPrefix : "";
- string returnValueS = retP.empty() ? string("__ret") : retP;
-
+ string returnValueS = retP.empty() ? string("ret") : retP;
string objPrefix = obj.empty() ? obj : obj + ".";
+ string stream = customStream;
+ if(stream.empty())
+ {
+ stream = marshal ? "ostr" : "istr";
+ }
+
bool cpp11 = (typeCtx & TypeContextCpp11) != 0;
//
@@ -351,11 +356,11 @@ writeMarshalUnmarshalParams(Output& out, const ParamDeclList& params, const Oper
out << nl;
if(marshal)
{
- out << "__os->writeAll";
+ out << stream << "->writeAll";
}
else
{
- out << "__is->readAll";
+ out << stream << "->readAll";
}
out << spar;
for(ParamDeclList::const_iterator p = requiredParams.begin(); p != requiredParams.end(); ++p)
@@ -373,7 +378,7 @@ writeMarshalUnmarshalParams(Output& out, const ParamDeclList& params, const Oper
for(ParamDeclList::const_iterator p = requiredParams.begin(); p != requiredParams.end(); ++p)
{
writeMarshalUnmarshalCode(out, (*p)->type(), false, 0, fixKwd(prefix + (*p)->name()), marshal, (*p)->getMetaData(),
- typeCtx, "", true, obj);
+ typeCtx, customStream, true, obj);
}
if(op && op->returnType())
@@ -381,7 +386,7 @@ writeMarshalUnmarshalParams(Output& out, const ParamDeclList& params, const Oper
if(!op->returnIsOptional())
{
writeMarshalUnmarshalCode(out, op->returnType(), false, 0, returnValueS, marshal, op->getMetaData(), typeCtx,
- "", true, obj);
+ customStream, true, obj);
}
}
}
@@ -407,11 +412,11 @@ writeMarshalUnmarshalParams(Output& out, const ParamDeclList& params, const Oper
out << nl;
if(marshal)
{
- out << "__os->writeAll";
+ out << stream << "->writeAll";
}
else
{
- out << "__is->readAll";
+ out << stream << "->readAll";
}
out << spar;
@@ -476,17 +481,17 @@ writeMarshalUnmarshalParams(Output& out, const ParamDeclList& params, const Oper
if(checkReturnType && op->returnTag() < (*p)->tag())
{
writeMarshalUnmarshalCode(out, op->returnType(), true, op->returnTag(), returnValueS, marshal,
- op->getMetaData(), typeCtx, "", true, obj);
+ op->getMetaData(), typeCtx, customStream, true, obj);
checkReturnType = false;
}
writeMarshalUnmarshalCode(out, (*p)->type(), true, (*p)->tag(), fixKwd(prefix + (*p)->name()), marshal,
- (*p)->getMetaData(), typeCtx, "", true, obj);
+ (*p)->getMetaData(), typeCtx, customStream, true, obj);
}
if(checkReturnType)
{
writeMarshalUnmarshalCode(out, op->returnType(), true, op->returnTag(), returnValueS, marshal, op->getMetaData(),
- typeCtx, "", true, obj);
+ typeCtx, customStream, true, obj);
}
}
}
@@ -494,7 +499,7 @@ writeMarshalUnmarshalParams(Output& out, const ParamDeclList& params, const Oper
}
Slice::FeatureProfile Slice::featureProfile = Slice::Ice;
-string Slice::paramPrefix = "__p_";
+string Slice::paramPrefix = "iceP_";
char
Slice::ToIfdef::operator()(char c)
@@ -1154,7 +1159,7 @@ Slice::opFormatTypeToString(const OperationPtr& op)
}
//
-// If the passed name is a keyword, return the name with a "_cxx_" prefix;
+// If the passed name is a keyword, return the name with a "_cpp_" prefix;
// otherwise, return the name unchanged.
//
@@ -1171,14 +1176,15 @@ lookupKwd(const string& name)
//
static const string keywordList[] =
{
- "and", "and_eq", "asm", "auto", "bit_and", "bit_or", "bool", "break", "case", "catch", "char",
- "class", "compl", "const", "const_cast", "continue", "default", "delete", "do", "double",
- "dynamic_cast", "else", "enum", "explicit", "export", "extern", "false", "float", "for",
- "friend", "goto", "if", "inline", "int", "long", "mutable", "namespace", "new", "not", "not_eq",
- "operator", "or", "or_eq", "private", "protected", "public", "register", "reinterpret_cast",
- "return", "short", "signed", "sizeof", "static", "static_cast", "struct", "switch", "template",
- "this", "throw", "true", "try", "typedef", "typeid", "typename", "union", "unsigned", "using",
- "virtual", "void", "volatile", "wchar_t", "while", "xor", "xor_eq"
+ "alignas", "alignof", "and", "and_eq", "asm", "auto", "bit_and", "bit_or", "bool", "break",
+ "case", "catch", "char", "char16_t", "char32_t", "class", "compl", "const", "const_exptr", "const_cast", "continue",
+ "decltype", "default", "delete", "do", "double", "dynamic_cast",
+ "else", "enum", "explicit", "export", "extern", "false", "float", "for", "friend",
+ "goto", "if", "inline", "int", "long", "mutable", "namespace", "new", "noexcept", "not", "not_eq",
+ "operator", "or", "or_eq", "private", "protected", "public", "register", "reinterpret_cast", "return",
+ "short", "signed", "sizeof", "static", "static_assert", "static_cast", "struct", "switch",
+ "template", "this", "thread_local", "throw", "true", "try", "typedef", "typeid", "typename",
+ "union", "unsigned", "using", "virtual", "void", "volatile", "wchar_t", "while", "xor", "xor_eq"
};
bool found = binary_search(&keywordList[0],
&keywordList[sizeof(keywordList) / sizeof(*keywordList)],
@@ -1224,8 +1230,8 @@ splitScopedName(const string& scoped)
//
// If the passed name is a scoped name, return the identical scoped name,
// but with all components that are C++ keywords replaced by
-// their "_cxx_"-prefixed version; otherwise, if the passed name is
-// not scoped, but a C++ keyword, return the "_cxx_"-prefixed name;
+// their "_cpp_"-prefixed version; otherwise, if the passed name is
+// not scoped, but a C++ keyword, return the "_cpp_"-prefixed name;
// otherwise, return the name unchanged.
//
string
@@ -1247,19 +1253,19 @@ Slice::fixKwd(const string& name)
void
Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, bool optional, int tag, const string& param,
- bool marshal, const StringList& metaData, int typeCtx, const string& str, bool pointer,
+ bool marshal, const StringList& metaData, int typeCtx, const string& customStream, bool pointer,
const string& obj)
{
string objPrefix = obj.empty() ? obj : obj + ".";
ostringstream os;
- if(str.empty())
+ if(customStream.empty())
{
- os << (marshal ? "__os" : "__is");
+ os << (marshal ? "ostr" : "istr");
}
else
{
- os << str;
+ os << customStream;
}
string deref;
@@ -1302,13 +1308,13 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, bool optional
return;
}
- out << nl << func << objPrefix << "___" << param << ");";
+ out << nl << func << objPrefix << param << "_tmp_);";
writeParamEndCode(out, seq, optional, param, metaData, obj);
return;
}
else if(seqType.find("%range") == 0)
{
- out << nl << func << objPrefix << "___" << param << ");";
+ out << nl << func << objPrefix << param << "_tmp_);";
writeParamEndCode(out, seq, optional, param, metaData, obj);
return;
}
@@ -1319,23 +1325,29 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, bool optional
}
void
-Slice::writeMarshalCode(Output& out, const ParamDeclList& params, const OperationPtr& op, bool prepend, int typeCtx)
+Slice::writeMarshalCode(Output& out, const ParamDeclList& params, const OperationPtr& op, bool prepend, int typeCtx,
+ const string& customStream, const string& retP)
{
- writeMarshalUnmarshalParams(out, params, op, true, prepend, typeCtx);
+ writeMarshalUnmarshalParams(out, params, op, true, prepend, typeCtx, customStream, retP);
}
void
Slice::writeUnmarshalCode(Output& out, const ParamDeclList& params, const OperationPtr& op, bool prepend, int typeCtx,
- const string& retP, const string& obj)
+ const string& customStream, const string& retP, const string& obj)
{
- writeMarshalUnmarshalParams(out, params, op, false, prepend, typeCtx, retP, obj);
+ writeMarshalUnmarshalParams(out, params, op, false, prepend, typeCtx, customStream, retP, obj);
}
void
-Slice::writeAllocateCode(Output& out, const ParamDeclList& params, const OperationPtr& op, bool prepend, int typeCtx)
+Slice::writeAllocateCode(Output& out, const ParamDeclList& params, const OperationPtr& op, bool prepend, int typeCtx,
+ const string& customRet)
{
string prefix = prepend ? paramPrefix : "";
- string returnValueS = "__ret";
+ string returnValueS = customRet;
+ if(returnValueS.empty())
+ {
+ returnValueS = "ret";
+ }
for(ParamDeclList::const_iterator p = params.begin(); p != params.end(); ++p)
{
@@ -1373,11 +1385,11 @@ Slice::getEndArg(const TypePtr& type, const StringList& metaData, const string&
builtin->kind() != Builtin::KindObject &&
builtin->kind() != Builtin::KindObjectProxy)
{
- endArg = "___" + endArg;
+ endArg += "_tmp_";
}
else if(!builtin || builtin->kind() != Builtin::KindByte)
{
- endArg = "___" + endArg;
+ endArg += "_tmp_";
}
}
else if(seqType.find("%range") == 0)
@@ -1387,7 +1399,7 @@ Slice::getEndArg(const TypePtr& type, const StringList& metaData, const string&
{
md.push_back("cpp:type:" + seqType.substr(strlen("%range:")));
}
- endArg = "___" + endArg;
+ endArg += "_tmp_";
}
}
return endArg;
@@ -1403,7 +1415,7 @@ Slice::writeEndCode(Output& out, const ParamDeclList& params, const OperationPtr
}
if(op && op->returnType())
{
- writeParamEndCode(out, op->returnType(), op->returnIsOptional(), "__ret", op->getMetaData());
+ writeParamEndCode(out, op->returnType(), op->returnIsOptional(), "ret", op->getMetaData());
}
}
@@ -1429,7 +1441,7 @@ Slice::writeMarshalUnmarshalAllInHolder(IceUtilInternal::Output& out,
return;
}
- string stream = marshal ? "__os" : "__is";
+ string stream = marshal ? "ostr" : "istr";
string streamOp = marshal ? "writeAll" : "readAll";
out << nl << stream << "->" << streamOp;
@@ -1525,7 +1537,7 @@ Slice::writeStreamHelpers(Output& out,
}
else
{
- out << nl << "static void write(S* __os, const " << fullName << "& v)";
+ out << nl << "static void write(S* ostr, const " << fullName << "& v)";
}
out << sb;
@@ -1564,7 +1576,7 @@ Slice::writeStreamHelpers(Output& out,
}
else
{
- out << nl << "static void read(S* __is, " << fullName << "& v)";
+ out << nl << "static void read(S* istr, " << fullName << "& v)";
}
out << sb;
diff --git a/cpp/src/Slice/CPlusPlusUtil.h b/cpp/src/Slice/CPlusPlusUtil.h
index 0e359b9a1a7..10808d75cff 100644
--- a/cpp/src/Slice/CPlusPlusUtil.h
+++ b/cpp/src/Slice/CPlusPlusUtil.h
@@ -52,10 +52,12 @@ void writeMarshalUnmarshalCode(::IceUtilInternal::Output&, const TypePtr&, bool,
bool, const StringList& = StringList(), int = 0, const std::string& = "",
bool = true, const std::string& = "");
-void writeMarshalCode(::IceUtilInternal::Output&, const ParamDeclList&, const OperationPtr&, bool, int = 0);
+void writeMarshalCode(::IceUtilInternal::Output&, const ParamDeclList&, const OperationPtr&, bool,
+ int = 0, const std::string& = "", const std::string& = "");
void writeUnmarshalCode(::IceUtilInternal::Output&, const ParamDeclList&, const OperationPtr&, bool, int = 0,
- const std::string& = "", const std::string& = "");
-void writeAllocateCode(::IceUtilInternal::Output&, const ParamDeclList&, const OperationPtr&, bool, int = 0);
+ const std::string& = "", const std::string& = "", const std::string& = "");
+void writeAllocateCode(::IceUtilInternal::Output&, const ParamDeclList&, const OperationPtr&, bool,
+ int = 0, const std::string& = "");
std::string getEndArg(const TypePtr&, const StringList&, const std::string&);
void writeEndCode(::IceUtilInternal::Output&, const ParamDeclList&, const OperationPtr&, bool = false);
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp
index e6e8fb768a6..3bcdd55a197 100644
--- a/cpp/src/Slice/Parser.cpp
+++ b/cpp/src/Slice/Parser.cpp
@@ -425,12 +425,13 @@ string
Slice::Contained::flattenedScope() const
{
string s = scope();
- string flattenedScope;
- for(string::const_iterator r = s.begin(); r != s.end(); ++r)
+ string::size_type pos = 0;
+ while((pos = s.find("::", pos)) != string::npos)
{
- flattenedScope += ((*r) == ':') ? '_' : *r;
+ s.replace(pos, 2, "_");
+
}
- return flattenedScope;
+ return s;
}
string
@@ -3805,13 +3806,13 @@ Slice::ClassDef::ClassDef(const ContainerPtr& container, const string& name, int
bool
Slice::Proxy::isLocal() const
{
- return __class->isLocal();
+ return _classDecl->isLocal();
}
string
Slice::Proxy::typeId() const
{
- return __class->scoped();
+ return _classDecl->scoped();
}
bool
@@ -3835,13 +3836,13 @@ Slice::Proxy::isVariableLength() const
ClassDeclPtr
Slice::Proxy::_class() const
{
- return __class;
+ return _classDecl;
}
Slice::Proxy::Proxy(const ClassDeclPtr& cl) :
SyntaxTreeBase(cl->unit()),
Type(cl->unit()),
- __class(cl)
+ _classDecl(cl)
{
}
diff --git a/cpp/src/Slice/Parser.h b/cpp/src/Slice/Parser.h
index c26de803f13..5e7a680bc08 100644
--- a/cpp/src/Slice/Parser.h
+++ b/cpp/src/Slice/Parser.h
@@ -707,7 +707,7 @@ public:
protected:
- ClassDeclPtr __class;
+ ClassDeclPtr _classDecl;
};
// ----------------------------------------------------------------------
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index ad125388647..65af5df2d0d 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -236,12 +236,12 @@ writeInParamsLambda(IceUtilInternal::Output& C, const OperationPtr& p, const Par
}
else
{
- C << "[&](::Ice::OutputStream* __os)";
+ C << "[&](::Ice::OutputStream* ostr)";
C << sb;
writeMarshalCode(C, inParams, 0, true, TypeContextInParam | TypeContextCpp11);
if(p->sendsClasses(false))
{
- C << nl << "__os->writePendingValues();";
+ C << nl << "ostr->writePendingValues();";
}
C << eb;
}
@@ -267,11 +267,11 @@ throwUserExceptionLambda(IceUtilInternal::Output& C, ExceptionList throws)
//
throws.sort(Slice::DerivedToBaseCompare());
- C << "[](const ::Ice::UserException& __ex)";
+ C << "[](const ::Ice::UserException& ex)";
C << sb;
C << nl << "try";
C << sb;
- C << nl << "__ex.ice_throw();";
+ C << nl << "ex.ice_throw();";
C << eb;
//
// Generate a catch block for each legal user exception.
@@ -427,7 +427,7 @@ Slice::Gen::generateChecksumMap(const UnitPtr& p)
{
C << sp << nl << "namespace";
C << nl << "{";
- C << sp << nl << "const char* __sliceChecksums[] =";
+ C << sp << nl << "const char* iceSliceChecksums[] =";
C << sb;
for(ChecksumMap::const_iterator q = map.begin(); q != map.end(); ++q)
{
@@ -443,7 +443,7 @@ Slice::Gen::generateChecksumMap(const UnitPtr& p)
}
C << nl << "0";
C << eb << ';';
- C << nl << "const IceInternal::SliceChecksumInit __sliceChecksumInit(__sliceChecksums);";
+ C << nl << "const IceInternal::SliceChecksumInit iceSliceChecksumInit(iceSliceChecksums);";
C << sp << nl << "}";
}
}
@@ -935,21 +935,15 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
DataMemberList allDataMembers = p->allDataMembers();
bool hasDefaultValues = p->hasDefaultValues();
- vector<string> params;
vector<string> allTypes;
vector<string> allParamDecls;
vector<string> baseParams;
- for(DataMemberList::const_iterator q = dataMembers.begin(); q != dataMembers.end(); ++q)
- {
- params.push_back(fixKwd((*q)->name()));
- }
-
for(DataMemberList::const_iterator q = allDataMembers.begin(); q != allDataMembers.end(); ++q)
{
string typeName = inputTypeToString((*q)->type(), (*q)->optional(), (*q)->getMetaData(), _useWstring);
allTypes.push_back(typeName);
- allParamDecls.push_back(typeName + " __ice_" + fixKwd((*q)->name()));
+ allParamDecls.push_back(typeName + " iceP_" + (*q)->name());
}
if(base)
@@ -957,7 +951,7 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
DataMemberList baseDataMembers = base->allDataMembers();
for(DataMemberList::const_iterator q = baseDataMembers.begin(); q != baseDataMembers.end(); ++q)
{
- baseParams.push_back("__ice_" + fixKwd((*q)->name()));
+ baseParams.push_back("iceP_" + (*q)->name());
}
}
@@ -1012,7 +1006,7 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
if(!p->isLocal())
{
- string initName = p->flattenedScope() + p->name() + "_init";
+ string initName = "iceC" + p->flattenedScope() + p->name() + "_init";
C << sp << nl << "namespace";
C << nl << "{";
@@ -1025,10 +1019,10 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
if(p->isLocal())
{
- C << sp << nl << scoped.substr(2) << "::" << name << spar << "const char* __file" << "int __line" << epar
+ C << sp << nl << scoped.substr(2) << "::" << name << spar << "const char* file_" << "int line_" << epar
<< " :";
C.inc();
- emitUpcall(base, "(__file, __line)", true);
+ emitUpcall(base, "(file_, line_)", true);
if(p->hasDefaultValues())
{
C << ", ";
@@ -1054,10 +1048,10 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
C << scoped.substr(2) << "::" << name << spar;
if(p->isLocal())
{
- C << "const char* __file" << "int __line";
+ C << "const char* file_" << "int line_";
}
C << allParamDecls << epar;
- if(p->isLocal() || !baseParams.empty() || !params.empty())
+ if(p->isLocal() || !baseParams.empty() || !dataMembers.empty())
{
C << " :";
C.inc();
@@ -1067,7 +1061,7 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
upcall = "(";
if(p->isLocal())
{
- upcall += "__file, __line";
+ upcall += "file_, line_";
}
for(vector<string>::const_iterator pi = baseParams.begin(); pi != baseParams.end(); ++pi)
{
@@ -1079,21 +1073,21 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
}
upcall += ")";
}
- if(!params.empty())
+ if(!dataMembers.empty())
{
upcall += ",";
}
emitUpcall(base, upcall, p->isLocal());
}
- for(vector<string>::const_iterator pi = params.begin(); pi != params.end(); ++pi)
+ for(DataMemberList::const_iterator d = dataMembers.begin(); d != dataMembers.end(); ++d)
{
- if(pi != params.begin())
+ if(d != dataMembers.begin())
{
C << ",";
}
- C << nl << *pi << "(__ice_" << *pi << ')';
+ C << nl << fixKwd((*d)->name()) << "(iceP_" << (*d)->name() << ')';
}
- if(p->isLocal() || !baseParams.empty() || !params.empty())
+ if(p->isLocal() || !baseParams.empty() || !dataMembers.empty())
{
C.dec();
}
@@ -1134,10 +1128,10 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
{
if(!base || (base && !base->usesClasses(false)))
{
- H << sp << nl << "virtual bool __usesClasses() const;";
+ H << sp << nl << "virtual bool _usesClasses() const;";
C << sp << nl << "bool";
- C << nl << scoped.substr(2) << "::__usesClasses() const";
+ C << nl << scoped.substr(2) << "::_usesClasses() const";
C << sb;
C << nl << "return true;";
C << eb;
@@ -1167,62 +1161,62 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(preserved && !basePreserved)
{
- H << sp << nl << "virtual void __write(::Ice::OutputStream*) const;";
- H << nl << "virtual void __read(::Ice::InputStream*);";
+ H << sp << nl << "virtual void _write(::Ice::OutputStream*) const;";
+ H << nl << "virtual void _read(::Ice::InputStream*);";
string baseName = base ? fixKwd(base->scoped()) : string("::Ice::UserException");
- H << nl << "using " << baseName << "::__write;";
- H << nl << "using " << baseName << "::__read;";
+ H << nl << "using " << baseName << "::_write;";
+ H << nl << "using " << baseName << "::_read;";
}
H.dec();
H << sp << nl << "protected:";
H.inc();
- H << sp << nl << "virtual void __writeImpl(::Ice::OutputStream*) const;";
- H << nl << "virtual void __readImpl(::Ice::InputStream*);";
+ H << sp << nl << "virtual void _writeImpl(::Ice::OutputStream*) const;";
+ H << nl << "virtual void _readImpl(::Ice::InputStream*);";
string baseName = base ? fixKwd(base->scoped()) : string("::Ice::UserException");
if(preserved && !basePreserved)
{
- H << sp << nl << "::Ice::SlicedDataPtr __slicedData;";
+ H << sp << nl << "::Ice::SlicedDataPtr _slicedData;";
- C << sp << nl << "void" << nl << scoped.substr(2) << "::__write(::Ice::OutputStream* __os) const";
+ C << sp << nl << "void" << nl << scoped.substr(2) << "::_write(::Ice::OutputStream* ostr) const";
C << sb;
- C << nl << "__os->startException(__slicedData);";
- C << nl << "__writeImpl(__os);";
- C << nl << "__os->endException();";
+ C << nl << "ostr->startException(_slicedData);";
+ C << nl << "_writeImpl(ostr);";
+ C << nl << "ostr->endException();";
C << eb;
- C << sp << nl << "void" << nl << scoped.substr(2) << "::__read(::Ice::InputStream* __is)";
+ C << sp << nl << "void" << nl << scoped.substr(2) << "::_read(::Ice::InputStream* istr)";
C << sb;
- C << nl << "__is->startException();";
- C << nl << "__readImpl(__is);";
- C << nl << "__slicedData = __is->endException(true);";
+ C << nl << "istr->startException();";
+ C << nl << "_readImpl(istr);";
+ C << nl << "_slicedData = istr->endException(true);";
C << eb;
}
- C << sp << nl << "void" << nl << scoped.substr(2) << "::__writeImpl(::Ice::OutputStream* __os) const";
+ C << sp << nl << "void" << nl << scoped.substr(2) << "::_writeImpl(::Ice::OutputStream* ostr) const";
C << sb;
- C << nl << "__os->startSlice(\"" << p->scoped() << "\", -1, " << (!base ? "true" : "false") << ");";
- C << nl << "Ice::StreamWriter< ::" << scoped.substr(2) << ", ::Ice::OutputStream>::write(__os, *this);";
- C << nl << "__os->endSlice();";
+ C << nl << "ostr->startSlice(\"" << p->scoped() << "\", -1, " << (!base ? "true" : "false") << ");";
+ C << nl << "Ice::StreamWriter< ::" << scoped.substr(2) << ", ::Ice::OutputStream>::write(ostr, *this);";
+ C << nl << "ostr->endSlice();";
if(base)
{
- emitUpcall(base, "::__writeImpl(__os);");
+ emitUpcall(base, "::_writeImpl(ostr);");
}
C << eb;
- C << sp << nl << "void" << nl << scoped.substr(2) << "::__readImpl(::Ice::InputStream* __is)";
+ C << sp << nl << "void" << nl << scoped.substr(2) << "::_readImpl(::Ice::InputStream* istr)";
C << sb;
- C << nl << "__is->startSlice();";
- C << nl << "Ice::StreamReader< ::" << scoped.substr(2) << ", ::Ice::InputStream>::read(__is, *this);";
- C << nl << "__is->endSlice();";
+ C << nl << "istr->startSlice();";
+ C << nl << "Ice::StreamReader< ::" << scoped.substr(2) << ", ::Ice::InputStream>::read(istr, *this);";
+ C << nl << "istr->endSlice();";
if(base)
{
- emitUpcall(base, "::__readImpl(__is);");
+ emitUpcall(base, "::_readImpl(istr);");
}
C << eb;
}
@@ -1238,7 +1232,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(!_doneStaticSymbol)
{
_doneStaticSymbol = true;
- H << sp << nl << "static " << name << " __" << p->name() << "_init;";
+ H << sp << nl << "static " << name << " _iceS_" << p->name() << "_init;";
}
}
@@ -1304,7 +1298,7 @@ Slice::Gen::TypesVisitor::visitStructStart(const StructPtr& p)
{
string typeName = inputTypeToString((*q)->type(), (*q)->optional(), (*q)->getMetaData(), _useWstring);
types.push_back(typeName);
- paramDecls.push_back(typeName + " __ice_" + (*q)->name());
+ paramDecls.push_back(typeName + " iceP_" + (*q)->name());
}
H << nl;
@@ -1322,7 +1316,7 @@ Slice::Gen::TypesVisitor::visitStructStart(const StructPtr& p)
H << ',';
}
string memberName = fixKwd((*q)->name());
- H << nl << memberName << '(' << "__ice_" << (*q)->name() << ')';
+ H << nl << memberName << '(' << "iceP_" << (*q)->name() << ')';
}
H.dec();
@@ -1356,34 +1350,34 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
bool containsSequence = false;
if((Dictionary::legalKeyType(p, containsSequence) && !containsSequence) || p->hasMetaData("cpp:comparable"))
{
- H << sp << nl << "bool operator==(const " << name << "& __rhs) const";
+ H << sp << nl << "bool operator==(const " << name << "& rhs_) const";
H << sb;
- H << nl << "if(this == &__rhs)";
+ H << nl << "if(this == &rhs_)";
H << sb;
H << nl << "return true;";
H << eb;
for(vector<string>::const_iterator pi = params.begin(); pi != params.end(); ++pi)
{
- H << nl << "if(" << *pi << " != __rhs." << *pi << ')';
+ H << nl << "if(" << *pi << " != rhs_." << *pi << ')';
H << sb;
H << nl << "return false;";
H << eb;
}
H << nl << "return true;";
H << eb;
- H << sp << nl << "bool operator<(const " << name << "& __rhs) const";
+ H << sp << nl << "bool operator<(const " << name << "& rhs_) const";
H << sb;
- H << nl << "if(this == &__rhs)";
+ H << nl << "if(this == &rhs_)";
H << sb;
H << nl << "return false;";
H << eb;
for(vector<string>::const_iterator pi = params.begin(); pi != params.end(); ++pi)
{
- H << nl << "if(" << *pi << " < __rhs." << *pi << ')';
+ H << nl << "if(" << *pi << " < rhs_." << *pi << ')';
H << sb;
H << nl << "return true;";
H << eb;
- H << nl << "else if(__rhs." << *pi << " < " << *pi << ')';
+ H << nl << "else if(rhs_." << *pi << " < " << *pi << ')';
H << sb;
H << nl << "return false;";
H << eb;
@@ -1391,21 +1385,21 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
H << nl << "return false;";
H << eb;
- H << sp << nl << "bool operator!=(const " << name << "& __rhs) const";
+ H << sp << nl << "bool operator!=(const " << name << "& rhs) const";
H << sb;
- H << nl << "return !operator==(__rhs);";
+ H << nl << "return !operator==(rhs);";
H << eb;
- H << nl << "bool operator<=(const " << name << "& __rhs) const";
+ H << nl << "bool operator<=(const " << name << "& rhs) const";
H << sb;
- H << nl << "return operator<(__rhs) || operator==(__rhs);";
+ H << nl << "return operator<(rhs) || operator==(rhs);";
H << eb;
- H << nl << "bool operator>(const " << name << "& __rhs) const";
+ H << nl << "bool operator>(const " << name << "& rhs) const";
H << sb;
- H << nl << "return !operator<(__rhs) && !operator==(__rhs);";
+ H << nl << "return !operator<(rhs) && !operator==(rhs);";
H << eb;
- H << nl << "bool operator>=(const " << name << "& __rhs) const";
+ H << nl << "bool operator>=(const " << name << "& rhs) const";
H << sb;
- H << nl << "return !operator<(__rhs);";
+ H << nl << "return !operator<(rhs);";
H << eb;
}
H << eb << ';';
@@ -1586,7 +1580,12 @@ Slice::Gen::ProxyDeclVisitor::visitClassDecl(const ClassDeclPtr& p)
string scoped = fixKwd(p->scoped());
H << sp << nl << "class " << name << ';';
- H << nl << _dllExport << "void __read(::Ice::InputStream*, ::IceInternal::ProxyHandle< ::IceProxy"
+ //
+ // Underscore prefix because it's a private function that should not clash with
+ // an interface named 'readProxy'
+ // Note that _readProxy is always in the IceProxy::... namespace
+ //
+ H << nl << _dllExport << "void _readProxy(::Ice::InputStream*, ::IceInternal::ProxyHandle< ::IceProxy"
<< scoped << ">&);";
H << nl << _dllExport << "::IceProxy::Ice::Object* upCast(::IceProxy" << scoped << "*);";
}
@@ -1693,7 +1692,7 @@ Slice::Gen::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p)
H << sp << nl << "protected:";
H.inc();
- H << sp << nl << "virtual Object* __newInstance() const = 0;";
+ H << sp << nl << "virtual Object* _newInstance() const = 0;";
H << eb << ';';
}
@@ -1723,11 +1722,11 @@ Slice::Gen::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p)
<< "::IceProxy::Ice::Object* ::IceProxy" << scope << "upCast(::IceProxy" << scoped << "* p) { return p; }";
C << sp;
- C << nl << "void" << nl << "::IceProxy" << scope << "__read(::Ice::InputStream* __is, "
+ C << nl << "void" << nl << "::IceProxy" << scope << "_readProxy(::Ice::InputStream* istr, "
<< "::IceInternal::ProxyHandle< ::IceProxy" << scoped << ">& v)";
C << sb;
C << nl << "::Ice::ObjectPrx proxy;";
- C << nl << "__is->read(proxy);";
+ C << nl << "istr->read(proxy);";
C << nl << "if(!proxy)";
C << sb;
C << nl << "v = 0;";
@@ -1735,7 +1734,7 @@ Slice::Gen::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p)
C << nl << "else";
C << sb;
C << nl << "v = new ::IceProxy" << scoped << ';';
- C << nl << "v->__copyFrom(proxy);";
+ C << nl << "v->_copyFrom(proxy);";
C << eb;
C << eb;
@@ -1754,12 +1753,12 @@ Slice::Gen::ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
H.dec();
H << sp << nl << "protected: ";
H.inc();
- H << sp << nl << _dllMemberExport << "virtual ::IceProxy::Ice::Object* __newInstance() const;";
+ H << sp << nl << _dllMemberExport << "virtual ::IceProxy::Ice::Object* _newInstance() const;";
H << eb << ';';
C << sp;
C << nl << "::IceProxy::Ice::Object*";
- C << nl << "IceProxy" << scoped << "::__newInstance() const";
+ C << nl << "IceProxy" << scoped << "::_newInstance() const";
C << sb;
C << nl << "return new " << name << ";";
C << eb;
@@ -1809,7 +1808,7 @@ void
Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
{
string name = p->name();
- string flatName = p->flattenedScope() + p->name() + "_name";
+ string flatName = "iceC" + p->flattenedScope() + p->name() + "_name";
string scoped = fixKwd(p->scoped());
string scope = fixKwd(p->scope());
@@ -1889,12 +1888,12 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
}
//
- // Check if we need to generate a private ___end_ method. This is the case if the
+ // Check if we need to generate a private _iceI_end_ method. This is the case if the
// when using certain mapping features such as cpp:array. While
// the regular end_ method can't return pair<const TYPE*, const TYPE*> because the
// pointers would be invalid once end_ returns, we still want to allow using this
// alternate mapping with AMI response callbacks (to allow zero-copy for instance).
- // For this purpose, we generate a special ___end method which is used by the
+ // For this purpose, we generate a special _iceI_end method which is used by the
// completed implementation of the generated Callback_Inft_opName operation
// delegate.
//
@@ -1903,65 +1902,65 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
{
string typeStringEndAMI = outputTypeToString(ret, p->returnIsOptional(), p->getMetaData(),
_useWstring | TypeContextAMIPrivateEnd);
- outParamsDeclEndAMI.push_back(typeStringEndAMI + ' ' + "__ret");
+ outParamsDeclEndAMI.push_back(typeStringEndAMI + ' ' + "ret");
}
string thisPointer = fixKwd(scope.substr(0, scope.size() - 2)) + "*";
string deprecateSymbol = getDeprecateSymbol(p, cl);
H << sp << nl << deprecateSymbol << _dllMemberExport << retS << ' ' << fixKwd(name) << spar << paramsDecl
- << "const ::Ice::Context& __ctx = ::Ice::noExplicitContext" << epar;
+ << "const ::Ice::Context& context = ::Ice::noExplicitContext" << epar;
H << sb << nl;
if(ret)
{
H << "return ";
}
- H << "end_" << name << spar << outParamNamesAMI << "__begin_" + name << spar << argsAMI;
- H << "__ctx" << "::IceInternal::__dummyCallback" << "0" << "true" << epar << epar << ';';
+ H << "end_" << name << spar << outParamNamesAMI << "_iceI_begin_" + name << spar << argsAMI;
+ H << "context" << "::IceInternal::dummyCallback" << "0" << "true" << epar << epar << ';';
H << eb;
H << sp << nl << "::Ice::AsyncResultPtr begin_" << name << spar << paramsDeclAMI
- << "const ::Ice::Context& __ctx = ::Ice::noExplicitContext" << epar;
+ << "const ::Ice::Context& context = ::Ice::noExplicitContext" << epar;
H << sb;
- H << nl << "return __begin_" << name << spar << argsAMI << "__ctx" << "::IceInternal::__dummyCallback" << "0"
+ H << nl << "return _iceI_begin_" << name << spar << argsAMI << "context" << "::IceInternal::dummyCallback" << "0"
<< epar << ';';
H << eb;
H << sp << nl << "::Ice::AsyncResultPtr begin_" << name << spar << paramsDeclAMI
- << "const ::Ice::CallbackPtr& __del"
- << "const ::Ice::LocalObjectPtr& __cookie = 0" << epar;
+ << "const ::Ice::CallbackPtr& del"
+ << "const ::Ice::LocalObjectPtr& cookie = 0" << epar;
H << sb;
- H << nl << "return __begin_" << name << spar << argsAMI << "::Ice::noExplicitContext" << "__del" << "__cookie" << epar << ';';
+ H << nl << "return _iceI_begin_" << name << spar << argsAMI << "::Ice::noExplicitContext" << "del" << "cookie" << epar << ';';
H << eb;
H << sp << nl << "::Ice::AsyncResultPtr begin_" << name << spar << paramsDeclAMI
- << "const ::Ice::Context& __ctx"
- << "const ::Ice::CallbackPtr& __del"
- << "const ::Ice::LocalObjectPtr& __cookie = 0" << epar;
+ << "const ::Ice::Context& context"
+ << "const ::Ice::CallbackPtr& del"
+ << "const ::Ice::LocalObjectPtr& cookie = 0" << epar;
H << sb;
- H << nl << "return __begin_" << name << spar << argsAMI << "__ctx" << "__del" << "__cookie" << epar << ';';
+ H << nl << "return _iceI_begin_" << name << spar << argsAMI << "context" << "del" << "cookie" << epar << ';';
H << eb;
H << sp << nl << "::Ice::AsyncResultPtr begin_" << name << spar << paramsDeclAMI
- << "const " + delNameScoped + "Ptr& __del"
- << "const ::Ice::LocalObjectPtr& __cookie = 0" << epar;
+ << "const " + delNameScoped + "Ptr& del"
+ << "const ::Ice::LocalObjectPtr& cookie = 0" << epar;
H << sb;
- H << nl << "return __begin_" << name << spar << argsAMI << "::Ice::noExplicitContext" << "__del" << "__cookie" << epar << ';';
+ H << nl << "return _iceI_begin_" << name << spar << argsAMI << "::Ice::noExplicitContext" << "del" << "cookie" << epar << ';';
H << eb;
H << sp << nl << "::Ice::AsyncResultPtr begin_" << name << spar << paramsDeclAMI
- << "const ::Ice::Context& __ctx"
- << "const " + delNameScoped + "Ptr& __del"
- << "const ::Ice::LocalObjectPtr& __cookie = 0" << epar;
+ << "const ::Ice::Context& context"
+ << "const " + delNameScoped + "Ptr& del"
+ << "const ::Ice::LocalObjectPtr& cookie = 0" << epar;
H << sb;
- H << nl << "return __begin_" << name << spar << argsAMI << "__ctx" << "__del" << "__cookie" << epar << ';';
+ H << nl << "return _iceI_begin_" << name << spar << argsAMI << "context" << "del" << "cookie" << epar << ';';
H << eb;
H << sp << nl << _dllMemberExport << retS << " end_" << name << spar << outParamsDeclAMI
<< "const ::Ice::AsyncResultPtr&" << epar << ';';
if(generatePrivateEnd)
{
- H << sp << nl << _dllMemberExport << "void ___end_" << name << spar << outParamsDeclEndAMI;
+ H << sp << nl << _dllMemberExport << "void _iceI_end_" << name << spar << outParamsDeclEndAMI;
H << "const ::Ice::AsyncResultPtr&" << epar << ';';
}
@@ -1969,71 +1968,71 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
H.dec();
H << nl << "private:";
H.inc();
- H << sp << nl << _dllMemberExport << "::Ice::AsyncResultPtr __begin_" << name << spar
+ H << sp << nl << _dllMemberExport << "::Ice::AsyncResultPtr _iceI_begin_" << name << spar
<< paramsAMI << "const ::Ice::Context&"
<< "const ::IceInternal::CallbackBasePtr&"
- << "const ::Ice::LocalObjectPtr& __cookie = 0"
+ << "const ::Ice::LocalObjectPtr& cookie = 0"
<< "bool sync = false" << epar << ';';
H << nl;
H.dec();
H << nl << "public:";
H.inc();
- C << sp << nl << "::Ice::AsyncResultPtr" << nl << "IceProxy" << scope << "__begin_" << name << spar << paramsDeclAMI
- << "const ::Ice::Context& __ctx" << "const ::IceInternal::CallbackBasePtr& __del"
- << "const ::Ice::LocalObjectPtr& __cookie" << "bool sync" << epar;
+ C << sp << nl << "::Ice::AsyncResultPtr" << nl << "IceProxy" << scope << "_iceI_begin_" << name << spar << paramsDeclAMI
+ << "const ::Ice::Context& context" << "const ::IceInternal::CallbackBasePtr& del"
+ << "const ::Ice::LocalObjectPtr& cookie" << "bool sync" << epar;
C << sb;
if(p->returnsData())
{
- C << nl << "__checkTwowayOnly(" << flatName << ", sync);";
+ C << nl << "_checkTwowayOnly(" << flatName << ", sync);";
}
- C << nl << "::IceInternal::OutgoingAsyncPtr __result = new ::IceInternal::CallbackOutgoing(this, " << flatName
- << ", __del, __cookie, sync);";
+ C << nl << "::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, " << flatName
+ << ", del, cookie, sync);";
C << nl << "try";
C << sb;
- C << nl << "__result->prepare(" << flatName << ", " << operationModeToString(p->sendMode()) << ", __ctx);";
+ C << nl << "result->prepare(" << flatName << ", " << operationModeToString(p->sendMode()) << ", context);";
if(inParams.empty())
{
- C << nl << "__result->writeEmptyParams();";
+ C << nl << "result->writeEmptyParams();";
}
else
{
- C << nl << "::Ice::OutputStream* __os = __result->startWriteParams(" << opFormatTypeToString(p) <<");";
+ C << nl << "::Ice::OutputStream* ostr = result->startWriteParams(" << opFormatTypeToString(p) <<");";
writeMarshalCode(C, inParams, 0, true, TypeContextInParam);
if(p->sendsClasses(false))
{
- C << nl << "__os->writePendingValues();";
+ C << nl << "ostr->writePendingValues();";
}
- C << nl << "__result->endWriteParams();";
+ C << nl << "result->endWriteParams();";
}
- C << nl << "__result->invoke(" << flatName << ");";
+ C << nl << "result->invoke(" << flatName << ");";
C << eb;
- C << nl << "catch(const ::Ice::Exception& __ex)";
+ C << nl << "catch(const ::Ice::Exception& ex)";
C << sb;
- C << nl << "__result->abort(__ex);";
+ C << nl << "result->abort(ex);";
C << eb;
- C << nl << "return __result;";
+ C << nl << "return result;";
C << eb;
C << sp << nl << retS << nl << "IceProxy" << scope << "end_" << name << spar << outParamsDeclAMI
- << "const ::Ice::AsyncResultPtr& __result" << epar;
+ << "const ::Ice::AsyncResultPtr& result" << epar;
C << sb;
if(p->returnsData())
{
- C << nl << "::Ice::AsyncResult::__check(__result, this, " << flatName << ");";
+ C << nl << "::Ice::AsyncResult::check(result, this, " << flatName << ");";
//
// COMPILERFIX: It's necessary to generate the allocate code here before
- // this if(!__result->wait()). If generated after this if block, we get
+ // this if(!result->wait()). If generated after this if block, we get
// access violations errors with the test/Ice/slicing/objects test on VC9
// and Windows 64 bits when compiled with optimization (see bug 4400).
//
writeAllocateCode(C, ParamDeclList(), p, true, _useWstring | TypeContextAMIEnd);
- C << nl << "if(!__result->__wait())";
+ C << nl << "if(!result->waitForResponse())";
C << sb;
C << nl << "try";
C << sb;
- C << nl << "__result->__throwUserException();";
+ C << nl << "result->throwUserException();";
C << eb;
//
// Generate a catch block for each legal user exception.
@@ -2054,33 +2053,33 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
C << nl << "throw;";
C << eb;
}
- C << nl << "catch(const ::Ice::UserException& __ex)";
+ C << nl << "catch(const ::Ice::UserException& ex)";
C << sb;
- C << nl << "throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_id());";
+ C << nl << "throw ::Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_id());";
C << eb;
C << eb;
if(ret || !outParams.empty())
{
- C << nl << "::Ice::InputStream* __is = __result->__startReadParams();";
+ C << nl << "::Ice::InputStream* istr = result->startReadParams();";
writeUnmarshalCode(C, outParams, p, true, _useWstring | TypeContextAMIEnd);
if(p->returnsClasses(false))
{
- C << nl << "__is->readPendingValues();";
+ C << nl << "istr->readPendingValues();";
}
- C << nl << "__result->__endReadParams();";
+ C << nl << "result->endReadParams();";
}
else
{
- C << nl << "__result->__readEmptyParams();";
+ C << nl << "result->readEmptyParams();";
}
if(ret)
{
- C << nl << "return __ret;";
+ C << nl << "return ret;";
}
}
else
{
- C << nl << "__end(__result, " << flatName << ");";
+ C << nl << "_end(result, " << flatName << ");";
}
C << eb;
@@ -2088,15 +2087,15 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
{
assert(p->returnsData());
- C << sp << nl << "void IceProxy" << scope << "___end_" << name << spar << outParamsDeclEndAMI
- << "const ::Ice::AsyncResultPtr& __result" << epar;
+ C << sp << nl << "void IceProxy" << scope << "_iceI_end_" << name << spar << outParamsDeclEndAMI
+ << "const ::Ice::AsyncResultPtr& result" << epar;
C << sb;
- C << nl << "::Ice::AsyncResult::__check(__result, this, " << flatName << ");";
- C << nl << "if(!__result->__wait())";
+ C << nl << "::Ice::AsyncResult::check(result, this, " << flatName << ");";
+ C << nl << "if(!result->waitForResponse())";
C << sb;
C << nl << "try";
C << sb;
- C << nl << "__result->__throwUserException();";
+ C << nl << "result->throwUserException();";
C << eb;
//
// Generate a catch block for each legal user exception.
@@ -2117,25 +2116,25 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
C << nl << "throw;";
C << eb;
}
- C << nl << "catch(const ::Ice::UserException& __ex)";
+ C << nl << "catch(const ::Ice::UserException& ex)";
C << sb;
- C << nl << "throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_id());";
+ C << nl << "throw ::Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_id());";
C << eb;
C << eb;
if(ret || !outParams.empty())
{
- C << nl << "::Ice::InputStream* __is = __result->__startReadParams();";
+ C << nl << "::Ice::InputStream* istr = result->startReadParams();";
writeUnmarshalCode(C, outParams, p, true, _useWstring | TypeContextAMIPrivateEnd);
if(p->returnsClasses(false))
{
- C << nl << "__is->readPendingValues();";
+ C << nl << "istr->readPendingValues();";
}
- C << nl << "__result->__endReadParams();";
+ C << nl << "result->endReadParams();";
}
else
{
- C << nl << "__result->__readEmptyParams();";
+ C << nl << "result->readEmptyParams();";
}
C << eb;
}
@@ -2177,11 +2176,20 @@ Slice::Gen::ObjectDeclVisitor::visitClassDecl(const ClassDeclPtr& p)
H << sp << nl << "class " << name << ';';
if(!p->isLocal())
{
+ //
+ // upCast is not _upCast nor _iceUpCast for historical reasons. IceInternal::Handle
+ // depends on this name
+ //
H << nl << _dllExport << "::Ice::Object* upCast(" << scoped << "*);";
H << nl << "typedef ::IceInternal::Handle< " << scoped << "> " << p->name() << "Ptr;";
H << nl << "typedef ::IceInternal::ProxyHandle< ::IceProxy" << scoped << "> " << p->name() << "Prx;";
H << nl << "typedef " << p->name() << "Prx " << p->name() << "PrxPtr;";
- H << nl << _dllExport << "void __patch(" << p->name() << "Ptr&, const ::Ice::ObjectPtr&);";
+
+ //
+ // _ice prefix because this function is in the Slice module namespace, where the user
+ // is allowed to define classes, functions etc. that start with _.
+ //
+ H << nl << _dllExport << "void _icePatchObjectPtr(" << p->name() << "Ptr&, const ::Ice::ObjectPtr&);";
}
else
{
@@ -2196,7 +2204,7 @@ Slice::Gen::ObjectDeclVisitor::visitOperation(const OperationPtr& p)
ClassDefPtr cl = ClassDefPtr::dynamicCast(p->container());
if(cl && !cl->isLocal())
{
- string flatName = p->flattenedScope() + p->name() + "_name";
+ string flatName = "iceC" + p->flattenedScope() + p->name() + "_name";
C << sp << nl << "const ::std::string " << flatName << " = \"" << p->name() << "\";";
}
}
@@ -2329,7 +2337,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
{
string typeName = inputTypeToString((*q)->type(), (*q)->optional(), (*q)->getMetaData(), _useWstring);
allTypes.push_back(typeName);
- allParamDecls.push_back(typeName + " __ice_" + (*q)->name());
+ allParamDecls.push_back(typeName + " iceP_" + (*q)->name());
}
if(!p->isInterface())
@@ -2356,7 +2364,8 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
{
C << sp << nl
<< _dllExport
- << "::Ice::Object* " << scope.substr(2) << "upCast(" << scoped << "* p) { return p; }";
+ << "::Ice::Object* " << scope.substr(2) << "upCast(" << scoped << "* p) { return p; }"
+ << nl;
//
// It would make sense to provide a covariant ice_clone(); unfortunately many compilers
@@ -2382,8 +2391,8 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
C << sb;
if(!p->isAbstract())
{
- C << nl << "::Ice::Object* __p = new " << name << "(*this);";
- C << nl << "return __p;";
+ C << nl << "::Ice::Object* p = new " << name << "(*this);";
+ C << nl << "return p;";
}
else
{
@@ -2425,7 +2434,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
H << nl << "virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::noExplicitCurrent) const;";
H << sp << nl << "static const ::std::string& ice_staticId();";
- string flatName = p->flattenedScope() + p->name() + "_ids";
+ string flatName = "iceC" + p->flattenedScope() + p->name() + "_ids";
C << sp << nl << "namespace";
C << nl << "{";
@@ -2445,9 +2454,9 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
C << sp;
C << nl << "bool" << nl << scoped.substr(2)
- << "::ice_isA(const ::std::string& _s, const ::Ice::Current&) const";
+ << "::ice_isA(const ::std::string& s, const ::Ice::Current&) const";
C << sb;
- C << nl << "return ::std::binary_search(" << flatName << ", " << flatName << " + " << ids.size() << ", _s);";
+ C << nl << "return ::std::binary_search(" << flatName << ", " << flatName << " + " << ids.size() << ", s);";
C << eb;
C << sp;
@@ -2527,9 +2536,9 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
allOpNames.unique();
H << sp;
- H << nl << "virtual bool __dispatch(::IceInternal::Incoming&, const ::Ice::Current&);";
+ H << nl << "virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&);";
- string flatName = p->flattenedScope() + p->name() + "_all";
+ string flatName = "iceC" + p->flattenedScope() + p->name() + "_all";
C << sp << nl << "namespace";
C << nl << "{";
C << nl << "const ::std::string " << flatName << "[] =";
@@ -2547,10 +2556,10 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
C << sp << nl << "}";
C << sp;
C << nl << "bool";
- C << nl << scoped.substr(2) << "::__dispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)";
+ C << nl << scoped.substr(2) << "::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)";
C << sb;
- C << nl << "::std::pair< const ::std::string*, const ::std::string*> r = "
+ C << nl << "::std::pair<const ::std::string*, const ::std::string*> r = "
<< "::std::equal_range(" << flatName << ", " << flatName << " + " << allOpNames.size()
<< ", current.operation);";
C << nl << "if(r.first == r.second)";
@@ -2566,7 +2575,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
{
C << nl << "case " << i++ << ':';
C << sb;
- C << nl << "return ___" << *q << "(in, current);";
+ C << nl << "return _iceD_" << *q << "(in, current);";
C << eb;
}
C << nl << "default:";
@@ -2597,7 +2606,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
H << nl
<< "virtual ::Ice::Int ice_operationAttributes(const ::std::string&) const;";
- string opAttrFlatName = p->flattenedScope() + p->name() + "_operationAttributes";
+ string opAttrFlatName = "iceC" + p->flattenedScope() + p->name() + "_operationAttributes";
C << sp << nl << "namespace";
C << nl << "{";
@@ -2631,7 +2640,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
<< "::ice_operationAttributes(const ::std::string& opName) const";
C << sb;
- C << nl << "::std::pair< const ::std::string*, const ::std::string*> r = "
+ C << nl << "::std::pair<const ::std::string*, const ::std::string*> r = "
<< "::std::equal_range(" << flatName << ", " << flatName << " + " << allOpNames.size()
<< ", opName);";
C << nl << "if(r.first == r.second)";
@@ -2652,8 +2661,8 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
if(preserved && !basePreserved)
{
H << sp;
- H << nl << "virtual void __write(::Ice::OutputStream*) const;";
- H << nl << "virtual void __read(::Ice::InputStream*);";
+ H << nl << "virtual void _iceWrite(::Ice::OutputStream*) const;";
+ H << nl << "virtual void _iceRead(::Ice::InputStream*);";
}
H.dec();
@@ -2661,49 +2670,49 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
inProtected = true;
H.inc();
- H << sp << nl << "virtual void __writeImpl(::Ice::OutputStream*) const;";
- H << nl << "virtual void __readImpl(::Ice::InputStream*);";
+ H << sp << nl << "virtual void _iceWriteImpl(::Ice::OutputStream*) const;";
+ H << nl << "virtual void _iceReadImpl(::Ice::InputStream*);";
if(preserved && !basePreserved)
{
C << sp;
- C << nl << "void" << nl << scoped.substr(2) << "::__write(::Ice::OutputStream* __os) const";
+ C << nl << "void" << nl << scoped.substr(2) << "::_iceWrite(::Ice::OutputStream* ostr) const";
C << sb;
- C << nl << "__os->startValue(__slicedData);";
- C << nl << "__writeImpl(__os);";
- C << nl << "__os->endValue();";
+ C << nl << "ostr->startValue(_iceSlicedData);";
+ C << nl << "_iceWriteImpl(ostr);";
+ C << nl << "ostr->endValue();";
C << eb;
C << sp;
- C << nl << "void" << nl << scoped.substr(2) << "::__read(::Ice::InputStream* __is)";
+ C << nl << "void" << nl << scoped.substr(2) << "::_iceRead(::Ice::InputStream* istr)";
C << sb;
- C << nl << "__is->startValue();";
- C << nl << "__readImpl(__is);";
- C << nl << "__slicedData = __is->endValue(true);";
+ C << nl << "istr->startValue();";
+ C << nl << "_iceReadImpl(istr);";
+ C << nl << "_iceSlicedData = istr->endValue(true);";
C << eb;
}
C << sp;
- C << nl << "void" << nl << scoped.substr(2) << "::__writeImpl(::Ice::OutputStream* __os) const";
+ C << nl << "void" << nl << scoped.substr(2) << "::_iceWriteImpl(::Ice::OutputStream* ostr) const";
C << sb;
- C << nl << "__os->startSlice(ice_staticId(), " << p->compactId() << (!base ? ", true" : ", false") << ");";
- C << nl << "Ice::StreamWriter< ::" << scoped.substr(2) << ", ::Ice::OutputStream>::write(__os, *this);";
- C << nl << "__os->endSlice();";
+ C << nl << "ostr->startSlice(ice_staticId(), " << p->compactId() << (!base ? ", true" : ", false") << ");";
+ C << nl << "Ice::StreamWriter< ::" << scoped.substr(2) << ", ::Ice::OutputStream>::write(ostr, *this);";
+ C << nl << "ostr->endSlice();";
if(base)
{
- emitUpcall(base, "::__writeImpl(__os);");
+ emitUpcall(base, "::_iceWriteImpl(ostr);");
}
C << eb;
C << sp;
- C << nl << "void" << nl << scoped.substr(2) << "::__readImpl(::Ice::InputStream* __is)";
+ C << nl << "void" << nl << scoped.substr(2) << "::_iceReadImpl(::Ice::InputStream* istr)";
C << sb;
- C << nl << "__is->startSlice();";
- C << nl << "Ice::StreamReader< ::" << scoped.substr(2) << ", ::Ice::InputStream>::read(__is, *this);";
- C << nl << "__is->endSlice();";
+ C << nl << "istr->startSlice();";
+ C << nl << "Ice::StreamReader< ::" << scoped.substr(2) << ", ::Ice::InputStream>::read(istr, *this);";
+ C << nl << "istr->endSlice();";
if(base)
{
- emitUpcall(base, "::__readImpl(__is);");
+ emitUpcall(base, "::_iceReadImpl(istr);");
}
C << eb;
@@ -2714,13 +2723,13 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
if(!p->isAbstract())
{
- string initName = p->flattenedScope() + p->name() + "_init";
+ string initName = "iceC" + p->flattenedScope() + p->name() + "_init";
C << nl << "const ::IceInternal::DefaultValueFactoryInit< " << scoped << "> "
<< initName << "(\"" << p->scoped() << "\");";
}
if(p->compactId() >= 0)
{
- string initName = p->flattenedScope() + p->name() + "_compactIdInit";
+ string initName = "iceC" + p->flattenedScope() + p->name() + "_compactIdInit";
C << nl << "const ::IceInternal::CompactIdInit "
<< initName << "(\"" << p->scoped() << "\", " << p->compactId() << ");";
}
@@ -2787,7 +2796,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
H.inc();
inProtected = true;
}
- H << sp << nl << "::Ice::SlicedDataPtr __slicedData;";
+ H << sp << nl << "::Ice::SlicedDataPtr _iceSlicedData;";
}
if(generateFriend)
@@ -2816,26 +2825,26 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
// But we do this only once per source file, because a single instance is sufficient to initialize
// all of the globals in a compilation unit.
//
- H << nl << "static ::Ice::ValueFactoryPtr _" << p->name() << "_init = " << p->scoped() << "::ice_factory();";
+ H << nl << "static ::Ice::ValueFactoryPtr _iceS_" << p->name() << "_init = " << p->scoped() << "::ice_factory();";
}
if(p->isLocal())
{
H << sp;
- H << nl << "inline bool operator==(const " << fixKwd(p->name()) << "& l, const " << fixKwd(p->name()) << "& r)";
+ H << nl << "inline bool operator==(const " << fixKwd(p->name()) << "& lhs, const " << fixKwd(p->name()) << "& rhs)";
H << sb;
- H << nl << "return static_cast<const ::Ice::LocalObject&>(l) == static_cast<const ::Ice::LocalObject&>(r);";
+ H << nl << "return static_cast<const ::Ice::LocalObject&>(lhs) == static_cast<const ::Ice::LocalObject&>(rhs);";
H << eb;
H << sp;
- H << nl << "inline bool operator<(const " << fixKwd(p->name()) << "& l, const " << fixKwd(p->name()) << "& r)";
+ H << nl << "inline bool operator<(const " << fixKwd(p->name()) << "& lhs, const " << fixKwd(p->name()) << "& rhs)";
H << sb;
- H << nl << "return static_cast<const ::Ice::LocalObject&>(l) < static_cast<const ::Ice::LocalObject&>(r);";
+ H << nl << "return static_cast<const ::Ice::LocalObject&>(lhs) < static_cast<const ::Ice::LocalObject&>(rhs);";
H << eb;
}
else
{
C << sp << nl << "void " << _dllExport;
- C << nl << scope.substr(2) << "__patch(" << p->name() << "Ptr& handle, const ::Ice::ObjectPtr& v)";
+ C << nl << scope.substr(2) << "_icePatchObjectPtr(" << p->name() << "Ptr& handle, const ::Ice::ObjectPtr& v)";
C << sb;
C << nl << "handle = " << scope << p->name() << "Ptr::dynamicCast(v);";
C << nl << "if(v && !handle)";
@@ -2845,14 +2854,14 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
C << eb;
H << sp;
- H << nl << "inline bool operator==(const " << fixKwd(p->name()) << "& l, const " << fixKwd(p->name()) << "& r)";
+ H << nl << "inline bool operator==(const " << fixKwd(p->name()) << "& lhs, const " << fixKwd(p->name()) << "& rhs)";
H << sb;
- H << nl << "return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r);";
+ H << nl << "return static_cast<const ::Ice::Object&>(lhs) == static_cast<const ::Ice::Object&>(rhs);";
H << eb;
H << sp;
- H << nl << "inline bool operator<(const " << fixKwd(p->name()) << "& l, const " << fixKwd(p->name()) << "& r)";
+ H << nl << "inline bool operator<(const " << fixKwd(p->name()) << "& lhs, const " << fixKwd(p->name()) << "& rhs)";
H << sb;
- H << nl << "return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r);";
+ H << nl << "return static_cast<const ::Ice::Object&>(lhs) < static_cast<const ::Ice::Object&>(rhs);";
H << eb;
}
@@ -2892,8 +2901,7 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p)
string classScopedAMD = classScope + classNameAMD;
string paramsAMD = "(const " + classScopedAMD + '_' + name + "Ptr&, ";
- string paramsDeclAMD = "(const " + classScopedAMD + '_' + name + "Ptr& __cb, ";
- string argsAMD = "(new IceAsync" + classScopedAMD + '_' + name + "(__inS), ";
+ string argsAMD = "(new IceAsync" + classScopedAMD + '_' + name + "(inS), ";
ParamDeclList inParams;
ParamDeclList outParams;
@@ -2933,10 +2941,6 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p)
{
paramsAMD += typeString;
paramsAMD += ", ";
- paramsDeclAMD += typeString;
- paramsDeclAMD += ' ';
- paramsDeclAMD += paramName;
- paramsDeclAMD += ", ";
argsAMD += paramName;
argsAMD += ", ";
}
@@ -2956,8 +2960,8 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p)
}
params += "const ::Ice::Current& = ::Ice::noExplicitCurrent)";
- paramsDecl += "const ::Ice::Current& __current)";
- args += "__current)";
+ paramsDecl += "const ::Ice::Current& current)";
+ args += "current)";
}
else
{
@@ -2967,8 +2971,7 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p)
}
paramsAMD += "const ::Ice::Current& = ::Ice::noExplicitCurrent)";
- paramsDeclAMD += "const ::Ice::Current& __current)";
- argsAMD += "__current)";
+ argsAMD += "current)";
string isConst = ((p->mode() == Operation::Nonmutating) || p->hasMetaData("cpp:const")) ? " const" : "";
bool amd = !cl->isLocal() && (cl->hasMetaData("amd") || p->hasMetaData("amd"));
@@ -2987,55 +2990,59 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p)
if(!cl->isLocal())
{
- H << nl << "bool ___" << name << "(::IceInternal::Incoming&, const ::Ice::Current&)" << isConst << ';';
+ H << nl << "bool _iceD_" << name << "(::IceInternal::Incoming&, const ::Ice::Current&)" << isConst << ';';
C << sp;
- C << nl << "bool" << nl << scope.substr(2) << "___" << name << "(::IceInternal::Incoming& __inS"
- << ", const ::Ice::Current& __current)" << isConst;
+ //
+ // inS, ret, current etc. may shadow class-with-operations data members in C++98
+ //
+ C << nl << "bool" << nl << scope.substr(2) << "_iceD_" << name << "(::IceInternal::Incoming& inS"
+ << ", const ::Ice::Current& current)" << isConst;
C << sb;
- C << nl << "__checkMode(" << operationModeToString(p->mode()) << ", __current.mode);";
+ C << nl << "_iceCheckMode(" << operationModeToString(p->mode()) << ", current.mode);";
if(!inParams.empty())
{
- C << nl << "::Ice::InputStream* __is = __inS.startReadParams();";
+ C << nl << "::Ice::InputStream* istr = inS.startReadParams();";
writeAllocateCode(C, inParams, 0, true, _useWstring | TypeContextInParam);
writeUnmarshalCode(C, inParams, 0, true, TypeContextInParam);
if(p->sendsClasses(false))
{
- C << nl << "__is->readPendingValues();";
+ C << nl << "istr->readPendingValues();";
}
- C << nl << "__inS.endReadParams();";
+ C << nl << "inS.endReadParams();";
}
else
{
- C << nl << "__inS.readEmptyParams();";
+ C << nl << "inS.readEmptyParams();";
}
if(p->format() != DefaultFormat)
{
- C << nl << "__inS.setFormat(" << opFormatTypeToString(p) << ");";
+ C << nl << "inS.setFormat(" << opFormatTypeToString(p) << ");";
}
if(!amd)
{
- writeAllocateCode(C, outParams, 0, true, _useWstring);
+ writeAllocateCode(C, outParams, 0, true, _useWstring, "ret");
+ C << nl;
if(ret)
{
- C << retS << " __ret = ";
+ C << retS << " ret = ";
}
C << fixKwd(name) << args << ';';
if(ret || !outParams.empty())
{
- C << nl << "::Ice::OutputStream* __os = __inS.startWriteParams();";
- writeMarshalCode(C, outParams, p, true);
+ C << nl << "::Ice::OutputStream* ostr = inS.startWriteParams();";
+ writeMarshalCode(C, outParams, p, true, 0);
if(p->returnsClasses(false))
{
- C << nl << "__os->writePendingValues();";
+ C << nl << "ostr->writePendingValues();";
}
- C << nl << "__inS.endWriteParams();";
+ C << nl << "inS.endWriteParams();";
}
else
{
- C << nl << "__inS.writeEmptyParams();";
+ C << nl << "inS.writeEmptyParams();";
}
C << nl << "return false;";
}
@@ -3082,16 +3089,16 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p)
H << sp << nl << "virtual ::Ice::AsyncResultPtr begin_" << name << spar << paramsDeclAMI << epar << " = 0;";
H << sp << nl << "virtual ::Ice::AsyncResultPtr begin_" << name << spar << paramsDeclAMI
- << "const ::Ice::CallbackPtr& __del"
- << "const ::Ice::LocalObjectPtr& __cookie = 0" << epar << " = 0;";
+ << "const ::Ice::CallbackPtr& del"
+ << "const ::Ice::LocalObjectPtr& cookie = 0" << epar << " = 0;";
string clScope = fixKwd(cl->scope());
string delName = "Callback_" + cl->name() + "_" + name;
string delNameScoped = clScope + delName;
H << sp << nl << "virtual ::Ice::AsyncResultPtr begin_" << name << spar << paramsDeclAMI
- << "const " + delNameScoped + "Ptr& __del"
- << "const ::Ice::LocalObjectPtr& __cookie = 0" << epar << " = 0;";
+ << "const " + delNameScoped + "Ptr& del"
+ << "const ::Ice::LocalObjectPtr& cookie = 0" << epar << " = 0;";
H << sp << nl << "virtual " << retS << " end_" << name << spar << outParamsDeclAMI
<< "const ::Ice::AsyncResultPtr&" << epar << " = 0;";
@@ -3126,7 +3133,7 @@ Slice::Gen::ObjectVisitor::emitGCFunctions(const ClassDefPtr& p)
bool preserved = basePreserved || p->hasMetaData("preserve-slice");
//
- // __gcVisit() is overridden by the basemost class that can be
+ // _iceGcVisit() is overridden by the basemost class that can be
// cyclic, plus all classes derived from that class.
//
// We also override these methods for the initial preserved class in a
@@ -3134,22 +3141,22 @@ Slice::Gen::ObjectVisitor::emitGCFunctions(const ClassDefPtr& p)
//
if(canBeCyclic || (preserved && !basePreserved))
{
- H << nl << "virtual void __gcVisitMembers(::IceInternal::GCVisitor&);";
+ H << nl << "virtual void _iceGcVisitMembers(::IceInternal::GCVisitor&);";
- C << sp << nl << "void" << nl << scoped.substr(2) << "::__gcVisitMembers(::IceInternal::GCVisitor& _v)";
+ C << sp << nl << "void" << nl << scoped.substr(2) << "::_iceGcVisitMembers(::IceInternal::GCVisitor& v_)";
C << sb;
bool hasCyclicBase = base && base->canBeCyclic();
if(hasCyclicBase || basePreserved)
{
- emitUpcall(bases.front(), "::__gcVisitMembers(_v);");
+ emitUpcall(bases.front(), "::_iceGcVisitMembers(v_);");
}
if(preserved && !basePreserved)
{
- C << nl << "if(__slicedData)";
+ C << nl << "if(_iceSlicedData)";
C << sb;
- C << nl << "__slicedData->__gcVisitMembers(_v);";
+ C << nl << "_iceSlicedData->_iceGcVisitMembers(v_);";
C << eb;
}
@@ -3188,11 +3195,11 @@ Slice::Gen::ObjectVisitor::emitGCVisitCode(const TypePtr& p, const string& prefi
if(decl)
{
string scope = fixKwd(decl->scope());
- C << nl << "if((" << scope << "upCast(" << prefix << name << ".get())->__gcVisit(_v)))";
+ C << nl << "if((" << scope << "upCast(" << prefix << name << ".get())->_iceGcVisit(v_)))";
}
else
{
- C << nl << "if((" << prefix << name << ".get())->__gcVisit(_v))";
+ C << nl << "if((" << prefix << name << ".get())->_iceGcVisit(v_))";
}
C << sb;
C << nl << prefix << name << " = 0;";
@@ -3276,7 +3283,7 @@ Slice::Gen::ObjectVisitor::emitVirtualBaseInitializers(const ClassDefPtr& p, boo
{
upcall += ", ";
}
- upcall += "__ice_" + (*q)->name();
+ upcall += "iceP_" + (*q)->name();
}
upcall += ")";
@@ -3304,7 +3311,7 @@ Slice::Gen::ObjectVisitor::emitOneShotConstructor(const ClassDefPtr& p)
string typeName = inputTypeToString((*q)->type(), (*q)->optional(), (*q)->getMetaData(), _useWstring);
bool dataMember = std::find(dataMembers.begin(), dataMembers.end(), (*q)) != dataMembers.end();
allParamDecls.push_back(typeName + ((dataMember || callBaseConstuctors) ?
- (" __ice_" + (*q)->name()) : (" /*__ice_" + (*q)->name() + "*/")));
+ (" iceP_" + (*q)->name()) : (" /*iceP_" + (*q)->name() + "*/")));
}
H << sp << nl;
@@ -3344,7 +3351,7 @@ Slice::Gen::ObjectVisitor::emitOneShotConstructor(const ClassDefPtr& p)
H << ',' << nl;
}
string memberName = fixKwd((*q)->name());
- H << memberName << '(' << "__ice_" << (*q)->name() << ')';
+ H << memberName << '(' << "iceP_" << (*q)->name() << ')';
}
H.dec();
@@ -3491,7 +3498,7 @@ Slice::Gen::AsyncCallbackTemplateVisitor::generateOperation(const OperationPtr&
TypePtr ret = p->returnType();
string retS = inputTypeToString(ret, p->returnIsOptional(), p->getMetaData(), _useWstring);
- string retEndArg = getEndArg(ret, p->getMetaData(), "__ret");
+ string retEndArg = getEndArg(ret, p->getMetaData(), "ret");
ParamDeclList outParams;
vector<string> outArgs;
@@ -3592,10 +3599,10 @@ Slice::Gen::AsyncCallbackTemplateVisitor::generateOperation(const OperationPtr&
//
// completed.
//
- H << sp << nl << "virtual void completed(const ::Ice::AsyncResultPtr& __result) const";
+ H << sp << nl << "virtual void completed(const ::Ice::AsyncResultPtr& result) const";
H << sb;
- H << nl << clScope << clName << "Prx __proxy = " << clScope << clName
- << "Prx::uncheckedCast(__result->getProxy());";
+ H << nl << clScope << clName << "Prx proxy = " << clScope << clName
+ << "Prx::uncheckedCast(result->getProxy());";
writeAllocateCode(H, outParams, p, false, _useWstring | TypeContextInParam | TypeContextAMICallPrivateEnd);
H << nl << "try";
H << sb;
@@ -3606,23 +3613,23 @@ Slice::Gen::AsyncCallbackTemplateVisitor::generateOperation(const OperationPtr&
{
H << retEndArg << " = ";
}
- H << "__proxy->end_" << p->name() << spar << outEndArgs << "__result" << epar << ';';
+ H << "proxy->end_" << p->name() << spar << outEndArgs << "result" << epar << ';';
}
else
{
- H << "__proxy->___end_" << p->name() << spar << outEndArgs;
+ H << "proxy->_iceI_end_" << p->name() << spar << outEndArgs;
if(ret)
{
H << retEndArg;
}
- H << "__result" << epar << ';';
+ H << "result" << epar << ';';
}
writeEndCode(H, outParams, p);
H << eb;
H << nl << "catch(const ::Ice::Exception& ex)";
H << sb;
- H << nl << "" << baseD << "::exception(__result, ex);";
+ H << nl << "" << baseD << "::exception(result, ex);";
H << nl << "return;";
H << eb;
H << nl << "if(_response)";
@@ -3630,12 +3637,12 @@ Slice::Gen::AsyncCallbackTemplateVisitor::generateOperation(const OperationPtr&
H << nl << "(" << baseD << "::_callback.get()->*_response)" << spar;
if(ret)
{
- H << "__ret";
+ H << "ret";
}
H << outArgs;
if(withCookie)
{
- H << "CT::dynamicCast(__result->getCookie())";
+ H << "CT::dynamicCast(result->getCookie())";
}
H << epar << ';';
H << eb;
@@ -4082,10 +4089,8 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
vector<string> args;
vector<string> paramsInvoke;
- vector<string> paramsDeclInvoke;
paramsInvoke.push_back("const " + proxyName + "&");
- paramsDeclInvoke.push_back("const " + proxyName + "& __prx");
TypePtr ret = p->returnType();
string retS = inputTypeToString(ret, p->returnIsOptional(), p->getMetaData(), _useWstring);
@@ -4094,8 +4099,8 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
{
params.push_back(retS);
paramsAMD.push_back(inputTypeToString(ret, p->returnIsOptional(), p->getMetaData(), _useWstring));
- paramsDecl.push_back(retS + " __ret");
- args.push_back("__ret");
+ paramsDecl.push_back(retS + " ret");
+ args.push_back("ret");
}
ParamDeclList inParams;
@@ -4119,14 +4124,11 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
else
{
paramsInvoke.push_back(typeString);
- paramsDeclInvoke.push_back(typeString + ' ' + paramName);
-
inParams.push_back(*q);
}
}
paramsInvoke.push_back("const ::Ice::Context&");
- paramsDeclInvoke.push_back("const ::Ice::Context& __ctx");
if(cl->hasMetaData("amd") || p->hasMetaData("amd"))
{
@@ -4245,8 +4247,8 @@ Slice::Gen::AsyncImplVisitor::visitOperation(const OperationPtr& p)
params += retS;
paramsDecl += retS;
paramsDecl += ' ';
- paramsDecl += "__ret";
- args += "__ret";
+ paramsDecl += "ret";
+ args += "ret";
}
ParamDeclList outParams;
@@ -4303,11 +4305,11 @@ Slice::Gen::AsyncImplVisitor::visitOperation(const OperationPtr& p)
C << sb;
if(ret || !outParams.empty())
{
- C << nl << "::Ice::OutputStream* __os = startWriteParams();";
+ C << nl << "::Ice::OutputStream* ostr = startWriteParams();";
writeMarshalCode(C, outParams, p, false, TypeContextInParam);
if(p->returnsClasses(false))
{
- C << nl << "__os->writePendingValues();";
+ C << nl << "ostr->writePendingValues();";
}
C << nl << "endWriteParams();";
}
@@ -5134,11 +5136,11 @@ Slice::Gen::Cpp11DeclVisitor::visitClassDefStart(const ClassDefPtr& p)
C << sp;
C << nl << "const ::IceInternal::DefaultValueFactoryInit<" << fixKwd(p->scoped()) << "> ";
- C << p->flattenedScope() + p->name() + "_init" << "(\"" << p->scoped() << "\");";
+ C << "iceC" + p->flattenedScope() + p->name() + "_init" << "(\"" << p->scoped() << "\");";
if(p->compactId() >= 0)
{
- string n = p->flattenedScope() + p->name() + "_compactIdInit ";
+ string n = "iceC" + p->flattenedScope() + p->name() + "_compactIdInit ";
C << "const ::IceInternal::CompactIdInit " << n << "(\"" << p->scoped() << "\", " << p->compactId() << ");";
}
}
@@ -5158,7 +5160,7 @@ Slice::Gen::Cpp11DeclVisitor::visitClassDefStart(const ClassDefPtr& p)
ids.merge(other);
ids.unique();
- C << nl << "const ::std::string " << p->flattenedScope() << p->name() << "_ids[" << ids.size() << "] =";
+ C << nl << "const ::std::string iceC" << p->flattenedScope() << p->name() << "_ids[" << ids.size() << "] =";
C << sb;
for(StringList::const_iterator r = ids.begin(); r != ids.end();)
{
@@ -5179,7 +5181,7 @@ Slice::Gen::Cpp11DeclVisitor::visitClassDefStart(const ClassDefPtr& p)
allOpNames.sort();
allOpNames.unique();
- C << nl << "const ::std::string " << p->flattenedScope() << p->name() << "_ops[] =";
+ C << nl << "const ::std::string iceC" << p->flattenedScope() << p->name() << "_ops[] =";
C << sb;
for(StringList::const_iterator q = allOpNames.begin(); q != allOpNames.end();)
{
@@ -5205,7 +5207,7 @@ Slice::Gen::Cpp11DeclVisitor::visitExceptionStart(const ExceptionPtr& p)
C << sp;
C << nl << "const ::IceInternal::DefaultUserExceptionFactoryInit<" << fixKwd(p->scoped()) << "> ";
- C << p->flattenedScope() + p->name() + "_init" << "(\"" << p->scoped() << "\");";
+ C << "iceC" + p->flattenedScope() + p->name() + "_init" << "(\"" << p->scoped() << "\");";
return false;
}
@@ -5215,7 +5217,7 @@ Slice::Gen::Cpp11DeclVisitor::visitOperation(const OperationPtr& p)
ClassDefPtr cl = ClassDefPtr::dynamicCast(p->container());
if(cl && !cl->isLocal())
{
- string flatName = p->flattenedScope() + p->name() + "_name";
+ string flatName = "iceC" + p->flattenedScope() + p->name() + "_name";
C << nl << "const ::std::string " << flatName << " = \"" << p->name() << "\";";
}
}
@@ -5288,7 +5290,7 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
string typeName = inputTypeToString((*q)->type(), (*q)->optional(), (*q)->getMetaData(),
_useWstring | TypeContextCpp11);
allTypes.push_back(typeName);
- allParamDecls.push_back(typeName + " " + fixKwd("__ice_" + (*q)->name()));
+ allParamDecls.push_back(typeName + " iceP_" + (*q)->name());
}
if(base)
@@ -5296,7 +5298,7 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
baseDataMembers = base->allDataMembers();
for(DataMemberList::const_iterator q = baseDataMembers.begin(); q != baseDataMembers.end(); ++q)
{
- baseParams.push_back(fixKwd("__ice_" + (*q)->name()));
+ baseParams.push_back("iceP_" + (*q)->name());
}
}
@@ -5321,9 +5323,9 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
if(p->isLocal())
{
- H << sp << nl << name << "(const char* __ice_file, int __ice_line) : ";
+ H << sp << nl << name << "(const char* file_, int line_) : ";
H << "::Ice::LocalExceptionHelper" << "<" << templateParameters << ">";
- H << "(__ice_file, __ice_line)";
+ H << "(file_, line_)";
H << sb;
H << eb;
}
@@ -5337,7 +5339,7 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
H << sp << nl << name << "(";
if(p->isLocal())
{
- H << "const char* __ice_file, int __ice_line";
+ H << "const char* file_, int line_";
if(!allParamDecls.empty())
{
H << ", ";
@@ -5359,7 +5361,7 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
H << nl << "::" << helperClass << "<" << templateParameters << ">" << "(";
if(p->isLocal())
{
- H << "__ice_file, __ice_line";
+ H << "file_, line_";
if(!baseDataMembers.empty())
{
H << ", ";
@@ -5374,11 +5376,11 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
}
if(isMovable((*q)->type()))
{
- H << "::std::move(" << fixKwd("__ice_" + (*q)->name()) << ")";
+ H << "::std::move(iceP_" << (*q)->name() << ")";
}
else
{
- H << fixKwd("__ice_" + (*q)->name());
+ H << "iceP_" << (*q)->name();
}
}
@@ -5391,7 +5393,7 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
else if(p->isLocal())
{
H << " ::Ice::LocalExceptionHelper" << "<" << templateParameters << ">";
- H << "(__ice_file, __ice_line)";
+ H << "(file_, line_)";
if(!dataMembers.empty())
{
H << ",";
@@ -5406,11 +5408,11 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
}
if(isMovable((*q)->type()))
{
- H << nl << fixKwd((*q)->name()) << "(::std::move(" << fixKwd("__ice_" + (*q)->name()) << "))";
+ H << nl << fixKwd((*q)->name()) << "(::std::move(iceP_" << (*q)->name() << "))";
}
else
{
- H << nl << fixKwd((*q)->name()) << "(" << fixKwd("__ice_" + (*q)->name()) << ")";
+ H << nl << fixKwd((*q)->name()) << "(iceP_" << (*q)->name() << ")";
}
}
@@ -5444,10 +5446,10 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
{
if(!base || (base && !base->usesClasses(false)))
{
- H << sp << nl << _dllMemberExport << "virtual bool __usesClasses() const override;";
+ H << sp << nl << _dllMemberExport << "virtual bool _usesClasses() const override;";
C << sp << nl << "bool";
- C << nl << scoped.substr(2) << "::__usesClasses() const";
+ C << nl << scoped.substr(2) << "::_usesClasses() const";
C << sb;
C << nl << "return true;";
C << eb;
@@ -5477,23 +5479,23 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(preserved && !basePreserved)
{
- H << sp << nl << _dllMemberExport << "virtual void __write(::Ice::OutputStream*) const override;";
- H << nl << _dllMemberExport << "virtual void __read(::Ice::InputStream*) override;";
+ H << sp << nl << _dllMemberExport << "virtual void _write(::Ice::OutputStream*) const override;";
+ H << nl << _dllMemberExport << "virtual void _read(::Ice::InputStream*) override;";
- H << sp << nl << "::std::shared_ptr<::Ice::SlicedData> __slicedData;";
+ H << sp << nl << "::std::shared_ptr<::Ice::SlicedData> _slicedData;";
- C << sp << nl << "void" << nl << scoped.substr(2) << "::__write(::Ice::OutputStream* __os) const";
+ C << sp << nl << "void" << nl << scoped.substr(2) << "::_write(::Ice::OutputStream* ostr) const";
C << sb;
- C << nl << "__os->startException(__slicedData);";
- C << nl << "__writeImpl(__os);";
- C << nl << "__os->endException();";
+ C << nl << "ostr->startException(_slicedData);";
+ C << nl << "_writeImpl(ostr);";
+ C << nl << "ostr->endException();";
C << eb;
- C << sp << nl << "void" << nl << scoped.substr(2) << "::__read(::Ice::InputStream* __is)";
+ C << sp << nl << "void" << nl << scoped.substr(2) << "::_read(::Ice::InputStream* istr)";
C << sb;
- C << nl << "__is->startException();";
- C << nl << "__readImpl(__is);";
- C << nl << "__slicedData = __is->endException(true);";
+ C << nl << "istr->startException();";
+ C << nl << "_readImpl(istr);";
+ C << nl << "_slicedData = istr->endException(true);";
C << eb;
}
}
@@ -5509,7 +5511,7 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(!_doneStaticSymbol)
{
_doneStaticSymbol = true;
- H << sp << nl << "static " << name << " __" << p->name() << "_init;";
+ H << sp << nl << "static " << name << " _iceS_" << p->name() << "_init;";
}
}
@@ -5715,7 +5717,7 @@ Slice::Gen::Cpp11ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
H << sp << nl << prx << "() = default;";
H << nl << "friend ::std::shared_ptr<" << prx << "> IceInternal::createProxy<" << prx << ">();";
H << sp;
- H << nl << _dllMemberExport << "virtual ::std::shared_ptr<::Ice::ObjectPrx> __newInstance() const override;";
+ H << nl << _dllMemberExport << "virtual ::std::shared_ptr<::Ice::ObjectPrx> _newInstance() const override;";
H << eb << ';';
string suffix = p->isInterface() ? "" : "Disp";
@@ -5723,7 +5725,7 @@ Slice::Gen::Cpp11ProxyVisitor::visitClassDefEnd(const ClassDefPtr& p)
C << sp;
C << nl << "::std::shared_ptr<::Ice::ObjectPrx>";
- C << nl << scoped.substr(2) << "::__newInstance() const";
+ C << nl << scoped.substr(2) << "::_newInstance() const";
C << sb;
C << nl << "return ::IceInternal::createProxy<" << prx << ">();";
C << eb;
@@ -5740,7 +5742,7 @@ void
Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
{
string name = p->name();
- string flatName = p->flattenedScope() + p->name() + "_name";
+ string flatName = "iceC" + p->flattenedScope() + p->name() + "_name";
TypePtr ret = p->returnType();
@@ -5839,7 +5841,7 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
// Synchronous operation
//
H << sp << nl << deprecateSymbol << retS << ' ' << fixKwd(name) << spar << paramsDecl;
- H << "const ::Ice::Context& __ctx = Ice::noExplicitContext" << epar;
+ H << "const ::Ice::Context& context = Ice::noExplicitContext" << epar;
H << sb;
H << nl;
if(futureOutParams.size() == 1)
@@ -5855,27 +5857,27 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
}
else if(futureOutParams.size() > 1)
{
- H << "auto __result = ";
+ H << "auto result = ";
}
- H << "makePromiseOutgoing<" << futureT << ">";
+ H << "_makePromiseOutgoing<" << futureT << ">";
- H << spar << "true, this" << string("&" + scoped + "__" + name);
+ H << spar << "true, this" << string("&" + scoped + "_iceI_" + name);
for(ParamDeclList::const_iterator q = inParams.begin(); q != inParams.end(); ++q)
{
H << fixKwd(paramPrefix + (*q)->name());
}
- H << "__ctx" << epar << ".get();";
+ H << "context" << epar << ".get();";
if(futureOutParams.size() > 1)
{
for(ParamDeclList::const_iterator q = outParams.begin(); q != outParams.end(); ++q)
{
H << nl << paramPrefix << (*q)->name() << " = ";
- H << condMove(isMovable((*q)->type()), "__result." + fixKwd((*q)->name())) + ";";
+ H << condMove(isMovable((*q)->type()), "result." + fixKwd((*q)->name())) + ";";
}
if(ret)
{
- H << nl << "return " + condMove(isMovable(ret), "__result." + returnValueS) + ";";
+ H << nl << "return " + condMove(isMovable(ret), "result." + returnValueS) + ";";
}
}
H << eb;
@@ -5886,20 +5888,20 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
H << sp;
H << nl << "template<template<typename> class P = ::std::promise>";
H << nl << deprecateSymbol << "auto " << name << "Async" << spar << inParamsDecl;
- H << "const ::Ice::Context& __ctx = Ice::noExplicitContext" << epar;
+ H << "const ::Ice::Context& context = Ice::noExplicitContext" << epar;
H.inc();
H << nl << "-> decltype(::std::declval<P<" << futureT << ">>().get_future())";
H.dec();
H << sb;
- H << nl << "return makePromiseOutgoing<" << futureT << ", P>" << spar;
+ H << nl << "return _makePromiseOutgoing<" << futureT << ", P>" << spar;
- H << "false, this" << string("&" + scoped + "__" + name);
+ H << "false, this" << string("&" + scoped + "_iceI_" + name);
for(ParamDeclList::const_iterator q = inParams.begin(); q != inParams.end(); ++q)
{
H << fixKwd(paramPrefix + (*q)->name());
}
- H << "__ctx" << epar << ";";
+ H << "context" << epar << ";";
H << eb;
@@ -5937,13 +5939,13 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
}
H << "::std::function<void" << spar << lambdaOutParams << epar << ">"
- + condString(!lambdaCustomOut, " __response") + ",";
+ + condString(!lambdaCustomOut, " response") + ",";
H << nl << "::std::function<void(::std::exception_ptr)>"
- + condString(!lambdaCustomOut, " __ex") + " = nullptr,";
+ + condString(!lambdaCustomOut, " ex") + " = nullptr,";
H << nl << "::std::function<void(bool)>"
- + condString(!lambdaCustomOut," __sent") + " = nullptr,";
+ + condString(!lambdaCustomOut," sent") + " = nullptr,";
H << nl << "const ::Ice::Context&"
- + condString(!lambdaCustomOut, "__ctx") + " = Ice::noExplicitContext)" + condString(lambdaCustomOut, ";");
+ + condString(!lambdaCustomOut, " context") + " = Ice::noExplicitContext)" + condString(lambdaCustomOut, ";");
H.restoreIndent();
if(lambdaCustomOut)
@@ -5964,36 +5966,36 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
}
C << nl;
}
- C << "::std::function<void " << spar << lambdaOutParams << epar << "> __response,";
- C << nl << "::std::function<void(::std::exception_ptr)> __ex,";
- C << nl << "::std::function<void(bool)> __sent,";
- C << nl << "const ::Ice::Context& __ctx)";
+ C << "::std::function<void " << spar << lambdaOutParams << epar << "> response,";
+ C << nl << "::std::function<void(::std::exception_ptr)> ex,";
+ C << nl << "::std::function<void(bool)> sent,";
+ C << nl << "const ::Ice::Context& context)";
C.restoreIndent();
C << sb;
if(p->returnsData())
{
- C << nl << "__checkTwowayOnly(" << flatName << ");";
+ C << nl << "_checkTwowayOnly(" << flatName << ");";
}
- C << nl << "::std::function<void(::Ice::InputStream*)> __read;";
- C << nl << "if(__response)";
+ C << nl << "::std::function<void(::Ice::InputStream*)> read;";
+ C << nl << "if(response)";
C << sb;
- C << nl << "__read = [__response](::Ice::InputStream* __is)";
+ C << nl << "read = [response](::Ice::InputStream* istr)";
C << sb;
- C << nl << "__is->startEncapsulation();";
+ C << nl << "istr->startEncapsulation();";
writeAllocateCode(C, outParams, p, true, _useWstring | TypeContextInParam | TypeContextCpp11);
writeUnmarshalCode(C, outParams, p, true, _useWstring | TypeContextInParam | TypeContextCpp11);
if(p->returnsClasses(false))
{
- C << nl << "__is->readPendingValues();";
+ C << nl << "istr->readPendingValues();";
}
- C << nl << "__is->endEncapsulation();";
+ C << nl << "istr->endEncapsulation();";
C << nl << "try" << sb;
- C << nl << "__response" << spar;
+ C << nl << "response" << spar;
if(ret)
{
- C << "__ret";
+ C << "ret";
}
for(ParamDeclList::const_iterator q = outParams.begin(); q != outParams.end(); ++q)
{
@@ -6007,12 +6009,12 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
C << eb;
C << eb << ";";
C << eb;
- C << nl << "auto __outAsync = ::std::make_shared<::IceInternal::CustomLambdaOutgoing>(";
- C << "shared_from_this(), __read, __ex, __sent);";
+ C << nl << "auto outAsync = ::std::make_shared<::IceInternal::CustomLambdaOutgoing>(";
+ C << "shared_from_this(), read, ex, sent);";
C << sp;
- C << nl << "__outAsync->invoke(" << flatName << ", ";
- C << operationModeToString(p->sendMode(), true) << ", " << opFormatTypeToString(p) << ", __ctx, ";
+ C << nl << "outAsync->invoke(" << flatName << ", ";
+ C << operationModeToString(p->sendMode(), true) << ", " << opFormatTypeToString(p) << ", context, ";
C.inc();
C << nl;
@@ -6022,7 +6024,7 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
C.dec();
C << ");";
- C << nl << "return [__outAsync]() { __outAsync->cancel(); };";
+ C << nl << "return [outAsync]() { outAsync->cancel(); };";
C << eb;
}
else
@@ -6034,9 +6036,9 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
H << sb;
if(futureOutParams.size() > 1)
{
- H << nl << "auto __responseCb = [__response](" << futureT << "&& result)";
+ H << nl << "auto responseCb = [response](" << futureT << "&& result)";
H << sb;
- H << nl << "__response" << spar;
+ H << nl << "response" << spar;
if(ret)
{
@@ -6049,15 +6051,15 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
H << epar << ";" << eb << ";";
}
- H << nl << "return makeLambdaOutgoing<" << futureT << ">" << spar;
+ H << nl << "return _makeLamdaOutgoing<" << futureT << ">" << spar;
- H << (futureOutParams.size() > 1 ? "__responseCb" : "__response") << "__ex" << "__sent" << "this";
- H << string("&" + scoped + "__" + name);
+ H << (futureOutParams.size() > 1 ? "responseCb" : "response") << "ex" << "sent" << "this";
+ H << string("&" + scoped + "_iceI_" + name);
for(ParamDeclList::const_iterator q = inParams.begin(); q != inParams.end(); ++q)
{
H << fixKwd(paramPrefix + (*q)->name());
}
- H << "__ctx" << epar << ";";
+ H << "context" << epar << ";";
H << eb;
}
@@ -6066,24 +6068,24 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
//
H << sp;
- H << nl << _dllMemberExport << "void __" << name << spar;
+ H << nl << _dllMemberExport << "void _iceI_" << name << spar;
H << "const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<" + futureT + ">>&";
H << inParamsS;
H << "const ::Ice::Context&";
H << epar << ";";
C << sp;
- C << nl << "void" << nl << scoped << "__" << name << spar;
- C << "const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<" + futureT + ">>& __outAsync";
- C << inParamsDecl << "const ::Ice::Context& __ctx";
+ C << nl << "void" << nl << scoped << "_iceI_" << name << spar;
+ C << "const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<" + futureT + ">>& outAsync";
+ C << inParamsDecl << "const ::Ice::Context& context";
C << epar;
C << sb;
if(p->returnsData())
{
- C << nl << "__checkTwowayOnly(" << flatName << ");";
+ C << nl << "_checkTwowayOnly(" << flatName << ");";
}
- C << nl << "__outAsync->invoke(" << flatName << ", ";
- C << operationModeToString(p->sendMode(), true) << ", " << opFormatTypeToString(p) << ", __ctx, ";
+ C << nl << "outAsync->invoke(" << flatName << ", ";
+ C << operationModeToString(p->sendMode(), true) << ", " << opFormatTypeToString(p) << ", context, ";
C.inc();
C << nl;
@@ -6098,14 +6100,14 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
// only one, we rely on the default read method from LambdaOutgoing
// except if the unique ret/out is optional or is an array/range.
//
- C << "," << nl << "[](::Ice::InputStream* __is)";
+ C << "," << nl << "[](::Ice::InputStream* istr)";
C << sb;
C << nl << futureT << " v;";
- writeUnmarshalCode(C, outParams, p, false, _useWstring | TypeContextCpp11, returnValueS, "v");
+ writeUnmarshalCode(C, outParams, p, false, _useWstring | TypeContextCpp11, "", returnValueS, "v");
if(p->returnsClasses(false))
{
- C << nl << "__is->readPendingValues();";
+ C << nl << "istr->readPendingValues();";
}
C << nl << "return v;";
C << eb;
@@ -6117,7 +6119,7 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
// a read method, we can't rely on the default read method which wouldn't
// known which tag to use.
//
- C << "," << nl << "[](::Ice::InputStream* __is)";
+ C << "," << nl << "[](::Ice::InputStream* istr)";
C << sb;
writeAllocateCode(C, outParams, p, true, _useWstring | TypeContextCpp11);
@@ -6125,12 +6127,12 @@ Slice::Gen::Cpp11ProxyVisitor::visitOperation(const OperationPtr& p)
if(p->returnsClasses(false))
{
- C << nl << "__is->readPendingValues();";
+ C << nl << "istr->readPendingValues();";
}
if(ret)
{
- C << nl << "return __ret;";
+ C << nl << "return ret;";
}
else
{
@@ -6356,7 +6358,7 @@ Slice::Gen::Cpp11LocalObjectVisitor::visitClassDefStart(const ClassDefPtr& p)
{
string typeName = inputTypeToString((*q)->type(), (*q)->optional(), (*q)->getMetaData(), _useWstring);
allTypes.push_back(typeName);
- allParamDecls.push_back(typeName + " __ice_" + (*q)->name());
+ allParamDecls.push_back(typeName + " iceP_" + (*q)->name());
}
if(!p->isInterface())
@@ -6569,7 +6571,7 @@ Slice::Gen::Cpp11LocalObjectVisitor::visitOperation(const OperationPtr& p)
H.dec();
H << sb;
H << nl << "using Promise = P<bool>;";
- H << nl << "auto __promise = ::std::make_shared<Promise>();";
+ H << nl << "auto promise = ::std::make_shared<Promise>();";
H << nl << name << "Async(";
H.useCurrentPosAsIndent();
@@ -6581,17 +6583,17 @@ Slice::Gen::Cpp11LocalObjectVisitor::visitOperation(const OperationPtr& p)
{
H << nl;
}
- H << "[__promise](::std::exception_ptr __ex)";
+ H << "[promise](::std::exception_ptr ex)";
H << sb;
- H << nl << "__promise->set_exception(::std::move(__ex));";
+ H << nl << "promise->set_exception(::std::move(ex));";
H << eb << ",";
- H << nl << "[__promise](bool __b)";
+ H << nl << "[promise](bool b)";
H << sb;
- H << nl << "__promise->set_value(__b);";
+ H << nl << "promise->set_value(b);";
H << eb << ");";
H.restoreIndent();
- H << nl << "return __promise->get_future();";
+ H << nl << "return promise->get_future();";
H << eb;
}
}
@@ -6707,7 +6709,7 @@ Slice::Gen::Cpp11InterfaceVisitor::visitClassDefStart(const ClassDefPtr& p)
H << nl << "virtual ::std::string ice_id(const ::Ice::Current& = ::Ice::noExplicitCurrent) const override;";
H << sp << nl << "static const ::std::string& ice_staticId();";
- string flatName = p->flattenedScope() + p->name() + "_ids";
+ string flatName = "iceC" + p->flattenedScope() + p->name() + "_ids";
C << sp;
C << nl << "bool" << nl << scoped.substr(2) << "::ice_isA(::std::string _s, const ::Ice::Current&) const";
@@ -6766,21 +6768,21 @@ Slice::Gen::Cpp11InterfaceVisitor::visitClassDefEnd(const ClassDefPtr& p)
allOpNames.sort();
allOpNames.unique();
- string flatName = p->flattenedScope() + p->name() + "_ops";
+ string flatName = "iceC" + p->flattenedScope() + p->name() + "_ops";
H << sp;
- H << nl << "virtual bool __dispatch(::IceInternal::Incoming&, const ::Ice::Current&) override;";
+ H << nl << "virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&) override;";
C << sp;
C << nl << "bool";
- C << nl << scoped.substr(2) << "::__dispatch(::IceInternal::Incoming& in, const ::Ice::Current& c)";
+ C << nl << scoped.substr(2) << "::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)";
C << sb;
- C << nl << "::std::pair< const ::std::string*, const ::std::string*> r = "
- << "::std::equal_range(" << flatName << ", " << flatName << " + " << allOpNames.size() << ", c.operation);";
+ C << nl << "::std::pair<const ::std::string*, const ::std::string*> r = "
+ << "::std::equal_range(" << flatName << ", " << flatName << " + " << allOpNames.size() << ", current.operation);";
C << nl << "if(r.first == r.second)";
C << sb;
- C << nl << "throw ::Ice::OperationNotExistException(__FILE__, __LINE__, c.id, c.facet, c.operation);";
+ C << nl << "throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);";
C << eb;
C << sp;
C << nl << "switch(r.first - " << flatName << ')';
@@ -6790,13 +6792,13 @@ Slice::Gen::Cpp11InterfaceVisitor::visitClassDefEnd(const ClassDefPtr& p)
{
C << nl << "case " << i++ << ':';
C << sb;
- C << nl << "return ___" << *q << "(in, c);";
+ C << nl << "return _iceD_" << *q << "(in, current);";
C << eb;
}
C << nl << "default:";
C << sb;
C << nl << "assert(false);";
- C << nl << "throw ::Ice::OperationNotExistException(__FILE__, __LINE__, c.id, c.facet, c.operation);";
+ C << nl << "throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);";
C << eb;
C << eb;
C << eb;
@@ -6851,7 +6853,7 @@ Slice::Gen::Cpp11InterfaceVisitor::visitOperation(const OperationPtr& p)
{
string typeS = inputTypeToString(ret, p->returnIsOptional(), p->getMetaData(), _useWstring | TypeContextCpp11);
responseParams.push_back(typeS);
- responseParamsDecl.push_back(typeS + " __ret");
+ responseParamsDecl.push_back(typeS + " ret");
}
string retS;
@@ -6904,18 +6906,18 @@ Slice::Gen::Cpp11InterfaceVisitor::visitOperation(const OperationPtr& p)
{
string resultName = resultStructName(name, "", true);
params.push_back("::std::function<void(const " + resultName + "&)>");
- args.push_back("inS->response<" + resultName + ">()");
+ args.push_back("inA->response<" + resultName + ">()");
}
else
{
params.push_back("::std::function<void(" + joinString(responseParams, ",") + ")>");
- args.push_back(ret || !outParams.empty() ? "__responseCB" : "inS->response()");
+ args.push_back(ret || !outParams.empty() ? "responseCB" : "inA->response()");
}
params.push_back("::std::function<void(::std::exception_ptr)>");
- args.push_back("inS->exception()");
+ args.push_back("inA->exception()");
}
params.push_back("const ::Ice::Current& = ::Ice::noExplicitCurrent");
- args.push_back("__current");
+ args.push_back("current");
if(cl->isInterface())
{
@@ -6935,18 +6937,18 @@ Slice::Gen::Cpp11InterfaceVisitor::visitOperation(const OperationPtr& p)
H << eb << ';';
C << sp << nl << scope.substr(2) << resultName << "::" << resultName;
- C << spar << responseParamsDecl << "const ::Ice::Current& __current" << epar << ":";
+ C << spar << responseParamsDecl << "const ::Ice::Current& current" << epar << ":";
C.inc();
- C << nl << "MarshaledResult(__current)";
+ C << nl << "MarshaledResult(current)";
C.dec();
C << sb;
- C << nl << "__os->startEncapsulation(__current.encoding, " << opFormatTypeToString(p) << ");";
- writeMarshalCode(C, outParams, p, true, TypeContextCpp11);
+ C << nl << "ostr->startEncapsulation(current.encoding, " << opFormatTypeToString(p) << ");";
+ writeMarshalCode(C, outParams, p, true, TypeContextCpp11, "ostr");
if(p->returnsClasses(false))
{
- C << nl << "__os->writePendingValues();";
+ C << nl << "ostr->writePendingValues();";
}
- C << nl << "__os->endEncapsulation();";
+ C << nl << "ostr->endEncapsulation();";
C << eb;
}
@@ -6957,33 +6959,33 @@ Slice::Gen::Cpp11InterfaceVisitor::visitOperation(const OperationPtr& p)
H << sp;
H << nl << deprecateSymbol << "virtual " << retS << ' ' << opName << spar << params << epar << isConst << " = 0;";
- H << nl << "bool ___" << name << "(::IceInternal::Incoming&, const ::Ice::Current&)" << isConst << ';';
+ H << nl << "bool _iceD_" << name << "(::IceInternal::Incoming&, const ::Ice::Current&)" << isConst << ';';
C << sp;
C << nl << "bool";
C << nl << scope.substr(2);
- C << "___" << name << "(::IceInternal::Incoming& __inS" << ", const ::Ice::Current& __current)" << isConst;
+ C << "_iceD_" << name << "(::IceInternal::Incoming& inS" << ", const ::Ice::Current& current)" << isConst;
C << sb;
- C << nl << "__checkMode(" << operationModeToString(p->mode(), true) << ", __current.mode);";
+ C << nl << "_iceCheckMode(" << operationModeToString(p->mode(), true) << ", current.mode);";
if(!inParams.empty())
{
- C << nl << "auto __is = __inS.startReadParams();";
+ C << nl << "auto istr = inS.startReadParams();";
writeAllocateCode(C, inParams, 0, true, _useWstring | TypeContextInParam | TypeContextCpp11);
writeUnmarshalCode(C, inParams, 0, true, _useWstring | TypeContextInParam | TypeContextCpp11);
if(p->sendsClasses(false))
{
- C << nl << "__is->readPendingValues();";
+ C << nl << "istr->readPendingValues();";
}
- C << nl << "__inS.endReadParams();";
+ C << nl << "inS.endReadParams();";
}
else
{
- C << nl << "__inS.readEmptyParams();";
+ C << nl << "inS.readEmptyParams();";
}
if(p->format() != DefaultFormat)
{
- C << nl << "__inS.setFormat(" << opFormatTypeToString(p) << ");";
+ C << nl << "inS.setFormat(" << opFormatTypeToString(p) << ");";
}
if(!amd)
@@ -6991,11 +6993,11 @@ Slice::Gen::Cpp11InterfaceVisitor::visitOperation(const OperationPtr& p)
writeAllocateCode(C, outParams, 0, true, _useWstring | TypeContextCpp11);
if(p->hasMarshaledResult())
{
- C << nl << "__inS.setMarshaledResult(";
+ C << nl << "inS.setMarshaledResult(";
}
else if(ret)
{
- C << nl << retS << " __ret = ";
+ C << nl << retS << " ret = ";
}
else
{
@@ -7012,36 +7014,36 @@ Slice::Gen::Cpp11InterfaceVisitor::visitOperation(const OperationPtr& p)
C << ";";
if(ret || !outParams.empty())
{
- C << nl << "auto __os = __inS.startWriteParams();";
+ C << nl << "auto ostr = inS.startWriteParams();";
writeMarshalCode(C, outParams, p, true, TypeContextCpp11);
if(p->returnsClasses(false))
{
- C << nl << "__os->writePendingValues();";
+ C << nl << "ostr->writePendingValues();";
}
- C << nl << "__inS.endWriteParams();";
+ C << nl << "inS.endWriteParams();";
}
else
{
- C << nl << "__inS.writeEmptyParams();";
+ C << nl << "inS.writeEmptyParams();";
}
}
C << nl << "return false;";
}
else
{
- C << nl << "auto inS = ::IceInternal::IncomingAsync::create(__inS);";
+ C << nl << "auto inA = ::IceInternal::IncomingAsync::create(inS);";
if(!p->hasMarshaledResult() && (ret || !outParams.empty()))
{
- C << nl << "auto __responseCB = [inS]" << spar << responseParamsDecl << epar;
+ C << nl << "auto responseCB = [inA]" << spar << responseParamsDecl << epar;
C << sb;
- C << nl << "auto __os = inS->startWriteParams();";
+ C << nl << "auto ostr = inA->startWriteParams();";
writeMarshalCode(C, outParams, p, true, TypeContextCpp11);
if(p->returnsClasses(false))
{
- C << nl << "__os->writePendingValues();";
+ C << nl << "ostr->writePendingValues();";
}
- C << nl << "inS->endWriteParams();";
- C << nl << "inS->completed();";
+ C << nl << "inA->endWriteParams();";
+ C << nl << "inA->completed();";
C << eb << ';';
}
C << nl << opName << spar << args << epar << ';';
@@ -7159,23 +7161,23 @@ Slice::Gen::Cpp11ValueVisitor::visitClassDefEnd(const ClassDefPtr& p)
if(preserved && !basePreserved)
{
H << sp;
- H << nl << "virtual void __write(::Ice::OutputStream*) const override;";
- H << nl << "virtual void __read(::Ice::InputStream*) override;";
+ H << nl << "virtual void _iceWrite(::Ice::OutputStream*) const override;";
+ H << nl << "virtual void _iceRead(::Ice::InputStream*) override;";
C << sp;
- C << nl << "void" << nl << scoped.substr(2) << "::__write(::Ice::OutputStream* __os) const";
+ C << nl << "void" << nl << scoped.substr(2) << "::_iceWrite(::Ice::OutputStream* ostr) const";
C << sb;
- C << nl << "__os->startValue(__slicedData);";
- C << nl << "__writeImpl(__os);";
- C << nl << "__os->endValue();";
+ C << nl << "ostr->startValue(_iceSlicedData);";
+ C << nl << "_iceWriteImpl(ostr);";
+ C << nl << "ostr->endValue();";
C << eb;
C << sp;
- C << nl << "void" << nl << scoped.substr(2) << "::__read(::Ice::InputStream* __is)";
+ C << nl << "void" << nl << scoped.substr(2) << "::_iceRead(::Ice::InputStream* istr)";
C << sb;
- C << nl << "__is->startValue();";
- C << nl << "__readImpl(__is);";
- C << nl << "__slicedData = __is->endValue(true);";
+ C << nl << "istr->startValue();";
+ C << nl << "_iceReadImpl(istr);";
+ C << nl << "_iceSlicedData = istr->endValue(true);";
C << eb;
}
@@ -7242,7 +7244,7 @@ Slice::Gen::Cpp11ValueVisitor::visitClassDefEnd(const ClassDefPtr& p)
H.inc();
inProtected = true;
}
- H << sp << nl << "::std::shared_ptr<::Ice::SlicedData> __slicedData;";
+ H << sp << nl << "::std::shared_ptr<::Ice::SlicedData> _iceSlicedData;";
}
if(generateFriend)
@@ -7272,7 +7274,7 @@ Slice::Gen::Cpp11ValueVisitor::visitClassDefEnd(const ClassDefPtr& p)
// all of the globals in a compilation unit.
//
_doneStaticSymbol = true;
- H << sp << nl << "static " << fixKwd(p->name()) << " _" << p->name() << "_init;";
+ H << sp << nl << "static " << fixKwd(p->name()) << " _iceS_" << p->name() << "_init;";
}
_useWstring = resetUseWstring(_useWstringHist);
@@ -7314,11 +7316,11 @@ Slice::Gen::Cpp11ObjectVisitor::emitVirtualBaseInitializers(const ClassDefPtr& d
}
if(isMovable((*q)->type()))
{
- upcall += "::std::move(__ice_" + (*q)->name() + ")";
+ upcall += "::std::move(iceP_" + (*q)->name() + ")";
}
else
{
- upcall += "__ice_" + (*q)->name();
+ upcall += "iceP_" + (*q)->name();
}
}
upcall += ")";
@@ -7349,7 +7351,7 @@ Slice::Gen::Cpp11ObjectVisitor::emitOneShotConstructor(const ClassDefPtr& p)
{
string typeName = inputTypeToString((*q)->type(), (*q)->optional(), (*q)->getMetaData(),
_useWstring | TypeContextCpp11);
- allParamDecls.push_back(typeName + " __ice_" + (*q)->name());
+ allParamDecls.push_back(typeName + " iceP_" + (*q)->name());
}
H << sp << nl;
@@ -7387,11 +7389,11 @@ Slice::Gen::Cpp11ObjectVisitor::emitOneShotConstructor(const ClassDefPtr& p)
string memberName = fixKwd((*q)->name());
if(isMovable((*q)->type()))
{
- H << memberName << "(::std::move(" << "__ice_" << (*q)->name() << "))";
+ H << memberName << "(::std::move(iceP_" << (*q)->name() << "))";
}
else
{
- H << memberName << '(' << "__ice_" << (*q)->name() << ')';
+ H << memberName << "(iceP_" << (*q)->name() << ')';
}
}
@@ -7463,7 +7465,7 @@ Slice::Gen::Cpp11StreamVisitor::visitStructStart(const StructPtr& p)
string scoped = fixKwd(p->scoped());
H << nl << "template<>";
- H << nl << "struct StreamableTraits< " << scoped << ">";
+ H << nl << "struct StreamableTraits<" << scoped << ">";
H << sb;
H << nl << "static const StreamHelperCategory helper = StreamHelperCategoryStruct;";
H << nl << "static const int minWireSize = " << p->minWireSize() << ";";
@@ -7756,7 +7758,7 @@ Slice::Gen::Cpp11ImplVisitor::visitClassDefStart(const ClassDefPtr& p)
string typeS = inputTypeToString(ret, op->returnIsOptional(), op->getMetaData(),
_useWstring | TypeContextCpp11);
responseParams = typeS;
- responseParamsDecl = typeS + " __ret";
+ responseParamsDecl = typeS + " ret";
if(!outParams.empty())
{
responseParams += ", ";