|
NSCL DDAS 12.2-009
Support for XIA DDAS at FRIB
|
Abstract base class for DDAS data sources. More...
#include <DataSource.h>

Public Member Functions | |
| DataSource (ufmt::RingItemFactoryBase *pFactory) | |
| Constructor. More... | |
| virtual | ~DataSource ()=default |
| Destructor. More... | |
| virtual ufmt::CRingItem * | getItem ()=0 |
| Pure-virtual method to access a ring item from the data source. Must be implemented in derived classes. More... | |
| void | setFactory (ufmt::RingItemFactoryBase *pFactory) |
| Set a new factory. More... | |
Protected Attributes | |
| ufmt::RingItemFactoryBase * | m_pFactory |
| Ptr to our ring item factory. More... | |
Abstract base class for DDAS data sources.
Pure abstract data source which uses a factory's ring item getters to provide ring items from a data source. Since the factory provides this, we'll need concrete classes:
ringselector | ddasdumper -. | DataSource::DataSource | ( | ufmt::RingItemFactoryBase * | pFactory | ) |
Constructor.
| pFactory | Pointer to concrete ring item factory. |
Just saves the factory pointer - note that the format factory selector maintains ownership of the factory.
|
virtualdefault |
Destructor.
|
pure virtual |
Pure-virtual method to access a ring item from the data source. Must be implemented in derived classes.
Implemented in FdDataSource, and StreamDataSource.
| void DataSource::setFactory | ( | ufmt::RingItemFactoryBase * | pFactory | ) |
Set a new factory.
Pretty simple: Set a new factory e.g., if the format changes. Note that since we do not own the factory we do not delete the old one.
|
protected |
Ptr to our ring item factory.