Generic hardware access library
HAL::AddressTableReader Class Reference

An interface defining how to read AddressTableItems from an implementation of this class. More...

#include <AddressTableReader.hh>

Inheritance diagram for HAL::AddressTableReader:
HAL::PCIAddressTableASCIIReader HAL::PCIAddressTableDOMReader HAL::PCIAddressTableDynamicReader HAL::PCIAddressTableXMLFileReader HAL::VME64xAddressTableASCIIReader HAL::VMEAddressTableASCIIReader HAL::VMEAddressTableDOMReader HAL::VMEAddressTableDynamicReader HAL::VMEAddressTableXMLFileReader HAL::VMEConfigurationSpaceAddressReader

List of all members.

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 * >

Detailed Description

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.

See also:
AddressTable, PCIAddressTable, VMEAddressTable
VMEAddressTableASCIIReader, PCIAddressTableASCIIReader
Christoph Schwick
2007/03/05 18:02:09

Definition at line 43 of file AddressTableReader.hh.

Constructor & Destructor Documentation

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

The constructor of this class is protected in order to avoid direct instantiation.

Definition at line 3 of file

Member Function Documentation

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

Member Data Documentation

Definition at line 70 of file AddressTableReader.hh.

std::list<AddressTableItem*>::iterator HAL::AddressTableReader::it [private]

Definition at line 71 of file AddressTableReader.hh.

Definition at line 68 of file AddressTableReader.hh.

The documentation for this class was generated from the following files: