IGate Class Reference

#include <Ca.h>

Inheritance diagram for IGate:

Inheritance graph
[legend]

List of all members.


Detailed Description

The most generic interface of designed (and/or simulated) circuit, most commonly a logical gate.

You want to implement this interface to define your own circuit, usually not directly, but using same abstract base class which implements the common part of your circuit.

Definition at line 174 of file Ca.h.


Public Member Functions

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

Constructor & Destructor Documentation

virtual ~IGate (  )  [inline, virtual]

Definition at line 176 of file Ca.h.


Member Function Documentation

virtual IGate* clone (  )  const [pure virtual]

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 size_t nInputs (  )  const [pure virtual]

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

Implemented in AbstractGate, AbstractGate< N, 1 >, AbstractGate< N, N >, AbstractGate< 6, 1 >, and AbstractGate< 3, 1 >.

virtual size_t nOutputs (  )  const [pure virtual]

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

Implemented in AbstractGate, AbstractGate< N, 1 >, AbstractGate< N, N >, AbstractGate< 6, 1 >, and AbstractGate< 3, 1 >.

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

(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:39 2009 for nucad by  doxygen 1.5.4