26 #include <Ice/ProxyHandle.h>
28 #include <ArmarXCore/interface/core/util/distributed/RemoteHandle/RemoteHandleControlBlock.h>
29 #include <ArmarXCore/interface/core/util/distributed/RemoteHandle/ClientSideRemoteHandleControlBlock.h>
30 #include "../../TemplateMetaProgramming.h"
44 template<
class PrxType>
53 RemoteHandle(
const ClientSideRemoteHandleControlBlockBasePtr& controlBlock);
63 template<
class PrxTypeB>
67 template<
class SourceType>
70 template<
class SourceType>
76 explicit inline operator bool()
const;
84 inline const PrxType
get()
const;
104 ClientSideRemoteHandleControlBlockBasePtr clientSideControlBlock;
107 template<
class PrxType>
109 objectProxy {controlBlock ? PrxType::checkedCast(controlBlock->getManagedObjectProxy()) :
nullptr},
110 clientSideControlBlock {objectProxy ? controlBlock :
nullptr}
112 assert(objectProxy ? clientSideControlBlock : !clientSideControlBlock);
115 template<
class PrxType>
template<
class PrxTypeB>
120 template<
class PrxType>
123 objectProxy = controlBlock ? PrxType::checkedCast(controlBlock->getManagedObjectProxy()) :
nullptr;
124 clientSideControlBlock = objectProxy ? controlBlock :
nullptr;
128 template<
class PrxType>
131 objectProxy =
nullptr;
132 clientSideControlBlock =
nullptr;
136 template<
class PrxType>
template<
class PrxTypeB>
139 this = other.clientSideControlBlock;
143 template<
class PrxType>
146 template<
class PrxType>
template<
class SourceType>
150 return proxyToCast.template uncheckedCast<PrxType>();
153 template<
class PrxType>
template<
class SourceType>
157 return proxyToCast.template checkedCast<PrxType>();
160 template<
class PrxType>
template<
class TargetPrxType>
165 casted.clientSideControlBlock = clientSideControlBlock;
166 casted.objectProxy = TargetPrxType::uncheckedCast(objectProxy);
170 template<
class PrxType>
template<
class TargetPrxType>
175 casted.objectProxy = TargetPrxType::checkedCast(objectProxy);
176 casted.clientSideControlBlock = casted.objectProxy ? clientSideControlBlock :
nullptr;
210 template<
class PrxType>
213 return clientSideControlBlock;
218 return fst.clientSideControlBlock->getManagedObjectProxy() == snd.clientSideControlBlock->getManagedObjectProxy();
222 return fst.clientSideControlBlock->getManagedObjectProxy() != snd.clientSideControlBlock->getManagedObjectProxy();
226 return fst.clientSideControlBlock->getManagedObjectProxy() < snd.clientSideControlBlock->getManagedObjectProxy();
230 return fst.clientSideControlBlock->getManagedObjectProxy() <= snd.clientSideControlBlock->getManagedObjectProxy();
234 return fst.clientSideControlBlock->getManagedObjectProxy() > snd.clientSideControlBlock->getManagedObjectProxy();
238 return fst.clientSideControlBlock->getManagedObjectProxy() >= snd.clientSideControlBlock->getManagedObjectProxy();