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 | Friends | List of all members
octave::textscan Class Reference
Collaboration diagram for octave::textscan:
Collaboration graph
[legend]

Public Member Functions

 textscan (const std::string &who_arg="textscan")
 
 ~textscan (void)
 
octave_value scan (std::istream &isp, const std::string &fmt, octave_idx_type ntimes, const octave_value_list &options, octave_idx_type &read_count)
 

Private Member Functions

 textscan (const textscan &)
 
octave_value do_scan (std::istream &isp, textscan_format_list &fmt_list, octave_idx_type ntimes)
 
bool is_delim (unsigned char ch) const
 
bool isspace (unsigned int ch) const
 
int lookahead (delimited_stream &is, const Cell &targets, int max_len, bool case_sensitive=true) const
 
bool match_literal (delimited_stream &isp, const textscan_format_elt &elem)
 
textscanoperator= (const textscan &)
 
void parse_options (const octave_value_list &args, textscan_format_list &fmt_list)
 
double read_double (delimited_stream &is, const textscan_format_elt &fmt) const
 
int read_format_once (delimited_stream &isp, textscan_format_list &fmt_list, std::list< octave_value > &retval, Array< octave_idx_type > row, int &done_after)
 
std::string read_until (delimited_stream &is, const Cell &delimiters, const std::string &ends) const
 
int scan_bracket (delimited_stream &is, const std::string &pattern, std::string &val) const
 
int scan_caret (delimited_stream &is, const std::string &pattern, std::string &val) const
 
void scan_complex (delimited_stream &is, const textscan_format_elt &fmt, Complex &val) const
 
void scan_cstring (delimited_stream &is, const textscan_format_elt &fmt, std::string &val) const
 
void scan_one (delimited_stream &is, const textscan_format_elt &fmt, octave_value &ov, Array< octave_idx_type > row)
 
void scan_qstring (delimited_stream &is, const textscan_format_elt &fmt, std::string &val)
 
void scan_string (delimited_stream &is, const textscan_format_elt &fmt, std::string &val) const
 
int skip_delim (delimited_stream &is)
 
int skip_whitespace (delimited_stream &is, bool EOLstop=false)
 
bool whitespace_delim (void) const
 

Private Attributes

std::string buf
 
octave_idx_type buffer_size
 
bool collect_output
 
int comment_char
 
int comment_len
 
Cell comment_style
 
std::string date_locale
 
bool default_exp
 
int delim_len
 
Cell delim_list
 
std::string delim_table
 
std::string delims
 
octave_value empty_value
 
short eol1
 
short eol2
 
std::string exp_chars
 
int header_lines
 
Cell inf_nan
 
octave_idx_type lines
 
bool multiple_delims_as_one
 
bool numeric_delim
 
short return_on_error
 
Cell treat_as_empty
 
int treat_as_empty_len
 
std::string whitespace
 
std::string whitespace_table
 
std::string who
 

Friends

class textscan_format_list
 

Detailed Description

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

Constructor & Destructor Documentation

octave::textscan::textscan ( const std::string who_arg = "textscan")

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

octave::textscan::~textscan ( void  )
inline

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

octave::textscan::textscan ( const textscan )
private

Member Function Documentation

octave_value octave::textscan::do_scan ( std::istream &  isp,
textscan_format_list fmt_list,
octave_idx_type  ntimes 
)
private
bool octave::textscan::is_delim ( unsigned char  ch) const
inlineprivate

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

Referenced by read_format_once(), scan_string(), and skip_delim().

bool octave::textscan::isspace ( unsigned int  ch) const
inlineprivate

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

Referenced by parse_options(), skip_delim(), and skip_whitespace().

