62 instream(std::shared_ptr<instream> &source, std::shared_ptr<allocator> &memory) :
125 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.
std::shared_ptr< instream > source
If this object is reading from another instream then this is that instream.
Definition: instream.h:48
Read data from an input stream.
Definition: instream.h:45
C++ slices (string-descriptors)
Definition: slice.h:27
Container class representing a document through the indexing pipeline.
Definition: document.h:31
std::shared_ptr< allocator > memory
Any and all memory allocation must happen using this object.
Definition: instream.h:49
instream(std::shared_ptr< instream > &source, std::shared_ptr< allocator > &memory)
Constructor.
Definition: instream.h:62
slice contents
The contents of the document (or likewise).
Definition: document.h:43
virtual ~instream()
Destructor.
Definition: instream.h:100
A document withing the indexing pipeline.
instream(std::shared_ptr< instream > &source)
Constructor.
Definition: instream.h:73
instream(void)
Constructor.
Definition: instream.h:86
Simple block-allocator that internally uses a single non-growable fixed-sized buffer.
Definition: compress_integer_elias_delta_simd.c:23
size_t size(void) const
Return the length of this slice.
Definition: slice.h:256
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:125