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

Public Member Functions

 scanf_format_list (const scanf_format_list &)=delete
 
 scanf_format_list (const std::string &fmt="")
 
 ~scanf_format_list (void)
 
bool all_character_conversions (void)
 
bool all_numeric_conversions (void)
 
const scanf_format_eltcurrent (void) const
 
const scanf_format_eltfirst (void)
 
size_t length (void) const
 
const scanf_format_eltnext (bool cycle=true)
 
octave_idx_type num_conversions (void)
 
bool ok (void) const
 
 operator bool () const
 
scanf_format_listoperator= (const scanf_format_list &)=delete
 
void printme (void) const
 

Private Member Functions

void add_elt_to_list (int width, bool discard, char type, char modifier, const std::string &char_class="")
 
int finish_conversion (const std::string &s, size_t &i, size_t n, int width, bool discard, char &type, char modifier)
 
void process_conversion (const std::string &s, size_t &i, size_t n, int &width, bool &discard, char &type, char &modifier)
 

Private Attributes

std::ostringstream buf
 
size_t curr_idx
 
std::deque< scanf_format_elt * > fmt_elts
 
octave_idx_type nconv
 

Detailed Description

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

Constructor & Destructor Documentation

◆ scanf_format_list() [1/2]

octave::scanf_format_list::scanf_format_list ( const std::string &  fmt = "")

◆ scanf_format_list() [2/2]

octave::scanf_format_list::scanf_format_list ( const scanf_format_list )
delete

◆ ~scanf_format_list()

octave::scanf_format_list::~scanf_format_list ( void  )

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

References fmt_elts, and n.

Member Function Documentation

◆ add_elt_to_list()

void octave::scanf_format_list::add_elt_to_list ( int  width,
bool  discard,
char  type,
char  modifier,
const std::string &  char_class = "" 
)
private

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

References buf, and fmt_elts.

Referenced by scanf_format_list(), and finish_conversion().

◆ all_character_conversions()

bool octave::scanf_format_list::all_character_conversions ( void  )

◆ all_numeric_conversions()

bool octave::scanf_format_list::all_numeric_conversions ( void  )

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

References fmt_elts, n, and octave::scanf_format_elt::type.

◆ current()

const scanf_format_elt* octave::scanf_format_list::current ( void  ) const
inline

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

References octave::jit_convention::length.

◆ finish_conversion()

int octave::scanf_format_list::finish_conversion ( const std::string &  s,
size_t &  i,
size_t  n,
int  width,
bool  discard,
char &  type,
char  modifier 
)
private

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

References add_elt_to_list(), buf, octave::expand_char_class(), n, nconv, and retval.

Referenced by process_conversion().

◆ first()

const scanf_format_elt* octave::scanf_format_list::first ( void  )
inline

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

Referenced by octave::base_stream::do_scanf(), and octave::base_stream::oscanf().

◆ length()

size_t octave::scanf_format_list::length ( void  ) const
inline

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

Referenced by octave::base_stream::do_scanf(), and octave::base_stream::oscanf().

◆ next()

const scanf_format_elt* octave::scanf_format_list::next ( bool  cycle = true)
inline

◆ num_conversions()

octave_idx_type octave::scanf_format_list::num_conversions ( void  )
inline

◆ ok()

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

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

◆ operator bool()

octave::scanf_format_list::operator bool ( ) const
inline

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

◆ operator=()

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

◆ printme()

◆ process_conversion()

void octave::scanf_format_list::process_conversion ( const std::string &  s,
size_t &  i,
size_t  n,
int &  width,
bool &  discard,
char &  type,
char &  modifier 
)
private

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

References buf, finish_conversion(), n, and nconv.

Referenced by scanf_format_list().

Member Data Documentation

◆ buf

std::ostringstream octave::scanf_format_list::buf
private

◆ curr_idx

size_t octave::scanf_format_list::curr_idx
private

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

◆ fmt_elts

std::deque<scanf_format_elt*> octave::scanf_format_list::fmt_elts
private

◆ nconv

octave_idx_type octave::scanf_format_list::nconv
private

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

Referenced by scanf_format_list(), finish_conversion(), and process_conversion().


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