PPL Logo

CpdSimpleListAccessor Class Reference

A typical CpdList accessor: length is stored at some fixed location in memory, path is a constant string, and the pup routine is completely random-access. More...

#include <debug-conv++.h>

Inheritance diagram for CpdSimpleListAccessor:

Inheritance graph
[legend]
Collaboration diagram for CpdSimpleListAccessor:

Collaboration graph
[legend]

Public Types

typedef void(* pupFn )(PUP::er &p, int itemNo)
 This routine is called to pup each item of the list.

Public Member Functions

 CpdSimpleListAccessor (const char *path_, size_t &length_, pupFn pfn_)
 Create a new CpdSimpleListAccessor.
virtual ~CpdSimpleListAccessor ()
virtual const char * getPath (void) const
 Return the CpdList path CCS clients should use to access this data.
virtual size_t getLength (void) const
 Return the length of this CpdList.
virtual void pup (PUP::er &p, CpdListItemsRequest &req)
 Pup the items listed in this request. Be sure to call beginItem between items!

Private Attributes

const char * path
size_t & length
pupFn pfn

Detailed Description

A typical CpdList accessor: length is stored at some fixed location in memory, path is a constant string, and the pup routine is completely random-access.

Definition at line 70 of file debug-conv++.h.


Member Typedef Documentation

typedef void(* CpdSimpleListAccessor::pupFn)(PUP::er &p, int itemNo)

This routine is called to pup each item of the list.

beginItem has already been called before this function.


Constructor & Destructor Documentation

CpdSimpleListAccessor::CpdSimpleListAccessor ( const char *  path_,
size_t &  length_,
pupFn  pfn_ 
) [inline]

Create a new CpdSimpleListAccessor.

Parameters:
path_ CpdList path CCS clients should use.
length_ Reference to number of elements in the list. This class keeps the reference, so as the list length changes, Cpd always has the latest value. In particular, this means length must not be moved!
pfn_ Function to pup the items in the list.

Definition at line 89 of file debug-conv++.h.

CpdSimpleListAccessor::~CpdSimpleListAccessor (  )  [virtual]

Definition at line 7 of file debug-conv++.C.


Member Function Documentation

const char * CpdSimpleListAccessor::getPath ( void   )  const [virtual]

Return the CpdList path CCS clients should use to access this data.

Implements CpdListAccessor.

Definition at line 8 of file debug-conv++.C.

References path.

size_t CpdSimpleListAccessor::getLength ( void   )  const [virtual]

Return the length of this CpdList.

Implements CpdListAccessor.

Definition at line 9 of file debug-conv++.C.

References length.

void CpdSimpleListAccessor::pup ( PUP::er p,
CpdListItemsRequest req 
) [virtual]

Pup the items listed in this request. Be sure to call beginItem between items!

Implements CpdListAccessor.

Definition at line 10 of file debug-conv++.C.

References CpdListAccessor::beginItem(), CpdListItemsRequest::hi, and CpdListItemsRequest::lo.


Field Documentation

const char* CpdSimpleListAccessor::path [private]

Definition at line 76 of file debug-conv++.h.

Referenced by getPath().

size_t& CpdSimpleListAccessor::length [private]

Definition at line 77 of file debug-conv++.h.

Referenced by getLength().

Definition at line 78 of file debug-conv++.h.


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

Generated on Fri May 25 08:02:54 2012 for Charm++ by  doxygen 1.5.5