GNU Octave  4.0.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
printf_format_list Class Reference

#include "oct-stream.h"

Collaboration diagram for printf_format_list:
Collaboration graph
[legend]

Public Member Functions

 printf_format_list (const std::string &fmt=std::string())
 
 ~printf_format_list (void)
 
const printf_format_eltcurrent (void) const
 
const printf_format_eltfirst (void)
 
bool last_elt_p (void)
 
const printf_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

 printf_format_list (const printf_format_list &)
 
void add_elt_to_list (int args, const std::string &flags, int fw, int prec, char type, char modifier, octave_idx_type &num_elts)
 
void finish_conversion (const std::string &s, size_t &i, int args, const std::string &flags, int fw, int prec, char modifier, char &type, octave_idx_type &num_elts)
 
printf_format_listoperator= (const printf_format_list &)
 
void process_conversion (const std::string &s, size_t &i, size_t n, int &args, std::string &flags, int &fw, int &prec, char &modifier, char &type, octave_idx_type &num_elts)
 

Private Attributes

std::ostringstream * buf
 
octave_idx_type curr_idx
 
Array< printf_format_elt * > list
 
octave_idx_type nconv
 

Detailed Description

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

Constructor & Destructor Documentation

printf_format_list::printf_format_list ( const std::string &  fmt = std::string ())

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

References add_elt_to_list(), buf, list, nconv, process_conversion(), and Array< T >::resize().

printf_format_list::~printf_format_list ( void  )

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

References Array< T >::length(), and list.

printf_format_list::printf_format_list ( const printf_format_list )
private

Member Function Documentation

void printf_format_list::add_elt_to_list ( int  args,
const std::string &  flags,
int  fw,
int  prec,
char  type,
char  modifier,
octave_idx_type num_elts 
)
private

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

References buf, Array< T >::length(), list, and Array< T >::resize().

Referenced by finish_conversion(), and printf_format_list().

const printf_format_elt* printf_format_list::current ( void  ) const
inline

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

References Array< T >::elem(), and Array< T >::length().

void printf_format_list::finish_conversion ( const std::string &  s,
size_t i,
int  args,
const std::string &  flags,
int  fw,
int  prec,
char  modifier,
char type,
octave_idx_type num_elts 
)
private

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

References add_elt_to_list(), buf, and nconv.

Referenced by process_conversion().

const printf_format_elt* printf_format_list::first ( void  )
inline

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

Referenced by octave_base_stream::do_printf().

bool printf_format_list::last_elt_p ( void  )
inline

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

References Array< T >::length().

const printf_format_elt* printf_format_list::next ( bool  cycle = true)
inline

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

References Array< T >::length().

Referenced by octave_base_stream::do_printf().

octave_idx_type printf_format_list::num_conversions ( void  )
inline

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

Referenced by octave_base_stream::do_printf(), and octave_base_stream::printf().

bool printf_format_list::ok ( void  ) const
inline

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

printf_format_list::operator bool ( ) const
inline

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

printf_format_list& printf_format_list::operator= ( const printf_format_list )
private
void printf_format_list::printme ( void  ) const
void printf_format_list::process_conversion ( const std::string &  s,
size_t i,
size_t  n,
int args,
std::string &  flags,
int fw,
int prec,
char modifier,
char type,
octave_idx_type num_elts 
)
private

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

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

Referenced by printf_format_list().

Member Data Documentation

std::ostringstream* printf_format_list::buf
private
octave_idx_type printf_format_list::curr_idx
private

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

Array<printf_format_elt*> printf_format_list::list
private

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

Referenced by add_elt_to_list(), printf_format_list(), printme(), and ~printf_format_list().

octave_idx_type printf_format_list::nconv
private

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

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


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