// **********************************************************************
//
// Copyright (c) 2003-2015 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.6.0
//
// <auto-generated>
//
// Generated from file `Router.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//

#ifndef __Ice_Router_h__
#define __Ice_Router_h__

#include <IceUtil/PushDisableWarnings.h>
#include <Ice/ProxyF.h>
#include <Ice/ObjectF.h>
#include <Ice/Exception.h>
#include <Ice/LocalObject.h>
#include <Ice/StreamHelpers.h>
#include <Ice/Proxy.h>
#include <Ice/GCObject.h>
#include <Ice/AsyncResult.h>
#include <Ice/Incoming.h>
#include <IceUtil/ScopedArray.h>
#include <IceUtil/Optional.h>
#include <Ice/StreamF.h>
#include <Ice/BuiltinSequences.h>
#include <IceUtil/UndefSysMacros.h>

#ifndef ICE_IGNORE_VERSION
#   if ICE_INT_VERSION / 100 != 306
#       error Ice version mismatch!
#   endif
#   if ICE_INT_VERSION % 100 > 50
#       error Beta header file detected
#   endif
#   if ICE_INT_VERSION % 100 < 0
#       error Ice patch level mismatch!
#   endif
#endif

#ifndef ICE_API
#   ifdef ICE_API_EXPORTS
#       define ICE_API ICE_DECLSPEC_EXPORT
#   elif defined(ICE_STATIC_LIBS)
#       define ICE_API /**/
#   else
#       define ICE_API ICE_DECLSPEC_IMPORT
#   endif
#endif

namespace IceProxy
{

namespace Ice
{

class Router;
ICE_API void __read(::IceInternal::BasicStream*, ::IceInternal::ProxyHandle< ::IceProxy::Ice::Router>&);
ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::Ice::Router*);

class RouterFinder;
ICE_API void __read(::IceInternal::BasicStream*, ::IceInternal::ProxyHandle< ::IceProxy::Ice::RouterFinder>&);
ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::Ice::RouterFinder*);

}

}

namespace Ice
{

class Router;
bool operator==(const Router&, const Router&);
bool operator<(const Router&, const Router&);
ICE_API ::Ice::Object* upCast(::Ice::Router*);
typedef ::IceInternal::Handle< ::Ice::Router> RouterPtr;
typedef ::IceInternal::ProxyHandle< ::IceProxy::Ice::Router> RouterPrx;
ICE_API void __patch(RouterPtr&, const ::Ice::ObjectPtr&);

class RouterFinder;
bool operator==(const RouterFinder&, const RouterFinder&);
bool operator<(const RouterFinder&, const RouterFinder&);
ICE_API ::Ice::Object* upCast(::Ice::RouterFinder*);
typedef ::IceInternal::Handle< ::Ice::RouterFinder> RouterFinderPtr;
typedef ::IceInternal::ProxyHandle< ::IceProxy::Ice::RouterFinder> RouterFinderPrx;
ICE_API void __patch(RouterFinderPtr&, const ::Ice::ObjectPtr&);

}

namespace Ice
{

class Callback_Router_getClientProxy_Base : virtual public ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_Router_getClientProxy_Base> Callback_Router_getClientProxyPtr;

class Callback_Router_getServerProxy_Base : virtual public ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_Router_getServerProxy_Base> Callback_Router_getServerProxyPtr;

class Callback_Router_addProxies_Base : virtual public ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_Router_addProxies_Base> Callback_Router_addProxiesPtr;

class Callback_RouterFinder_getRouter_Base : virtual public ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_RouterFinder_getRouter_Base> Callback_RouterFinder_getRouterPtr;

}

namespace IceProxy
{

namespace Ice
{

class ICE_API Router : virtual public ::IceProxy::Ice::Object
{
public:

