GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
delimited_stream Class Reference
Collaboration diagram for delimited_stream:

Public Member Functions

 delimited_stream (const delimited_stream &)=delete
 
 delimited_stream (std::istream &is, const delimited_stream &ds)
 
 delimited_stream (std::istream &is, const std::string &delimiters, int longest_lookahead, octave_idx_type bsize=4096)
 
 ~delimited_stream (void)
 
void clear (std::ios_base::iostate m=(std::ios_base::eofbit &~std::ios_base::eofbit))
 
bool eof (void)
 
bool fail (void)
 
void field_done (void)
 
int get (void)
 
int get_undelim (void)
 
int getline (std::string &dest, char delim)
 
bool no_progress (void)
 
 operator const void * (void)
 
delimited_streamoperator= (const delimited_stream &)=delete
 
int peek (void)
 
int peek_undelim (void)
 
void progress_benchmark (void)
 
void putback (char=0)
 
std::ios_base::iostate rdstate (void)
 
char * read (char *buffer, int size, char *&new_start)
 
int refresh_buf (bool initialize=false)
 
std::ptrdiff_t remaining (void)
 
void seekg (char *old_idx)
 
void setstate (std::ios_base::iostate m)
 
char * tellg (void)
 

Private Attributes

char * m_buf
 
std::streampos m_buf_in_file
 
int m_bufsize
 
bool m_delimited
 
const std::string m_delims
 
char * m_eob
 
std::ios_base::iostate m_flags
 
std::istream & m_i_stream
 
char * m_idx
 
char * m_last
 
int m_longest
 
std::ptrdiff_t m_overlap
 
char * m_progress_marker
 

Detailed Description

Definition at line 1224 of file oct-stream.cc.

Constructor & Destructor Documentation

◆ delimited_stream() [1/3]

delimited_stream::delimited_stream ( std::istream &  is,
const std::string &  delimiters,
int  longest_lookahead,
octave_idx_type  bsize = 4096 
)

Definition at line 1380 of file oct-stream.cc.

References m_buf, m_bufsize, m_eob, m_idx, m_progress_marker, and refresh_buf().

◆ delimited_stream() [2/3]

delimited_stream::delimited_stream ( std::istream &  is,
const delimited_stream ds 
)

Definition at line 1396 of file oct-stream.cc.

◆ delimited_stream() [3/3]

delimited_stream::delimited_stream ( const delimited_stream )
delete

◆ ~delimited_stream()

delimited_stream::~delimited_stream ( void  )

Definition at line 1401 of file oct-stream.cc.

References eof(), m_buf, m_buf_in_file, m_i_stream, m_idx, and m_overlap.

Member Function Documentation

◆ clear()

void delimited_stream::clear ( std::ios_base::iostate  m = (std::ios_base::eofbit & ~std::ios_base::eofbit))
inline

◆ eof()

◆ fail()

bool delimited_stream::fail ( void  )
inline

◆ field_done()

void delimited_stream::field_done ( void  )
inline

Definition at line 1244 of file oct-stream.cc.

Referenced by getline(), and textscan::scan_one().

◆ get()

int delimited_stream::get ( void  )
inline

◆ get_undelim()

◆ getline()

int delimited_stream::getline ( std::string &  dest,
char  delim 
)

Definition at line 1628 of file oct-stream.cc.

References field_done(), get_undelim(), and len.

Referenced by textscan_format_list::read_first_row().

◆ no_progress()

bool delimited_stream::no_progress ( void  )
inline

Definition at line 1321 of file oct-stream.cc.

Referenced by textscan_format_list::read_first_row().

◆ operator const void *()

delimited_stream::operator const void * ( void  )
inline

Definition at line 1301 of file oct-stream.cc.

◆ operator=()

delimited_stream& delimited_stream::operator= ( const delimited_stream )
delete

◆ peek()

int delimited_stream::peek ( void  )
inline

Definition at line 1271 of file oct-stream.cc.

◆ peek_undelim()

int delimited_stream::peek_undelim ( void  )

◆ progress_benchmark()

void delimited_stream::progress_benchmark ( void  )
inline

Definition at line 1319 of file oct-stream.cc.

Referenced by textscan_format_list::read_first_row().

◆ putback()

◆ rdstate()

std::ios_base::iostate delimited_stream::rdstate ( void  )
inline

◆ read()

char * delimited_stream::read ( char *  buffer,
int  size,
char *&  new_start 
)

◆ refresh_buf()

int delimited_stream::refresh_buf ( bool  initialize = false)

◆ remaining()

std::ptrdiff_t delimited_stream::remaining ( void  )
inline

Definition at line 1326 of file oct-stream.cc.

References max().

Referenced by textscan::read_double().

◆ seekg()

void delimited_stream::seekg ( char *  old_idx)
inline

◆ setstate()

void delimited_stream::setstate ( std::ios_base::iostate  m)
inline

◆ tellg()

char* delimited_stream::tellg ( void  )
inline

Member Data Documentation

◆ m_buf

char* delimited_stream::m_buf
private

Definition at line 1343 of file oct-stream.cc.

Referenced by delimited_stream(), ~delimited_stream(), read(), and refresh_buf().

◆ m_buf_in_file

std::streampos delimited_stream::m_buf_in_file
private

Definition at line 1368 of file oct-stream.cc.

Referenced by ~delimited_stream(), and refresh_buf().

◆ m_bufsize

int delimited_stream::m_bufsize
private

Definition at line 1337 of file oct-stream.cc.

Referenced by delimited_stream(), read(), and refresh_buf().

◆ m_delimited

bool delimited_stream::m_delimited
private

Definition at line 1359 of file oct-stream.cc.

Referenced by get_undelim(), read(), and refresh_buf().

◆ m_delims

const std::string delimited_stream::m_delims
private

Definition at line 1365 of file oct-stream.cc.

Referenced by refresh_buf().

◆ m_eob

char* delimited_stream::m_eob
private

Definition at line 1353 of file oct-stream.cc.

Referenced by delimited_stream(), get_undelim(), read(), and refresh_buf().

◆ m_flags

std::ios_base::iostate delimited_stream::m_flags
private

Definition at line 1373 of file oct-stream.cc.

◆ m_i_stream

std::istream& delimited_stream::m_i_stream
private

Definition at line 1340 of file oct-stream.cc.

Referenced by ~delimited_stream(), and refresh_buf().

◆ m_idx

char* delimited_stream::m_idx
private

Definition at line 1346 of file oct-stream.cc.

Referenced by delimited_stream(), ~delimited_stream(), get_undelim(), read(), and refresh_buf().

◆ m_last

char* delimited_stream::m_last
private

Definition at line 1350 of file oct-stream.cc.

Referenced by get_undelim(), read(), and refresh_buf().

◆ m_longest

int delimited_stream::m_longest
private

Definition at line 1362 of file oct-stream.cc.

Referenced by refresh_buf().

◆ m_overlap

std::ptrdiff_t delimited_stream::m_overlap
private

Definition at line 1356 of file oct-stream.cc.

Referenced by ~delimited_stream(), and refresh_buf().

◆ m_progress_marker

char* delimited_stream::m_progress_marker
private

Definition at line 1371 of file oct-stream.cc.

Referenced by delimited_stream(), and refresh_buf().


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