#include <binarystream.h>
Public Member Functions | |
basic_binstreambuf (const _Ch *p) | |
basic_binstreambuf (std::streamsize sz) | |
basic_binstreambuf (const _Ch *p) | |
basic_binstreambuf (std::streamsize sz) | |
_Ch * | givebuf () |
_Ch * | givebuf () |
size_t | outbufsize () const |
size_t | outbufsize () const |
virtual | ~basic_binstreambuf () |
virtual | ~basic_binstreambuf () |
Static Public Member Functions | |
size_t | computesize (size_t s) |
size_t | computesize (size_t s) |
Private Attributes | |
_Ch * | _inbuf |
_Ch * | _inbuf |
_Ch * | _outbuf |
_Ch * | _outbuf |
|
00029 : _outbuf(new _Ch[sz + sizeof(std::streamsize)/sizeof(_Ch)]), _inbuf(0) { 00030 memcpy(_outbuf, &sz, sizeof(std::streamsize)); 00031 setp (_outbuf + sizeof(std::streamsize), _outbuf + sz*sizeof(_Ch) + sizeof(unsigned int)); 00032 }
|
|
00033 : _outbuf(0), _inbuf(0) { 00034 std::streamsize sz = *((const std::streamsize*)p); 00035 _inbuf = new _Ch[sz]; 00036 memcpy (_inbuf, p + sizeof(std::streamsize), sz); 00037 setg (_inbuf, _inbuf, _inbuf + sz * sizeof(_Ch)); 00038 }
|
|
00039 { delete _outbuf; delete _inbuf; }
|
|
00029 : _outbuf(new _Ch[sz + sizeof(std::streamsize)/sizeof(_Ch)]), _inbuf(0) { 00030 memcpy(_outbuf, &sz, sizeof(std::streamsize)); 00031 setp (_outbuf + sizeof(std::streamsize), _outbuf + sz*sizeof(_Ch) + sizeof(unsigned int)); 00032 }
|
|
00033 : _outbuf(0), _inbuf(0) { 00034 std::streamsize sz = *((const std::streamsize*)p); 00035 _inbuf = new _Ch[sz]; 00036 memcpy (_inbuf, p + sizeof(std::streamsize), sz); 00037 setg (_inbuf, _inbuf, _inbuf + sz * sizeof(_Ch)); 00038 }
|
|
00039 { delete _outbuf; delete _inbuf; }
|
|
00056 { 00057 return s + sizeof(std::streamsize); 00058 }
|
|
00056 { 00057 return s + sizeof(std::streamsize); 00058 }
|
|
00042 { 00043 _Ch* p = _outbuf; 00044 _outbuf = 0; 00045 return p; 00046 }
|
|
00042 { 00043 _Ch* p = _outbuf; 00044 _outbuf = 0; 00045 return p; 00046 }
|
|
00050 { 00051 return (_outbuf) ? (sizeof(_Ch) * (*(std::streamsize*)_outbuf) + sizeof(std::streamsize)) : 0; 00052 }
|
|
00050 { 00051 return (_outbuf) ? (sizeof(_Ch) * (*(std::streamsize*)_outbuf) + sizeof(std::streamsize)) : 0; 00052 }
|
|
|
|
|
|
|
|
|