gem5  v20.1.0.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cp::Print Struct Reference

#include <cprintf.hh>

Public Member Functions

 Print (std::ostream &stream, const std::string &format)
 
 Print (std::ostream &stream, const char *format)
 
 ~Print ()
 
int get_number (int data)
 
template<typename T >
int get_number (const T &data)
 
template<typename T >
void add_arg (const T &data)
 
void end_args ()
 

Protected Member Functions

void process ()
 
void process_flag ()
 

Protected Attributes

std::ostream & stream
 
const char * format
 
const char * ptr
 
bool cont
 
std::ios::fmtflags saved_flags
 
char saved_fill
 
int saved_precision
 
int saved_width
 
Format fmt
 

Detailed Description

Definition at line 42 of file cprintf.hh.

Constructor & Destructor Documentation

◆ Print() [1/2]

cp::Print::Print ( std::ostream &  stream,
const std::string &  format 
)

Definition at line 42 of file cprintf.cc.

References saved_fill, saved_flags, saved_precision, saved_width, and stream.

◆ Print() [2/2]

cp::Print::Print ( std::ostream &  stream,
const char *  format 
)

Definition at line 51 of file cprintf.cc.

References saved_fill, saved_flags, saved_precision, saved_width, and stream.

◆ ~Print()

cp::Print::~Print ( )

Definition at line 60 of file cprintf.cc.

Member Function Documentation

◆ add_arg()

template<typename T >
void cp::Print::add_arg ( const T &  data)
inline

◆ end_args()

void cp::Print::end_args ( )

Definition at line 278 of file cprintf.cc.

References ArmISA::len, ptr, saved_fill, saved_flags, saved_precision, saved_width, and stream.

Referenced by ccprintf().

◆ get_number() [1/2]

template<typename T >
int cp::Print::get_number ( const T &  data)
inline

Definition at line 72 of file cprintf.hh.

◆ get_number() [2/2]

int cp::Print::get_number ( int  data)
inline

Definition at line 65 of file cprintf.hh.

References data.

Referenced by add_arg().

◆ process()

void cp::Print::process ( )
protected

Definition at line 65 of file cprintf.cc.

References cp::Format::clear(), fmt, ArmISA::len, process_flag(), ptr, and stream.

Referenced by add_arg().

◆ process_flag()

void cp::Print::process_flag ( )
protected

Member Data Documentation

◆ cont

bool cp::Print::cont
protected

Definition at line 48 of file cprintf.hh.

Referenced by add_arg().

◆ fmt

Format cp::Print::fmt
protected

Definition at line 55 of file cprintf.hh.

Referenced by add_arg(), process(), and process_flag().

◆ format

const char* cp::Print::format
protected

Definition at line 46 of file cprintf.hh.

◆ ptr

const char* cp::Print::ptr
protected

Definition at line 47 of file cprintf.hh.

Referenced by end_args(), process(), and process_flag().

◆ saved_fill

char cp::Print::saved_fill
protected

Definition at line 51 of file cprintf.hh.

Referenced by end_args(), and Print().

◆ saved_flags

std::ios::fmtflags cp::Print::saved_flags
protected

Definition at line 50 of file cprintf.hh.

Referenced by end_args(), and Print().

◆ saved_precision

int cp::Print::saved_precision
protected

Definition at line 52 of file cprintf.hh.

Referenced by end_args(), and Print().

◆ saved_width

int cp::Print::saved_width
protected

Definition at line 53 of file cprintf.hh.

Referenced by end_args(), and Print().

◆ stream

std::ostream& cp::Print::stream
protected

Definition at line 45 of file cprintf.hh.

Referenced by add_arg(), end_args(), Print(), process(), and process_flag().


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

Generated on Wed Sep 30 2020 14:02:39 for gem5 by doxygen 1.8.17