    ::Ice::ObjectPrx getClientProxy()
    {
        return getClientProxy(0);
    }
    ::Ice::ObjectPrx getClientProxy(const ::Ice::Context& __ctx)
    {
        return getClientProxy(&__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_getClientProxy(const ::IceInternal::Function<void (const ::Ice::ObjectPrx&)>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_getClientProxy(0, __response, __exception, __sent);
    }
    ::Ice::AsyncResultPtr
    begin_getClientProxy(const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_getClientProxy(0, ::Ice::newCallback(__completed, __sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_getClientProxy(const ::Ice::Context& __ctx, const ::IceInternal::Function<void (const ::Ice::ObjectPrx&)>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_getClientProxy(&__ctx, __response, __exception, __sent);
    }
    ::Ice::AsyncResultPtr
    begin_getClientProxy(const ::Ice::Context& __ctx, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_getClientProxy(&__ctx, ::Ice::newCallback(__completed, __sent));
    }
    
private:

    ::Ice::AsyncResultPtr __begin_getClientProxy(const ::Ice::Context* __ctx, const ::IceInternal::Function<void (const ::Ice::ObjectPrx&)>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception, const ::IceInternal::Function<void (bool)>& __sent);
    
public:
#endif

    ::Ice::AsyncResultPtr begin_getClientProxy()
    {
        return begin_getClientProxy(0, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_getClientProxy(const ::Ice::Context& __ctx)
    {
        return begin_getClientProxy(&__ctx, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_getClientProxy(const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getClientProxy(0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getClientProxy(const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getClientProxy(&__ctx, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getClientProxy(const ::Ice::Callback_Router_getClientProxyPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getClientProxy(0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getClientProxy(const ::Ice::Context& __ctx, const ::Ice::Callback_Router_getClientProxyPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getClientProxy(&__ctx, __del, __cookie);
    }

    ::Ice::ObjectPrx end_getClientProxy(const ::Ice::AsyncResultPtr&);
    
private:

    ::Ice::ObjectPrx getClientProxy(const ::Ice::Context*);
    ::Ice::AsyncResultPtr begin_getClientProxy(const ::Ice::Context*, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& __cookie = 0);
    
public:

    ::Ice::ObjectPrx getServerProxy()
    {
        return getServerProxy(0);
    }
    ::Ice::ObjectPrx getServerProxy(const ::Ice::Context& __ctx)
    {
        return getServerProxy(&__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_getServerProxy(const ::IceInternal::Function<void (const ::Ice::ObjectPrx&)>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_getServerProxy(0, __response, __exception, __sent);
    }
    ::Ice::AsyncResultPtr
    begin_getServerProxy(const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_getServerProxy(0, ::Ice::newCallback(__completed, __sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_getServerProxy(const ::Ice::Context& __ctx, const ::IceInternal::Function<void (const ::Ice::ObjectPrx&)>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_getServerProxy(&__ctx, __response, __exception, __sent);
    }
    ::Ice::AsyncResultPtr
    begin_getServerProxy(const ::Ice::Context& __ctx, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_getServerProxy(&__ctx, ::Ice::newCallback(__completed, __sent));
    }
    
private:

    ::Ice::AsyncResultPtr __begin_getServerProxy(const ::Ice::Context* __ctx, const ::IceInternal::Function<void (const ::Ice::ObjectPrx&)>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception, const ::IceInternal::Function<void (bool)>& __sent);
    
public:
#endif

    ::Ice::AsyncResultPtr begin_getServerProxy()
    {
        return begin_getServerProxy(0, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_getServerProxy(const ::Ice::Context& __ctx)
    {
        return begin_getServerProxy(&__ctx, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_getServerProxy(const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getServerProxy(0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getServerProxy(const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getServerProxy(&__ctx, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getServerProxy(const ::Ice::Callback_Router_getServerProxyPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getServerProxy(0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getServerProxy(const ::Ice::Context& __ctx, const ::Ice::Callback_Router_getServerProxyPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getServerProxy(&__ctx, __del, __cookie);
    }

    ::Ice::ObjectPrx end_getServerProxy(const ::Ice::AsyncResultPtr&);
    
private:

    ::Ice::ObjectPrx getServerProxy(const ::Ice::Context*);
    ::Ice::AsyncResultPtr begin_getServerProxy(const ::Ice::Context*, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& __cookie = 0);
    
public:

    ::Ice::ObjectProxySeq addProxies(const ::Ice::ObjectProxySeq& __p_proxies)
    {
        return addProxies(__p_proxies, 0);
    }
    ::Ice::ObjectProxySeq addProxies(const ::Ice::ObjectProxySeq& __p_proxies, const ::Ice::Context& __ctx)
    {
        return addProxies(__p_proxies, &__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_addProxies(const ::Ice::ObjectProxySeq& __p_proxies, const ::IceInternal::Function<void (const ::Ice::ObjectProxySeq&)>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_addProxies(__p_proxies, 0, __response, __exception, __sent);
    }
    ::Ice::AsyncResultPtr
    begin_addProxies(const ::Ice::ObjectProxySeq& __p_proxies, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_addProxies(__p_proxies, 0, ::Ice::newCallback(__completed, __sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_addProxies(const ::Ice::ObjectProxySeq& __p_proxies, const ::Ice::Context& __ctx, const ::IceInternal::Function<void (const ::Ice::ObjectProxySeq&)>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_addProxies(__p_proxies, &__ctx, __response, __exception, __sent);
    }
    ::Ice::AsyncResultPtr
    begin_addProxies(const ::Ice::ObjectProxySeq& __p_proxies, const ::Ice::Context& __ctx, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_addProxies(__p_proxies, &__ctx, ::Ice::newCallback(__completed, __sent));
    }
    
private:

    ::Ice::AsyncResultPtr __begin_addProxies(const ::Ice::ObjectProxySeq& __p_proxies, const ::Ice::Context* __ctx, const ::IceInternal::Function<void (const ::Ice::ObjectProxySeq&)>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception, const ::IceInternal::Function<void (bool)>& __sent);
    
public:
#endif

    ::Ice::AsyncResultPtr begin_addProxies(const ::Ice::ObjectProxySeq& __p_proxies)
    {
        return begin_addProxies(__p_proxies, 0, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_addProxies(const ::Ice::ObjectProxySeq& __p_proxies, const ::Ice::Context& __ctx)
    {
        return begin_addProxies(__p_proxies, &__ctx, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_addProxies(const ::Ice::ObjectProxySeq& __p_proxies, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_addProxies(__p_proxies, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_addProxies(const ::Ice::ObjectProxySeq& __p_proxies, const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_addProxies(__p_proxies, &__ctx, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_addProxies(const ::Ice::ObjectProxySeq& __p_proxies, const ::Ice::Callback_Router_addProxiesPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_addProxies(__p_proxies, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_addProxies(const ::Ice::ObjectProxySeq& __p_proxies, const ::Ice::Context& __ctx, const ::Ice::Callback_Router_addProxiesPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_addProxies(__p_proxies, &__ctx, __del, __cookie);
    }

    ::Ice::ObjectProxySeq end_addProxies(const ::Ice::AsyncResultPtr&);
    
private:

    ::Ice::ObjectProxySeq addProxies(const ::Ice::ObjectProxySeq&, const ::Ice::Context*);
    ::Ice::AsyncResultPtr begin_addProxies(const ::Ice::ObjectProxySeq&, const ::Ice::Context*, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& __cookie = 0);
    
public:
    
    ::IceInternal::ProxyHandle<Router> ice_context(const ::Ice::Context& __context) const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_context(__context).get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_adapterId(const ::std::string& __id) const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_adapterId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_locatorCacheTimeout(int __timeout) const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_connectionCached(bool __cached) const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_connectionCached(__cached).get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_endpointSelection(::Ice::EndpointSelectionType __est) const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_endpointSelection(__est).get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_secure(bool __secure) const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_secure(__secure).get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_preferSecure(bool __preferSecure) const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_router(const ::Ice::RouterPrx& __router) const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_router(__router).get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_locator(const ::Ice::LocatorPrx& __locator) const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_locator(__locator).get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_collocationOptimized(bool __co) const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_invocationTimeout(int __timeout) const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_invocationTimeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_twoway() const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_twoway().get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_oneway() const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_oneway().get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_batchOneway() const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_batchOneway().get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_datagram() const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_datagram().get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_batchDatagram() const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_batchDatagram().get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_compress(bool __compress) const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_compress(__compress).get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_timeout(int __timeout) const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_timeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_connectionId(const ::std::string& __id) const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_connectionId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<Router> ice_encodingVersion(const ::Ice::EncodingVersion& __v) const
    {
        return dynamic_cast<Router*>(::IceProxy::Ice::Object::ice_encodingVersion(__v).get());
    }
    
    static const ::std::string& ice_staticId();

private: 
    virtual ::IceProxy::Ice::Object* __newInstance() const;
};

class ICE_API RouterFinder : virtual public ::IceProxy::Ice::Object
{
public:

    ::Ice::RouterPrx getRouter()
    {
        return getRouter(0);
    }
    ::Ice::RouterPrx getRouter(const ::Ice::Context& __ctx)
    {
        return getRouter(&__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_getRouter(const ::IceInternal::Function<void (const ::Ice::RouterPrx&)>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_getRouter(0, __response, __exception, __sent);
    }
    ::Ice::AsyncResultPtr
    begin_getRouter(const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_getRouter(0, ::Ice::newCallback(__completed, __sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_getRouter(const ::Ice::Context& __ctx, const ::IceInternal::Function<void (const ::Ice::RouterPrx&)>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_getRouter(&__ctx, __response, __exception, __sent);
    }
    ::Ice::AsyncResultPtr
    begin_getRouter(const ::Ice::Context& __ctx, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_getRouter(&__ctx, ::Ice::newCallback(__completed, __sent));
    }
    
private:

    ::Ice::AsyncResultPtr __begin_getRouter(const ::Ice::Context* __ctx, const ::IceInternal::Function<void (const ::Ice::RouterPrx&)>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception, const ::IceInternal::Function<void (bool)>& __sent);
    
public:
#endif

    ::Ice::AsyncResultPtr begin_getRouter()
    {
        return begin_getRouter(0, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_getRouter(const ::Ice::Context& __ctx)
    {
        return begin_getRouter(&__ctx, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_getRouter(const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getRouter(0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getRouter(const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getRouter(&__ctx, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getRouter(const ::Ice::Callback_RouterFinder_getRouterPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getRouter(0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getRouter(const ::Ice::Context& __ctx, const ::Ice::Callback_RouterFinder_getRouterPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getRouter(&__ctx, __del, __cookie);
    }

    ::Ice::RouterPrx end_getRouter(const ::Ice::AsyncResultPtr&);
    
private:

    ::Ice::RouterPrx getRouter(const ::Ice::Context*);
    ::Ice::AsyncResultPtr begin_getRouter(const ::Ice::Context*, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& __cookie = 0);
    
public:
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_context(const ::Ice::Context& __context) const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_context(__context).get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_adapterId(const ::std::string& __id) const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_adapterId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_locatorCacheTimeout(int __timeout) const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_connectionCached(bool __cached) const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_connectionCached(__cached).get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_endpointSelection(::Ice::EndpointSelectionType __est) const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_endpointSelection(__est).get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_secure(bool __secure) const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_secure(__secure).get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_preferSecure(bool __preferSecure) const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_router(const ::Ice::RouterPrx& __router) const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_router(__router).get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_locator(const ::Ice::LocatorPrx& __locator) const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_locator(__locator).get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_collocationOptimized(bool __co) const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_invocationTimeout(int __timeout) const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_invocationTimeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_twoway() const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_twoway().get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_oneway() const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_oneway().get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_batchOneway() const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_batchOneway().get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_datagram() const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_datagram().get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_batchDatagram() const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_batchDatagram().get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_compress(bool __compress) const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_compress(__compress).get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_timeout(int __timeout) const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_timeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_connectionId(const ::std::string& __id) const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_connectionId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<RouterFinder> ice_encodingVersion(const ::Ice::EncodingVersion& __v) const
    {
        return dynamic_cast<RouterFinder*>(::IceProxy::Ice::Object::ice_encodingVersion(__v).get());
    }
    
    static const ::std::string& ice_staticId();

private: 
    virtual ::IceProxy::Ice::Object* __newInstance() const;
};

}

}

namespace Ice
{

class ICE_API Router : virtual public ::Ice::Object
{
public:

    typedef RouterPrx ProxyType;
    typedef RouterPtr PointerType;

    virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const;
    virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const;
    virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const;
    static const ::std::string& ice_staticId();

    virtual ::Ice::ObjectPrx getClientProxy(const ::Ice::Current& = ::Ice::Current()) const = 0;
    ::Ice::DispatchStatus ___getClientProxy(::IceInternal::Incoming&, const ::Ice::Current&) const;

    virtual ::Ice::ObjectPrx getServerProxy(const ::Ice::Current& = ::Ice::Current()) const = 0;
    ::Ice::DispatchStatus ___getServerProxy(::IceInternal::Incoming&, const ::Ice::Current&) const;

    virtual ::Ice::ObjectProxySeq addProxies(const ::Ice::ObjectProxySeq&, const ::Ice::Current& = ::Ice::Current()) = 0;
    ::Ice::DispatchStatus ___addProxies(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual ::Ice::DispatchStatus __dispatch(::IceInternal::Incoming&, const ::Ice::Current&);

protected:
    virtual void __writeImpl(::IceInternal::BasicStream*) const;
    virtual void __readImpl(::IceInternal::BasicStream*);
    using ::Ice::Object::__writeImpl;
    using ::Ice::Object::__readImpl;
};

inline bool operator==(const Router& l, const Router& r)
{
    return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r);
}

inline bool operator<(const Router& l, const Router& r)
{
    return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r);
}

class ICE_API RouterFinder : virtual public ::Ice::Object
{
public:

    typedef RouterFinderPrx ProxyType;
    typedef RouterFinderPtr PointerType;

    virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) const;
    virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::Current()) const;
    virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const;
    static const ::std::string& ice_staticId();

    virtual ::Ice::RouterPrx getRouter(const ::Ice::Current& = ::Ice::Current()) = 0;
    ::Ice::DispatchStatus ___getRouter(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual ::Ice::DispatchStatus __dispatch(::IceInternal::Incoming&, const ::Ice::Current&);

protected:
    virtual void __writeImpl(::IceInternal::BasicStream*) const;
    virtual void __readImpl(::IceInternal::BasicStream*);
    using ::Ice::Object::__writeImpl;
    using ::Ice::Object::__readImpl;
};

inline bool operator==(const RouterFinder& l, const RouterFinder& r)
{
    return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r);
}

inline bool operator<(const RouterFinder& l, const RouterFinder& r)
{
    return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r);
}

}

namespace Ice
{

template<class T>
class CallbackNC_Router_getClientProxy : public Callback_Router_getClientProxy_Base, public ::IceInternal::TwowayCallbackNC<T>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception&);
    typedef void (T::*Sent)(bool);
    typedef void (T::*Response)(const ::Ice::ObjectPrx&);

    CallbackNC_Router_getClientProxy(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), _response(cb)
    {
    }

    virtual void completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::Ice::RouterPrx __proxy = ::Ice::RouterPrx::uncheckedCast(__result->getProxy());
        ::Ice::ObjectPrx __ret;
        try
        {
            __ret = __proxy->end_getClientProxy(__result);
        }
        catch(const ::Ice::Exception& ex)
        {
            ::IceInternal::CallbackNC<T>::exception(__result, ex);
            return;
        }
        if(_response)
        {
            (::IceInternal::CallbackNC<T>::_callback.get()->*_response)(__ret);
        }
    }

    private:

    Response _response;
};

template<class T> Callback_Router_getClientProxyPtr
newCallback_Router_getClientProxy(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::Ice::ObjectPrx&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_Router_getClientProxy<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_Router_getClientProxyPtr
newCallback_Router_getClientProxy(T* instance, void (T::*cb)(const ::Ice::ObjectPrx&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_Router_getClientProxy<T>(instance, cb, excb, sentcb);
}

template<class T, typename CT>
class Callback_Router_getClientProxy : public Callback_Router_getClientProxy_Base, public ::IceInternal::TwowayCallback<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 ::Ice::ObjectPrx&, const CT&);

    Callback_Router_getClientProxy(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), _response(cb)
    {
    }

    virtual void completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::Ice::RouterPrx __proxy = ::Ice::RouterPrx::uncheckedCast(__result->getProxy());
        ::Ice::ObjectPrx __ret;
        try
        {
            __ret = __proxy->end_getClientProxy(__result);
        }
        catch(const ::Ice::Exception& ex)
        {
            ::IceInternal::Callback<T, CT>::exception(__result, ex);
            return;
        }
        if(_response)
        {
            (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(__ret, CT::dynamicCast(__result->getCookie()));
        }
    }

    private:

    Response _response;
};

template<class T, typename CT> Callback_Router_getClientProxyPtr
newCallback_Router_getClientProxy(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::Ice::ObjectPrx&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_Router_getClientProxy<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_Router_getClientProxyPtr
newCallback_Router_getClientProxy(T* instance, void (T::*cb)(const ::Ice::ObjectPrx&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_Router_getClientProxy<T, CT>(instance, cb, excb, sentcb);
}

template<class T>
class CallbackNC_Router_getServerProxy : public Callback_Router_getServerProxy_Base, public ::IceInternal::TwowayCallbackNC<T>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception&);
    typedef void (T::*Sent)(bool);
    typedef void (T::*Response)(const ::Ice::ObjectPrx&);

    CallbackNC_Router_getServerProxy(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), _response(cb)
    {
    }

    virtual void completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::Ice::RouterPrx __proxy = ::Ice::RouterPrx::uncheckedCast(__result->getProxy());
        ::Ice::ObjectPrx __ret;
        try
        {
            __ret = __proxy->end_getServerProxy(__result);
        }
        catch(const ::Ice::Exception& ex)
        {
            ::IceInternal::CallbackNC<T>::exception(__result, ex);
            return;
        }
        if(_response)
        {
            (::IceInternal::CallbackNC<T>::_callback.get()->*_response)(__ret);
        }
    }

    private:

    Response _response;
};

template<class T> Callback_Router_getServerProxyPtr
newCallback_Router_getServerProxy(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::Ice::ObjectPrx&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_Router_getServerProxy<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_Router_getServerProxyPtr
newCallback_Router_getServerProxy(T* instance, void (T::*cb)(const ::Ice::ObjectPrx&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_Router_getServerProxy<T>(instance, cb, excb, sentcb);
}

template<class T, typename CT>
class Callback_Router_getServerProxy : public Callback_Router_getServerProxy_Base, public ::IceInternal::TwowayCallback<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 ::Ice::ObjectPrx&, const CT&);

    Callback_Router_getServerProxy(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), _response(cb)
    {
    }

    virtual void completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::Ice::RouterPrx __proxy = ::Ice::RouterPrx::uncheckedCast(__result->getProxy());
        ::Ice::ObjectPrx __ret;
        try
        {
            __ret = __proxy->end_getServerProxy(__result);
        }
        catch(const ::Ice::Exception& ex)
        {
            ::IceInternal::Callback<T, CT>::exception(__result, ex);
            return;
        }
        if(_response)
        {
            (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(__ret, CT::dynamicCast(__result->getCookie()));
        }
    }

    private:

    Response _response;
};

template<class T, typename CT> Callback_Router_getServerProxyPtr
newCallback_Router_getServerProxy(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::Ice::ObjectPrx&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_Router_getServerProxy<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_Router_getServerProxyPtr
newCallback_Router_getServerProxy(T* instance, void (T::*cb)(const ::Ice::ObjectPrx&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_Router_getServerProxy<T, CT>(instance, cb, excb, sentcb);
}

template<class T>
class CallbackNC_Router_addProxies : public Callback_Router_addProxies_Base, public ::IceInternal::TwowayCallbackNC<T>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception&);
    typedef void (T::*Sent)(bool);
    typedef void (T::*Response)(const ::Ice::ObjectProxySeq&);

    CallbackNC_Router_addProxies(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), _response(cb)
    {
    }

    virtual void completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::Ice::RouterPrx __proxy = ::Ice::RouterPrx::uncheckedCast(__result->getProxy());
        ::Ice::ObjectProxySeq __ret;
        try
        {
            __ret = __proxy->end_addProxies(__result);
        }
        catch(const ::Ice::Exception& ex)
        {
            ::IceInternal::CallbackNC<T>::exception(__result, ex);
            return;
        }
        if(_response)
        {
            (::IceInternal::CallbackNC<T>::_callback.get()->*_response)(__ret);
        }
    }

    private:

    Response _response;
};

template<class T> Callback_Router_addProxiesPtr
newCallback_Router_addProxies(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::Ice::ObjectProxySeq&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_Router_addProxies<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_Router_addProxiesPtr
newCallback_Router_addProxies(T* instance, void (T::*cb)(const ::Ice::ObjectProxySeq&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_Router_addProxies<T>(instance, cb, excb, sentcb);
}

template<class T, typename CT>
class Callback_Router_addProxies : public Callback_Router_addProxies_Base, public ::IceInternal::TwowayCallback<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 ::Ice::ObjectProxySeq&, const CT&);

    Callback_Router_addProxies(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), _response(cb)
    {
    }

    virtual void completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::Ice::RouterPrx __proxy = ::Ice::RouterPrx::uncheckedCast(__result->getProxy());
        ::Ice::ObjectProxySeq __ret;
        try
        {
            __ret = __proxy->end_addProxies(__result);
        }
        catch(const ::Ice::Exception& ex)
        {
            ::IceInternal::Callback<T, CT>::exception(__result, ex);
            return;
        }
        if(_response)
        {
            (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(__ret, CT::dynamicCast(__result->getCookie()));
        }
    }

    private:

    Response _response;
};

template<class T, typename CT> Callback_Router_addProxiesPtr
newCallback_Router_addProxies(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::Ice::ObjectProxySeq&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_Router_addProxies<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_Router_addProxiesPtr
newCallback_Router_addProxies(T* instance, void (T::*cb)(const ::Ice::ObjectProxySeq&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_Router_addProxies<T, CT>(instance, cb, excb, sentcb);
}

template<class T>
class CallbackNC_RouterFinder_getRouter : public Callback_RouterFinder_getRouter_Base, public ::IceInternal::TwowayCallbackNC<T>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception&);
    typedef void (T::*Sent)(bool);
    typedef void (T::*Response)(const ::Ice::RouterPrx&);

    CallbackNC_RouterFinder_getRouter(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), _response(cb)
    {
    }

    virtual void completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::Ice::RouterFinderPrx __proxy = ::Ice::RouterFinderPrx::uncheckedCast(__result->getProxy());
        ::Ice::RouterPrx __ret;
        try
        {
            __ret = __proxy->end_getRouter(__result);
        }
        catch(const ::Ice::Exception& ex)
        {
            ::IceInternal::CallbackNC<T>::exception(__result, ex);
            return;
        }
        if(_response)
        {
            (::IceInternal::CallbackNC<T>::_callback.get()->*_response)(__ret);
        }
    }

    private:

    Response _response;
};

template<class T> Callback_RouterFinder_getRouterPtr
newCallback_RouterFinder_getRouter(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::Ice::RouterPrx&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_RouterFinder_getRouter<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_RouterFinder_getRouterPtr
newCallback_RouterFinder_getRouter(T* instance, void (T::*cb)(const ::Ice::RouterPrx&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_RouterFinder_getRouter<T>(instance, cb, excb, sentcb);
}

template<class T, typename CT>
class Callback_RouterFinder_getRouter : public Callback_RouterFinder_getRouter_Base, public ::IceInternal::TwowayCallback<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 ::Ice::RouterPrx&, const CT&);

    Callback_RouterFinder_getRouter(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), _response(cb)
    {
    }

    virtual void completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::Ice::RouterFinderPrx __proxy = ::Ice::RouterFinderPrx::uncheckedCast(__result->getProxy());
        ::Ice::RouterPrx __ret;
        try
        {
            __ret = __proxy->end_getRouter(__result);
        }
        catch(const ::Ice::Exception& ex)
        {
            ::IceInternal::Callback<T, CT>::exception(__result, ex);
            return;
        }
        if(_response)
        {
            (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(__ret, CT::dynamicCast(__result->getCookie()));
        }
    }

    private:

    Response _response;
};

template<class T, typename CT> Callback_RouterFinder_getRouterPtr
newCallback_RouterFinder_getRouter(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::Ice::RouterPrx&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_RouterFinder_getRouter<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_RouterFinder_getRouterPtr
newCallback_RouterFinder_getRouter(T* instance, void (T::*cb)(const ::Ice::RouterPrx&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_RouterFinder_getRouter<T, CT>(instance, cb, excb, sentcb);
}

}

#include <IceUtil/PopDisableWarnings.h>
#endif
