GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
textscan_format_list Class Reference
Collaboration diagram for 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
 
std::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, std::size_t &i, std::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, std::size_t &i, std::size_t n)
 

Private Attributes

std::ostringstream m_buf
 
std::size_t m_curr_idx
 
std::deque< textscan_format_elt * > m_fmt_elts
 
octave_idx_type m_nconv
 
std::list< octave_valuem_output_container
 

Detailed Description

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

Constructor & Destructor Documentation

◆ textscan_format_list() [1/2]

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

◆ textscan_format_list() [2/2]

textscan_format_list::textscan_format_list ( const textscan_format_list )
delete

◆ ~textscan_format_list()

textscan_format_list::~textscan_format_list ( void  )

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

References m_fmt_elts, n, and numel().

Member Function Documentation

◆ add_elt_to_list()

void 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 () 
)
private

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

References m_buf, m_fmt_elts, and m_output_container.

Referenced by textscan_format_list(), and finish_conversion().

◆ current()

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

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

References numel().

◆ finish_conversion()

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

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

References add_elt_to_list(), m_buf, m_nconv, n, and parse_char_class().

Referenced by process_conversion().

◆ first()

const textscan_format_elt* textscan_format_list::first ( void  )
inline

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

Referenced by textscan::read_format_once().

◆ next()

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

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

References numel().

Referenced by textscan::read_format_once().

◆ num_conversions()

octave_idx_type textscan_format_list::num_conversions ( void  ) const
inline

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

Referenced by textscan::do_scan().

◆ numel()

std::size_t textscan_format_list::numel ( void  ) const
inline

◆ ok()

bool textscan_format_list::ok ( void  ) const
inline

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

Referenced by printf_value_cache::operator bool().

◆ operator const void *()

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

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

◆ operator=()

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

◆ out_buf()

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

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

Referenced by textscan::do_scan().

◆ parse_char_class()

std::string textscan_format_list::parse_char_class ( const std::string &  pattern) const
private

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

References len, warning_with_id(), and who.

Referenced by finish_conversion().

◆ printme()

◆ process_conversion()

void textscan_format_list::process_conversion ( const std::string &  s,
std::size_t &  i,
std::size_t  n 
)
private

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

References error(), finish_conversion(), has_string, m_buf, m_nconv, n, octave_value(), and who.

Referenced by textscan_format_list().

◆ read_first_row()

Member Data Documentation

◆ has_string

bool textscan_format_list::has_string

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

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

◆ m_buf

std::ostringstream textscan_format_list::m_buf
private

◆ m_curr_idx

std::size_t textscan_format_list::m_curr_idx
private

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

◆ m_fmt_elts

std::deque<textscan_format_elt *> textscan_format_list::m_fmt_elts
private

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

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

◆ m_nconv

◆ m_output_container

std::list<octave_value> textscan_format_list::m_output_container
private

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

Referenced by add_elt_to_list(), and read_first_row().

◆ set_from_first

bool textscan_format_list::set_from_first

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

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

◆ who


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