GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
scanf_format_list Class Reference

#include "oct-stream.h"

Collaboration diagram for scanf_format_list:
Collaboration graph
[legend]

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 103 of file oct-stream.h.

Constructor & Destructor Documentation

scanf_format_list::scanf_format_list ( const std::string &  fmt = std::string ())
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 548 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 128 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 413 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 122 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 120 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 131 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 147 of file oct-stream.h.

scanf_format_list::operator bool ( ) const
inline

Definition at line 149 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 310 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
octave_idx_type scanf_format_list::curr_idx
private

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

Array<scanf_format_elt*> scanf_format_list::list
private
octave_idx_type scanf_format_list::nconv
private

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