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

Public Member Functions

 textscan_format_list (const std::string &fmt=std::string(), const std::string &who="textscan")
 textscan_format_list (const textscan_format_list &)=delete
 ~textscan_format_list (void)
const textscan_format_eltcurrent (void) const
const textscan_format_eltfirst (void)
const textscan_format_eltnext (bool cycle=true)
octave_idx_type num_conversions (void) const
size_t numel (void) const
bool ok (void) const
 operator const void * (void) const
textscan_format_listoperator= (const textscan_format_list &)=delete
std::list< octave_valueout_buf (void) const
void printme (void) const
int read_first_row (delimited_stream &is, textscan &ts)

Public Attributes

bool has_string
bool set_from_first
std::string who

Private Member Functions

void add_elt_to_list (unsigned int width, int prec, int bitwidth, octave_value val_type, bool discard, char type, const std::string &char_class=std::string())
int finish_conversion (const std::string &s, size_t &i, size_t n, unsigned int &width, int &prec, int &bitwidth, octave_value &val_type, bool discard, char &type)
std::string parse_char_class (const std::string &pattern) const
void process_conversion (const std::string &s, size_t &i, size_t n)

Private Attributes

std::ostringstream buf
size_t curr_idx
std::deque< textscan_format_elt * > fmt_elts
octave_idx_type nconv
std::list< octave_valueoutput_container

Detailed Description

Definition at line 1654 of file

Constructor & Destructor Documentation

◆ textscan_format_list() [1/2]

octave::textscan_format_list::textscan_format_list ( const std::string fmt = std::string (),
const std::string who = "textscan" 

◆ textscan_format_list() [2/2]

octave::textscan_format_list::textscan_format_list ( const textscan_format_list )

◆ ~textscan_format_list()

octave::textscan_format_list::~textscan_format_list ( void  )

Definition at line 2008 of file

References fmt_elts, i, and numel().

Member Function Documentation

◆ add_elt_to_list()

void octave::textscan_format_list::add_elt_to_list ( unsigned int  width,
int  prec,
int  bitwidth,
octave_value  val_type,
bool  discard,
char  type,
const std::string char_class = std::string () 

Definition at line 2020 of file

References buf, fmt_elts, output_container, string, and type.

Referenced by finish_conversion(), and textscan_format_list().

◆ current()

const textscan_format_elt* octave::textscan_format_list::current ( void  ) const

Definition at line 1684 of file

References numel().

◆ finish_conversion()

int octave::textscan_format_list::finish_conversion ( const std::string s,
size_t i,
size_t  n,
unsigned int &  width,
int &  prec,
int &  bitwidth,
octave_value val_type,
bool  discard,
char &  type 

Definition at line 2327 of file

References add_elt_to_list(), buf, i, nconv, parse_char_class(), retval, s, string, and type.

Referenced by process_conversion().

◆ first()

const textscan_format_elt* octave::textscan_format_list::first ( void  )

Definition at line 1678 of file

Referenced by octave::textscan::read_format_once().

◆ next()

const textscan_format_elt* octave::textscan_format_list::next ( bool  cycle = true)

Definition at line 1689 of file

References numel().

Referenced by octave::textscan::read_format_once().

◆ num_conversions()

octave_idx_type octave::textscan_format_list::num_conversions ( void  ) const

Definition at line 1669 of file

Referenced by octave::textscan::do_scan().

◆ numel()

size_t octave::textscan_format_list::numel ( void  ) const

◆ ok()

bool octave::textscan_format_list::ok ( void  ) const

Definition at line 1706 of file

◆ operator const void *()

octave::textscan_format_list::operator const void * ( void  ) const

Definition at line 1708 of file

References this().

◆ operator=()

textscan_format_list& octave::textscan_format_list::operator= ( const textscan_format_list )

◆ out_buf()

std::list<octave_value> octave::textscan_format_list::out_buf ( void  ) const

Definition at line 1721 of file

Referenced by octave::textscan::do_scan().

◆ parse_char_class()

std::string octave::textscan_format_list::parse_char_class ( const std::string pattern) const

Definition at line 2240 of file

References i, pattern(), octave_value::resize(), retval, string, warning_with_id(), and who.

Referenced by finish_conversion().

◆ printme()

◆ process_conversion()

void octave::textscan_format_list::process_conversion ( const std::string s,
size_t i,
size_t  n 

Definition at line 2044 of file

References buf, c, done, error(), finish_conversion(), has_string, i, nconv, octave_value(), s, type, and who.

Referenced by textscan_format_list().

◆ read_first_row()

Member Data Documentation

◆ buf

std::ostringstream octave::textscan_format_list::buf

◆ curr_idx

size_t octave::textscan_format_list::curr_idx

Definition at line 1730 of file

◆ fmt_elts

std::deque<textscan_format_elt*> octave::textscan_format_list::fmt_elts

Definition at line 1733 of file

Referenced by add_elt_to_list(), printme(), read_first_row(), and ~textscan_format_list().

◆ has_string

bool octave::textscan_format_list::has_string

Definition at line 1717 of file

Referenced by octave::textscan::parse_options(), and process_conversion().

◆ nconv

octave_idx_type octave::textscan_format_list::nconv

◆ output_container

std::list<octave_value> octave::textscan_format_list::output_container

Definition at line 1736 of file

Referenced by add_elt_to_list(), and read_first_row().

◆ set_from_first

bool octave::textscan_format_list::set_from_first

Definition at line 1714 of file

Referenced by octave::textscan::do_scan(), and textscan_format_list().

◆ who

std::string octave::textscan_format_list::who

Definition at line 1711 of file

Referenced by parse_char_class(), and process_conversion().

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