Public Member Functions | Protected Member Functions | List of all members
memorybuf::in Class Reference

An input streambuf for memory access. More...

Inheritance diagram for memorybuf::in:
Inheritance graph
[legend]
Collaboration diagram for memorybuf::in:
Collaboration graph
[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 165 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 198 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 179 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 208 of file memoryStreamBuffer.H.

References n, and s.

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 228 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 236 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 244 of file memoryStreamBuffer.H.

◆ printBufInfo()

void printBufInfo ( Ostream os) const
inline

Some information about the input buffer position/capacity.

Definition at line 252 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 136 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: