MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions
BufferedReader Class Reference

`#include <BufferedReader.hxx>`

## Public Member Functions
| BufferedReader (Reader &_reader)
void | Reset ()
| Reset the internal state. More...
bool | Fill (bool need_more)
gcc_pure WritableBuffer< void > | Read () const
gcc_pure void * | ReadFull (size_t size)
| Read a buffer of exactly the given size (without consuming it). More...
void | Consume (size_t n)
size_t | ReadFromBuffer (WritableBuffer< void > dest)
| Read (and consume) data from the input buffer into the given buffer. More...
void | ReadFull (WritableBuffer< void > dest)
| Read data into the given buffer and consume it from our buffer. More...
char * | ReadLine ()
unsigned | GetLineNumber () const

## Detailed Description

Definition at line 31 of file BufferedReader.hxx.

## Constructor & Destructor Documentation

BufferedReader::BufferedReader | ( | Reader & | _reader | ) |
| inline explicit

Definition at line 43 of file BufferedReader.hxx.

## Member Function Documentation

void BufferedReader::Consume | ( | size_t | n | ) |
| inline

Definition at line 71 of file BufferedReader.hxx.

bool BufferedReader::Fill | ( | bool | need_more | ) |

unsigned BufferedReader::GetLineNumber | ( |  | ) | const
| inline

Definition at line 90 of file BufferedReader.hxx.

gcc_pure WritableBuffer<void> BufferedReader::Read | ( |  | ) | const
| inline

Definition at line 59 of file BufferedReader.hxx.

size_t BufferedReader::ReadFromBuffer | ( | WritableBuffer< void > | dest | ) |

Read (and consume) data from the input buffer into the given buffer.

Does not attempt to refill the buffer.

gcc_pure void* BufferedReader::ReadFull | ( | size_t | size | ) |

Read a buffer of exactly the given size (without consuming it).

Throws std::runtime_error if not enough data is available.

void BufferedReader::ReadFull | ( | WritableBuffer< void > | dest | ) |

Read data into the given buffer and consume it from our buffer.

Throw an exception if the request cannot be forfilled.

char* BufferedReader::ReadLine | ( |  | ) |

void BufferedReader::Reset | ( |  | ) |
| inline

Reset the internal state.

Should be called after rewinding the underlying Reader.

Definition at line 50 of file BufferedReader.hxx.

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

- fs/io/BufferedReader.hxx