opcode::Visitor that pretty-prints the opcodes using indentation to show structure
More...
#include <opcode.h>
Data Fields |
FILE * | out |
| Output stream.
|
const Vartable * | btable |
| Table used to get variable descriptions (optional).
|
unsigned | indent |
| Current indent level.
|
unsigned | indent_step |
| How many spaces in an indentation level.
|
const DTable * | dtable |
| D table to use to expand D groups.
|
Protected Member Functions |
void | print_lead (Varcode code) |
| Print line lead (indentation and formatted code)
|
Detailed Description
opcode::Visitor that pretty-prints the opcodes using indentation to show structure
Member Function Documentation
virtual void wreport::opcode::Printer::b_variable |
( |
Varcode |
code | ) |
|
|
virtual |
virtual void wreport::opcode::Printer::c_associated_field |
( |
Varcode |
code, |
|
|
Varcode |
sig_code, |
|
|
unsigned |
nbits |
|
) |
| |
|
virtual |
Notify the declaration of an associated field for the next values.
- Parameters
-
code | The C modifier code |
sig_code | The B code of the associated field significance opcode (or 0 to mark the end of the associated field encoding) |
nbits | The number of bits used for the associated field. |
Reimplemented from wreport::opcode::Visitor.
virtual void wreport::opcode::Printer::c_change_data_scale |
( |
Varcode |
code, |
|
|
int |
change |
|
) |
| |
|
virtual |
Notify a change of data scale.
- Parameters
-
code | The C modifier code |
change | The scale change (positive or negative) |
Reimplemented from wreport::opcode::Visitor.
virtual void wreport::opcode::Printer::c_change_data_width |
( |
Varcode |
code, |
|
|
int |
change |
|
) |
| |
|
virtual |
Notify a change of data width.
- Parameters
-
code | The C modifier code |
change | The width change (positive or negative) |
Reimplemented from wreport::opcode::Visitor.
virtual void wreport::opcode::Printer::c_char_data |
( |
Varcode |
code | ) |
|
|
virtual |
virtual void wreport::opcode::Printer::c_char_data_override |
( |
Varcode |
code, |
|
|
unsigned |
new_length |
|
) |
| |
|
virtual |
Notify an override of character data length.
- Parameters
-
code | The C modifier code |
new_length | New length of all following character data (or 0 to reset to default) |
Reimplemented from wreport::opcode::Visitor.
virtual void wreport::opcode::Printer::c_local_descriptor |
( |
Varcode |
code, |
|
|
Varcode |
desc_code, |
|
|
unsigned |
nbits |
|
) |
| |
|
virtual |
Notify the length of the following local descriptor.
- Parameters
-
code | The C modifier code |
desc_code | Local descriptor for which the length is provided |
nbits | Bit size of the data described by desc_code |
Reimplemented from wreport::opcode::Visitor.
virtual void wreport::opcode::Printer::c_modifier |
( |
Varcode |
code | ) |
|
|
virtual |
Notify of a C modifier.
Whenever the modifier is a supported one, this is followed by an invocation of one of the specific c_* methods.
- Parameters
-
Reimplemented from wreport::opcode::Visitor.
virtual void wreport::opcode::Printer::c_quality_information_bitmap |
( |
Varcode |
code | ) |
|
|
virtual |
virtual void wreport::opcode::Printer::c_substituted_value |
( |
Varcode |
code | ) |
|
|
virtual |
virtual void wreport::opcode::Printer::c_substituted_value_bitmap |
( |
Varcode |
code | ) |
|
|
virtual |
virtual void wreport::opcode::Printer::d_group_begin |
( |
Varcode |
code | ) |
|
|
virtual |
Notify the start of a D group.
- Parameters
-
code | The D code that is being expanded |
Reimplemented from wreport::opcode::Visitor.
virtual void wreport::opcode::Printer::d_group_end |
( |
Varcode |
code | ) |
|
|
virtual |
Notify the end of a D group.
- Parameters
-
code | The D code that has just been expanded |
Reimplemented from wreport::opcode::Visitor.
void wreport::opcode::Printer::print_lead |
( |
Varcode |
code | ) |
|
|
protected |
Print line lead (indentation and formatted code)
- Parameters
-
code | Code to format in the line lead |
virtual void wreport::opcode::Printer::r_replication |
( |
Varcode |
code, |
|
|
Varcode |
delayed_code, |
|
|
const Opcodes & |
ops |
|
) |
| |
|
virtual |
Notify a replicated section.
- Parameters
-
code | The R replication code |
delayed_code | The delayed replication B code, or 0 if delayed replication is not used |
ops | The replicated operators |
Reimplemented from wreport::opcode::Visitor.
Field Documentation
const Vartable* wreport::opcode::Printer::btable |
Table used to get variable descriptions (optional).
It defaults to NULL, but if it is set, the output will contain descriptions of B variable entries
unsigned wreport::opcode::Printer::indent |
Current indent level.
It defaults to 0 in a newly created Printer. You can set it to some other value to indent all the output by the given amount of spaces
FILE* wreport::opcode::Printer::out |
Output stream.
It defaults to stdout, but it can be set to any FILE* stream
The documentation for this class was generated from the following file: