BindOutput Class Template Reference

#include <CaFactory.h>

Inheritance diagram for BindOutput:

Inheritance graph
[legend]

List of all members.


Detailed Description

template<int OUTPUT, int ROW, int COL, class PARENT = BindNothing>
class BindOutput< OUTPUT, ROW, COL, PARENT >

Template for output wire binding.

Parameters:
OUTPUT Output wire index in range <0, n-1>.
ROW CA's row index in range <0, caSize-1>.
COL CA's column index in range <0, caSize-1>.
PARENT Another class implementing IGateBinding interface used as a base class.

Definition at line 140 of file CaFactory.h.


Public Member Functions

virtual IGateBindingclone () const
 Each final derivation of IGateBinding has to override this method with self-cloning method to keep the simulator working.
virtual void setOutput (CaState &ca, TBus out) const
 Projection of given output to CA's state referred.
virtual TBus getOutput (const CaState &ca) const
 Gather gate's output from CA's state.
virtual void setInput (CaState &state, TBus in) const =0
 Projection of given input to CA's state referred.

Static Public Attributes

static const TBus MASK = 1 << OUTPUT
static const TBus BOUND_INPUTS = PARENT::BOUND_INPUTS
static const TBus BOUND_OUTPUTS = PARENT::BOUND_OUTPUTS | MASK

Private Attributes

CT_ASSERT
<!(PARENT::BOUND_OUTPUTS &MASK)> 
___COMPILE_TIME_ERROR__OUTPUT_ALREADY_BOUND___

Member Function Documentation

virtual IGateBinding* clone (  )  const [inline, virtual]

Each final derivation of IGateBinding has to override this method with self-cloning method to keep the simulator working.

If you find a way how to do it generically at the top level, please send a patch to nucad@dudka.cz.

Implements IGateBinding.

Definition at line 152 of file CaFactory.h.

virtual void setOutput ( CaState state,
TBus  out 
) const [inline, virtual]

Projection of given output to CA's state referred.

Note:
Currently used only by visualizer.
Parameters:
state CA state being changed.
out Output ought to be passed to CA state.

Implements IGateBinding.

Definition at line 155 of file CaFactory.h.

virtual TBus getOutput ( const CaState state  )  const [inline, virtual]

Gather gate's output from CA's state.

Parameters:
state CA's state to read output from.
Returns:
Return the gathered gate's output.

Implements IGateBinding.

Definition at line 159 of file CaFactory.h.

virtual void setInput ( CaState state,
TBus  in 
) const [pure virtual, inherited]

Projection of given input to CA's state referred.

Parameters:
state CA state being changed.
in Input ought to be passed to CA state.

Implemented in BindInput.

Referenced by CaEvaluator::cntSteps(), CaEvaluator::eval(), and CaEvaluator::simulate().

Here is the caller graph for this function:


Member Data Documentation

const TBus MASK = 1 << OUTPUT [static]

Definition at line 147 of file CaFactory.h.

const TBus BOUND_INPUTS = PARENT::BOUND_INPUTS [static]

Definition at line 148 of file CaFactory.h.

const TBus BOUND_OUTPUTS = PARENT::BOUND_OUTPUTS | MASK [static]

Definition at line 149 of file CaFactory.h.

CT_ASSERT<!(PARENT::BOUND_OUTPUTS & MASK)> ___COMPILE_TIME_ERROR__OUTPUT_ALREADY_BOUND___ [private]

Definition at line 169 of file CaFactory.h.


The documentation for this class was generated from the following file:
Generated on Sat May 2 16:39:36 2009 for nucad by  doxygen 1.5.4