memorybuf::in Class Reference

An input streambuf for memory access. More...

Inheritance diagram for memorybuf::in:
[legend]
Collaboration diagram for memorybuf::in:
[legend]

Public Member Functions

 in (char *s, std::streamsize n)
 Construct for character array (can be nullptr) and number of bytes. More...
 
void resetg (char *s, std::streamsize n)
 Reset for character array (can be nullptr) and number of bytes. More...
 
std::streamsize capacity () const
 The buffer capacity. More...
 
const UList< char > list () const
 Const UList access to the input characters (shallow copy). More...
 
UList< char > list ()
 Non-const UList access to the input characters (shallow copy). More...
 
void printBufInfo (Ostream &os) const
 Some information about the input buffer position/capacity. More...
 
std::streamsize tellg () const
 The buffer get position. More...
 

Protected Member Functions

 in ()=default
 Default construct. More...
 
virtual std::streamsize xsgetn (char *s, std::streamsize n)
 Get sequence of characters. More...
 
- Protected Member Functions inherited from memorybuf
virtual std::streampos seekoff (std::streamoff off, std::ios_base::seekdir way, std::ios_base::openmode which=std::ios_base::in|std::ios_base::out)
 Set position pointer to relative position. More...
 
virtual std::streampos seekpos (std::streampos pos, std::ios_base::openmode which=std::ios_base::in|std::ios_base::out)
 Set position pointer to absolute position. More...
 
std::streamsize tellg () const
 
std::streamsize tellp () const
 

Detailed Description

An input streambuf for memory access.

Definition at line 159 of file memoryStreamBuffer.H.

Constructor & Destructor Documentation

◆ in() [1/2]

in ( )
protecteddefault

Default construct.

◆ in() [2/2]

in ( char *  s,
std::streamsize  n 
)
inline

Construct for character array (can be nullptr) and number of bytes.

Definition at line 186 of file memoryStreamBuffer.H.

References n, memorybuf::in::resetg(), and s.

Here is the call graph for this function:

Member Function Documentation

◆ xsgetn()

virtual std::streamsize xsgetn ( char *  s,
std::streamsize  n 
)
inlineprotectedvirtual

Get sequence of characters.

Definition at line 169 of file memoryStreamBuffer.H.

References Foam::BitOps::count(), n, and s.

Here is the call graph for this function:

◆ resetg()

void resetg ( char *  s,
std::streamsize  n 
)
inline

Reset for character array (can be nullptr) and number of bytes.

Sets get pointer to the begin.

Definition at line 193 of file memoryStreamBuffer.H.

Referenced by memorybuf::in::in(), uiliststream::reset(), and UIListStreamAllocator::reset().

Here is the caller graph for this function:

◆ capacity()

std::streamsize capacity ( ) const
inline

The buffer capacity.

Definition at line 209 of file memoryStreamBuffer.H.

Referenced by UIListStreamAllocator::size().

Here is the caller graph for this function:

◆ list() [1/2]

const UList<char> list ( ) const
inline

Const UList access to the input characters (shallow copy).

Definition at line 215 of file memoryStreamBuffer.H.

Referenced by UIListStreamAllocator::list().

Here is the caller graph for this function:

◆ list() [2/2]

UList<char> list ( )
inline

Non-const UList access to the input characters (shallow copy).

Definition at line 221 of file memoryStreamBuffer.H.

◆ printBufInfo()

void printBufInfo ( Ostream os) const
inline

Some information about the input buffer position/capacity.

Definition at line 227 of file memoryStreamBuffer.H.

References os().

Referenced by UIListStreamAllocator::printBufInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tellg()

std::streamsize tellg
inline

The buffer get position.

Definition at line 134 of file memoryStreamBuffer.H.

Referenced by UIListStreamAllocator::tellg().

Here is the caller graph for this function:

The documentation for this class was generated from the following file: