- A Logic Circuit Simulation Library in C++





lcs::Array1D< T, len > Class Template Reference

#include <array1d.h>

Inheritance diagram for lcs::Array1D< T, len >:

lcs::BitBuff< bits > lcs::InputBus< bits > lcs::InputBus< 1 > lcs::Bus< bits > lcs::Clock lcs::InOutBus< bits > List of all members.

Detailed Description

template<typename T, unsigned int len>
class lcs::Array1D< T, len >

A one dimensional array class.


Public Member Functions

 Array1D (void)
 Array1D (const Array1D< T, len > &a)
virtual ~Array1D ()
int length (void) const
Array1D< T, len > & operator= (const Array1D< T, len > &a)
T & operator[] (unsigned int index) throw (OutOfRangeException<unsigned int>)
const T & operator[] (unsigned int index) const throw (OutOfRangeException<unsigned int>)


Constructor & Destructor Documentation

template<typename T, unsigned int len>
lcs::Array1D< T, len >::Array1D ( void   ) 

Default constructor.

template<typename T, unsigned int len>
lcs::Array1D< T, len >::Array1D ( const Array1D< T, len > &  a  ) 

Copy constructor.

template<typename T, unsigned int len>
lcs::Array1D< T, len >::~Array1D (  )  [virtual]

Destructor.


Member Function Documentation

template<typename T, unsigned int len>
int lcs::Array1D< T, len >::length ( void   )  const [inline]

Returns the length of the array.

template<typename T, unsigned int len>
Array1D< T, len > & lcs::Array1D< T, len >::operator= ( const Array1D< T, len > &  a  ) 

The assignment operator.

template<typename T, unsigned int len>
const T & lcs::Array1D< T, len >::operator[] ( unsigned int  index  )  const throw (OutOfRangeException<unsigned int>)

Retrieves the array element at the specified index.

Reimplemented in lcs::InputBus< bits >, lcs::InputBus< 1 >, lcs::InputBus< w >, lcs::InputBus< lines >, and lcs::InputBus< width >.

template<typename T, unsigned int len>
T & lcs::Array1D< T, len >::operator[] ( unsigned int  index  )  throw (OutOfRangeException<unsigned int>)

Retrieves the array element at the specified index.

Reimplemented in lcs::Bus< bits >, lcs::InOutBus< bits >, lcs::Bus< outbits >, lcs::Bus< inBits >, lcs::Bus< 1 >, lcs::Bus< lines >, and lcs::Bus< n >.


Copyright © 2006, 2007 Siva Chandra