template<typename ObjT>
vt::objgroup::proxy::ProxyElm struct

A indexed proxy to a object instance on a particular node.

A Proxy<ObjT> can be indexed to select a particular node, returning this class. Once indexed, one can send a message to the particular node that has been selected.

Public types

using PendingSendType = messaging::PendingSend

Constructors, destructors, conversion operators

ProxyElm() defaulted
ProxyElm(ProxyElm const&) defaulted
ProxyElm(ProxyElm&&) defaulted
ProxyElm(ObjGroupProxyType in_proxy, NodeType in_node)
Create a new element proxy, called by the system.

Public functions

auto operator=(ProxyElm const&) -> ProxyElm& defaulted
template<typename MsgT, ActiveObjType<MsgT, ObjT> fn>
void send(MsgT* msg) const
Send a message to the node/element indexed by this proxy to be delivered to the local object instance.
template<typename MsgT, ActiveObjType<MsgT, ObjT> fn>
void send(MsgSharedPtr<MsgT> msg) const
Send a message to the node/element indexed by this proxy to be delivered to the local object instance.
template<typename MsgT, ActiveObjType<MsgT, ObjT> fn>
auto sendMsg(messaging::MsgPtrThief<MsgT> msg) const -> PendingSendType
Send a message to the node/element indexed by this proxy to be delivered to the local object instance.
template<auto fn>
auto sendMsg(messaging::MsgPtrThief<typename ObjFuncTraits<decltype(fn)>::MsgT> msg) const -> decltype(auto)
Send a message to the node/element indexed by this proxy to be delivered to the local object instance.
template<typename MsgT, ActiveObjType<MsgT, ObjT> fn, typename... Args>
auto send(Args && ... args) const -> PendingSendType
Send a message to the node/element indexed by this proxy to be delivered to the local object instance.
template<auto fn, typename... Args>
auto send(Args && ... args) const -> PendingSendType
Send a message to the node/element indexed by this proxy to be delivered to the local object instance.
template<typename MsgT, ActiveObjType<MsgT, ObjT> fn, typename... Args>
auto invoke(Args && ... args) const -> decltype(auto)
Invoke locally a message handler on the node/element indexed by this proxy. The message handler will be invoked inline without going through scheduler.
template<auto f, typename... Args>
auto invoke(Args && ... args) const -> decltype(auto)
Invoke locally a function 'f' on the node/element indexed by this proxy. The function will be invoked inline without going through scheduler.
template<typename... Args>
void update(ObjGroupReconstructTagType, Args && ... args) const
Update the local object instance pointer on this node. Must be run on local node.
auto get() const -> ObjT*
Get raw pointer to the local object instance residing on the selected node.
auto getProxy() const -> ObjGroupProxyType
Get the underlying proxy bits that are used to identify the objgroup.
auto getNode() const -> NodeType
Get the node this element proxy is holding.
template<typename SerializerT>
void serialize(SerializerT& s)
Serialize the element proxy.

Function documentation

template<typename ObjT>
vt::objgroup::proxy::ProxyElm<ObjT>::ProxyElm(ObjGroupProxyType in_proxy, NodeType in_node)

Create a new element proxy, called by the system.

Parameters
in_proxy in the proxy ID
in_node in the node selected

template<typename ObjT> template<typename MsgT, ActiveObjType<MsgT, ObjT> fn>
void vt::objgroup::proxy::ProxyElm<ObjT>::send(MsgT* msg) const

Send a message to the node/element indexed by this proxy to be delivered to the local object instance.

Parameters
msg in raw pointer to the message

template<typename ObjT> template<typename MsgT, ActiveObjType<MsgT, ObjT> fn>
void vt::objgroup::proxy::ProxyElm<ObjT>::send(MsgSharedPtr<MsgT> msg) const

Send a message to the node/element indexed by this proxy to be delivered to the local object instance.

Parameters
msg in managed pointer to the message

template<typename ObjT> template<typename MsgT, ActiveObjType<MsgT, ObjT> fn>
PendingSendType vt::objgroup::proxy::ProxyElm<ObjT>::sendMsg(messaging::MsgPtrThief<MsgT> msg) const

Send a message to the node/element indexed by this proxy to be delivered to the local object instance.

Parameters
msg in the message

template<typename ObjT> template<auto fn>
decltype(auto) vt::objgroup::proxy::ProxyElm<ObjT>::sendMsg(messaging::MsgPtrThief<typename ObjFuncTraits<decltype(fn)>::MsgT> msg) const

Send a message to the node/element indexed by this proxy to be delivered to the local object instance.

Parameters
msg in the message

template<typename ObjT> template<typename MsgT, ActiveObjType<MsgT, ObjT> fn, typename... Args>
PendingSendType vt::objgroup::proxy::ProxyElm<ObjT>::send(Args && ... args) const

Send a message to the node/element indexed by this proxy to be delivered to the local object instance.

Parameters
args in args to pass to the message constructor

template<typename ObjT> template<auto fn, typename... Args>
PendingSendType vt::objgroup::proxy::ProxyElm<ObjT>::send(Args && ... args) const

Send a message to the node/element indexed by this proxy to be delivered to the local object instance.

Parameters
args in args to pass to the message constructor

template<typename ObjT> template<typename MsgT, ActiveObjType<MsgT, ObjT> fn, typename... Args>
decltype(auto) vt::objgroup::proxy::ProxyElm<ObjT>::invoke(Args && ... args) const

Invoke locally a message handler on the node/element indexed by this proxy. The message handler will be invoked inline without going through scheduler.

Parameters
args in args to pass to the message constructor

template<typename ObjT> template<auto f, typename... Args>
decltype(auto) vt::objgroup::proxy::ProxyElm<ObjT>::invoke(Args && ... args) const

Invoke locally a function 'f' on the node/element indexed by this proxy. The function will be invoked inline without going through scheduler.

Parameters
args in function arguments

template<typename ObjT> template<typename... Args>
void vt::objgroup::proxy::ProxyElm<ObjT>::update(ObjGroupReconstructTagType, Args && ... args) const

Update the local object instance pointer on this node. Must be run on local node.

Parameters
args in args to pass the object constructor

template<typename ObjT>
ObjT* vt::objgroup::proxy::ProxyElm<ObjT>::get() const

Get raw pointer to the local object instance residing on the selected node.

Returns raw pointer to the object

template<typename ObjT>
ObjGroupProxyType vt::objgroup::proxy::ProxyElm<ObjT>::getProxy() const

Get the underlying proxy bits that are used to identify the objgroup.

Returns the proxy ID

template<typename ObjT>
NodeType vt::objgroup::proxy::ProxyElm<ObjT>::getNode() const

Get the node this element proxy is holding.

Returns the node indexed

template<typename ObjT> template<typename SerializerT>
void vt::objgroup::proxy::ProxyElm<ObjT>::serialize(SerializerT& s)

Serialize the element proxy.

Parameters
in serializer