PPL Logo

CProxy Class Reference

A proxy is a local handle to a remote object. More...

#include <charm++.h>

Inheritance diagram for CProxy:

Inheritance graph
[legend]
Collaboration diagram for CProxy:

Collaboration graph
[legend]

Public Member Functions

 CProxy (const CProxy &src)
 Copy constructor. Only needed for delegated proxies.
CProxyoperator= (const CProxy &src)
 Assignment operator. Only needed for delegated proxies.
 ~CProxy ()
 Destructor. Only needed for delegated proxies.
void ckDelegate (CkDelegateMgr *to, CkDelegateData *pd=NULL)
 Delegation allows a class, called a CkDelegateMgr, to intercept calls made to this proxy for further processing.
void ckUndelegate (void)
 Remove delegation from this proxy.
int ckIsDelegated (void) const
 Return true if this proxy is delegated.
CkDelegateMgrckDelegatedTo (void) const
 Return the delegator of this proxy, to which the proxies' messages are actually sent.
CkDelegateDatackDelegatedPtr (void) const
 Return the delegator's local data associated with this proxy.
CkGroupID ckDelegatedIdx (void) const
 Return the groupID of our delegator.
void pup (PUP::er &p)
 Pup the data for this proxy. Only needed for delegated proxies.

Protected Member Functions

 CProxy ()
 CProxy (CK_DELCTOR_PARAM)
 Delegation constructor: used when building an element proxy from a collective proxy, like in "aProxy[i]".

Private Attributes

CkDelegateMgrdelegatedMgr
CkDelegateDatadelegatedPtr
CkGroupID delegatedGroupId
bool isNodeGroup

Detailed Description

A proxy is a local handle to a remote object.

This is the superclass of all proxies: CProxy_Array, CProxy_Group, etc. inherit from this class.

Real proxies for user classes are generated by the .ci file translator charmxi and put in the generated .decl.h headers.

Definition at line 698 of file charm++.h.


Constructor & Destructor Documentation

CProxy::CProxy (  )  [inline, protected]

Definition at line 705 of file charm++.h.

References delegatedGroupId, and _ckGroupID::setZero().

Here is the call graph for this function:

CProxy::CProxy ( CK_DELCTOR_PARAM   )  [inline, protected]

Delegation constructor: used when building an element proxy from a collective proxy, like in "aProxy[i]".

Definition at line 713 of file charm++.h.

References CkDelegateMgr::ckCopyDelegateData(), IrrGroup::CkGetGroupID(), delegatedGroupId, delegatedMgr, delegatedPtr, IrrGroup::isNodeGroup(), and isNodeGroup.

Here is the call graph for this function:

CProxy::CProxy ( const CProxy src  ) 

Copy constructor. Only needed for delegated proxies.

Copy constructor.

Definition at line 317 of file ck.C.

References CkDelegateMgr::ckCopyDelegateData(), delegatedMgr, and delegatedPtr.

Here is the call graph for this function:

CProxy::~CProxy (  )  [inline]

Destructor. Only needed for delegated proxies.

Definition at line 729 of file charm++.h.

References delegatedPtr, and CkDelegateData::unref().

Here is the call graph for this function:


Member Function Documentation

CProxy & CProxy::operator= ( const CProxy src  ) 

Assignment operator. Only needed for delegated proxies.

Assignment operator.

Definition at line 327 of file ck.C.

References CkDelegateMgr::ckCopyDelegateData(), ckUndelegate(), delegatedGroupId, delegatedMgr, delegatedPtr, isNodeGroup, and CkDelegateData::unref().

Referenced by PUPmarshall().

Here is the call graph for this function:

Here is the caller graph for this function:

void CProxy::ckDelegate ( CkDelegateMgr dTo,
CkDelegateData dPtr = NULL 
)

Delegation allows a class, called a CkDelegateMgr, to intercept calls made to this proxy for further processing.

FIXME: make a "CkReferenceHandle<CkDelegateData>" class to avoid this tricky manual reference counting business.

