ROSE 0.11.145.147
Public Member Functions | Protected Attributes | List of all members
Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter Class Reference

Description

Format for printing things.

Some semantic domains may want to pass some additional information to print methods on a per-call basis. This base class provides something they can subclass to do that. A reference is passed to all print() methods for semantic objects.

Definition at line 19 of file Formatter.h.

#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/Formatter.h>

Inheritance diagram for Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter:
Inheritance graph
[legend]
Collaboration diagram for Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter:
Collaboration graph
[legend]

Public Member Functions

 Formatter ()
 Default formatter.
 
 Formatter (const std::string &)
 Format for indentation.
 
RegisterDictionaryPtr registerDictionary () const
 Property: Register dictionary.
 
void registerDictionary (const RegisterDictionaryPtr &)
 Property: Register dictionary.
 
bool get_suppress_initial_values () const
 Whether register initial values should be suppressed.
 
void set_suppress_initial_values (bool b=true)
 Whether register initial values should be suppressed.
 
void clear_suppress_initial_values ()
 Whether register initial values should be suppressed.
 
std::string get_line_prefix () const
 The string to print at the start of each line.
 
void set_line_prefix (const std::string &s)
 The string to print at the start of each line.
 
std::string get_indentation_suffix () const
 Indentation string appended to the line prefix for multi-level, multi-line outputs.
 
void set_indentation_suffix (const std::string &s)
 Indentation string appended to the line prefix for multi-level, multi-line outputs.
 
bool get_show_latest_writers () const
 Whether to show latest writer information for register and memory states.
 
void set_show_latest_writers (bool b=true)
 Whether to show latest writer information for register and memory states.
 
void clear_show_latest_writers ()
 Whether to show latest writer information for register and memory states.
 
bool get_show_properties () const
 Whether to show register properties.
 
void set_show_properties (bool b=true)
 Whether to show register properties.
 
void clear_show_properties ()
 Whether to show register properties.
 

Protected Attributes

RegisterDictionaryPtr regdict
 
bool suppress_initial_values = false
 
std::string line_prefix
 
std::string indentation_suffix = " "
 
bool show_latest_writers = true
 
bool show_properties = true
 

Constructor & Destructor Documentation

◆ Formatter() [1/2]

Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::Formatter ( )

Default formatter.

Using a default formatter is the same as using no formatter at all.

◆ Formatter() [2/2]

Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::Formatter ( const std::string &  )
explicit

Format for indentation.

Formatter that indents every line according to the given prefix.

Member Function Documentation

◆ registerDictionary() [1/2]

RegisterDictionaryPtr Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::registerDictionary ( ) const

Property: Register dictionary.

The register dictionary which is used for printing register names.

◆ registerDictionary() [2/2]

void Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::registerDictionary ( const RegisterDictionaryPtr )

Property: Register dictionary.

The register dictionary which is used for printing register names.

◆ get_suppress_initial_values()

bool Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::get_suppress_initial_values ( ) const
inline

Whether register initial values should be suppressed.

If a register's value has a comment that is equal to the register name with "_0" appended, then that value is assumed to be the register's initial value.

Definition at line 53 of file Formatter.h.

◆ set_suppress_initial_values()

void Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::set_suppress_initial_values ( bool  b = true)
inline

Whether register initial values should be suppressed.

If a register's value has a comment that is equal to the register name with "_0" appended, then that value is assumed to be the register's initial value.

Definition at line 54 of file Formatter.h.

Referenced by clear_suppress_initial_values().

◆ clear_suppress_initial_values()

void Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::clear_suppress_initial_values ( )
inline

Whether register initial values should be suppressed.

If a register's value has a comment that is equal to the register name with "_0" appended, then that value is assumed to be the register's initial value.

Definition at line 55 of file Formatter.h.

References set_suppress_initial_values().

◆ get_line_prefix()

std::string Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::get_line_prefix ( ) const
inline

The string to print at the start of each line.

This only applies to objects that occupy more than one line.

Definition at line 60 of file Formatter.h.

Referenced by Rose::BinaryAnalysis::Partitioner2::Semantics::MemoryState< Super >::print().

◆ set_line_prefix()

void Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::set_line_prefix ( const std::string &  s)
inline

The string to print at the start of each line.

This only applies to objects that occupy more than one line.

Definition at line 61 of file Formatter.h.

◆ get_indentation_suffix()

std::string Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::get_indentation_suffix ( ) const
inline

Indentation string appended to the line prefix for multi-level, multi-line outputs.

Definition at line 66 of file Formatter.h.

◆ set_indentation_suffix()

void Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::set_indentation_suffix ( const std::string &  s)
inline

Indentation string appended to the line prefix for multi-level, multi-line outputs.

Definition at line 67 of file Formatter.h.

◆ get_show_latest_writers()

bool Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::get_show_latest_writers ( ) const
inline

Whether to show latest writer information for register and memory states.

Definition at line 72 of file Formatter.h.

◆ set_show_latest_writers()

void Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::set_show_latest_writers ( bool  b = true)
inline

Whether to show latest writer information for register and memory states.

Definition at line 73 of file Formatter.h.

◆ clear_show_latest_writers()

void Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::clear_show_latest_writers ( )
inline

Whether to show latest writer information for register and memory states.

Definition at line 74 of file Formatter.h.

◆ get_show_properties()

bool Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::get_show_properties ( ) const
inline

Whether to show register properties.

Definition at line 79 of file Formatter.h.

◆ set_show_properties()

void Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::set_show_properties ( bool  b = true)
inline

Whether to show register properties.

Definition at line 80 of file Formatter.h.

◆ clear_show_properties()

void Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::clear_show_properties ( )
inline

Whether to show register properties.

Definition at line 81 of file Formatter.h.

Member Data Documentation

◆ regdict

RegisterDictionaryPtr Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::regdict
protected

Definition at line 21 of file Formatter.h.

◆ suppress_initial_values

bool Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::suppress_initial_values = false
protected

Definition at line 22 of file Formatter.h.

◆ line_prefix

std::string Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::line_prefix
protected

Definition at line 23 of file Formatter.h.

◆ indentation_suffix

std::string Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::indentation_suffix = " "
protected

Definition at line 24 of file Formatter.h.

◆ show_latest_writers

bool Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::show_latest_writers = true
protected

Definition at line 25 of file Formatter.h.

◆ show_properties

bool Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::Formatter::show_properties = true
protected

Definition at line 26 of file Formatter.h.


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