OneInputGate Class Reference

The Class OneInputGate. More...

#include <OneInputGate.h>

Inheritance diagram for OneInputGate:
LogicGate BaseOneInputGate AbstractSimObject BaseLogicGate SimObject Input Output

List of all members.

Public Member Functions

 OneInputGate (size_t id, const OneInputFunc &func, const std::string &outputName, const std::string &inputName, const SimTime &delay)
 Instantiates a new one input gate.
 OneInputGate (const OneInputGate &that)
virtual OneInputGateclone () const
 a way to construct different subtypes
virtual bool hasInputName (const std::string &net) const
 Checks for input name.
virtual bool hasOutputName (const std::string &net) const
 Checks for output name.
virtual const std::string & getOutputName () const
 Gets the output name.
virtual const std::string getGateName () const
 name depends on the logic function this gate is implementing
virtual size_t getInputIndex (const std::string &net) const
 Gets the index of the input whose name is matching the net.
virtual const std::string toString () const
 A string representation.

Protected Member Functions

virtual LogicVal evalOutput () const
 execEvent follows the same logic as TwoInputGate::execEvent()
virtual void execEvent (Graph &graph, GNode &myNode, const EventTy &event)
 Exec event.

Private Attributes

const OneInputFuncfunc
 a functor which computes an output LogicVal when provided an input LogicVal

Detailed Description

The Class OneInputGate.


Constructor & Destructor Documentation

OneInputGate::OneInputGate ( size_t  id,
const OneInputFunc func,
const std::string &  outputName,
const std::string &  inputName,
const SimTime delay 
) [inline]

Instantiates a new one input gate.

Parameters:
id 
func,: the functor providing mapping from input values to output values
outputName the output name
inputName the input name
delay the delay
OneInputGate::OneInputGate ( const OneInputGate that  )  [inline]

Member Function Documentation

virtual OneInputGate* OneInputGate::clone (  )  const [inline, virtual]

a way to construct different subtypes

Returns:
a copy of this

Implements AbstractSimObject.

Reimplemented in Input, and Output.

virtual LogicVal OneInputGate::evalOutput (  )  const [inline, protected, virtual]

execEvent follows the same logic as TwoInputGate::execEvent()

calls the functor to compute output value

Implements BaseLogicGate.

Reimplemented in Input, and Output.

virtual void OneInputGate::execEvent ( Graph graph,
GNode myNode,
const EventTy e 
) [inline, protected, virtual]

Exec event.

The user code should override this method inorder to define the semantics of executing and event on a sub-type

Parameters:
graph,: the graph containg simulation objects as nodes and communication links as edges
myNode,: the node in the graph that has this SimObject as its node data
e,: the input event

Implements AbstractSimObject.

Reimplemented in Input, and Output.

virtual const std::string OneInputGate::getGateName (  )  const [inline, virtual]

name depends on the logic function this gate is implementing

Reimplemented in Input, and Output.

virtual size_t OneInputGate::getInputIndex ( const std::string &  net  )  const [inline, virtual]

Gets the index of the input whose name is matching the net.

Parameters:
net name of the net an input of this gate is connected to
Returns:
index of that input

Implements LogicGate.

virtual const std::string& OneInputGate::getOutputName (  )  const [inline, virtual]

Gets the output name.

Returns:
the output name

Reimplemented from BaseOneInputGate.

virtual bool OneInputGate::hasInputName ( const std::string &  net  )  const [inline, virtual]

Checks for input name.

Parameters:
net the wire name
Returns:
true, if input is connected to net

Reimplemented from BaseOneInputGate.

virtual bool OneInputGate::hasOutputName ( const std::string &  net  )  const [inline, virtual]

Checks for output name.

Parameters:
net the wire name
Returns:
true, if this gate's output is connected to net

Reimplemented from BaseOneInputGate.

virtual const std::string OneInputGate::toString (  )  const [inline, virtual]

A string representation.

Reimplemented from BaseOneInputGate.


Member Data Documentation

const OneInputFunc& OneInputGate::func [private]

a functor which computes an output LogicVal when provided an input LogicVal


The documentation for this class was generated from the following file:
Generated on Tue Aug 2 11:51:28 2011 for Galois by  doxygen 1.6.3