#include <kokostream.h>
Inheritance diagram for basic_kokobuf< _Elem, _Traits, _Alloc >:
Public Types | |
typedef _Alloc | allocator_type |
typedef std::basic_streambuf< _Elem, _Traits > | _Mysb |
My Stream buffer (ie. my base class). | |
typedef std::basic_string< _Elem, _Traits, _Alloc > | _Mystr |
My String (ie, what kind of buffer am I). | |
typedef std::ios_base::openmode | openmode |
typedef int | _Strstate |
typedef _Traits::int_type | int_type |
typedef _Traits::pos_type | pos_type |
typedef _Traits::off_type | off_type |
enum | { _Allocated = 1, _Constant = 2, _Noread = 4, _Append = 8, _Frozen = 16 } |
Public Member Functions | |
basic_kokobuf (int size, openmode _Mode=std::ios_base::in|std::ios_base::out) | |
using default base class constructors | |
virtual | ~basic_kokobuf () |
destruction, nuke it :) | |
bool | resetStream () |
recycle your streams, think green. | |
bool | makeWritable () |
make it into a "in" stream buf, you still need to reset the stream, if that is your intention false= success, true = failure | |
bool | makeReadable () |
make it into a "out" stream buf make an instream into an outstream. | |
int | totalBufferSize () const |
How big is this buffer. | |
int | writableSize () const |
how much could you write to this stream? | |
int | writtenSize () const |
how much has been written | |
_Elem * | getCurWritePtr () |
getWritePtr(), frezes stream till you set the written size, | |
void | setWrittenSize (int size) |
set how much was written after you get the getWritePtr(), + "unFreze" the stream | |
const _Elem * | getReadPtr () const |
get the pointer for reading only, starting at the beginning of stream | |
const _Elem * | getCurReadPtr () const |
get a read pointer from the current position | |
void | setReadSize (int size) |
you read from it? how much plus, return it to a "normal state" | |
void | returnReadPtr () |
return it to a "normal state" after reading, equiv. | |
size_t | getReadableSize () const |
how much of this array has been written to | |
bool | isFrozen () const |
can we/should we write to this buffer | |
bool | isConst () const |
bool | setSize (int size) |
change the size of this stream, carefull, is this really nessessary? copys old data, could be slow. | |
_Mystr | str () const |
get a "deep copy" of the buffer, no need to unfreze() | |
void | str (const _Mystr &_Newstr) |
resize + "deep copy" from a string | |
Protected Types | |
enum | { _MINSIZE = 32 } |
Protected Member Functions | |
virtual int_type | overflow (int_type _Meta=_Traits::eof()) |
Protected from here down. | |
virtual int_type | pbackfail (int_type _Meta=_Traits::eof()) |
virtual int_type | underflow () |
virtual pos_type | seekoff (off_type _Off, std::ios_base::seekdir _Way, openmode _Which=std::ios_base::in|std::ios_base::out) |
virtual pos_type | seekpos (pos_type _Ptr, openmode _Mode=std::ios_base::in|std::ios_base::out) |
void | _Init (const _Elem *_Ptr, size_t _Count, _Strstate _State) |
void | _Tidy () |
_Strstate | _Getstate (openmode _Mode) |
virtual void | _incCount () |
gutz::Counted interface, increment reference count by one. | |
virtual void | _decCount () |
gutz::Counted interface, decrement reference count by one. | |
virtual int | _getCount () const |
gutz::Counted interface, get the current reference count. | |
Protected Attributes | |
_Elem * | _Seekhigh |
_Strstate | _Mystate |
allocator_type | _Al |
Friends | |
class | SmartPtr |
class | SmartPtrRef |
|
My Stream buffer (ie. my base class).
Definition at line 55 of file kokostream.h. |
|
My String (ie, what kind of buffer am I).
Definition at line 57 of file kokostream.h. Referenced by basic_kokobuf< _Elem, _Traits, _Alloc >::str(). |
|
Definition at line 103 of file kokostream.h. Referenced by basic_kokobuf< _Elem, _Traits, _Alloc >::_Getstate(). |
|
Definition at line 53 of file kokostream.h. |
|
Definition at line 105 of file kokostream.h. Referenced by basic_kokobuf< _Elem, _Traits, _Alloc >::overflow(), basic_kokobuf< _Elem, _Traits, _Alloc >::pbackfail(), and basic_kokobuf< _Elem, _Traits, _Alloc >::underflow(). |
|
Definition at line 107 of file kokostream.h. Referenced by basic_kokobuf< _Elem, _Traits, _Alloc >::seekoff(). |
|
Definition at line 58 of file kokostream.h. |
|
Definition at line 106 of file kokostream.h. Referenced by basic_kokobuf< _Elem, _Traits, _Alloc >::seekoff(), and basic_kokobuf< _Elem, _Traits, _Alloc >::seekpos(). |
|
Definition at line 95 of file kokostream.h. |
|
Definition at line 595 of file kokostream.h. |
|
using default base class constructors istream &| ostream Definition at line 62 of file kokostream.h. References basic_kokobuf< _Elem, _Traits, _Alloc >::_Al, basic_kokobuf< _Elem, _Traits, _Alloc >::_Allocated, basic_kokobuf< _Elem, _Traits, _Alloc >::_Constant, basic_kokobuf< _Elem, _Traits, _Alloc >::_Getstate(), basic_kokobuf< _Elem, _Traits, _Alloc >::_Init(), basic_kokobuf< _Elem, _Traits, _Alloc >::_Mystate, basic_kokobuf< _Elem, _Traits, _Alloc >::_Noread, basic_kokobuf< _Elem, _Traits, _Alloc >::_Seekhigh, and size. |
|
destruction, nuke it :)
Definition at line 90 of file kokostream.h. References basic_kokobuf< _Elem, _Traits, _Alloc >::_Tidy(). |
|
gutz::Counted interface, decrement reference count by one. Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr. Sometimes you need to call this though, see the documentation for gutz::SmartPtr Definition at line 54 of file smartptr.h. Referenced by TFImage::clear(), NrroImage::fBlendOverRGBA(), and Nrro::updateMinMax(). |
|
gutz::Counted interface, get the current reference count. Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr. Definition at line 58 of file smartptr.h. |
|
Definition at line 600 of file kokostream.h. References basic_kokobuf< _Elem, _Traits, _Alloc >::_Append, basic_kokobuf< _Elem, _Traits, _Alloc >::_Constant, basic_kokobuf< _Elem, _Traits, _Alloc >::_Noread, and basic_kokobuf< _Elem, _Traits, _Alloc >::_Strstate. Referenced by basic_kokobuf< _Elem, _Traits, _Alloc >::basic_kokobuf(). |
|
gutz::Counted interface, increment reference count by one. Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr. Sometimes you need to call this though, see the documentation for gutz::SmartPtr Definition at line 48 of file smartptr.h. Referenced by TFImage::clear(), NrroImage::fBlendOverRGBA(), and Nrro::updateMinMax(). |
|
|
|
get a read pointer from the current position
Definition at line 223 of file kokostream.h. References basic_kokobuf< _Elem, _Traits, _Alloc >::_Constant, basic_kokobuf< _Elem, _Traits, _Alloc >::_Frozen, and basic_kokobuf< _Elem, _Traits, _Alloc >::_Mystate. |
|
getWritePtr(), frezes stream till you set the written size,
Definition at line 189 of file kokostream.h. References basic_kokobuf< _Elem, _Traits, _Alloc >::_Constant, basic_kokobuf< _Elem, _Traits, _Alloc >::_Frozen, and basic_kokobuf< _Elem, _Traits, _Alloc >::_Mystate. Referenced by basic_kokobuf< _Elem, _Traits, _Alloc >::str(). |
|
how much of this array has been written to
Definition at line 248 of file kokostream.h. |
|
get the pointer for reading only, starting at the beginning of stream
Definition at line 214 of file kokostream.h. References basic_kokobuf< _Elem, _Traits, _Alloc >::_Constant, basic_kokobuf< _Elem, _Traits, _Alloc >::_Frozen, and basic_kokobuf< _Elem, _Traits, _Alloc >::_Mystate. |
|
Definition at line 256 of file kokostream.h. References basic_kokobuf< _Elem, _Traits, _Alloc >::_Constant, basic_kokobuf< _Elem, _Traits, _Alloc >::_Frozen, and basic_kokobuf< _Elem, _Traits, _Alloc >::_Mystate. |
|
can we/should we write to this buffer
Definition at line 255 of file kokostream.h. References basic_kokobuf< _Elem, _Traits, _Alloc >::_Frozen, and basic_kokobuf< _Elem, _Traits, _Alloc >::_Mystate. |
|
make it into a "out" stream buf make an instream into an outstream. false = success, true = failure setg(_Mysb::pbase(),_Mysb::pbase(),_Mysb::pptr()+1); Definition at line 154 of file kokostream.h. References basic_kokobuf< _Elem, _Traits, _Alloc >::_Frozen, basic_kokobuf< _Elem, _Traits, _Alloc >::_Mystate, and basic_kokobuf< _Elem, _Traits, _Alloc >::_Noread. |
|
make it into a "in" stream buf, you still need to reset the stream, if that is your intention false= success, true = failure
Definition at line 143 of file kokostream.h. References basic_kokobuf< _Elem, _Traits, _Alloc >::_Constant, basic_kokobuf< _Elem, _Traits, _Alloc >::_Frozen, and basic_kokobuf< _Elem, _Traits, _Alloc >::_Mystate. |
|
Protected from here down. g++, may need yet more hacks! g++, may need yet more hacks! Definition at line 334 of file kokostream.h. References basic_kokobuf< _Elem, _Traits, _Alloc >::_Al, basic_kokobuf< _Elem, _Traits, _Alloc >::_Allocated, basic_kokobuf< _Elem, _Traits, _Alloc >::_Append, basic_kokobuf< _Elem, _Traits, _Alloc >::_Constant, basic_kokobuf< _Elem, _Traits, _Alloc >::_MINSIZE, basic_kokobuf< _Elem, _Traits, _Alloc >::_Mystate, basic_kokobuf< _Elem, _Traits, _Alloc >::_Noread, basic_kokobuf< _Elem, _Traits, _Alloc >::_Seekhigh, and basic_kokobuf< _Elem, _Traits, _Alloc >::int_type. |
|
Definition at line 424 of file kokostream.h. References basic_kokobuf< _Elem, _Traits, _Alloc >::_Constant, basic_kokobuf< _Elem, _Traits, _Alloc >::_Mystate, and basic_kokobuf< _Elem, _Traits, _Alloc >::int_type. |
|
recycle your streams, think green. false = success, true = failure g++ ? Definition at line 116 of file kokostream.h. References basic_kokobuf< _Elem, _Traits, _Alloc >::_Frozen, basic_kokobuf< _Elem, _Traits, _Alloc >::_Mystate, basic_kokobuf< _Elem, _Traits, _Alloc >::_Noread, and basic_kokobuf< _Elem, _Traits, _Alloc >::_Seekhigh. Referenced by basic_kokobuf< _Elem, _Traits, _Alloc >::str(). |
|
return it to a "normal state" after reading, equiv. unFreze(); Definition at line 241 of file kokostream.h. References basic_kokobuf< _Elem, _Traits, _Alloc >::_Constant, basic_kokobuf< _Elem, _Traits, _Alloc >::_Frozen, and basic_kokobuf< _Elem, _Traits, _Alloc >::_Mystate. |
|
istream g++, may need yet more hacks! ostream Definition at line 459 of file kokostream.h. References _BADOFF, basic_kokobuf< _Elem, _Traits, _Alloc >::_Seekhigh, basic_kokobuf< _Elem, _Traits, _Alloc >::off_type, and basic_kokobuf< _Elem, _Traits, _Alloc >::pos_type. |
|
Definition at line 515 of file kokostream.h. References _BADOFF, basic_kokobuf< _Elem, _Traits, _Alloc >::_Seekhigh, and basic_kokobuf< _Elem, _Traits, _Alloc >::pos_type. |
|
you read from it? how much plus, return it to a "normal state"
Definition at line 232 of file kokostream.h. References basic_kokobuf< _Elem, _Traits, _Alloc >::_Constant, basic_kokobuf< _Elem, _Traits, _Alloc >::_Frozen, basic_kokobuf< _Elem, _Traits, _Alloc >::_Mystate, and size. |
|
change the size of this stream, carefull, is this really nessessary? copys old data, could be slow.
Definition at line 262 of file kokostream.h. References basic_kokobuf< _Elem, _Traits, _Alloc >::_Al, basic_kokobuf< _Elem, _Traits, _Alloc >::_Allocated, basic_kokobuf< _Elem, _Traits, _Alloc >::_Mystate, basic_kokobuf< _Elem, _Traits, _Alloc >::_Noread, basic_kokobuf< _Elem, _Traits, _Alloc >::_Seekhigh, and size. |
|
set how much was written after you get the getWritePtr(), + "unFreze" the stream we only inc to last char written Definition at line 205 of file kokostream.h. References basic_kokobuf< _Elem, _Traits, _Alloc >::_Constant, basic_kokobuf< _Elem, _Traits, _Alloc >::_Frozen, basic_kokobuf< _Elem, _Traits, _Alloc >::_Mystate, and size. Referenced by basic_kokobuf< _Elem, _Traits, _Alloc >::str(). |
|
resize + "deep copy" from a string
Definition at line 310 of file kokostream.h. References basic_kokobuf< _Elem, _Traits, _Alloc >::_Init(), basic_kokobuf< _Elem, _Traits, _Alloc >::_Mystate, basic_kokobuf< _Elem, _Traits, _Alloc >::_Tidy(), basic_kokobuf< _Elem, _Traits, _Alloc >::getCurWritePtr(), basic_kokobuf< _Elem, _Traits, _Alloc >::resetStream(), s, and basic_kokobuf< _Elem, _Traits, _Alloc >::setWrittenSize(). |
|
get a "deep copy" of the buffer, no need to unfreze() ostream istream Definition at line 286 of file kokostream.h. References basic_kokobuf< _Elem, _Traits, _Alloc >::_Constant, basic_kokobuf< _Elem, _Traits, _Alloc >::_Mystate, basic_kokobuf< _Elem, _Traits, _Alloc >::_Mystr, basic_kokobuf< _Elem, _Traits, _Alloc >::_Noread, and basic_kokobuf< _Elem, _Traits, _Alloc >::_Seekhigh. |
|
How big is this buffer.
Definition at line 166 of file kokostream.h. |
|
|
how much could you write to this stream?
Definition at line 173 of file kokostream.h. |
|
how much has been written
Definition at line 180 of file kokostream.h. |
|
Definition at line 40 of file smartptr.h. Referenced by Nrro::NrroIter< T >::NrroIter(). |
|
Definition at line 41 of file smartptr.h. |
|
|
|