#include <KeySerialize.h>
The serialized format is filename and null character friendly. (Note: This marshaller will not check to see if stored strings conform, so users of this class will have to do that check themselves).
Definition at line 38 of file KeySerialize.h.
Public Member Functions | |
KeyMarshal (ExpandableBuffer *buf, const char *border=0) | |
int | action (const SerializableObject *object) |
Const object handler. | |
void | process (const char *name, u_int64_t *i) |
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, u_int32_t len) |
Virtual functions inherited from SerializeAction. | |
void | process (const char *name, u_char **bp, u_int32_t *lenp, int flags) |
Virtual functions inherited from SerializeAction. | |
void | process (const char *name, std::string *s) |
Virtual functions inherited from SerializeAction. | |
void | process (const char *name, SerializableObject *object) |
Virtual functions inherited from SerializeAction. | |
void | end_action () |
Virtual functions inherited from SerializeAction. | |
Private Member Functions | |
void | process_int (u_int32_t i, u_int32_t size, const char *format) |
void | process_int64 (u_int64_t i, u_int32_t size, const char *format) |
void | border () |
Private Attributes | |
ExpandableBuffer * | buf_ |
const char * | border_ |
oasys::KeyMarshal::KeyMarshal | ( | ExpandableBuffer * | buf, | |
const char * | border = 0 | |||
) |
Definition at line 22 of file KeySerialize.cc.
void oasys::KeyMarshal::process | ( | const char * | name, | |
u_int64_t * | i | |||
) | [virtual] |
Virtual functions inherited from SerializeAction.
Implements oasys::SerializeAction.
Definition at line 31 of file KeySerialize.cc.
References border(), and process_int64().
void oasys::KeyMarshal::process | ( | const char * | name, | |
u_int32_t * | i | |||
) | [virtual] |
Virtual functions inherited from SerializeAction.
Implements oasys::SerializeAction.
Definition at line 41 of file KeySerialize.cc.
References border(), and process_int().
void oasys::KeyMarshal::process | ( | const char * | name, | |
u_int16_t * | i | |||
) | [virtual] |
Virtual functions inherited from SerializeAction.
Implements oasys::SerializeAction.
Definition at line 51 of file KeySerialize.cc.
References border(), and process_int().
void oasys::KeyMarshal::process | ( | const char * | name, | |
u_int8_t * | i | |||
) | [virtual] |
Virtual functions inherited from SerializeAction.
Implements oasys::SerializeAction.
Definition at line 61 of file KeySerialize.cc.
References border(), and process_int().
void oasys::KeyMarshal::process | ( | const char * | name, | |
bool * | b | |||
) | [virtual] |
Virtual functions inherited from SerializeAction.
Implements oasys::SerializeAction.
Definition at line 71 of file KeySerialize.cc.
References border(), and process_int().
void oasys::KeyMarshal::process | ( | const char * | name, | |
u_char * | bp, | |||
u_int32_t | len | |||
) | [virtual] |
Virtual functions inherited from SerializeAction.
Implements oasys::SerializeAction.
Definition at line 81 of file KeySerialize.cc.
References border(), buf_, oasys::ExpandableBuffer::end(), oasys::SerializeAction::error(), oasys::ExpandableBuffer::len(), oasys::ExpandableBuffer::reserve(), and oasys::ExpandableBuffer::set_len().
void oasys::KeyMarshal::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 97 of file KeySerialize.cc.
References ASSERT, border(), buf_, oasys::ExpandableBuffer::end(), oasys::SerializeAction::error(), oasys::ExpandableBuffer::len(), oasys::Serialize::NULL_TERMINATED, process_int(), oasys::ExpandableBuffer::reserve(), and oasys::ExpandableBuffer::set_len().
void oasys::KeyMarshal::process | ( | const char * | name, | |
std::string * | s | |||
) | [virtual] |
Virtual functions inherited from SerializeAction.
Implements oasys::SerializeAction.
Definition at line 125 of file KeySerialize.cc.
References border(), buf_, oasys::ExpandableBuffer::end(), oasys::SerializeAction::error(), oasys::ExpandableBuffer::len(), process_int(), oasys::ExpandableBuffer::reserve(), and oasys::ExpandableBuffer::set_len().
void oasys::KeyMarshal::process | ( | const char * | name, | |
SerializableObject * | object | |||
) | [virtual] |
Virtual functions inherited from SerializeAction.
Reimplemented from oasys::SerializeAction.
Definition at line 141 of file KeySerialize.cc.
References action(), border(), oasys::SerializeAction::error(), and oasys::SerializeAction::signal_error().
void oasys::KeyMarshal::end_action | ( | ) | [virtual] |
Virtual functions inherited from SerializeAction.
Reimplemented from oasys::SerializeAction.
Definition at line 157 of file KeySerialize.cc.
References buf_, oasys::ExpandableBuffer::end(), and oasys::ExpandableBuffer::reserve().
int oasys::KeyMarshal::action | ( | const SerializableObject * | object | ) | [inline] |
Const object handler.
Definition at line 58 of file KeySerialize.h.
References oasys::SerializeAction::action().
Referenced by oasys::FileSystemTable::del(), oasys::FileSystemTable::get_common(), process(), and oasys::FileSystemTable::put().
void oasys::KeyMarshal::process_int | ( | u_int32_t | i, | |
u_int32_t | size, | |||
const char * | format | |||
) | [private] |
Definition at line 165 of file KeySerialize.cc.
References ASSERT, buf_, oasys::ExpandableBuffer::end(), oasys::SerializeAction::error(), oasys::ExpandableBuffer::len(), oasys::ExpandableBuffer::reserve(), oasys::ExpandableBuffer::set_len(), and snprintf().
Referenced by process().
void oasys::KeyMarshal::process_int64 | ( | u_int64_t | i, | |
u_int32_t | size, | |||
const char * | format | |||
) | [private] |
Definition at line 178 of file KeySerialize.cc.
References ASSERT, buf_, oasys::ExpandableBuffer::end(), oasys::SerializeAction::error(), oasys::ExpandableBuffer::len(), oasys::ExpandableBuffer::reserve(), oasys::ExpandableBuffer::set_len(), and snprintf().
Referenced by process().
void oasys::KeyMarshal::border | ( | ) | [private] |
Definition at line 191 of file KeySerialize.cc.
References border_, buf_, oasys::ExpandableBuffer::end(), oasys::SerializeAction::error(), oasys::ExpandableBuffer::len(), oasys::ExpandableBuffer::reserve(), and oasys::ExpandableBuffer::set_len().
Referenced by process().
ExpandableBuffer* oasys::KeyMarshal::buf_ [private] |
Definition at line 64 of file KeySerialize.h.
Referenced by border(), end_action(), process(), process_int(), and process_int64().
const char* oasys::KeyMarshal::border_ [private] |