- A Logic Circuit Simulation Library in C++





lcs::Expression< bits, BUS_EXPR, void, void > Class Template Reference

#include <expression.h>

List of all members.


Detailed Description

template<int bits>
class lcs::Expression< bits, BUS_EXPR, void, void >

A class whose objects are created as temporary objects corresponding to an expression consisting of only an lcs::InputBus object. A user of libLCS will never need to use this class explicitly. Implicitly, this class is used everytime a continuous assignment is requested using the function lcs::Bus::cass.


Public Member Functions

 Expression (const InputBus< bits > &b)
 Expression (const Expression< bits, BUS_EXPR, void, void > &e)
void notify (Module *mod)
const LineState operator[] (int index) const throw (OutOfRangeException<int>)
int width () const


Constructor & Destructor Documentation

template<int bits>
lcs::Expression< bits, BUS_EXPR, void, void >::Expression ( const InputBus< bits > &  b  ) 

The only usefull constructor. The default constructor is practically useless.

template<int bits>
lcs::Expression< bits, BUS_EXPR, void, void >::Expression ( const Expression< bits, BUS_EXPR, void, void > &  e  ) 

Copy Constructor.


Member Function Documentation

template<int bits>
void lcs::Expression< bits, BUS_EXPR, void, void >::notify ( Module mod  )  [inline]

This function can be used by a lcs::Module derivative to be notified of line state changes in the busses used in the expression.

template<int bits>
const LineState lcs::Expression< bits, BUS_EXPR, void, void >::operator[] ( int  index  )  const throw (OutOfRangeException<int>)

Returns the bit state (which is a result of the operation performed by the expression) at the index specified.

template<int bits>
int lcs::Expression< bits, BUS_EXPR, void, void >::width (  )  const [inline]

Returns the width for which an lcs::Expression object is valid.


Copyright © 2006, 2007 Siva Chandra