#include <MarshalSerialize.h>
Definition at line 115 of file MarshalSerialize.h.
Public Member Functions | |
MarshalSize (context_t context, int options=0) | |
Constructor. | |
int | action (const SerializableObject *const_object) |
Again, we can tolerate a const object as well. | |
void | process (const char *name, SerializableObject *const_object) |
Process function for a contained SerializableObject. | |
u_int32_t | size () |
| |
void | begin_action () |
void | process (const char *name, u_int64_t *i) |
void | process (const char *name, u_int32_t *i) |
void | process (const char *name, u_int16_t *i) |
void | process (const char *name, u_int8_t *i) |
void | process (const char *name, bool *b) |
void | process (const char *name, u_char *bp, u_int32_t len) |
void | process (const char *name, u_char **bp, u_int32_t *lenp, int flags) |
void | process (const char *name, std::string *s) |
Static Public Member Functions | |
static u_int32_t | get_size (u_int64_t *) |
static u_int32_t | get_size (u_int32_t *) |
static u_int32_t | get_size (u_int16_t *) |
static u_int32_t | get_size (u_int8_t *) |
static u_int32_t | get_size (bool *) |
static u_int32_t | get_size (u_char *, u_int32_t len) |
static u_int32_t | get_size (std::string *s) |
Private Attributes | |
u_int32_t | size_ |
oasys::MarshalSize::MarshalSize | ( | context_t | context, | |
int | options = 0 | |||
) | [inline] |
int oasys::MarshalSize::action | ( | const SerializableObject * | const_object | ) | [inline] |
Again, we can tolerate a const object as well.
Definition at line 128 of file MarshalSerialize.h.
References oasys::SerializeAction::action().
Referenced by oasys::DurableTableImpl::flatten(), and oasys::BerkeleyDBTable::put().
void oasys::MarshalSize::process | ( | const char * | name, | |
SerializableObject * | object | |||
) | [inline, virtual] |
Process function for a contained SerializableObject.
The default implementation just calls serialize() on the contained object, ignoring the name value. However, a derived class can of course override it to make use of the name (as is done by SQLTableFormat, for example).
Reimplemented from oasys::SerializeAction.
Definition at line 134 of file MarshalSerialize.h.
References oasys::SerializeAction::process().
u_int32_t oasys::MarshalSize::size | ( | ) | [inline] |
Definition at line 141 of file MarshalSerialize.h.
References size_.
Referenced by oasys::DurableTableImpl::flatten(), and oasys::BerkeleyDBTable::put().
static u_int32_t oasys::MarshalSize::get_size | ( | u_int64_t * | ) | [inline, static] |
Static functions to simply return the serialized sizes. Called from the various process() variants.
Definition at line 146 of file MarshalSerialize.h.
Referenced by oasys::BerkeleyDBTable::get(), process(), and oasys::BerkeleyDBTable::put().
static u_int32_t oasys::MarshalSize::get_size | ( | u_int32_t * | ) | [inline, static] |
Static functions to simply return the serialized sizes. Called from the various process() variants.
Definition at line 147 of file MarshalSerialize.h.
static u_int32_t oasys::MarshalSize::get_size | ( | u_int16_t * | ) | [inline, static] |
Static functions to simply return the serialized sizes. Called from the various process() variants.
Definition at line 148 of file MarshalSerialize.h.
static u_int32_t oasys::MarshalSize::get_size | ( | u_int8_t * | ) | [inline, static] |
Static functions to simply return the serialized sizes. Called from the various process() variants.
Definition at line 149 of file MarshalSerialize.h.
static u_int32_t oasys::MarshalSize::get_size | ( | bool * | ) | [inline, static] |
Static functions to simply return the serialized sizes. Called from the various process() variants.
Definition at line 150 of file MarshalSerialize.h.
static u_int32_t oasys::MarshalSize::get_size | ( | u_char * | , | |
u_int32_t | len | |||
) | [inline, static] |
Static functions to simply return the serialized sizes. Called from the various process() variants.
Definition at line 151 of file MarshalSerialize.h.
static u_int32_t oasys::MarshalSize::get_size | ( | std::string * | s | ) | [inline, static] |
Static functions to simply return the serialized sizes. Called from the various process() variants.
Definition at line 152 of file MarshalSerialize.h.
void oasys::MarshalSize::begin_action | ( | ) | [virtual] |
Virtual functions inherited from SerializeAction
Reimplemented from oasys::SerializeAction.
Definition at line 379 of file MarshalSerialize.cc.
References oasys::SerializeAction::options_, size_, and oasys::Serialize::USE_CRC.
void oasys::MarshalSize::process | ( | const char * | name, | |
u_int64_t * | i | |||
) | [virtual] |
Virtual functions inherited from SerializeAction
Implements oasys::SerializeAction.
Definition at line 387 of file MarshalSerialize.cc.
References get_size(), and size_.
void oasys::MarshalSize::process | ( | const char * | name, | |
u_int32_t * | i | |||
) | [virtual] |
Virtual functions inherited from SerializeAction
Implements oasys::SerializeAction.
Definition at line 394 of file MarshalSerialize.cc.
References get_size(), and size_.
void oasys::MarshalSize::process | ( | const char * | name, | |
u_int16_t * | i | |||
) | [virtual] |
Virtual functions inherited from SerializeAction
Implements oasys::SerializeAction.
Definition at line 401 of file MarshalSerialize.cc.
References get_size(), and size_.
void oasys::MarshalSize::process | ( | const char * | name, | |
u_int8_t * | i | |||
) | [virtual] |
Virtual functions inherited from SerializeAction
Implements oasys::SerializeAction.
Definition at line 408 of file MarshalSerialize.cc.
References get_size(), and size_.
void oasys::MarshalSize::process | ( | const char * | name, | |
bool * | b | |||
) | [virtual] |
Virtual functions inherited from SerializeAction
Implements oasys::SerializeAction.
Definition at line 415 of file MarshalSerialize.cc.
References get_size(), and size_.
void oasys::MarshalSize::process | ( | const char * | name, | |
u_char * | bp, | |||
u_int32_t | len | |||
) | [virtual] |
Virtual functions inherited from SerializeAction
Implements oasys::SerializeAction.
Definition at line 422 of file MarshalSerialize.cc.
References get_size(), and size_.
void oasys::MarshalSize::process | ( | const char * | name, | |
u_char ** | bp, | |||
u_int32_t * | lenp, | |||
int | flags | |||
) | [virtual] |
Virtual functions inherited from SerializeAction
Implements oasys::SerializeAction.
Definition at line 436 of file MarshalSerialize.cc.
References oasys::Serialize::NULL_TERMINATED, and size_.
void oasys::MarshalSize::process | ( | const char * | name, | |
std::string * | s | |||
) | [virtual] |
Virtual functions inherited from SerializeAction
Implements oasys::SerializeAction.
Definition at line 429 of file MarshalSerialize.cc.
References get_size(), and size_.
u_int32_t oasys::MarshalSize::size_ [private] |
Definition at line 169 of file MarshalSerialize.h.
Referenced by begin_action(), process(), and size().