BindInput Class Template Reference

#include <CaFactory.h>

Inheritance diagram for BindInput:

Inheritance graph
[legend]

List of all members.


Detailed Description

template<int INPUT, int ROW, int COL, class PARENT = BindNothing>
class BindInput< INPUT, ROW, COL, PARENT >

Template for input wire binding.

Parameters:
INPUT Input 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 105 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 setInput (CaState &ca, TBus in) const
 Projection of given input to CA's state referred.
virtual void setOutput (CaState &state, TBus out) const =0
 Projection of given output to CA's state referred.
virtual TBus getOutput (const CaState &state) const =0
 Gather gate's output from CA's state.

Static Public Attributes

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

Private Attributes

CT_ASSERT
<!(PARENT::BOUND_INPUTS &MASK)> 
___COMPILE_TIME_ERROR__INPUT_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 117 of file CaFactory.h.

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

Projection of given input to CA's state referred.

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

Implements IGateBinding.

Definition at line 120 of file CaFactory.h.

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

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.

Implemented in BindOutput.

Referenced by CaEvaluator::simulate().

Here is the caller graph for this function:

virtual TBus getOutput ( const CaState state  )  const [pure virtual, inherited]

Gather gate's output from CA's state.

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

Implemented in BindOutput.

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

Here is the caller graph for this function:


Member Data Documentation

const TBus MASK = 1 << INPUT [static]

Definition at line 112 of file CaFactory.h.

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

Definition at line 113 of file CaFactory.h.

const TBus BOUND_OUTPUTS = PARENT::BOUND_OUTPUTS [static]

Definition at line 114 of file CaFactory.h.

CT_ASSERT<!(PARENT::BOUND_INPUTS & MASK)> ___COMPILE_TIME_ERROR__INPUT_ALREADY_BOUND___ [private]

Definition at line 128 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