AbstractGate Class Template Reference

#include <CaFactory.h>

Inheritance diagram for AbstractGate:

Inheritance graph
[legend]

List of all members.


Detailed Description

template<int N_IN, int N_OUT>
class AbstractGate< N_IN, N_OUT >

Abstract IGate implementation defining gate's interface only.

The behavior has to be defined in the derived class and the clone() method as well.

Parameters:
N_IN Count of input signals.
N_OUT Count of output signals.

Definition at line 180 of file CaFactory.h.


Public Member Functions

virtual size_t nInputs () const
 Override this method to return number of circuit's input signals.
virtual size_t nOutputs () const
 Override this method to return number of circuit's output signals.
virtual IGateclone () const =0
 Each final derivation of IGate has to override this method with self-cloning method to keep the simulator working.
virtual TBus operator[] (TBus in) const =0
 (the core method of IGate interface) Override it to define circuit's behavior.

Member Function Documentation

virtual size_t nInputs (  )  const [inline, virtual]

Override this method to return number of circuit's input signals.

Implements IGate.

Definition at line 182 of file CaFactory.h.

Referenced by AbstractGate< 3, 1 >::nInputs().

Here is the caller graph for this function:

virtual size_t nOutputs (  )  const [inline, virtual]

Override this method to return number of circuit's output signals.

Implements IGate.

Definition at line 185 of file CaFactory.h.

virtual IGate* clone (  )  const [pure virtual, inherited]

Each final derivation of IGate 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.

Implemented in MuxGate< 3 >, MuxGate< 6 >, BusGate, CrossGate, MulGate, AndGate, OrGate, and XorGate.

Referenced by CaEvaluator::CaEvaluator().

Here is the caller graph for this function:

virtual TBus operator[] ( TBus  in  )  const [pure virtual, inherited]

(the core method of IGate interface) Override it to define circuit's behavior.

Parameters:
in Input passed to gate.
Returns:
Returns corresponding output of the gate to given input.

Implemented in MuxGate< 3 >, MuxGate< 6 >, BusGate, CrossGate, MulGate, and CommonGateBase.


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