List of all members | Public Member Functions | Public Attributes
print_circuit_settings Struct Reference

Settings for print_circuit function. More...

Public Member Functions

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

Public Attributes

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

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
osThe stream parameter has to be determined in the constructor
Author
RevKit
Since
1.0
virtual ~print_circuit_settings ( )
virtual

Default deconstructor.

Author
RevKit
Since
1.1

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
gGate
Returns
The char

Member Data Documentation

char control_char

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
bool print_gate_index

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
bool print_inputs_and_outputs

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 Tue Apr 16 2013 08:12:02 for RevKit by doxygen 1.8.3.1