#include "oct-stream.h"
Public Member Functions | |
scanf_format_list (const std::string &fmt=std::string()) | |
~scanf_format_list (void) | |
bool | all_character_conversions (void) |
bool | all_numeric_conversions (void) |
const scanf_format_elt * | current (void) const |
const scanf_format_elt * | first (void) |
octave_idx_type | length (void) |
const scanf_format_elt * | next (bool cycle=true) |
octave_idx_type | num_conversions (void) |
bool | ok (void) const |
operator bool () const | |
void | printme (void) const |
Private Member Functions | |
scanf_format_list (const scanf_format_list &) | |
void | add_elt_to_list (int width, bool discard, char type, char modifier, octave_idx_type &num_elts, const std::string &char_class=std::string()) |
int | finish_conversion (const std::string &s, size_t &i, size_t n, int &width, bool discard, char &type, char modifier, octave_idx_type &num_elts) |
scanf_format_list & | operator= (const scanf_format_list &) |
void | process_conversion (const std::string &s, size_t &i, size_t n, int &width, bool &discard, char &type, char &modifier, octave_idx_type &num_elts) |
Private Attributes | |
std::ostringstream * | buf |
octave_idx_type | curr_idx |
Array< scanf_format_elt * > | list |
octave_idx_type | nconv |
Definition at line 101 of file oct-stream.h.
scanf_format_list::scanf_format_list | ( | const std::string & | fmt = std::string () |
) |
Definition at line 157 of file oct-stream.cc.
References add_elt_to_list(), buf, list, nconv, process_conversion(), and Array< T >::resize().
scanf_format_list::~scanf_format_list | ( | void | ) |
Definition at line 236 of file oct-stream.cc.
References Array< T >::length(), and list.
scanf_format_list::scanf_format_list | ( | const scanf_format_list & | ) | [private] |
void scanf_format_list::add_elt_to_list | ( | int | width, | |
bool | discard, | |||
char | type, | |||
char | modifier, | |||
octave_idx_type & | num_elts, | |||
const std::string & | char_class = std::string () | |||
) | [private] |
Definition at line 248 of file oct-stream.cc.
References buf, Array< T >::length(), list, and Array< T >::resize().
Referenced by finish_conversion(), and scanf_format_list().
bool scanf_format_list::all_character_conversions | ( | void | ) |
Definition at line 517 of file oct-stream.cc.
References Array< T >::length(), list, scanf_format_elt::literal_conversion, scanf_format_elt::type, and scanf_format_elt::whitespace_conversion.
Referenced by octave_base_stream::do_scanf().
bool scanf_format_list::all_numeric_conversions | ( | void | ) |
Definition at line 547 of file oct-stream.cc.
References Array< T >::length(), list, and scanf_format_elt::type.
const scanf_format_elt* scanf_format_list::current | ( | void | ) | const [inline] |
Definition at line 126 of file oct-stream.h.
int scanf_format_list::finish_conversion | ( | const std::string & | s, | |
size_t & | i, | |||
size_t | n, | |||
int & | width, | |||
bool | discard, | |||
char & | type, | |||
char | modifier, | |||
octave_idx_type & | num_elts | |||
) | [private] |
Definition at line 412 of file oct-stream.cc.
References add_elt_to_list(), buf, expand_char_class(), and nconv.
Referenced by process_conversion().
const scanf_format_elt* scanf_format_list::first | ( | void | ) | [inline] |
Definition at line 120 of file oct-stream.h.
Referenced by octave_base_stream::do_scanf(), and octave_base_stream::oscanf().
octave_idx_type scanf_format_list::length | ( | void | ) | [inline] |
Definition at line 118 of file oct-stream.h.
Referenced by octave_base_stream::do_scanf(), and octave_base_stream::oscanf().
const scanf_format_elt* scanf_format_list::next | ( | bool | cycle = true |
) | [inline] |
Definition at line 129 of file oct-stream.h.
Referenced by octave_base_stream::do_scanf(), and octave_base_stream::oscanf().
octave_idx_type scanf_format_list::num_conversions | ( | void | ) | [inline] |
Definition at line 111 of file oct-stream.h.
Referenced by octave_base_stream::do_scanf(), octave_base_stream::oscanf(), and octave_base_stream::scanf().
bool scanf_format_list::ok | ( | void | ) | const [inline] |
Definition at line 145 of file oct-stream.h.
scanf_format_list::operator bool | ( | ) | const [inline] |
Definition at line 147 of file oct-stream.h.
scanf_format_list& scanf_format_list::operator= | ( | const scanf_format_list & | ) | [private] |
void scanf_format_list::printme | ( | void | ) | const |
Definition at line 489 of file oct-stream.cc.
References scanf_format_elt::char_class, scanf_format_elt::discard, Array< T >::length(), list, scanf_format_elt::literal_conversion, scanf_format_elt::modifier, scanf_format_elt::text, scanf_format_elt::type, undo_string_escapes(), scanf_format_elt::whitespace_conversion, and scanf_format_elt::width.
void scanf_format_list::process_conversion | ( | const std::string & | s, | |
size_t & | i, | |||
size_t | n, | |||
int & | width, | |||
bool & | discard, | |||
char & | type, | |||
char & | modifier, | |||
octave_idx_type & | num_elts | |||
) | [private] |
Definition at line 309 of file oct-stream.cc.
References buf, finish_conversion(), and nconv.
Referenced by scanf_format_list().
std::ostringstream* scanf_format_list::buf [private] |
Definition at line 167 of file oct-stream.h.
Referenced by add_elt_to_list(), finish_conversion(), process_conversion(), and scanf_format_list().
octave_idx_type scanf_format_list::curr_idx [private] |
Definition at line 160 of file oct-stream.h.
Array<scanf_format_elt*> scanf_format_list::list [private] |
Definition at line 164 of file oct-stream.h.
Referenced by add_elt_to_list(), all_character_conversions(), all_numeric_conversions(), printme(), scanf_format_list(), and ~scanf_format_list().
octave_idx_type scanf_format_list::nconv [private] |
Definition at line 157 of file oct-stream.h.
Referenced by finish_conversion(), process_conversion(), and scanf_format_list().