A toolkit for working with phylogenetic data.
v0.24.0
InputBuffer Class Reference

#include <genesis/utils/io/input_buffer.hpp>

Detailed Description

Definition at line 49 of file input_buffer.hpp.

Public Member Functions

 InputBuffer ()
 
 InputBuffer (std::shared_ptr< BaseInputSource > input_source)
 
 InputBuffer (self_type const &)=delete
 
 InputBuffer (self_type &&other)
 
 ~InputBuffer ()
 
 operator bool () const
 
self_typeoperator= (self_type const &)=delete
 
self_typeoperator= (self_type &&other)
 
char peek (size_t ahead=1)
 
size_t read (char *target, size_t size)
 

Public Types

using self_type = InputBuffer
 
using value_type = char
 

Static Public Attributes

static const size_t BlockLength = 1 << 22
 Block length for internal buffering. More...
 

Constructor & Destructor Documentation

◆ InputBuffer() [1/4]

InputBuffer ( )
inline

Definition at line 71 of file input_buffer.hpp.

◆ InputBuffer() [2/4]

InputBuffer ( std::shared_ptr< BaseInputSource input_source)
inlineexplicit

Definition at line 78 of file input_buffer.hpp.

◆ ~InputBuffer()

~InputBuffer ( )
inline

Definition at line 83 of file input_buffer.hpp.

◆ InputBuffer() [3/4]

InputBuffer ( self_type const &  )
delete

◆ InputBuffer() [4/4]

InputBuffer ( self_type &&  other)
inline

Definition at line 91 of file input_buffer.hpp.

Member Function Documentation

◆ operator bool()

operator bool ( ) const
inline

Definition at line 130 of file input_buffer.hpp.

◆ operator=() [1/2]

self_type& operator= ( self_type const &  )
delete

◆ operator=() [2/2]

self_type& operator= ( self_type &&  other)
inline

Definition at line 99 of file input_buffer.hpp.

◆ peek()

char peek ( size_t  ahead = 1)
inline

Definition at line 135 of file input_buffer.hpp.

◆ read()

size_t read ( char *  target,
size_t  size 
)
inline

Definition at line 165 of file input_buffer.hpp.

Member Typedef Documentation

◆ self_type

Definition at line 64 of file input_buffer.hpp.

◆ value_type

using value_type = char

Definition at line 65 of file input_buffer.hpp.

Member Data Documentation

◆ BlockLength

const size_t BlockLength = 1 << 22
static

Block length for internal buffering.

The buffer uses three blocks of this size (4MB each).

Definition at line 62 of file input_buffer.hpp.


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