#include <MarshalSerialize.h>
Inheritance diagram for oasys::MarshalSize:
Definition at line 134 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. | |
size_t | size () |
| |
void | begin_action () |
Virtual functions inherited from SerializeAction. | |
void | process (const char *name, u_int32_t *i) |
Virtual functions inherited from SerializeAction. | |
void | process (const char *name, u_int16_t *i) |
Virtual functions inherited from SerializeAction. | |
void | process (const char *name, u_int8_t *i) |
Virtual functions inherited from SerializeAction. | |
void | process (const char *name, bool *b) |
Virtual functions inherited from SerializeAction. | |
void | process (const char *name, u_char *bp, size_t len) |
Virtual functions inherited from SerializeAction. | |
void | process (const char *name, u_char **bp, size_t *lenp, int flags) |
Virtual functions inherited from SerializeAction. | |
void | process (const char *name, std::string *s) |
Virtual functions inherited from SerializeAction. | |
Static Public Member Functions | |
static size_t | get_size (u_int32_t *) |
Static functions to simply return the serialized sizes. | |
static size_t | get_size (u_int16_t *) |
Static functions to simply return the serialized sizes. | |
static size_t | get_size (u_int8_t *) |
Static functions to simply return the serialized sizes. | |
static size_t | get_size (bool *) |
Static functions to simply return the serialized sizes. | |
static size_t | get_size (u_char *, size_t len) |
Static functions to simply return the serialized sizes. | |
static size_t | get_size (std::string *s) |
Static functions to simply return the serialized sizes. | |
Private Attributes | |
size_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 147 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 * | const_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 153 of file MarshalSerialize.h.
References oasys::SerializeAction::process().
size_t oasys::MarshalSize::size | ( | ) | [inline] |
Definition at line 160 of file MarshalSerialize.h.
References size_.
Referenced by oasys::DurableTableImpl::flatten(), and oasys::BerkeleyDBTable::put().
static size_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 165 of file MarshalSerialize.h.
Referenced by oasys::BerkeleyDBTable::get(), process(), and oasys::BerkeleyDBTable::put().
static size_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 166 of file MarshalSerialize.h.
static size_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 167 of file MarshalSerialize.h.
static size_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 168 of file MarshalSerialize.h.
static size_t oasys::MarshalSize::get_size | ( | u_char * | , | |
size_t | len | |||
) | [inline, static] |
Static functions to simply return the serialized sizes.
Called from the various process() variants.
Definition at line 169 of file MarshalSerialize.h.
static size_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 170 of file MarshalSerialize.h.
void oasys::MarshalSize::begin_action | ( | ) | [virtual] |
Virtual functions inherited from SerializeAction.
Reimplemented from oasys::SerializeAction.
Definition at line 369 of file MarshalSerialize.cc.
References oasys::SerializeAction::options_, size_, and oasys::Serialize::USE_CRC.
void oasys::MarshalSize::process | ( | const char * | name, | |
u_int32_t * | i | |||
) | [virtual] |
Virtual functions inherited from SerializeAction.
Implements oasys::SerializeAction.
Definition at line 377 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 384 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 391 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 398 of file MarshalSerialize.cc.
References get_size(), and size_.
void oasys::MarshalSize::process | ( | const char * | name, | |
u_char * | bp, | |||
size_t | len | |||
) | [virtual] |
Virtual functions inherited from SerializeAction.
Implements oasys::SerializeAction.
Definition at line 405 of file MarshalSerialize.cc.
References get_size(), and size_.
void oasys::MarshalSize::process | ( | const char * | name, | |
u_char ** | bp, | |||
size_t * | lenp, | |||
int | flags | |||
) | [virtual] |
Virtual functions inherited from SerializeAction.
Implements oasys::SerializeAction.
Definition at line 419 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 412 of file MarshalSerialize.cc.
References get_size(), and size_.
size_t oasys::MarshalSize::size_ [private] |
Definition at line 186 of file MarshalSerialize.h.
Referenced by begin_action(), process(), and size().