PPL Logo

PUP_fmt Class Reference

A PUP_fmt inserts a 1-byte data format code before each pup'd data item. More...

#include <ccs-builtins.h>

Inheritance diagram for PUP_fmt:

Inheritance graph
[legend]
Collaboration diagram for PUP_fmt:

Collaboration graph
[legend]

Public Member Functions

 PUP_fmt (PUP::er &parent_)
virtual void comment (const char *message)
 A descriptive (but entirely optional) human-readable comment field.
virtual void synchronize (unsigned int m)
 A 32-bit "synchronization marker" (not human readable).
virtual void bytes (void *p, int n, size_t itemSize, PUP::dataType t)

Private Types

enum  lengthLen_t { lengthLen_single = 0, lengthLen_byte = 1, lengthLen_int = 2, lengthLen_long = 3 }
 The introductory byte for each field is bit-coded as: | unused(2) | lengthLen(2) | typeCode(4) |. More...
enum  typeCode_t {
  typeCode_byte = 0, typeCode_int = 2, typeCode_long = 3, typeCode_float = 5,
  typeCode_double = 6, typeCode_comment = 10, typeCode_sync = 11, typeCode_pointer = 12
}
typedef PUP::er parent
typedef unsigned char byte

Private Member Functions

void fieldHeader (typeCode_t typeCode, int nItems)

Detailed Description

A PUP_fmt inserts a 1-byte data format code before each pup'd data item.

This makes it possible to unpack items without using PUP.

Definition at line 6 of file ccs-builtins.h.


Member Typedef Documentation

typedef PUP::er PUP_fmt::parent [private]

Definition at line 7 of file ccs-builtins.h.

typedef unsigned char PUP_fmt::byte [private]

Definition at line 9 of file ccs-builtins.h.


Member Enumeration Documentation

enum PUP_fmt::lengthLen_t [private]

The introductory byte for each field is bit-coded as: | unused(2) | lengthLen(2) | typeCode(4) |.

Enumerator:
lengthLen_single 
lengthLen_byte 
lengthLen_int 
lengthLen_long 

Definition at line 14 of file ccs-builtins.h.

enum PUP_fmt::typeCode_t [private]

Enumerator:
typeCode_byte 
typeCode_int 
typeCode_long 
typeCode_float 
typeCode_double 
typeCode_comment 
typeCode_sync 
typeCode_pointer 

Definition at line 20 of file ccs-builtins.h.


Constructor & Destructor Documentation

PUP_fmt::PUP_fmt ( PUP::er parent_  )  [inline]

Definition at line 32 of file ccs-builtins.h.


Member Function Documentation

void PUP_fmt::fieldHeader ( typeCode_t  typeCode,
int  nItems 
) [private]

Definition at line 669 of file ccs-builtins.C.

References lengthLen_byte, lengthLen_int, lengthLen_single, and PUP::wrap_er::p.

Referenced by bytes(), comment(), and synchronize().

void PUP_fmt::comment ( const char *  message  )  [virtual]

A descriptive (but entirely optional) human-readable comment field.

Reimplemented from PUP::er.

Definition at line 691 of file ccs-builtins.C.

References fieldHeader(), PUP::wrap_er::p, and typeCode_comment.

void PUP_fmt::synchronize ( unsigned int  sync  )  [virtual]

A 32-bit "synchronization marker" (not human readable).

Some standard codes are listed under PUP::sync_....

Reimplemented from PUP::er.

Definition at line 696 of file ccs-builtins.C.

References fieldHeader(), PUP::wrap_er::p, and typeCode_sync.

void PUP_fmt::bytes ( void *  p,
int  n,
size_t  itemSize,
PUP::dataType  t 
) [virtual]


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

Generated on Fri May 25 08:04:55 2012 for Charm++ by  doxygen 1.5.5