standard_circuit Class Reference

Represents a circuit. More...

List of all members.

Public Member Functions

 standard_circuit ()
 Default Constructor.
 standard_circuit (unsigned lines)
 Default Constructor.

Detailed Description

Represents a circuit.

A circuit is represented by a list of gates (type gate::vector) and meta information like name, inputs, outputs, constants, and garbage.

Via STL like iterators the gates can be accessed and also used in STL and STL like algorithms based on the iterator concept.

Example: Creating a circuit with 5 lines

 #include <core/circuit.hpp>

 ...

 circuit circ( 5 );

Example: Iterate through all gates in a circuit \p circ with iterators

 for ( circuit::const_iterator itGate = circ.begin(); itGate != circ.end(); ++itGate )
 {
   gate& g = *itGate;
 }

Example: Iterator through all gates in a circuit with foreach

 #include <boost/foreach.hpp>
 #define foreach BOOST_FOREACH

 ...

 foreach ( gate& g, circ )
 {
   // g can be modified
 } 

 foreach ( const gate& g, circ )
 {
   // g cannot be modified
 } 
Author:
RevKit
Since:
1.0

Constructor & Destructor Documentation

standard_circuit (  )  [inline]

Default Constructor.

Creates an empty circuit with zero lines.

Author:
RevKit
Since:
1.0
standard_circuit ( unsigned  lines  )  [inline]

Default Constructor.

Creates an empty circuit with lines lines.

Parameters:
lines Number of lines
Author:
RevKit
Since:
1.0

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

Generated on Tue Dec 21 2010 21:52:13 for RevKit by doxygen 1.7.1