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, size_t 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 670 of file ccs-builtins.C.

References CmiAbort(), int, PUP::l, lengthLen_byte, lengthLen_int, lengthLen_long, lengthLen_single, and PUP::wrap_er::p.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Reimplemented from PUP::er.

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

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

Here is the call graph for this function:

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 698 of file ccs-builtins.C.

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

Here is the call graph for this function:

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


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

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