filtered_gate Class Reference

Wrapper for a gate to filter some lines. More...

Inheritance diagram for filtered_gate:
gate

List of all members.

Public Member Functions

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

Detailed Description

Wrapper for a gate to filter some lines.

This class wraps a underline base gate to just access some lines which are specified in filter.

You will never have to create a filtered_gate object on your own, but you will get this as reference object to your iterators in a subcircuit.

Author:
RevKit
Since:
1.0

Constructor & Destructor Documentation

filtered_gate ( gate base,
std::vector< unsigned > &  filter 
)

Standard constructor.

Creates a filtered_gate from a base gate and a list of indices which should be included in this gate.

Parameters:
base The underlying referenced gate
filter A vector with line indices which are included in this gate
Author:
RevKit
Since:
1.0
filtered_gate ( const filtered_gate other  )  [explicit]

Copy constructor.

Parameters:
other Object to be copied from
Author:
RevKit
Since:
1.0

Member Function Documentation

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 from gate.

void add_target ( line  l  )  [virtual]

Adds a target to the desired line.

Parameters:
l target line
Author:
RevKit
Since:
1.0

Reimplemented from gate.

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 from gate.

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 from gate.

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 from gate.

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 from gate.

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 from gate.

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 from gate.

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 from gate.

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 from gate.

filtered_gate& operator= ( const filtered_gate other  ) 

Assignment operator.

Parameters:
other Gate to be assigned
Returns:
Pointer to instance
Author:
RevKit
Since:
1.0
void remove_control ( line  c  )  [virtual]

Remove control line to the gate.

Parameters:
c control line to remove
Author:
RevKit
Since:
1.0

Reimplemented from gate.

void remove_target ( line  l  )  [virtual]

Removes a target from the desired line.

Parameters:
l target line
Author:
RevKit
Since:
1.0

Reimplemented from gate.

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 from gate.

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 from gate.

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

Returns the type of the target line(s).

Returns:
target type
Author:
RevKit
Since:
1.0

Reimplemented from gate.


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

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