cprover
printf_formattert Class Reference

#include <printf_formatter.h>

Collaboration diagram for printf_formattert:
[legend]

Classes

class  eol_exceptiont
 

Public Member Functions

void operator() (const std::string &format, const std::list< exprt > &_operands)
 
void print (std::ostream &out)
 
std::string as_string ()
 
 printf_formattert (const namespacet &_ns)
 

Protected Member Functions

bool eol () const
 
char next ()
 
void process_char (std::ostream &out)
 
void process_format (std::ostream &out)
 
const exprt make_type (const exprt &src, const typet &dest)
 

Protected Attributes

const namespacetns
 
std::string format
 
std::list< exprtoperands
 
std::list< exprt >::const_iterator next_operand
 
unsigned format_pos
 

Detailed Description

Definition at line 18 of file printf_formatter.h.

Constructor & Destructor Documentation

◆ printf_formattert()

printf_formattert::printf_formattert ( const namespacet _ns)
inlineexplicit

Definition at line 28 of file printf_formatter.h.

Member Function Documentation

◆ as_string()

std::string printf_formattert::as_string ( )

Definition at line 55 of file printf_formatter.cpp.

References print().

Referenced by convert().

◆ eol()

bool printf_formattert::eol ( ) const
inlineprotected

Definition at line 38 of file printf_formatter.h.

References format, and format_pos.

Referenced by next(), and print().

◆ make_type()

const exprt printf_formattert::make_type ( const exprt src,
const typet dest 
)
protected

Definition at line 21 of file printf_formatter.cpp.

References exprt::make_typecast(), ns, simplify(), and exprt::type().

Referenced by process_format().

◆ next()

char printf_formattert::next ( )
inlineprotected

Definition at line 42 of file printf_formatter.h.

References eol(), format, and format_pos.

Referenced by process_char(), and process_format().

◆ operator()()

void printf_formattert::operator() ( const std::string &  format,
const std::list< exprt > &  _operands 
)

Definition at line 32 of file printf_formatter.cpp.

References format, and operands.

◆ print()

void printf_formattert::print ( std::ostream &  out)

Definition at line 40 of file printf_formatter.cpp.

References eol(), format_pos, next_operand, operands, and process_char().

Referenced by as_string(), and show_goto_trace().

◆ process_char()

void printf_formattert::process_char ( std::ostream &  out)
protected

Definition at line 182 of file printf_formatter.cpp.

References next(), and process_format().

Referenced by print().

◆ process_format()

Member Data Documentation

◆ format

std::string printf_formattert::format
protected

Definition at line 34 of file printf_formatter.h.

Referenced by eol(), next(), and operator()().

◆ format_pos

unsigned printf_formattert::format_pos
protected

Definition at line 37 of file printf_formatter.h.

Referenced by eol(), next(), and print().

◆ next_operand

std::list<exprt>::const_iterator printf_formattert::next_operand
protected

Definition at line 36 of file printf_formatter.h.

Referenced by print(), and process_format().

◆ ns

const namespacet& printf_formattert::ns
protected

Definition at line 33 of file printf_formatter.h.

Referenced by make_type().

◆ operands

std::list<exprt> printf_formattert::operands
protected

Definition at line 35 of file printf_formatter.h.

Referenced by operator()(), print(), and process_format().


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