GNU Octave  6.2.0
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 1676 of file oct-stream.cc.

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 )
delete

◆ ~textscan_format_list()

octave::textscan_format_list::~textscan_format_list ( void  )

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

References fmt_elts, n, 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 () 
)
private

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

References buf, fmt_elts, and output_container.

Referenced by textscan_format_list(), and finish_conversion().

◆ current()

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

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

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

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

References add_elt_to_list(), buf, n, nconv, parse_char_class(), and retval.

Referenced by process_conversion().

◆ first()

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

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

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

◆ next()

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

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

References numel().

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

◆ num_conversions()

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

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

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

◆ numel()

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

◆ ok()

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

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

◆ operator const void *()

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

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

◆ operator=()

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

◆ out_buf()

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

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

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

◆ parse_char_class()

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

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

References len, Array< T >::resize(), retval, 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 
)
private

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

References buf, error(), finish_conversion(), has_string, n, nconv, octave_value(), and who.

Referenced by textscan_format_list().

◆ read_first_row()

Member Data Documentation

◆ buf

std::ostringstream octave::textscan_format_list::buf
private

◆ curr_idx

size_t octave::textscan_format_list::curr_idx
private

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

◆ fmt_elts

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

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

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

◆ has_string

bool octave::textscan_format_list::has_string

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

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

◆ nconv

octave_idx_type octave::textscan_format_list::nconv
private

◆ output_container

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

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

Referenced by add_elt_to_list(), and read_first_row().

◆ set_from_first

bool octave::textscan_format_list::set_from_first

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

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

◆ who

std::string octave::textscan_format_list::who

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

Referenced by parse_char_class(), and process_conversion().


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