#include <ExpandableBuffer.h>
Inheritance diagram for oasys::ExpandableBuffer:
Definition at line 15 of file ExpandableBuffer.h.
Public Member Functions | |
ExpandableBuffer (size_t size=0) | |
ExpandableBuffer (const ExpandableBuffer &other) | |
virtual | ~ExpandableBuffer () |
char * | tail_buf (size_t size) |
virtual void | reserve (size_t size) |
int | nfree () const |
| |
char * | raw_buf () const |
| |
char * | at (size_t offset) const |
| |
char * | end () const |
| |
size_t | buf_len () const |
| |
size_t | len () const |
| |
void | set_len (size_t len) |
Set the length to this amount. | |
void | incr_len (size_t amt) |
Increase len by this amount. | |
void | clear () |
Protected Attributes | |
char * | buf_ |
size_t | buf_len_ |
size_t | len_ |
oasys::ExpandableBuffer::ExpandableBuffer | ( | size_t | size = 0 |
) | [inline] |
oasys::ExpandableBuffer::ExpandableBuffer | ( | const ExpandableBuffer & | other | ) | [inline] |
virtual oasys::ExpandableBuffer::~ExpandableBuffer | ( | ) | [inline, virtual] |
char* oasys::ExpandableBuffer::tail_buf | ( | size_t | size | ) | [inline] |
Return a pointer into the expanded buffer, past data up to len_, and with enough space for the given size.
Definition at line 50 of file ExpandableBuffer.h.
References ASSERT, buf_, buf_len_, len_, and reserve().
Referenced by oasys::BufferedSerializeAction::next_slice().
virtual void oasys::ExpandableBuffer::reserve | ( | size_t | size | ) | [inline, virtual] |
Reserve buffer space.
size | The size of the buffer desired |
Reimplemented in oasys::ScratchBuffer< _memory_t, _static_size >, oasys::ScratchBuffer< char *, 512 >, and oasys::ScratchBuffer< u_char * >.
Definition at line 67 of file ExpandableBuffer.h.
References buf_, and buf_len_.
Referenced by oasys::StringBuffer::append(), oasys::StringBuffer::append_int(), oasys::KeyMarshal::border(), oasys::StringBuffer::c_str(), oasys::KeyMarshal::end_action(), ExpandableBuffer(), oasys::FileSystemTable::get_common(), oasys::KeyMarshal::process(), oasys::KeyMarshal::process_int(), oasys::ScratchBuffer< u_char * >::reserve(), oasys::StringBuffer::StringBuffer(), tail_buf(), and oasys::StringBuffer::vappendf().
int oasys::ExpandableBuffer::nfree | ( | ) | const [inline] |
Definition at line 78 of file ExpandableBuffer.h.
References ASSERT, buf_len_, and len_.
Referenced by oasys::StringBuffer::c_str(), and oasys::StringBuffer::vappendf().
char* oasys::ExpandableBuffer::raw_buf | ( | ) | const [inline] |
Definition at line 84 of file ExpandableBuffer.h.
Referenced by oasys::BufferedSerializeAction::buf(), oasys::MarshalCopy::copy(), and oasys::StringBuffer::data().
char* oasys::ExpandableBuffer::at | ( | size_t | offset | ) | const [inline] |
Definition at line 91 of file ExpandableBuffer.h.
References ASSERT, buf_, and buf_len_.
Referenced by oasys::StringBuffer::c_str(), end(), and oasys::FileSystemTable::get_common().
char* oasys::ExpandableBuffer::end | ( | ) | const [inline] |
Definition at line 102 of file ExpandableBuffer.h.
References ASSERT, at(), buf_, buf_len_, and len_.
Referenced by oasys::StringBuffer::append(), oasys::StringBuffer::append_int(), oasys::KeyMarshal::border(), oasys::StringBuffer::c_str(), oasys::KeyMarshal::end_action(), oasys::FileSystemTable::get_common(), oasys::KeyMarshal::process(), oasys::KeyMarshal::process_int(), and oasys::StringBuffer::vappendf().
size_t oasys::ExpandableBuffer::buf_len | ( | ) | const [inline] |
Definition at line 109 of file ExpandableBuffer.h.
References buf_len_.
Referenced by oasys::BufferedSerializeAction::length(), dtn::BluetoothConvergenceLayer::Connection::send_bundle(), oasys::StringBuffer::set_length(), and oasys::StringBuffer::vappendf().
size_t oasys::ExpandableBuffer::len | ( | ) | const [inline] |
Definition at line 114 of file ExpandableBuffer.h.
References len_.
Referenced by oasys::StringBuffer::append(), oasys::StringBuffer::append_int(), oasys::KeyMarshal::border(), oasys::StringBuffer::c_str(), oasys::MarshalCopy::copy(), oasys::MemoryTable::get(), oasys::FileSystemTable::get(), oasys::FileSystemTable::get_common(), oasys::MemoryIterator::get_key(), dtntunnel::UDPTunnel::handle_bundle(), dtntunnel::TCPTunnel::Connection::handle_bundle(), dtntunnel::TCPTunnel::handle_bundle(), oasys::StringBuffer::length(), oasys::BufferedSerializeAction::offset(), oasys::TextUnmarshal::process(), oasys::KeyMarshal::process(), oasys::KeyMarshal::process_int(), oasys::FileSystemTable::put(), dtntunnel::TCPTunnel::Connection::run(), dtntunnel::DTNTunnel::send_bundle(), oasys::StringBuffer::trim(), and oasys::StringBuffer::vappendf().
void oasys::ExpandableBuffer::set_len | ( | size_t | len | ) | [inline] |
Set the length to this amount.
Definition at line 117 of file ExpandableBuffer.h.
References ASSERT, buf_len_, and len_.
Referenced by oasys::StringBuffer::append(), oasys::StringBuffer::append_int(), oasys::KeyMarshal::border(), oasys::BufferedSerializeAction::BufferedSerializeAction(), clear(), oasys::FileSystemTable::get_common(), dtntunnel::DTNTunnel::handle_bundle(), oasys::KeyMarshal::process(), oasys::KeyMarshal::process_int(), dtntunnel::UDPTunnel::Listener::run(), dtntunnel::TCPTunnel::Connection::run(), oasys::StringBuffer::set_length(), oasys::StringBuffer::trim(), and oasys::StringBuffer::vappendf().
void oasys::ExpandableBuffer::incr_len | ( | size_t | amt | ) | [inline] |
Increase len by this amount.
Definition at line 123 of file ExpandableBuffer.h.
References ASSERT, buf_len_, and len_.
Referenced by oasys::BufferedSerializeAction::next_slice().
void oasys::ExpandableBuffer::clear | ( | ) | [inline] |
char* oasys::ExpandableBuffer::buf_ [protected] |
Definition at line 133 of file ExpandableBuffer.h.
Referenced by at(), oasys::ScratchBuffer< u_char * >::buf(), oasys::ScratchBuffer< _memory_t, 0 >::buf(), end(), ExpandableBuffer(), raw_buf(), oasys::ScratchBuffer< u_char * >::reserve(), reserve(), oasys::ScratchBuffer< u_char * >::ScratchBuffer(), tail_buf(), oasys::ScratchBuffer< u_char * >::using_malloc(), ~ExpandableBuffer(), and oasys::ScratchBuffer< u_char * >::~ScratchBuffer().
size_t oasys::ExpandableBuffer::buf_len_ [protected] |
Definition at line 134 of file ExpandableBuffer.h.
Referenced by at(), oasys::ScratchBuffer< _memory_t, 0 >::buf(), buf_len(), end(), ExpandableBuffer(), incr_len(), nfree(), oasys::ScratchBuffer< u_char * >::reserve(), reserve(), oasys::ScratchBuffer< u_char * >::ScratchBuffer(), set_len(), tail_buf(), and ~ExpandableBuffer().
size_t oasys::ExpandableBuffer::len_ [protected] |
Definition at line 135 of file ExpandableBuffer.h.
Referenced by end(), ExpandableBuffer(), incr_len(), len(), nfree(), set_len(), tail_buf(), and ~ExpandableBuffer().