|
GTIRB-PPRINTER
v0.1.1
GrammaTech Intermediate Representation for Binaries: Pretty Printer
|
#include <PrettyPrinter.h>
Public Member Functions | |
| PrettyPrinter () | |
| Construct a PrettyPrinter with the default configuration. More... | |
| PrettyPrinter (const PrettyPrinter &)=default | |
| PrettyPrinter (PrettyPrinter &&)=default | |
| bool | getDebug () const |
| const std::set< std::string > & | getSkippedFunctions () const |
| Set of functions to skip during printing. More... | |
| const std::string & | getSyntax () const |
| Return the syntax that will be used for pretty printing. More... | |
| void | keepFunction (const std::string &functionName) |
| PrettyPrinter & | operator= (const PrettyPrinter &)=default |
| PrettyPrinter & | operator= (PrettyPrinter &&)=default |
| std::error_condition | print (std::ostream &stream, gtirb::Context &context, gtirb::IR &ir) const |
| void | setDebug (bool do_debug) |
| void | setSyntax (const std::string &syntax) |
| void | skipFunction (const std::string &functionName) |
The primary interface for pretty-printing GTIRB objects. The typical flow is to create a PrettyPrinter, configure it (e.g., set the output syntax, enable/disable debugging messages, etc.), then print one or more IR objects.
| gtirb_pprint::PrettyPrinter::PrettyPrinter | ( | ) |
Construct a PrettyPrinter with the default configuration.
|
default |
|
default |
| bool gtirb_pprint::PrettyPrinter::getDebug | ( | ) | const |
Indicates whether debugging messages are currently enable or disabled.
true if debugging messages are currently enabled, otherwise false. | const std::set< std::string > & gtirb_pprint::PrettyPrinter::getSkippedFunctions | ( | ) | const |
Set of functions to skip during printing.
| const std::string & gtirb_pprint::PrettyPrinter::getSyntax | ( | ) | const |
Return the syntax that will be used for pretty printing.
| void gtirb_pprint::PrettyPrinter::keepFunction | ( | const std::string & | functionName | ) |
Do not skip the named function when printing.
| functionName | name of the function to keep |
|
default |
|
default |
| std::error_condition gtirb_pprint::PrettyPrinter::print | ( | std::ostream & | stream, |
| gtirb::Context & | context, | ||
| gtirb::IR & | ir | ||
| ) | const |
Pretty-print the IR to a stream.
| stream | the stream to print to |
| context | context to use for allocating AuxData objects if needed |
| ir | the IR to pretty-print |
| void gtirb_pprint::PrettyPrinter::setDebug | ( | bool | do_debug | ) |
Enable or disable debugging messages inside the pretty-printed code.
| do_debug | whether to enable debugging messages |
| void gtirb_pprint::PrettyPrinter::setSyntax | ( | const std::string & | syntax | ) |
Set the syntax with in which to pretty print. It is the caller's responsibility to ensure that the syntax name has been registered.
| syntax | name of the syntax to use |
| void gtirb_pprint::PrettyPrinter::skipFunction | ( | const std::string & | functionName | ) |
Skip the named function when printing.
| functionName | name of the function to skip |
1.8.15