Public Member Functions | Private Member Functions | Private Attributes

scanf_format_list Class Reference

#include "oct-stream.h"

Collaboration diagram for scanf_format_list:
Collaboration graph
[legend]

List of all members.

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_eltcurrent (void) const
const scanf_format_eltfirst (void)
octave_idx_type length (void)
const scanf_format_eltnext (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_listoperator= (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

Detailed Description

Definition at line 101 of file oct-stream.h.


Constructor & Destructor Documentation

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]

Member Function Documentation

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   ) 
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]
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
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().


Member Data Documentation

std::ostringstream* scanf_format_list::buf [private]

Definition at line 160 of file oct-stream.h.

Definition at line 157 of file oct-stream.h.

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


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines