oasys::MarshalCRC Class Reference

#include <MarshalSerialize.h>

Inheritance diagram for oasys::MarshalCRC:

oasys::SerializeAction oasys::Serialize List of all members.

Detailed Description

MarshalCRC: compute the CRC32 checksum of the bits.

Definition at line 176 of file MarshalSerialize.h.

Public Member Functions

 MarshalCRC (context_t context)
u_int32_t crc ()
void process (const char *name, u_int32_t *i)
 Process function for a 4 byte integer.
void process (const char *name, u_int16_t *i)
 Process function for a 2 byte integer.
void process (const char *name, u_int8_t *i)
 Process function for a byte.
void process (const char *name, bool *b)
 Process function for a boolean.
void process (const char *name, u_char *bp, u_int32_t len)
 Process function for a constant length char buffer.
void process (const char *name, u_char **bp, u_int32_t *lenp, int flags)
 Process function for a variable length char buffer.
void process (const char *name, std::string *s)
 Process function for a c++ string.
int action (const SerializableObject *const_object)
 Make it so this can take const objects.
void process (const char *name, SerializableObject *const_object)
 Make it so this can take const objects.

Private Attributes

CRC32 crc_


Constructor & Destructor Documentation

oasys::MarshalCRC::MarshalCRC ( context_t  context  )  [inline]

Definition at line 178 of file MarshalSerialize.h.


Member Function Documentation

u_int32_t oasys::MarshalCRC::crc (  )  [inline]

Definition at line 181 of file MarshalSerialize.h.

References crc_, and oasys::CRC32::value().

int oasys::MarshalCRC::action ( const SerializableObject const_object  )  [inline]

Make it so this can take const objects.

Definition at line 184 of file MarshalSerialize.h.

References oasys::SerializeAction::action().

void oasys::MarshalCRC::process ( const char *  name,
SerializableObject const_object 
) [inline, virtual]

Make it so this can take const objects.

Reimplemented from oasys::SerializeAction.

Definition at line 189 of file MarshalSerialize.h.

References oasys::SerializeAction::process().

void oasys::MarshalCRC::process ( const char *  name,
u_int32_t *  i 
) [virtual]

Process function for a 4 byte integer.

Implements oasys::SerializeAction.

void oasys::MarshalCRC::process ( const char *  name,
u_int16_t *  i 
) [virtual]

Process function for a 2 byte integer.

Implements oasys::SerializeAction.

void oasys::MarshalCRC::process ( const char *  name,
u_int8_t *  i 
) [virtual]

Process function for a byte.

Implements oasys::SerializeAction.

void oasys::MarshalCRC::process ( const char *  name,
bool b 
) [virtual]

Process function for a boolean.

Implements oasys::SerializeAction.

void oasys::MarshalCRC::process ( const char *  name,
u_char *  bp,
u_int32_t  len 
) [virtual]

Process function for a constant length char buffer.

Parameters:
name field name
bp buffer
len buffer length

Implements oasys::SerializeAction.

Definition at line 467 of file MarshalSerialize.cc.

void oasys::MarshalCRC::process ( const char *  name,
u_char **  bp,
u_int32_t *  lenp,
int  flags 
) [virtual]

Process function for a variable length char buffer.

Parameters:
name field name
bp buffer, allocated by SerializeAction if ALLOC_MEM flag is set.
lenp IN: If ALLOC_MEM flags is set, then len is the length of the buffer allocated. OUT: contains the length of the buffer
flags ALLOC_MEM as above, NULL_TERMINATED specifies that the data stored will be a null-terminated C-string.

Implements oasys::SerializeAction.

Definition at line 474 of file MarshalSerialize.cc.

References crc_, oasys::Serialize::NULL_TERMINATED, and oasys::CRC32::update().

void oasys::MarshalCRC::process ( const char *  name,
std::string *  s 
) [virtual]

Process function for a c++ string.

Implements oasys::SerializeAction.

Definition at line 486 of file MarshalSerialize.cc.

References crc_, and oasys::CRC32::update().


Member Data Documentation

CRC32 oasys::MarshalCRC::crc_ [private]

Definition at line 206 of file MarshalSerialize.h.

Referenced by crc(), and process().


The documentation for this class was generated from the following files:
Generated on Thu Jun 7 12:54:35 2007 for DTN Reference Implementation by  doxygen 1.5.1