99 size_t fetch(
void *buffer,
size_t bytes)
virtual void read(document &buffer)=0
Read at most buffer.contents.size() bytes of data into buffer, resizing on eof.
Read data from an input stream.
Definition: instream.h:44
C++ slices (string-descriptors)
Definition: slice.h:27
Container class representing a document through the indexing pipeline.
Definition: document.h:31
instream(allocator *memory=nullptr, instream *source=nullptr)
Constructor.
Definition: instream.h:60
slice contents
The contents of the document (or likewise).
Definition: document.h:43
virtual ~instream()
Destructor.
Definition: instream.h:74
A document withing the indexing pipeline.
Virtual base class for C style allocators.
Definition: allocator.h:33
allocator * memory
Any and all memory allocation must happen using this object.
Definition: instream.h:47
instream * source
If this object is reading from another instream then this is that instream.
Definition: instream.h:48
Simple block-allocator that internally allocated a large chunk then allocates smaller blocks from thi...
Definition: allocator.h:21
size_t size(void) const
Return the length of this slice.
Definition: slice.h:186
Memory allocator out of a single non-growable fixed-sized buffer.
Definition: allocator_memory.h:25
size_t fetch(void *buffer, size_t bytes)
fetch() generates a document object, sets its contents to the passed buffer, calls read() and returns...
Definition: instream.h:99