gate Class Reference

Represents a gate in a circuit. More...

Inheritance diagram for gate:
filtered_gate

List of all members.

Public Types

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

Public Member Functions

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

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:
other Gate 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:
c control 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:
l target 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 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 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 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_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_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.

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.

gate& operator= ( const gate other  ) 

Assignment operator.

Parameters:
other Gate 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:
c control 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:
l target 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:
t target 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 Dec 21 2010 21:52:13 for RevKit by doxygen 1.7.1