#include <BufferedSerializeAction.h>
Definition at line 31 of file BufferedSerializeAction.h.
Public Member Functions | |
BufferedSerializeAction (action_t action, context_t context, u_char *buf, size_t length, int options=0) | |
Constructor with a fixed-length buffer. | |
BufferedSerializeAction (action_t action, context_t context, ExpandableBuffer *buf, int options=0) | |
Constructor with an expandable buffer. | |
virtual void | process (const char *name, SerializableObject *object) |
Since BufferedSerializeAction ignores the name field, calling process() on a contained object is the same as just calling the contained object's serialize() method. | |
Protected Member Functions | |
u_char * | next_slice (size_t length) |
Get the next R/W length of the buffer. | |
u_char * | buf () |
| |
size_t | length () |
| |
size_t | offset () |
| |
Private Attributes | |
ExpandableBuffer * | expandable_buf_ |
Expandable buffer. | |
u_char * | buf_ |
Buffer that is un/marshalled. | |
size_t | length_ |
Length of the buffer. | |
size_t | offset_ |
Offset into the buffer. |
oasys::BufferedSerializeAction::BufferedSerializeAction | ( | action_t | action, | |
context_t | context, | |||
ExpandableBuffer * | buf, | |||
int | options = 0 | |||
) |
Constructor with an expandable buffer.
Definition at line 39 of file BufferedSerializeAction.cc.
References expandable_buf_, and oasys::ExpandableBuffer::set_len().
virtual void oasys::BufferedSerializeAction::process | ( | const char * | name, | |
SerializableObject * | object | |||
) | [inline, virtual] |
Since BufferedSerializeAction ignores the name field, calling process() on a contained object is the same as just calling the contained object's serialize() method.
Reimplemented from oasys::SerializeAction.
Reimplemented in oasys::Marshal.
Definition at line 52 of file BufferedSerializeAction.h.
u_char * oasys::BufferedSerializeAction::next_slice | ( | size_t | length | ) | [protected] |
Get the next R/W length of the buffer.
Return the next chunk of buffer.
Definition at line 76 of file BufferedSerializeAction.cc.
References buf_, oasys::SerializeAction::error(), expandable_buf_, oasys::ExpandableBuffer::incr_len(), length_, offset_, oasys::SerializeAction::signal_error(), and oasys::ExpandableBuffer::tail_buf().
Referenced by oasys::Unmarshal::process(), and oasys::Marshal::process().
u_char * oasys::BufferedSerializeAction::buf | ( | ) | [protected] |
Definition at line 53 of file BufferedSerializeAction.cc.
References buf_, expandable_buf_, and oasys::ExpandableBuffer::raw_buf().
Referenced by oasys::Unmarshal::begin_action(), oasys::Marshal::end_action(), oasys::Unmarshal::process(), and oasys::Marshal::process().
size_t oasys::BufferedSerializeAction::length | ( | ) | [protected] |
Definition at line 59 of file BufferedSerializeAction.cc.
References oasys::ExpandableBuffer::buf_len(), expandable_buf_, and length_.
Referenced by oasys::Unmarshal::begin_action(), and oasys::Unmarshal::process().
size_t oasys::BufferedSerializeAction::offset | ( | ) | [protected] |
Definition at line 65 of file BufferedSerializeAction.cc.
References expandable_buf_, oasys::ExpandableBuffer::len(), and offset_.
Referenced by oasys::Marshal::end_action(), and oasys::Unmarshal::process().
Expandable buffer.
Definition at line 77 of file BufferedSerializeAction.h.
Referenced by buf(), BufferedSerializeAction(), length(), next_slice(), and offset().
u_char* oasys::BufferedSerializeAction::buf_ [private] |
Buffer that is un/marshalled.
Definition at line 81 of file BufferedSerializeAction.h.
Referenced by buf(), and next_slice().
size_t oasys::BufferedSerializeAction::length_ [private] |
Length of the buffer.
Definition at line 82 of file BufferedSerializeAction.h.
Referenced by length(), and next_slice().
size_t oasys::BufferedSerializeAction::offset_ [private] |
Offset into the buffer.
Definition at line 83 of file BufferedSerializeAction.h.
Referenced by next_slice(), and offset().