[openrtm-commit:01223] r2418 - branches/work_ForDoil/OpenRTM-aist/src/lib/doil/ice/tests/IceManager
openrtm @ openrtm.org
openrtm @ openrtm.org
2014年 2月 8日 (土) 11:27:31 JST
Author: win-ei
Date: 2014-02-08 11:27:31 +0900 (Sat, 08 Feb 2014)
New Revision: 2418
Modified:
branches/work_ForDoil/OpenRTM-aist/src/lib/doil/ice/tests/IceManager/EchoSample.cpp
branches/work_ForDoil/OpenRTM-aist/src/lib/doil/ice/tests/IceManager/EchoSample.h
Log:
Changed for Ice version 3.4.2.
Modified: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/ice/tests/IceManager/EchoSample.cpp
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/ice/tests/IceManager/EchoSample.cpp 2014-02-06 14:33:10 UTC (rev 2417)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/ice/tests/IceManager/EchoSample.cpp 2014-02-08 02:27:31 UTC (rev 2418)
@@ -1,68 +1,47 @@
// **********************************************************************
//
-// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
-
-// Ice version 3.2.1
+//
+// Ice version 3.4.2
+//
+// <auto-generated>
+//
// Generated from file `EchoSample.ice'
+//
+// Warning: do not edit this file.
+//
+// </auto-generated>
+//
#include <EchoSample.h>
#include <Ice/LocalException.h>
#include <Ice/ObjectFactory.h>
#include <Ice/BasicStream.h>
-#include <Ice/Object.h>
#include <IceUtil/Iterator.h>
-#include <IceUtil/ScopedArray.h>
#ifndef ICE_IGNORE_VERSION
-# if ICE_INT_VERSION / 100 != 302
+# if ICE_INT_VERSION / 100 != 304
# error Ice version mismatch!
# endif
# if ICE_INT_VERSION % 100 > 50
# error Beta header file detected
# endif
-# if ICE_INT_VERSION % 100 < 1
+# if ICE_INT_VERSION % 100 < 2
# error Ice patch level mismatch!
# endif
#endif
static const ::std::string __Demo__EchoSample__echo_name = "echo";
-void
-IceInternal::incRef(::Demo::EchoSample* p)
-{
- p->__incRef();
-}
+::Ice::Object* IceInternal::upCast(::Demo::EchoSample* p) { return p; }
+::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy::Demo::EchoSample* p) { return p; }
void
-IceInternal::decRef(::Demo::EchoSample* p)
-{
- p->__decRef();
-}
-
-void
-IceInternal::incRef(::IceProxy::Demo::EchoSample* p)
-{
- p->__incRef();
-}
-
-void
-IceInternal::decRef(::IceProxy::Demo::EchoSample* p)
-{
- p->__decRef();
-}
-
-void
-Demo::__write(::IceInternal::BasicStream* __os, const ::Demo::EchoSamplePrx& v)
-{
- __os->write(::Ice::ObjectPrx(v));
-}
-
-void
Demo::__read(::IceInternal::BasicStream* __is, ::Demo::EchoSamplePrx& v)
{
::Ice::ObjectPrx proxy;
@@ -79,36 +58,6 @@
}
void
-Demo::__write(::IceInternal::BasicStream* __os, const ::Demo::EchoSamplePtr& v)
-{
- __os->write(::Ice::ObjectPtr(v));
-}
-
-void
-Demo::__addObject(const EchoSamplePtr& p, ::IceInternal::GCCountMap& c)
-{
- p->__addObject(c);
-}
-
-bool
-Demo::__usesClasses(const EchoSamplePtr& p)
-{
- return p->__usesClasses();
-}
-
-void
-Demo::__decRefUnsafe(const EchoSamplePtr& p)
-{
- p->__decRefUnsafe();
-}
-
-void
-Demo::__clearHandleUnsafe(EchoSamplePtr& p)
-{
- p.__clearHandleUnsafe();
-}
-
-void
IceProxy::Demo::EchoSample::echo(const ::std::string& msg, const ::Ice::Context* __ctx)
{
int __cnt = 0;
@@ -117,7 +66,7 @@
::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase;
try
{
- __delBase = __getDelegate();
+ __delBase = __getDelegate(false);
::IceDelegate::Demo::EchoSample* __del = dynamic_cast< ::IceDelegate::Demo::EchoSample*>(__delBase.get());
__del->echo(msg, __ctx);
return;
@@ -128,11 +77,36 @@
}
catch(const ::Ice::LocalException& __ex)
{
- __handleException(__delBase, __ex, __cnt);
+ __handleException(__delBase, __ex, true, __cnt);
}
}
}
+::Ice::AsyncResultPtr
+IceProxy::Demo::EchoSample::begin_echo(const ::std::string& msg, const ::Ice::Context* __ctx, const ::IceInternal::CallbackBasePtr& __del, const ::Ice::LocalObjectPtr& __cookie)
+{
+ ::IceInternal::OutgoingAsyncPtr __result = new ::IceInternal::OutgoingAsync(this, __Demo__EchoSample__echo_name, __del, __cookie);
+ try
+ {
+ __result->__prepare(__Demo__EchoSample__echo_name, ::Ice::Normal, __ctx);
+ ::IceInternal::BasicStream* __os = __result->__getOs();
+ __os->write(msg);
+ __os->endWriteEncaps();
+ __result->__send(true);
+ }
+ catch(const ::Ice::LocalException& __ex)
+ {
+ __result->__exceptionAsync(__ex);
+ }
+ return __result;
+}
+
+void
+IceProxy::Demo::EchoSample::end_echo(const ::Ice::AsyncResultPtr& __result)
+{
+ __end(__result, __Demo__EchoSample__echo_name);
+}
+
const ::std::string&
IceProxy::Demo::EchoSample::ice_staticId()
{
@@ -151,46 +125,16 @@
return ::IceInternal::Handle< ::IceDelegateD::Ice::Object>(new ::IceDelegateD::Demo::EchoSample);
}
-bool
-IceProxy::Demo::operator==(const ::IceProxy::Demo::EchoSample& l, const ::IceProxy::Demo::EchoSample& r)
+::IceProxy::Ice::Object*
+IceProxy::Demo::EchoSample::__newInstance() const
{
- return static_cast<const ::IceProxy::Ice::Object&>(l) == static_cast<const ::IceProxy::Ice::Object&>(r);
+ return new EchoSample;
}
-bool
-IceProxy::Demo::operator!=(const ::IceProxy::Demo::EchoSample& l, const ::IceProxy::Demo::EchoSample& r)
-{
- return static_cast<const ::IceProxy::Ice::Object&>(l) != static_cast<const ::IceProxy::Ice::Object&>(r);
-}
-
-bool
-IceProxy::Demo::operator<(const ::IceProxy::Demo::EchoSample& l, const ::IceProxy::Demo::EchoSample& r)
-{
- return static_cast<const ::IceProxy::Ice::Object&>(l) < static_cast<const ::IceProxy::Ice::Object&>(r);
-}
-
-bool
-IceProxy::Demo::operator<=(const ::IceProxy::Demo::EchoSample& l, const ::IceProxy::Demo::EchoSample& r)
-{
- return l < r || l == r;
-}
-
-bool
-IceProxy::Demo::operator>(const ::IceProxy::Demo::EchoSample& l, const ::IceProxy::Demo::EchoSample& r)
-{
- return !(l < r) && !(l == r);
-}
-
-bool
-IceProxy::Demo::operator>=(const ::IceProxy::Demo::EchoSample& l, const ::IceProxy::Demo::EchoSample& r)
-{
- return !(l < r);
-}
-
void
IceDelegateM::Demo::EchoSample::echo(const ::std::string& msg, const ::Ice::Context* __context)
{
- ::IceInternal::Outgoing __og(__connection.get(), __reference.get(), __Demo__EchoSample__echo_name, ::Ice::Normal, __context, __compress);
+ ::IceInternal::Outgoing __og(__handler.get(), __Demo__EchoSample__echo_name, ::Ice::Normal, __context);
try
{
::IceInternal::BasicStream* __os = __og.os();
@@ -201,54 +145,69 @@
__og.abort(__ex);
}
bool __ok = __og.invoke();
- try
+ if(!__og.is()->b.empty())
{
- ::IceInternal::BasicStream* __is = __og.is();
- if(!__ok)
+ try
{
- try
+ if(!__ok)
{
- __is->throwException();
+ try
+ {
+ __og.throwUserException();
+ }
+ catch(const ::Ice::UserException& __ex)
+ {
+ ::Ice::UnknownUserException __uue(__FILE__, __LINE__, __ex.ice_name());
+ throw __uue;
+ }
}
- catch(const ::Ice::UserException& __ex)
- {
- throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
- }
+ __og.is()->skipEmptyEncaps();
}
+ catch(const ::Ice::LocalException& __ex)
+ {
+ throw ::IceInternal::LocalExceptionWrapper(__ex, false);
+ }
}
- catch(const ::Ice::LocalException& __ex)
- {
- throw ::IceInternal::LocalExceptionWrapper(__ex, false);
- }
}
void
IceDelegateD::Demo::EchoSample::echo(const ::std::string& msg, const ::Ice::Context* __context)
{
+ class _DirectI : public ::IceInternal::Direct
+ {
+ public:
+
+ _DirectI(const ::std::string& msg, const ::Ice::Current& __current) :
+ ::IceInternal::Direct(__current),
+ _m_msg(msg)
+ {
+ }
+
+ virtual ::Ice::DispatchStatus
+ run(::Ice::Object* object)
+ {
+ ::Demo::EchoSample* servant = dynamic_cast< ::Demo::EchoSample*>(object);
+ if(!servant)
+ {
+ throw ::Ice::OperationNotExistException(__FILE__, __LINE__, _current.id, _current.facet, _current.operation);
+ }
+ servant->echo(_m_msg, _current);
+ return ::Ice::DispatchOK;
+ }
+
+ private:
+
+ const ::std::string& _m_msg;
+ };
+
::Ice::Current __current;
__initCurrent(__current, __Demo__EchoSample__echo_name, ::Ice::Normal, __context);
- while(true)
+ try
{
- ::IceInternal::Direct __direct(__current);
+ _DirectI __direct(msg, __current);
try
{
- ::Demo::EchoSample* __servant = dynamic_cast< ::Demo::EchoSample*>(__direct.servant().get());
- if(!__servant)
- {
- ::Ice::OperationNotExistException __opEx(__FILE__, __LINE__);
- __opEx.id = __current.id;
- __opEx.facet = __current.facet;
- __opEx.operation = __current.operation;
- throw __opEx;
- }
- try
- {
- __servant->echo(msg, __current);
- }
- catch(const ::Ice::LocalException& __ex)
- {
- throw ::IceInternal::LocalExceptionWrapper(__ex, false);
- }
+ __direct.servant()->__collocDispatch(__direct);
}
catch(...)
{
@@ -256,8 +215,23 @@
throw;
}
__direct.destroy();
- return;
}
+ catch(const ::Ice::SystemException&)
+ {
+ throw;
+ }
+ catch(const ::IceInternal::LocalExceptionWrapper&)
+ {
+ throw;
+ }
+ catch(const ::std::exception& __ex)
+ {
+ ::IceInternal::LocalExceptionWrapper::throwWrapper(__ex);
+ }
+ catch(...)
+ {
+ throw ::IceInternal::LocalExceptionWrapper(::Ice::UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
+ }
}
::Ice::ObjectPtr
@@ -297,15 +271,17 @@
return __Demo__EchoSample_ids[0];
}
-::IceInternal::DispatchStatus
-Demo::EchoSample::___echo(::IceInternal::Incoming&__inS, const ::Ice::Current& __current)
+::Ice::DispatchStatus
+Demo::EchoSample::___echo(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
__checkMode(::Ice::Normal, __current.mode);
::IceInternal::BasicStream* __is = __inS.is();
+ __is->startReadEncaps();
::std::string msg;
__is->read(msg);
+ __is->endReadEncaps();
echo(msg, __current);
- return ::IceInternal::DispatchOK;
+ return ::Ice::DispatchOK;
}
static ::std::string __Demo__EchoSample_all[] =
@@ -317,13 +293,13 @@
"ice_ping"
};
-::IceInternal::DispatchStatus
+::Ice::DispatchStatus
Demo::EchoSample::__dispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
{
::std::pair< ::std::string*, ::std::string*> r = ::std::equal_range(__Demo__EchoSample_all, __Demo__EchoSample_all + 5, current.operation);
if(r.first == r.second)
{
- return ::IceInternal::DispatchOperationNotExist;
+ throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
}
switch(r.first - __Demo__EchoSample_all)
@@ -351,7 +327,7 @@
}
assert(false);
- return ::IceInternal::DispatchOperationNotExist;
+ throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
}
void
@@ -384,6 +360,8 @@
#endif
}
+// COMPILERFIX: Stream API is not supported with VC++ 6
+#if !defined(_MSC_VER) || (_MSC_VER >= 1300)
void
Demo::EchoSample::__write(const ::Ice::OutputStreamPtr&) const
{
@@ -399,6 +377,7 @@
ex.reason = "type Demo::EchoSample was not generated with stream support";
throw ex;
}
+#endif
void
Demo::__patch__EchoSamplePtr(void* __addr, ::Ice::ObjectPtr& v)
@@ -408,45 +387,6 @@
*p = ::Demo::EchoSamplePtr::dynamicCast(v);
if(v && !*p)
{
- ::Ice::UnexpectedObjectException e(__FILE__, __LINE__);
- e.type = v->ice_id();
- e.expectedType = ::Demo::EchoSample::ice_staticId();
- throw e;
+ IceInternal::Ex::throwUOE(::Demo::EchoSample::ice_staticId(), v->ice_id());
}
}
-
-bool
-Demo::operator==(const ::Demo::EchoSample& l, const ::Demo::EchoSample& r)
-{
- return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r);
-}
-
-bool
-Demo::operator!=(const ::Demo::EchoSample& l, const ::Demo::EchoSample& r)
-{
- return static_cast<const ::Ice::Object&>(l) != static_cast<const ::Ice::Object&>(r);
-}
-
-bool
-Demo::operator<(const ::Demo::EchoSample& l, const ::Demo::EchoSample& r)
-{
- return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r);
-}
-
-bool
-Demo::operator<=(const ::Demo::EchoSample& l, const ::Demo::EchoSample& r)
-{
- return l < r || l == r;
-}
-
-bool
-Demo::operator>(const ::Demo::EchoSample& l, const ::Demo::EchoSample& r)
-{
- return !(l < r) && !(l == r);
-}
-
-bool
-Demo::operator>=(const ::Demo::EchoSample& l, const ::Demo::EchoSample& r)
-{
- return !(l < r);
-}
Modified: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/ice/tests/IceManager/EchoSample.h
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/ice/tests/IceManager/EchoSample.h 2014-02-06 14:33:10 UTC (rev 2417)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/ice/tests/IceManager/EchoSample.h 2014-02-08 02:27:31 UTC (rev 2418)
@@ -1,14 +1,22 @@
// **********************************************************************
//
-// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
-
-// Ice version 3.2.1
+//
+// Ice version 3.4.2
+//
+// <auto-generated>
+//
// Generated from file `EchoSample.ice'
+//
+// Warning: do not edit this file.
+//
+// </auto-generated>
+//
#ifndef __EchoSample_h__
#define __EchoSample_h__
@@ -21,19 +29,21 @@
#include <Ice/Proxy.h>
#include <Ice/Object.h>
#include <Ice/Outgoing.h>
+#include <Ice/OutgoingAsync.h>
#include <Ice/Incoming.h>
#include <Ice/Direct.h>
+#include <IceUtil/ScopedArray.h>
#include <Ice/StreamF.h>
#include <Ice/UndefSysMacros.h>
#ifndef ICE_IGNORE_VERSION
-# if ICE_INT_VERSION / 100 < 302
+# if ICE_INT_VERSION / 100 != 304
# error Ice version mismatch!
# endif
# if ICE_INT_VERSION % 100 > 50
# error Beta header file detected
# endif
-# if ICE_INT_VERSION % 100 < 1
+# if ICE_INT_VERSION % 100 < 2
# error Ice patch level mismatch!
# endif
#endif
@@ -45,12 +55,6 @@
{
class EchoSample;
-bool operator==(const EchoSample&, const EchoSample&);
-bool operator!=(const EchoSample&, const EchoSample&);
-bool operator<(const EchoSample&, const EchoSample&);
-bool operator<=(const EchoSample&, const EchoSample&);
-bool operator>(const EchoSample&, const EchoSample&);
-bool operator>=(const EchoSample&, const EchoSample&);
}
@@ -61,23 +65,16 @@
class EchoSample;
bool operator==(const EchoSample&, const EchoSample&);
-bool operator!=(const EchoSample&, const EchoSample&);
bool operator<(const EchoSample&, const EchoSample&);
-bool operator<=(const EchoSample&, const EchoSample&);
-bool operator>(const EchoSample&, const EchoSample&);
-bool operator>=(const EchoSample&, const EchoSample&);
}
namespace IceInternal
{
-void incRef(::Demo::EchoSample*);
-void decRef(::Demo::EchoSample*);
+::Ice::Object* upCast(::Demo::EchoSample*);
+::IceProxy::Ice::Object* upCast(::IceProxy::Demo::EchoSample*);
-void incRef(::IceProxy::Demo::EchoSample*);
-void decRef(::IceProxy::Demo::EchoSample*);
-
}
namespace Demo
@@ -86,21 +83,17 @@
typedef ::IceInternal::Handle< ::Demo::EchoSample> EchoSamplePtr;
typedef ::IceInternal::ProxyHandle< ::IceProxy::Demo::EchoSample> EchoSamplePrx;
-void __write(::IceInternal::BasicStream*, const EchoSamplePrx&);
void __read(::IceInternal::BasicStream*, EchoSamplePrx&);
-void __write(::IceInternal::BasicStream*, const EchoSamplePtr&);
void __patch__EchoSamplePtr(void*, ::Ice::ObjectPtr&);
-void __addObject(const EchoSamplePtr&, ::IceInternal::GCCountMap&);
-bool __usesClasses(const EchoSamplePtr&);
-void __decRefUnsafe(const EchoSamplePtr&);
-void __clearHandleUnsafe(EchoSamplePtr&);
-
}
namespace Demo
{
+class Callback_EchoSample_echo_Base : virtual public ::IceInternal::CallbackBase { };
+typedef ::IceUtil::Handle< Callback_EchoSample_echo_Base> Callback_EchoSample_echoPtr;
+
}
namespace IceProxy
@@ -121,19 +114,243 @@
{
echo(msg, &__ctx);
}
+
+ ::Ice::AsyncResultPtr begin_echo(const ::std::string& msg)
+ {
+ return begin_echo(msg, 0, ::IceInternal::__dummyCallback, 0);
+ }
+
+ ::Ice::AsyncResultPtr begin_echo(const ::std::string& msg, const ::Ice::Context& __ctx)
+ {
+ return begin_echo(msg, &__ctx, ::IceInternal::__dummyCallback, 0);
+ }
+
+ ::Ice::AsyncResultPtr begin_echo(const ::std::string& msg, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
+ {
+ return begin_echo(msg, 0, __del, __cookie);
+ }
+
+ ::Ice::AsyncResultPtr begin_echo(const ::std::string& msg, const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
+ {
+ return begin_echo(msg, &__ctx, __del, __cookie);
+ }
+
+ ::Ice::AsyncResultPtr begin_echo(const ::std::string& msg, const ::Demo::Callback_EchoSample_echoPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
+ {
+ return begin_echo(msg, 0, __del, __cookie);
+ }
+
+ ::Ice::AsyncResultPtr begin_echo(const ::std::string& msg, const ::Ice::Context& __ctx, const ::Demo::Callback_EchoSample_echoPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
+ {
+ return begin_echo(msg, &__ctx, __del, __cookie);
+ }
+
+ void end_echo(const ::Ice::AsyncResultPtr&);
private:
void echo(const ::std::string&, const ::Ice::Context*);
+ ::Ice::AsyncResultPtr begin_echo(const ::std::string&, const ::Ice::Context*, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& __cookie = 0);
public:
+ ::IceInternal::ProxyHandle<EchoSample> ice_context(const ::Ice::Context& __context) const
+ {
+ #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ typedef ::IceProxy::Ice::Object _Base;
+ return dynamic_cast<EchoSample*>(_Base::ice_context(__context).get());
+ #else
+ return dynamic_cast<EchoSample*>(::IceProxy::Ice::Object::ice_context(__context).get());
+ #endif
+ }
+
+ ::IceInternal::ProxyHandle<EchoSample> ice_adapterId(const std::string& __id) const
+ {
+ #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ typedef ::IceProxy::Ice::Object _Base;
+ return dynamic_cast<EchoSample*>(_Base::ice_adapterId(__id).get());
+ #else
+ return dynamic_cast<EchoSample*>(::IceProxy::Ice::Object::ice_adapterId(__id).get());
+ #endif
+ }
+
+ ::IceInternal::ProxyHandle<EchoSample> ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const
+ {
+ #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ typedef ::IceProxy::Ice::Object _Base;
+ return dynamic_cast<EchoSample*>(_Base::ice_endpoints(__endpoints).get());
+ #else
+ return dynamic_cast<EchoSample*>(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get());
+ #endif
+ }
+
+ ::IceInternal::ProxyHandle<EchoSample> ice_locatorCacheTimeout(int __timeout) const
+ {
+ #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ typedef ::IceProxy::Ice::Object _Base;
+ return dynamic_cast<EchoSample*>(_Base::ice_locatorCacheTimeout(__timeout).get());
+ #else
+ return dynamic_cast<EchoSample*>(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get());
+ #endif
+ }
+
+ ::IceInternal::ProxyHandle<EchoSample> ice_connectionCached(bool __cached) const
+ {
+ #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ typedef ::IceProxy::Ice::Object _Base;
+ return dynamic_cast<EchoSample*>(_Base::ice_connectionCached(__cached).get());
+ #else
+ return dynamic_cast<EchoSample*>(::IceProxy::Ice::Object::ice_connectionCached(__cached).get());
+ #endif
+ }
+
+ ::IceInternal::ProxyHandle<EchoSample> ice_endpointSelection(::Ice::EndpointSelectionType __est) const
+ {
+ #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ typedef ::IceProxy::Ice::Object _Base;
+ return dynamic_cast<EchoSample*>(_Base::ice_endpointSelection(__est).get());
+ #else
+ return dynamic_cast<EchoSample*>(::IceProxy::Ice::Object::ice_endpointSelection(__est).get());
+ #endif
+ }
+
+ ::IceInternal::ProxyHandle<EchoSample> ice_secure(bool __secure) const
+ {
+ #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ typedef ::IceProxy::Ice::Object _Base;
+ return dynamic_cast<EchoSample*>(_Base::ice_secure(__secure).get());
+ #else
+ return dynamic_cast<EchoSample*>(::IceProxy::Ice::Object::ice_secure(__secure).get());
+ #endif
+ }
+
+ ::IceInternal::ProxyHandle<EchoSample> ice_preferSecure(bool __preferSecure) const
+ {
+ #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ typedef ::IceProxy::Ice::Object _Base;
+ return dynamic_cast<EchoSample*>(_Base::ice_preferSecure(__preferSecure).get());
+ #else
+ return dynamic_cast<EchoSample*>(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get());
+ #endif
+ }
+
+ ::IceInternal::ProxyHandle<EchoSample> ice_router(const ::Ice::RouterPrx& __router) const
+ {
+ #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ typedef ::IceProxy::Ice::Object _Base;
+ return dynamic_cast<EchoSample*>(_Base::ice_router(__router).get());
+ #else
+ return dynamic_cast<EchoSample*>(::IceProxy::Ice::Object::ice_router(__router).get());
+ #endif
+ }
+
+ ::IceInternal::ProxyHandle<EchoSample> ice_locator(const ::Ice::LocatorPrx& __locator) const
+ {
+ #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ typedef ::IceProxy::Ice::Object _Base;
+ return dynamic_cast<EchoSample*>(_Base::ice_locator(__locator).get());
+ #else
+ return dynamic_cast<EchoSample*>(::IceProxy::Ice::Object::ice_locator(__locator).get());
+ #endif
+ }
+
+ ::IceInternal::ProxyHandle<EchoSample> ice_collocationOptimized(bool __co) const
+ {
+ #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ typedef ::IceProxy::Ice::Object _Base;
+ return dynamic_cast<EchoSample*>(_Base::ice_collocationOptimized(__co).get());
+ #else
+ return dynamic_cast<EchoSample*>(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get());
+ #endif
+ }
+
+ ::IceInternal::ProxyHandle<EchoSample> ice_twoway() const
+ {
+ #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ typedef ::IceProxy::Ice::Object _Base;
+ return dynamic_cast<EchoSample*>(_Base::ice_twoway().get());
+ #else
+ return dynamic_cast<EchoSample*>(::IceProxy::Ice::Object::ice_twoway().get());
+ #endif
+ }
+
+ ::IceInternal::ProxyHandle<EchoSample> ice_oneway() const
+ {
+ #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ typedef ::IceProxy::Ice::Object _Base;
+ return dynamic_cast<EchoSample*>(_Base::ice_oneway().get());
+ #else
+ return dynamic_cast<EchoSample*>(::IceProxy::Ice::Object::ice_oneway().get());
+ #endif
+ }
+
+ ::IceInternal::ProxyHandle<EchoSample> ice_batchOneway() const
+ {
+ #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ typedef ::IceProxy::Ice::Object _Base;
+ return dynamic_cast<EchoSample*>(_Base::ice_batchOneway().get());
+ #else
+ return dynamic_cast<EchoSample*>(::IceProxy::Ice::Object::ice_batchOneway().get());
+ #endif
+ }
+
+ ::IceInternal::ProxyHandle<EchoSample> ice_datagram() const
+ {
+ #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ typedef ::IceProxy::Ice::Object _Base;
+ return dynamic_cast<EchoSample*>(_Base::ice_datagram().get());
+ #else
+ return dynamic_cast<EchoSample*>(::IceProxy::Ice::Object::ice_datagram().get());
+ #endif
+ }
+
+ ::IceInternal::ProxyHandle<EchoSample> ice_batchDatagram() const
+ {
+ #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ typedef ::IceProxy::Ice::Object _Base;
+ return dynamic_cast<EchoSample*>(_Base::ice_batchDatagram().get());
+ #else
+ return dynamic_cast<EchoSample*>(::IceProxy::Ice::Object::ice_batchDatagram().get());
+ #endif
+ }
+
+ ::IceInternal::ProxyHandle<EchoSample> ice_compress(bool __compress) const
+ {
+ #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ typedef ::IceProxy::Ice::Object _Base;
+ return dynamic_cast<EchoSample*>(_Base::ice_compress(__compress).get());
+ #else
+ return dynamic_cast<EchoSample*>(::IceProxy::Ice::Object::ice_compress(__compress).get());
+ #endif
+ }
+
+ ::IceInternal::ProxyHandle<EchoSample> ice_timeout(int __timeout) const
+ {
+ #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ typedef ::IceProxy::Ice::Object _Base;
+ return dynamic_cast<EchoSample*>(_Base::ice_timeout(__timeout).get());
+ #else
+ return dynamic_cast<EchoSample*>(::IceProxy::Ice::Object::ice_timeout(__timeout).get());
+ #endif
+ }
+
+ ::IceInternal::ProxyHandle<EchoSample> ice_connectionId(const std::string& __id) const
+ {
+ #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ typedef ::IceProxy::Ice::Object _Base;
+ return dynamic_cast<EchoSample*>(_Base::ice_connectionId(__id).get());
+ #else
+ return dynamic_cast<EchoSample*>(::IceProxy::Ice::Object::ice_connectionId(__id).get());
+ #endif
+ }
+
static const ::std::string& ice_staticId();
private:
virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM();
virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD();
+ virtual ::IceProxy::Ice::Object* __newInstance() const;
};
}
@@ -211,18 +428,116 @@
static const ::std::string& ice_staticId();
virtual void echo(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) = 0;
- ::IceInternal::DispatchStatus ___echo(::IceInternal::Incoming&, const ::Ice::Current&);
+ ::Ice::DispatchStatus ___echo(::IceInternal::Incoming&, const ::Ice::Current&);
- virtual ::IceInternal::DispatchStatus __dispatch(::IceInternal::Incoming&, const ::Ice::Current&);
+ virtual ::Ice::DispatchStatus __dispatch(::IceInternal::Incoming&, const ::Ice::Current&);
virtual void __write(::IceInternal::BasicStream*) const;
virtual void __read(::IceInternal::BasicStream*, bool);
+// COMPILERFIX: Stream API is not supported with VC++ 6
+#if !defined(_MSC_VER) || (_MSC_VER >= 1300)
virtual void __write(const ::Ice::OutputStreamPtr&) const;
virtual void __read(const ::Ice::InputStreamPtr&, bool);
+#endif
};
-void __patch__EchoSamplePtr(void*, ::Ice::ObjectPtr&);
+inline bool operator==(const EchoSample& l, const EchoSample& r)
+{
+ return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r);
+}
+inline bool operator<(const EchoSample& l, const EchoSample& r)
+{
+ return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r);
}
+}
+
+namespace Demo
+{
+
+template<class T>
+class CallbackNC_EchoSample_echo : public Callback_EchoSample_echo_Base, public ::IceInternal::OnewayCallbackNC<T>
+{
+public:
+
+ typedef IceUtil::Handle<T> TPtr;
+
+ typedef void (T::*Exception)(const ::Ice::Exception&);
+ typedef void (T::*Sent)(bool);
+ typedef void (T::*Response)();
+
+ CallbackNC_EchoSample_echo(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
+ : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
+ {
+ }
+};
+
+template<class T> Callback_EchoSample_echoPtr
+newCallback_EchoSample_echo(const IceUtil::Handle<T>& instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
+{
+ return new CallbackNC_EchoSample_echo<T>(instance, cb, excb, sentcb);
+}
+
+template<class T> Callback_EchoSample_echoPtr
+newCallback_EchoSample_echo(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
+{
+ return new CallbackNC_EchoSample_echo<T>(instance, 0, excb, sentcb);
+}
+
+template<class T> Callback_EchoSample_echoPtr
+newCallback_EchoSample_echo(T* instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
+{
+ return new CallbackNC_EchoSample_echo<T>(instance, cb, excb, sentcb);
+}
+
+template<class T> Callback_EchoSample_echoPtr
+newCallback_EchoSample_echo(T* instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
+{
+ return new CallbackNC_EchoSample_echo<T>(instance, 0, excb, sentcb);
+}
+
+template<class T, typename CT>
+class Callback_EchoSample_echo : public Callback_EchoSample_echo_Base, public ::IceInternal::OnewayCallback<T, CT>
+{
+public:
+
+ typedef IceUtil::Handle<T> TPtr;
+
+ typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
+ typedef void (T::*Sent)(bool , const CT&);
+ typedef void (T::*Response)(const CT&);
+
+ Callback_EchoSample_echo(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
+ : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
+ {
+ }
+};
+
+template<class T, typename CT> Callback_EchoSample_echoPtr
+newCallback_EchoSample_echo(const IceUtil::Handle<T>& instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
+{
+ return new Callback_EchoSample_echo<T, CT>(instance, cb, excb, sentcb);
+}
+
+template<class T, typename CT> Callback_EchoSample_echoPtr
+newCallback_EchoSample_echo(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
+{
+ return new Callback_EchoSample_echo<T, CT>(instance, 0, excb, sentcb);
+}
+
+template<class T, typename CT> Callback_EchoSample_echoPtr
+newCallback_EchoSample_echo(T* instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
+{
+ return new Callback_EchoSample_echo<T, CT>(instance, cb, excb, sentcb);
+}
+
+template<class T, typename CT> Callback_EchoSample_echoPtr
+newCallback_EchoSample_echo(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
+{
+ return new Callback_EchoSample_echo<T, CT>(instance, 0, excb, sentcb);
+}
+
+}
+
#endif
More information about the openrtm-commit
mailing list