libzypp: zyppng::IOBuffer Class Reference

libzypp 17.36.6

Classes | Public Member Functions | Private Attributes | List of all members
zyppng::IOBuffer Class Reference

`#include <zypp-core/zyppng/io/private/iobuffer_p.h>`

## Classes
struct | Chunk

## Public Member Functions
| IOBuffer (int64_t chunkSize=0)
char * | reserve (int64_t bytes)
char * | front ()
int64_t | frontSize () const
void | clear ()
int64_t | discard (int64_t bytes)
void | chop (int64_t bytes)
void | append (const char *data, int64_t count)
void | append (const ByteArray &data)
int64_t | read (char *buffer, int64_t max)
int64_t | size () const
std::vector< Chunk >::size_type | chunks () const
int64_t | indexOf (const char c) const
int64_t | indexOf (const char c, int64_t maxCount, int64_t pos=0) const
ByteArray | readUntil (const char delim, const int64_t max=0)
int64_t | readUntil (char *buffer, const char delim, int64_t max)
ByteArray | readLine (const int64_t max=0)
int64_t | readLine (char *buffer, int64_t max)
bool | canReadUntil (const char delim) const
bool | canReadLine () const

## Private Attributes
int64_t | _defaultChunkSize
std::vector< Chunk > | _chunks

## Detailed Description

Definition at line 10 of file iobuffer_p.h.

## Constructor & Destructor Documentation

## ◆ IOBuffer()

zyppng::IOBuffer::IOBuffer | ( | int64_t | chunkSize = 0 | ) |

Definition at line 11 of file iobuffer.cc.

## Member Function Documentation

## ◆ reserve()

char * zyppng::IOBuffer::reserve | ( | int64_t | bytes | ) |

Definition at line 14 of file iobuffer.cc.

## ◆ front()

char * zyppng::IOBuffer::front | ( |  | ) |

Definition at line 35 of file iobuffer.cc.

## ◆ frontSize()

int64_t zyppng::IOBuffer::frontSize | ( |  | ) | const

Definition at line 43 of file iobuffer.cc.

## ◆ clear()

void zyppng::IOBuffer::clear | ( |  | ) |

Definition at line 50 of file iobuffer.cc.

## ◆ discard()

int64_t zyppng::IOBuffer::discard | ( | int64_t | bytes | ) |

Definition at line 55 of file iobuffer.cc.

## ◆ chop()

void zyppng::IOBuffer::chop | ( | int64_t | bytes | ) |

Removes bytes from the end of the buffer

Definition at line 87 of file iobuffer.cc.

## ◆ append() [1/2]

void zyppng::IOBuffer::append | ( | const char * | data,
|  | int64_t | count )

Definition at line 113 of file iobuffer.cc.

## ◆ append() [2/2]

void zyppng::IOBuffer::append | ( | const ByteArray & | data | ) |

Definition at line 128 of file iobuffer.cc.

## ◆ read()

int64_t zyppng::IOBuffer::read | ( | char * | buffer,
|  | int64_t | max )

Definition at line 133 of file iobuffer.cc.

## ◆ size()

int64_t zyppng::IOBuffer::size | ( |  | ) | const

Definition at line 154 of file iobuffer.cc.

## ◆ chunks()

std::vector< IOBuffer::Chunk >::size_type zyppng::IOBuffer::chunks | ( |  | ) | const

Definition at line 162 of file iobuffer.cc.

## ◆ indexOf() [1/2]

int64_t zyppng::IOBuffer::indexOf | ( | const char | c | ) | const
| inline

Definition at line 48 of file iobuffer_p.h.

## ◆ indexOf() [2/2]

int64_t zyppng::IOBuffer::indexOf | ( | const char | c,
|  | int64_t | maxCount,
|  | int64_t | pos = 0 ) const

Definition at line 167 of file iobuffer.cc.

## ◆ readUntil() [1/2]

ByteArray zyppng::IOBuffer::readUntil | ( | const char | delim,
|  | const int64_t | max = 0 )

Definition at line 205 of file iobuffer.cc.

## ◆ readUntil() [2/2]

int64_t zyppng::IOBuffer::readUntil | ( | char * | buffer,
|  | const char | delim,
|  | int64_t | max )

Definition at line 218 of file iobuffer.cc.

## ◆ readLine() [1/2]

ByteArray zyppng::IOBuffer::readLine | ( | const int64_t | max = 0 | ) |

Definition at line 228 of file iobuffer.cc.

## ◆ readLine() [2/2]

int64_t zyppng::IOBuffer::readLine | ( | char * | buffer,
|  | int64_t | max )

Definition at line 233 of file iobuffer.cc.

## ◆ canReadUntil()

bool zyppng::IOBuffer::canReadUntil | ( | const char | delim | ) | const

Definition at line 238 of file iobuffer.cc.

## ◆ canReadLine()

bool zyppng::IOBuffer::canReadLine | ( |  | ) | const

Definition at line 243 of file iobuffer.cc.

## Member Data Documentation

## ◆ _defaultChunkSize

int64_t zyppng::IOBuffer::_defaultChunkSize
| private

Definition at line 58 of file iobuffer_p.h.

## ◆ _chunks

std::vector<Chunk> zyppng::IOBuffer::_chunks
| private

Definition at line 59 of file iobuffer_p.h.

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

- zypp-core/zyppng/io/private/iobuffer_p.h
- zypp-core/zyppng/io/iobuffer.cc