int octave::textscan::lookahead ( delimited_stream is,
const Cell targets,
int  max_len,
bool  case_sensitive = true 
) const
private
bool octave::textscan::match_literal ( delimited_stream isp,
const textscan_format_elt elem 
)
private
textscan& octave::textscan::operator= ( const textscan )
private
void octave::textscan::parse_options ( const octave_value_list args,
textscan_format_list fmt_list 
)
private
double octave::textscan::read_double ( delimited_stream is,
const textscan_format_elt fmt 
) const
private
int octave::textscan::read_format_once ( delimited_stream isp,
textscan_format_list fmt_list,
std::list< octave_value > &  retval,
Array< octave_idx_type row,
int done_after 
)
private
std::string octave::textscan::read_until ( delimited_stream is,
const Cell delimiters,
const std::string ends 
) const
private
octave_value octave::textscan::scan ( std::istream &  isp,
const std::string fmt,
octave_idx_type  ntimes,
const octave_value_list options,
octave_idx_type read_count 
)

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

References do_scan(), parse_options(), result, and state.

Referenced by octave_base_stream::do_textscan().

int octave::textscan::scan_bracket ( delimited_stream is,
const std::string pattern,
std::string val 
) const
private
int octave::textscan::scan_caret ( delimited_stream is,
const std::string pattern,
std::string val 
) const
private
void octave::textscan::scan_complex ( delimited_stream is,
const textscan_format_elt fmt,
Complex val 
) const
private
void octave::textscan::scan_cstring ( delimited_stream is,
const textscan_format_elt fmt,
std::string val 
) const
private
void octave::textscan::scan_one ( delimited_stream is,
const textscan_format_elt fmt,
octave_value ov,
Array< octave_idx_type row 
)
private
void octave::textscan::scan_qstring ( delimited_stream is,
const textscan_format_elt fmt,
std::string val 
)
private
void octave::textscan::scan_string ( delimited_stream is,
const textscan_format_elt fmt,
std::string val 
) const
private
int octave::textscan::skip_delim ( delimited_stream is)
private
int octave::textscan::skip_whitespace ( delimited_stream is,
bool  EOLstop = false 
)
private
bool octave::textscan::whitespace_delim ( void  ) const
inlineprivate

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

Friends And Related Function Documentation

friend class textscan_format_list
friend

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

Member Data Documentation

std::string octave::textscan::buf
private

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

octave_idx_type octave::textscan::buffer_size
private

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

Referenced by do_scan(), and parse_options().

bool octave::textscan::collect_output
private

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

Referenced by do_scan(), and parse_options().

int octave::textscan::comment_char
private

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

Referenced by parse_options(), and skip_whitespace().

int octave::textscan::comment_len
private

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

Referenced by do_scan(), parse_options(), and skip_whitespace().

Cell octave::textscan::comment_style
private

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

Referenced by parse_options(), and skip_whitespace().

std::string octave::textscan::date_locale
private

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

bool octave::textscan::default_exp
private

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

Referenced by parse_options().

int octave::textscan::delim_len
private

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

Referenced by do_scan(), parse_options(), and skip_delim().

Cell octave::textscan::delim_list
private

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

Referenced by parse_options(), scan_string(), and skip_delim().

std::string octave::textscan::delim_table
private

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

Referenced by do_scan(), and parse_options().

std::string octave::textscan::delims
private

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

Referenced by do_scan(), and parse_options().

octave_value octave::textscan::empty_value
private
short octave::textscan::eol1
private
short octave::textscan::eol2
private
std::string octave::textscan::exp_chars
private

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

Referenced by parse_options(), and read_double().

int octave::textscan::header_lines
private

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

Referenced by do_scan(), and parse_options().

Cell octave::textscan::inf_nan
private

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

Referenced by read_double().

octave_idx_type octave::textscan::lines
private

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

Referenced by do_scan(), skip_delim(), and skip_whitespace().

bool octave::textscan::multiple_delims_as_one
private

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

Referenced by do_scan(), parse_options(), and skip_delim().

bool octave::textscan::numeric_delim
private

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

short octave::textscan::return_on_error
private

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

Referenced by do_scan(), and parse_options().

Cell octave::textscan::treat_as_empty
private

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

Referenced by parse_options(), and scan_complex().

int octave::textscan::treat_as_empty_len
private

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

Referenced by do_scan(), parse_options(), and scan_complex().

std::string octave::textscan::whitespace
private

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

Referenced by do_scan(), and parse_options().

std::string octave::textscan::whitespace_table
private

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

Referenced by parse_options().

std::string octave::textscan::who
private

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


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