GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave::delimited_stream Class Reference
Collaboration diagram for octave::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 (void)
 
void seekg (char *old_idx)
 
void setstate (std::ios_base::iostate m)
 
char * tellg (void)
 

Private Attributes

char * buf
 
std::streampos buf_in_file
 
int bufsize
 
bool delimited
 
const std::string delims
 
char * eob
 
std::ios_base::iostate flags
 
std::istream & i_stream
 
char * idx
 
char * last
 
int longest
 
char * progress_marker
 

Detailed Description

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

Constructor & Destructor Documentation

◆ delimited_stream() [1/3]

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

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

References buf, bufsize, eob, idx, progress_marker, and refresh_buf().

◆ delimited_stream() [2/3]

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

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

◆ delimited_stream() [3/3]

octave::delimited_stream::delimited_stream ( const delimited_stream )
delete

◆ ~delimited_stream()

octave::delimited_stream::~delimited_stream ( void  )

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

References buf, buf_in_file, eof(), i_stream, and idx.

Member Function Documentation

◆ clear()

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

◆ eof()

◆ fail()

bool octave::delimited_stream::fail ( void  )
inline

◆ field_done()

void octave::delimited_stream::field_done ( void  )
inline

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

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

◆ get()

◆ get_undelim()

◆ getline()

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

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

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

Referenced by octave::textscan_format_list::read_first_row().

◆ no_progress()

bool octave::delimited_stream::no_progress ( void  )
inline

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

Referenced by octave::textscan_format_list::read_first_row().

◆ operator const void *()

octave::delimited_stream::operator const void * ( void  )
inline

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

◆ operator=()

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

◆ peek()

int octave::delimited_stream::peek ( void  )
inline

◆ peek_undelim()

int octave::delimited_stream::peek_undelim ( void  )

◆ progress_benchmark()

void octave::delimited_stream::progress_benchmark ( void  )
inline

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

Referenced by octave::textscan_format_list::read_first_row().

◆ putback()

◆ rdstate()

◆ read()

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

◆ refresh_buf()

int octave::delimited_stream::refresh_buf ( void  )

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

References buf, buf_in_file, bufsize, delimited, delims, eob, eof(), i_stream, idx, last, longest, progress_marker, and retval.

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

◆ seekg()

void octave::delimited_stream::seekg ( char *  old_idx)
inline

◆ setstate()

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

◆ tellg()

char* octave::delimited_stream::tellg ( void  )
inline

Member Data Documentation

◆ buf

char* octave::delimited_stream::buf
private

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

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

◆ buf_in_file

std::streampos octave::delimited_stream::buf_in_file
private

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

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

◆ bufsize

int octave::delimited_stream::bufsize
private

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

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

◆ delimited

bool octave::delimited_stream::delimited
private

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

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

◆ delims

const std::string octave::delimited_stream::delims
private

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

Referenced by refresh_buf().

◆ eob

char* octave::delimited_stream::eob
private

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

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

◆ flags

std::ios_base::iostate octave::delimited_stream::flags
private

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

◆ i_stream

std::istream& octave::delimited_stream::i_stream
private

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

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

◆ idx

char* octave::delimited_stream::idx
private

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

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

◆ last

char* octave::delimited_stream::last
private

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

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

◆ longest

int octave::delimited_stream::longest
private

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

Referenced by refresh_buf().

◆ progress_marker

char* octave::delimited_stream::progress_marker
private

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

Referenced by delimited_stream(), and refresh_buf().


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