print_circuit_settings Struct Reference

Settings for print_circuit function. More...

List of all members.

Public Member Functions

 print_circuit_settings (std::ostream &os=std::cout)
 Default constructor.
virtual char target_type_char (const gate &g) const
 Returns a char for a gate.

Public Attributes

std::ostream & os
 The stream to dump the circuit to (default: std::ostream).
bool print_inputs_and_outputs
 Determines whether the inputs and outputs should be printed (default: false).
bool print_gate_index
 Determines whether the gate_index should be printed (default: false).
char control_char
 Character to be printed for a control line.
char line_char
 Character to be printed for an empty line.
unsigned gate_spacing
 Space between gates.
unsigned line_spacing
 Space between lines.

Detailed Description

Settings for print_circuit function.

Note:
This settings cannot be applied when using operator<<(std::ostream&, const circuit&) to print a circuit.
Author:
RevKit
Since:
1.0

Constructor & Destructor Documentation

print_circuit_settings ( std::ostream &  os = std::cout  ) 

Default constructor.

Initializes default values

Parameters:
os The stream parameter has to be determined in the constructor
Author:
RevKit
Since:
1.0

Member Function Documentation

virtual char target_type_char ( const gate g  )  const [virtual]

Returns a char for a gate.

The default implementation returns O for Toffoli and Peres gates, X for Fredkin, v for V gates, and + for V+ gates.

For unknown gates an empty char ' ' is returned.

When overriding this method, first the base method can be called and further decisions can be made when the return value is an empty char meaning it is an unknown type.

Parameters:
g Gate
Returns:
The char

Member Data Documentation

Character to be printed for a control line.

Default value is *

Author:
RevKit
Since:
1.0
unsigned gate_spacing

Space between gates.

Default value is 0.

Author:
RevKit
Since:
1.0
char line_char

Character to be printed for an empty line.

Default value is -

Author:
RevKit
Since:
1.0
unsigned line_spacing

Space between lines.

Default value is 0.

Author:
RevKit
Since:
1.0
std::ostream& os

The stream to dump the circuit to (default: std::ostream).

Author:
RevKit
Since:
1.0

Determines whether the gate_index should be printed (default: false).

If this flag is enabled, in the first line -- before the circuit is printed -- the gate index is printed as modulo to base 10, because there is only space for one character.

Note:
The first gate has the index 0.
Author:
RevKit
Since:
1.0

Determines whether the inputs and outputs should be printed (default: false).

Author:
RevKit
Since:
1.0

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

Generated on Fri Jul 2 07:50:42 2010 for by doxygen 1.6.3