"ptr" is any delegator-specific data the CkDelegateMgr wants to associate with this proxy: the pointer is owned by this proxy, but will be copied and pupped by calling delegator routines.

This interface should only be used by library writers, not ordinary user code.

..

Definition at line 301 of file ck.C.

References IrrGroup::CkGetGroupID(), ckUndelegate(), delegatedGroupId, delegatedMgr, delegatedPtr, IrrGroup::isNodeGroup(), isNodeGroup, and CkDelegateData::ref().

Referenced by PUPmarshall().

Here is the call graph for this function:

Here is the caller graph for this function:

void CProxy::ckUndelegate ( void   ) 

Remove delegation from this proxy.

Definition at line 309 of file ck.C.

References delegatedGroupId, delegatedMgr, delegatedPtr, _ckGroupID::setZero(), and CkDelegateData::unref().

Referenced by ckDelegate(), and operator=().

Here is the call graph for this function:

Here is the caller graph for this function:

int CProxy::ckIsDelegated ( void   )  const [inline]

Return true if this proxy is delegated.

Definition at line 750 of file charm++.h.

References delegatedMgr.

Referenced by CProxy_ArrayBase::ckBroadcast(), and CProxy_ArrayBase::ckInsertIdx().

Here is the caller graph for this function:

CkDelegateMgr* CProxy::ckDelegatedTo ( void   )  const [inline]

Return the delegator of this proxy, to which the proxies' messages are actually sent.

Definition at line 754 of file charm++.h.

References CkLocalBranch(), CkLocalNodeBranch(), delegatedGroupId, delegatedMgr, isNodeGroup, and _ckGroupID::isZero().

Referenced by CProxy_ArrayBase::ckBroadcast(), CProxy_ArrayBase::ckInsertIdx(), and pup().

Here is the call graph for this function:

Here is the caller graph for this function:

CkDelegateData* CProxy::ckDelegatedPtr ( void   )  const [inline]

Return the delegator's local data associated with this proxy.

Definition at line 773 of file charm++.h.

References delegatedPtr.

Referenced by CProxy_ArrayBase::ckBroadcast(), and CProxy_ArrayBase::ckInsertIdx().

Here is the caller graph for this function:

CkGroupID CProxy::ckDelegatedIdx ( void   )  const [inline]

Return the groupID of our delegator.

Note that this can be a GroupID or a NodeGroupID, so be careful!

Definition at line 777 of file charm++.h.

References IrrGroup::CkGetGroupID(), delegatedMgr, and _ckGroupID::setZero().

Here is the call graph for this function:

void CProxy::pup ( PUP::er p  ) 

Pup the data for this proxy. Only needed for delegated proxies.

Reimplemented in CProxy_Group, CProxy_NodeGroup, CProxyElement_NodeGroup, and CProxy_ArrayBase.

Definition at line 344 of file ck.C.

References _chareTable, _entryTable, ckDelegatedTo(), IrrGroup::CkGetGroupID(), delegatedGroupId, delegatedMgr, delegatedPtr, CkDelegateMgr::DelegatePointerPup(), free(), IrrGroup::isNodeGroup(), isNodeGroup, PUP::er::isUnpacking(), _ckGroupID::isZero(), malloc(), and CkDelegateData::ref().

Referenced by CProxy_ArrayBase::pup(), CProxy_NodeGroup::pup(), CProxy_Group::pup(), and PUPmarshall().

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

CkDelegateMgr* CProxy::delegatedMgr [mutable, private]

Definition at line 701 of file charm++.h.

Referenced by ckDelegate(), ckDelegatedPtr(), ckUndelegate(), CProxy(), operator=(), pup(), and ~CProxy().

Definition at line 702 of file charm++.h.

Referenced by ckDelegate(), ckDelegatedTo(), ckUndelegate(), CProxy(), operator=(), and pup().

Definition at line 703 of file charm++.h.

Referenced by ckDelegate(), ckDelegatedTo(), CProxy(), operator=(), and pup().


The documentation for this class was generated from the following files:

Generated on Mon Sep 21 08:22:21 2020 for Charm++ by  doxygen 1.5.5