Generic hardware access library
|
An interface defining how to read AddressTableItems from an implementation of this class. More...
#include <AddressTableReader.hh>
Public Member Functions | |
virtual | ~AddressTableReader () |
Clean up of non-used resources. | |
virtual bool | next (AddressTableItem **nextItem) |
Retrieves the next item from the AddressTableReader. | |
Protected Member Functions | |
AddressTableReader () | |
The constructor of this class is protected in order to avoid direct instantiation. | |
Protected Attributes | |
std::list< AddressTableItem * > | itemPointerList |
Private Attributes | |
bool | firstAccess |
std::list< AddressTableItem * > ::iterator | it |
An interface defining how to read AddressTableItems from an implementation of this class.
This interface is used by concrete implementations of the AddressTable which in the constructor need to read from an AddressTableReader all items of the Table. The reader has been separarted from the AddressTable itself since this allows to construct different AddressTableReaders for different input methods which then can be plugged at will into the implementation of the AddressTable itself.
Example: You can plug into the constructor of a PCIAddressTable an AddressTableReader which reads an ASCII file or another one which reads an XML representation of the table, or a third one which accesses a database.
This class is not ment to be instantiated directly. It merely defines the functionality which is common to all AddressTableReaders: That is the way how to retrieve the data from an AddressTableReader.
Definition at line 43 of file AddressTableReader.hh.
HAL::AddressTableReader::~AddressTableReader | ( | ) | [virtual] |
Clean up of non-used resources.
With the next() method the AddressTableReader gives the pointer to the AddressTableItems to the user. The items are then owned by the user and it is the responsibility of the user to delete the items if they are not anymore needed. (This is done in the destructor of the AddressTable.) If on the other hand no item or only a part of the items have been read out with the next() routine, the remaining items must be deleted in this destructor.
Definition at line 7 of file AddressTableReader.cc.
HAL::AddressTableReader::AddressTableReader | ( | ) | [protected] |
The constructor of this class is protected in order to avoid direct instantiation.
Definition at line 3 of file AddressTableReader.cc.
bool HAL::AddressTableReader::next | ( | HAL::AddressTableItem ** | nextItem | ) | [virtual] |
Retrieves the next item from the AddressTableReader.
After excecution *nextItem contains a pointer to the next item of the AddressTable.
Definition at line 17 of file AddressTableReader.cc.
bool HAL::AddressTableReader::firstAccess [private] |
Definition at line 70 of file AddressTableReader.hh.
std::list<AddressTableItem*>::iterator HAL::AddressTableReader::it [private] |
Definition at line 71 of file AddressTableReader.hh.
std::list<AddressTableItem*> HAL::AddressTableReader::itemPointerList [protected] |
Definition at line 68 of file AddressTableReader.hh.