- A Logic Circuit Simulation Library in C++

lcs::Bit Class Reference

#include <bit.h>

List of all members.

Detailed Description

A class which is denotes a single bit. A bit object holds a lcs::LineState value. Users of libLCS will not need to directly use Bit objects under normal circumstances. One has to use objects of class lcs::BitBuffer, which bundles one or more Bit objects, as neccesary.

Public Member Functions

 Bit (void)
 Bit (const Bit &bit)
 ~Bit ()
void operator= (const LineState &rhs)
template<int w, ExprType Type, typename LExprType, typename RExprType>
void operator= (const Expression< w, Type, LExprType, RExprType > &rhs)
const LineState state (void)

Private Member Functions

Bitoperator= (const Bit &rhs)
void notify (Module *mod)
void stopNotification (Module *mod)

Constructor & Destructor Documentation

lcs::Bit::Bit ( void   ) 

The default constructor.

lcs::Bit::Bit ( const Bit bit  ) 

The copy constructor.

lcs::Bit::~Bit (  ) 


Member Function Documentation

void lcs::Bit::notify ( Module mod  )  [private]

A lcs::Module (or its derivative) should register to be notified by the bit about a bit state change using this function. However, since this function is declared as a private member, one cannot use this function directly. See lcs::BitBuff::notify for more information. The lcs::Bit::notify is called by the function lcs::BitBuff::notify.

Bit& lcs::Bit::operator= ( const Bit rhs  )  [private]

The assignment operator.

template<int w, ExprType Type, typename LExprType, typename RExprType>
void lcs::Bit::operator= ( const Expression< w, Type, LExprType, RExprType > &  rhs  )  [inline]

Assigns the bit state with an expression object.

void lcs::Bit::operator= ( const LineState rhs  ) 

An assignment operator to assign the bit state with a lcs::LineState variable.

rhs The RHS lcs::LineState variable for the assignment operator.

const LineState lcs::Bit::state ( void   )  [inline]

Returns the logic state of the bit.

void lcs::Bit::stopNotification ( Module mod  )  [private]

A lcs::Module (or its derivative) can de-register itself from being notified by the bit using this function. See lcs::Bit::notify for more information. As with lcs::Bit::notify, even this function is declared private and hence cannot be used directly. One has to use lcs::BitBuff::stopNotification, which internally makes a call to lcs::Bit::stopNotification.

Copyright © 2006, 2007 Siva Chandra