26 #include <Ice/ProxyHandle.h>
28 #include <ArmarXCore/interface/core/util/distributed/RemoteHandle/ClientSideRemoteHandleControlBlock.h>
29 #include <ArmarXCore/interface/core/util/distributed/RemoteHandle/RemoteHandleControlBlock.h>
31 #include "../../TemplateMetaProgramming.h"
45 template <
class PrxType>
50 "PrxType has to be an Ice proxy");
57 RemoteHandle(
const ClientSideRemoteHandleControlBlockBasePtr& controlBlock);
59 template <
class PrxTypeB>
67 operator=(
const ClientSideRemoteHandleControlBlockBasePtr& controlBlock);
69 template <
class PrxTypeB>
73 template <
class SourceType>
76 template <
class SourceType>
79 template <
class TargetPrxType>
81 template <
class TargetPrxType>
84 explicit inline operator bool()
const;
92 inline const PrxType
get()
const;
95 template <
class PrxTA,
class PrxTB>
97 template <
class PrxTA,
class PrxTB>
99 template <
class PrxTA,
class PrxTB>
101 template <
class PrxTA,
class PrxTB>
103 template <
class PrxTA,
class PrxTB>
105 template <
class PrxTA,
class PrxTB>
116 template <
class PrxTA>
120 ClientSideRemoteHandleControlBlockBasePtr clientSideControlBlock;
123 template <
class PrxType>
125 const ClientSideRemoteHandleControlBlockBasePtr& controlBlock) :
126 objectProxy{controlBlock ? PrxType::checkedCast(controlBlock->getManagedObjectProxy())
128 clientSideControlBlock{objectProxy ? controlBlock :
nullptr}
130 assert(objectProxy ? clientSideControlBlock : !clientSideControlBlock);
133 template <
class PrxType>
134 template <
class PrxTypeB>
140 template <
class PrxType>
145 controlBlock ? PrxType::checkedCast(controlBlock->getManagedObjectProxy()) :
nullptr;
146 clientSideControlBlock = objectProxy ? controlBlock :
nullptr;
150 template <
class PrxType>
154 objectProxy =
nullptr;
155 clientSideControlBlock =
nullptr;
159 template <
class PrxType>
160 template <
class PrxTypeB>
164 this = other.clientSideControlBlock;
168 template <
class PrxType>
173 template <
class PrxType>
174 template <
class SourceType>
175 RemoteHandle<PrxType>
180 "proxyToCast has to be a RemoteHandle");
181 return proxyToCast.template uncheckedCast<PrxType>();
184 template <
class PrxType>
185 template <
class SourceType>
191 "proxyToCast has to be a RemoteHandle");
192 return proxyToCast.template checkedCast<PrxType>();
195 template <
class PrxType>
196 template <
class TargetPrxType>
202 "TargetPrxType has to be an Ice proxy");
204 casted.clientSideControlBlock = clientSideControlBlock;
205 casted.objectProxy = TargetPrxType::uncheckedCast(objectProxy);
209 template <
class PrxType>
210 template <
class TargetPrxType>
216 "TargetPrxType has to be an Ice proxy");
218 casted.objectProxy = TargetPrxType::checkedCast(objectProxy);
219 casted.clientSideControlBlock = casted.objectProxy ? clientSideControlBlock :
nullptr;
223 template <
class PrxType>
230 template <
class PrxType>
237 template <
class PrxType>
244 template <
class PrxType>
251 template <
class PrxType>
258 template <
class PrxType>
265 template <
class PrxType>
271 template <
class PrxType>
275 return clientSideControlBlock;
278 template <
class PrxTA,
class PrxTB>
282 return fst.clientSideControlBlock->getManagedObjectProxy() ==
283 snd.clientSideControlBlock->getManagedObjectProxy();
286 template <
class PrxTA,
class PrxTB>
290 return fst.clientSideControlBlock->getManagedObjectProxy() !=
291 snd.clientSideControlBlock->getManagedObjectProxy();
294 template <
class PrxTA,
class PrxTB>
298 return fst.clientSideControlBlock->getManagedObjectProxy() <
299 snd.clientSideControlBlock->getManagedObjectProxy();
302 template <
class PrxTA,
class PrxTB>
306 return fst.clientSideControlBlock->getManagedObjectProxy() <=
307 snd.clientSideControlBlock->getManagedObjectProxy();
310 template <
class PrxTA,
class PrxTB>
314 return fst.clientSideControlBlock->getManagedObjectProxy() >
315 snd.clientSideControlBlock->getManagedObjectProxy();
318 template <
class PrxTA,
class PrxTB>
322 return fst.clientSideControlBlock->getManagedObjectProxy() >=
323 snd.clientSideControlBlock->getManagedObjectProxy();