Ice 3.7 C++98 API Reference
Loading...
Searching...
No Matches
CommunicatorAsync.h
Go to the documentation of this file.
1//
2// Copyright (c) ZeroC, Inc. All rights reserved.
3//
4
5#ifndef ICE_COMMUNICATOR_ASYNC_H
6#define ICE_COMMUNICATOR_ASYNC_H
7
8#ifndef ICE_CPP11_MAPPING
9
10#include <Ice/Communicator.h>
11
12namespace Ice
13{
14
21template<class T>
23 public ::IceInternal::OnewayCallbackNC<T>
24{
25public:
26
28
29 typedef void (T::*Exception)(const ::Ice::Exception&);
30 typedef void (T::*Sent)(bool);
31
33 : ::IceInternal::OnewayCallbackNC<T>(obj, 0, excb, sentcb)
34 {
35 }
36
38 virtual void completed(const ::Ice::AsyncResultPtr& result) const
39 {
40 ::Ice::CommunicatorPtr communicator = result->getCommunicator();
41 assert(communicator);
42 try
43 {
44 communicator->end_flushBatchRequests(result);
45 assert(false);
46 }
47 catch(const ::Ice::Exception& ex)
48 {
49 ::IceInternal::CallbackNC<T>::exception(result, ex);
50 }
51 }
53};
54
65 void (T::*excb)(const ::Ice::Exception&),
66 void (T::*sentcb)(bool) = 0)
67{
68 return new CallbackNC_Communicator_flushBatchRequests<T>(instance, excb, sentcb);
69}
70
80newCallback_Communicator_flushBatchRequests(T* instance, void (T::*excb)(const ::Ice::Exception&),
81 void (T::*sentcb)(bool) = 0)
82{
83 return new CallbackNC_Communicator_flushBatchRequests<T>(instance, excb, sentcb);
84}
85
92template<class T, typename CT>
94 public ::IceInternal::OnewayCallback<T, CT>
95{
96public:
97
99
100 typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
101 typedef void (T::*Sent)(bool , const CT&);
102
104 : ::IceInternal::OnewayCallback<T, CT>(obj, 0, excb, sentcb)
105 {
106 }
107
109 virtual void completed(const ::Ice::AsyncResultPtr& result) const
110 {
111 ::Ice::CommunicatorPtr communicator = result->getCommunicator();
112 assert(communicator);
113 try
114 {
115 communicator->end_flushBatchRequests(result);
116 assert(false);
117 }
118 catch(const ::Ice::Exception& ex)
119 {
120 ::IceInternal::Callback<T, CT>::exception(result, ex);
121 }
122 }
124};
125
131template<class T, typename CT> Callback_Communicator_flushBatchRequestsPtr
133 void (T::*excb)(const ::Ice::Exception&, const CT&),
134 void (T::*sentcb)(bool, const CT&) = 0)
135{
136 return new Callback_Communicator_flushBatchRequests<T, CT>(instance, excb, sentcb);
137}
138
144template<class T, typename CT> Callback_Communicator_flushBatchRequestsPtr
145newCallback_Communicator_flushBatchRequests(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&),
146 void (T::*sentcb)(bool, const CT&) = 0)
147{
148 return new Callback_Communicator_flushBatchRequests<T, CT>(instance, excb, sentcb);
149}
150
151}
152#endif
153
154#endif
Definition Handle.h:143
Type-safe asynchronous callback wrapper class used for calls to Ice::Communicator::begin_flushBatchRe...
Definition CommunicatorAsync.h:24
IceUtil::Handle< T > TPtr
Definition CommunicatorAsync.h:27
void(T::* Exception)(const ::Ice::Exception &)
Definition CommunicatorAsync.h:29
void(T::* Sent)(bool)
Definition CommunicatorAsync.h:30
CallbackNC_Communicator_flushBatchRequests(const TPtr &obj, Exception excb, Sent sentcb)
Definition CommunicatorAsync.h:32
Base class for asynchronous callback wrapper classes used for calls to IceProxy::Ice::Communicator::b...
Definition Communicator.h:660
Type-safe asynchronous callback wrapper class used for calls to Ice::Communicator::begin_flushBatchRe...
Definition CommunicatorAsync.h:95
void(T::* Sent)(bool, const CT &)
Definition CommunicatorAsync.h:101
IceUtil::Handle< T > TPtr
Definition CommunicatorAsync.h:98
Callback_Communicator_flushBatchRequests(const TPtr &obj, Exception excb, Sent sentcb)
Definition CommunicatorAsync.h:103
void(T::* Exception)(const ::Ice::Exception &, const CT &)
Definition CommunicatorAsync.h:100
Definition BuiltinSequences.h:113
Callback_Communicator_flushBatchRequestsPtr newCallback_Communicator_flushBatchRequests(const IceUtil::Handle< T > &instance, void(T::*excb)(const ::Ice::Exception &), void(T::*sentcb)(bool)=0)
Creates a callback wrapper instance that delegates to your object.
Definition CommunicatorAsync.h:64
::IceInternal::Handle< Communicator > CommunicatorPtr
Definition Communicator.h:608
::IceUtil::Handle< Callback_Communicator_flushBatchRequests_Base > Callback_Communicator_flushBatchRequestsPtr
Definition Communicator.h:661