taco-db  0.1.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
taco::CSVReader Class Reference

#include <utils/CSVReader.h>

Inheritance diagram for taco::CSVReader:
taco::FileCSVReader

Public Member Functions

 CSVReader (bool has_header=false, char delim=',')
 has_header currently only has the effect of skipping the first line. More...
 
 ~CSVReader ()
 
void FeedBuffer (char *buf, size_t n)
 
bool Next (absl::string_view &field)
 
bool AtEOL () const
 
bool AtEOF () const
 
size_t GetCurLineNumber () const
 
size_t GetCurCharNumber () const
 

Private Member Functions

bool NextImpl (absl::string_view &field)
 

Private Attributes

bool m_header_skipped
 
const char m_delim
 
bool m_eol
 
bool m_in_broken_field
 
bool m_broken_field_in_quote
 
bool m_broken_field_ends_in_quote
 
char * m_buf
 
size_t m_bufsz
 
size_t m_ipos
 
size_t m_lno
 
ptrdiff_t m_llpos
 
std::string m_outbuf
 

Constructor & Destructor Documentation

◆ CSVReader()

taco::CSVReader::CSVReader ( bool  has_header = false,
char  delim = ',' 
)

has_header currently only has the effect of skipping the first line.

◆ ~CSVReader()

taco::CSVReader::~CSVReader ( )

Member Function Documentation

◆ AtEOF()

bool taco::CSVReader::AtEOF ( ) const
inline

◆ AtEOL()

bool taco::CSVReader::AtEOL ( ) const
inline

◆ FeedBuffer()

void taco::CSVReader::FeedBuffer ( char *  buf,
size_t  n 
)

◆ GetCurCharNumber()

size_t taco::CSVReader::GetCurCharNumber ( ) const
inline

◆ GetCurLineNumber()

size_t taco::CSVReader::GetCurLineNumber ( ) const
inline

◆ Next()

bool taco::CSVReader::Next ( absl::string_view &  field)
inline

◆ NextImpl()

bool taco::CSVReader::NextImpl ( absl::string_view &  field)
private

Member Data Documentation

◆ m_broken_field_ends_in_quote

bool taco::CSVReader::m_broken_field_ends_in_quote
private

◆ m_broken_field_in_quote

bool taco::CSVReader::m_broken_field_in_quote
private

◆ m_buf

char* taco::CSVReader::m_buf
private

◆ m_bufsz

size_t taco::CSVReader::m_bufsz
private

◆ m_delim

const char taco::CSVReader::m_delim
private

◆ m_eol

bool taco::CSVReader::m_eol
private

◆ m_header_skipped

bool taco::CSVReader::m_header_skipped
private

◆ m_in_broken_field

bool taco::CSVReader::m_in_broken_field
private

◆ m_ipos

size_t taco::CSVReader::m_ipos
private

◆ m_llpos

ptrdiff_t taco::CSVReader::m_llpos
private

◆ m_lno

size_t taco::CSVReader::m_lno
private

◆ m_outbuf

std::string taco::CSVReader::m_outbuf
private

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