GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
scanf_format_list Class Reference
Collaboration diagram for 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)
 
std::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, std::size_t &i, std::size_t n, int width, bool discard, char &type, char modifier)
 
void process_conversion (const std::string &s, std::size_t &i, std::size_t n, int &width, bool &discard, char &type, char &modifier)
 

Private Attributes

std::ostringstream m_buf
 
std::size_t m_curr_idx
 
std::deque< scanf_format_elt * > m_fmt_elts
 
octave_idx_type m_nconv
 

Detailed Description

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

Constructor & Destructor Documentation

◆ scanf_format_list() [1/2]

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

◆ scanf_format_list() [2/2]

scanf_format_list::scanf_format_list ( const scanf_format_list )
delete

◆ ~scanf_format_list()

scanf_format_list::~scanf_format_list ( void  )

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

References m_fmt_elts, and n.

Member Function Documentation

◆ add_elt_to_list()

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

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

References m_buf, and m_fmt_elts.

Referenced by scanf_format_list(), and finish_conversion().

◆ all_character_conversions()

bool scanf_format_list::all_character_conversions ( void  )

◆ all_numeric_conversions()

bool scanf_format_list::all_numeric_conversions ( void  )

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

References m_fmt_elts, n, and scanf_format_elt::type.

◆ current()

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

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

◆ finish_conversion()

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

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

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

Referenced by process_conversion().

◆ first()

const scanf_format_elt* scanf_format_list::first ( void  )
inline

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

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

◆ length()

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

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

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

◆ next()

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

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

References scanf_format_elt::null.

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

◆ num_conversions()

octave_idx_type scanf_format_list::num_conversions ( void  )
inline

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

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

◆ ok()

bool scanf_format_list::ok ( void  ) const
inline

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

◆ operator bool()

scanf_format_list::operator bool ( ) const
inline

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

◆ operator=()

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

◆ printme()

◆ process_conversion()

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

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

References finish_conversion(), m_buf, m_nconv, and n.

Referenced by scanf_format_list().

Member Data Documentation

◆ m_buf

std::ostringstream scanf_format_list::m_buf
private

◆ m_curr_idx

std::size_t scanf_format_list::m_curr_idx
private

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

◆ m_fmt_elts

std::deque<scanf_format_elt *> scanf_format_list::m_fmt_elts
private

◆ m_nconv

octave_idx_type scanf_format_list::m_nconv
private

Definition at line 367 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: