List of all members | Public Types | Public Member Functions | Friends
gate Class Reference

Represents a gate in a circuit. More...

Inheritance diagram for gate:
filtered_gate

Public Types

typedef std::vector< gatevector
 Vector type of gates. More...
 
typedef unsigned line
 Type for accessing the line (line index) More...
 
typedef std::set< lineline_container
 Container for storing lines. More...
 
typedef
boost::transform_iterator
< transform_line,
boost::filter_iterator
< filter_line,
line_container::iterator > > 
iterator
 Mutable Iterator for iterating through control or target lines. More...
 
typedef
boost::transform_iterator
< transform_line,
boost::filter_iterator
< filter_line,
line_container::const_iterator > > 
const_iterator
 Constant Iterator for iterating through control or target lines. More...
 

Public Member Functions

 gate ()
 Default constructor. More...
 
 gate (const gate &other)
 Copy Constructor. More...
 
virtual ~gate ()
 Default deconstructor. More...
 
gateoperator= (const gate &other)
 Assignment operator. More...
 
virtual const_iterator begin_controls () const
 Start iterator for accessing control lines. More...
 
virtual const_iterator end_controls () const
 End iterator for accessing control lines (const). More...
 
virtual iterator begin_controls ()
 Start iterator for accessing control lines (non-const). More...
 
virtual iterator end_controls ()
 End iterator for accessing control lines (non-const). More...
 
virtual const_iterator begin_targets () const
 Start iterator for accessing target lines (const). More...
 
virtual const_iterator end_targets () const
 End iterator for accessing target lines (const). More...
 
virtual iterator begin_targets ()
 Start iterator for accessing target lines (const). More...
 
virtual iterator end_targets ()
 End iterator for accessing target lines (non-const). More...
 
virtual unsigned size () const
 Returns the number of control and target lines as sum. More...
 
virtual void add_control (line c)
 Adds a control line to the gate. More...
 
virtual void remove_control (line c)
 Remove control line to the gate. More...
 
virtual void add_target (line l)
 Adds a target to the desired line. More...
 
virtual void remove_target (line l)
 Removes a target from the desired line. More...
 
virtual void set_type (const boost::any &t)
 Sets the type of the target line(s) More...
 
virtual const boost::any & type () const
 Returns the type of the target line(s) More...
 

Friends

class filtered_gate
 

Detailed Description

Represents a gate in a circuit.

Author
RevKit
Since
1.0

Member Typedef Documentation

typedef boost::transform_iterator<transform_line, boost::filter_iterator<filter_line, line_container::const_iterator> > const_iterator

Constant Iterator for iterating through control or target lines.

Author
RevKit
Since
1.0
typedef boost::transform_iterator<transform_line, boost::filter_iterator<filter_line, line_container::iterator> > iterator

Mutable Iterator for iterating through control or target lines.

Author
RevKit
Since
1.0
typedef unsigned line

Type for accessing the line (line index)

Author
RevKit
Since
1.0
typedef std::set<line> line_container

Container for storing lines.

Author
RevKit
Since
1.0
typedef std::vector<gate> vector

Vector type of gates.

Author
RevKit
Since
1.0

Constructor & Destructor Documentation

gate ( )

Default constructor.

Initializes private data

Author
RevKit
Since
1.0
gate ( const gate other)

Copy Constructor.

Initializes private data and copies gate

Parameters
otherGate to be assigned
Author
RevKit
Since
1.0
virtual ~gate ( )
virtual

Default deconstructor.

Clears private data

Author
RevKit
Since
1.0

Member Function Documentation

virtual void add_control ( line  c)
virtual

Adds a control line to the gate.

Parameters
ccontrol line to add
Author
RevKit
Since
1.0

Reimplemented in filtered_gate.

virtual void add_target ( line  l)
virtual

Adds a target to the desired line.

Parameters
ltarget line
Author
RevKit
Since
1.0

Reimplemented in filtered_gate.

virtual const_iterator begin_controls ( ) const
virtual

Start iterator for accessing control lines.

Returns The start iterator of the line_container for accessing control lines.

Author
RevKit
Since
1.0

Reimplemented in filtered_gate.

virtual iterator begin_controls ( )
virtual

Start iterator for accessing control lines (non-const).

Returns The start iterator of the line_container for accessing lines (non-const).

Author
RevKit
Since
1.0

Reimplemented in filtered_gate.

virtual const_iterator begin_targets ( ) const
virtual

Start iterator for accessing target lines (const).

Returns The start iterator of the line_container for accessing target lines (const).

Author
RevKit
Since
1.0

Reimplemented in filtered_gate.

virtual iterator begin_targets ( )
virtual

Start iterator for accessing target lines (const).

Returns The start iterator of the line_container for accessing target lines (const).

Author
RevKit
Since
1.0

Reimplemented in filtered_gate.

virtual const_iterator end_controls ( ) const
virtual

End iterator for accessing control lines (const).

Returns The end iterator of the line_container for accessing control lines (const).

Author
RevKit
Since
1.0

Reimplemented in filtered_gate.

virtual iterator end_controls ( )
virtual

End iterator for accessing control lines (non-const).

Returns the end iterator of the line_container for accessing control lines (non-const).

Author
RevKit
Since
1.0

Reimplemented in filtered_gate.

virtual const_iterator end_targets ( ) const
virtual

End iterator for accessing target lines (const).

Returns The end iterator of the line_container for accessing target lines (const).

Author
RevKit
Since
1.0

Reimplemented in filtered_gate.

virtual iterator end_targets ( )
virtual

End iterator for accessing target lines (non-const).

Returns The start iterator of the line_container for accessing target lines (non-const).

Author
RevKit
Since
1.0

Reimplemented in filtered_gate.

gate& operator= ( const gate other)

Assignment operator.

Parameters
otherGate to be assigned
Returns
Pointer to instance
Author
RevKit
Since
1.0
virtual void remove_control ( line  c)
virtual

Remove control line to the gate.

Parameters
ccontrol line to remove
Author
RevKit
Since
1.0

Reimplemented in filtered_gate.

virtual void remove_target ( line  l)
virtual

Removes a target from the desired line.

Parameters
ltarget line
Author
RevKit
Since
1.0

Reimplemented in filtered_gate.

virtual void set_type ( const boost::any &  t)
virtual

Sets the type of the target line(s)

Parameters
ttarget type
Author
RevKit
Since
1.0

Reimplemented in filtered_gate.

virtual unsigned size ( ) const
virtual

Returns the number of control and target lines as sum.

This method returns the number of control and target lines as sum and can be used for e.g. calculating costs.

Author
RevKit
Since
1.0
Returns
Number of control and target lines.

Reimplemented in filtered_gate.

virtual const boost::any& type ( ) const
virtual

Returns the type of the target line(s)

Returns
target type
Author
RevKit
Since
1.0

Reimplemented in filtered_gate.


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

Generated on Tue Apr 16 2013 08:12:02 for RevKit by doxygen 1.8.3.1