GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
octave::delimited_stream Class Reference
Collaboration diagram for octave::delimited_stream:
Collaboration graph
[legend]

Public Member Functions

 delimited_stream (std::istream &is, const std::string &delimiters, int longest_lookahead, octave_idx_type bsize=4096)
 
 delimited_stream (std::istream &is, const delimited_stream &ds)
 
 ~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)
 
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 Member Functions

 delimited_stream (const delimited_stream &)
 
delimited_streamoperator= (const delimited_stream &)
 

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 1221 of file oct-stream.cc.

Constructor & Destructor Documentation

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

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

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

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

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

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

octave::delimited_stream::~delimited_stream ( void  )

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

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

octave::delimited_stream::delimited_stream ( const delimited_stream )
private

Member Function Documentation

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

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

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

int octave::delimited_stream::get ( void  )
inline
int octave::delimited_stream::get_undelim ( void  )
int octave::delimited_stream::getline ( std::string dest,
char  delim 
)

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

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

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

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

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

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

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

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

delimited_stream& octave::delimited_stream::operator= ( const delimited_stream )
private
int octave::delimited_stream::peek ( void  )
inline
int octave::delimited_stream::peek_undelim ( void  )

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

References get_undelim(), putback(), and retval.

Referenced by octave::textscan::skip_delim(), and octave::textscan::skip_whitespace().

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

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

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

void octave::delimited_stream::putback ( char  = 0)
inline
std::ios_base::iostate octave::delimited_stream::rdstate ( void  )
inline
char * octave::delimited_stream::read ( char *  buffer,
int  size,
char *&  new_start 
)
int octave::delimited_stream::refresh_buf ( void  )

Definition at line 1452 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().

void octave::delimited_stream::seekg ( char *  old_idx)
inline
void octave::delimited_stream::setstate ( std::ios_base::iostate  m)
inline
char* octave::delimited_stream::tellg ( void  )
inline

Member Data Documentation

char* octave::delimited_stream::buf
private

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

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

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

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

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

int octave::delimited_stream::bufsize
private

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

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

bool octave::delimited_stream::delimited
private

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

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

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

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

Referenced by refresh_buf().

char* octave::delimited_stream::eob
private

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

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

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

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

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

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

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

char* octave::delimited_stream::idx
private

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

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

char* octave::delimited_stream::last
private

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

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

int octave::delimited_stream::longest
private

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

Referenced by refresh_buf().

char* octave::delimited_stream::progress_marker
private

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

Referenced by delimited_stream(), and refresh_buf().


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