#include <bus.h>
Bus::getLineAccessor
and Bus::lock
for more information on why and when to use a LineAccessor
object.
Public Member Functions | |
LineAccessor () | |
LineAccessor (Line *lineDataPtr) | |
LineAccessor (const LineAccessor &la) | |
bool | isValid () const |
Line & | operator[] (int index) |
void | operator= (int value) |
lcs::Bus< bits >::LineAccessor::LineAccessor | ( | ) | [inline] |
Default constructor. An object initialised through a default constructor is practically useless.
The only usefull constructor. User will never need to initialise a LineAccessor
object through the constructor. Unless very sure, let the function Bus::getLineAccessor
construct a LineAccessor
object for you.
lcs::Bus< bits >::LineAccessor::LineAccessor | ( | const LineAccessor & | la | ) | [inline] |
Copy constructor.
bool lcs::Bus< bits >::LineAccessor::isValid | ( | ) | const |
Returns true
if the LineAccessor
can access valid bus line data, false
if not.
void lcs::Bus< bits >::LineAccessor::operator= | ( | int | value | ) |
Makes a bitwise assignment to the lines of the a Bus
object according to the bit representation of the integer value
. A ShortCircuitException
is thrown if modifying line states is illegal.
Overloaded operator for line access. Usage is very similar to accessing array elements from arrays of standard data types. An OutOfRangeException
is thrown if index
is beyond the bus width. A ShortCircuitException
is thrown if the line access is illegal.
index | The index into the bus bits. |