NSCL DDAS 12.2-009
Support for XIA DDAS at FRIB
DataSource.h
Go to the documentation of this file.
1/*
2 This software is Copyright by the Board of Trustees of Michigan
3 State University (c) Copyright 2017.
4
5 You may use this software under the terms of the GNU public license
6 (GPL). The terms of this license are described at:
7
8 http://www.gnu.org/licenses/gpl.txt
9
10 Authors:
11 Ron Fox
12 Giordano Cerriza
13 Aaron Chester
14 FRIB
15 Michigan State University
16 East Lansing, MI 48824-1321
17*/
18
19#ifndef DATASOURCE_H
20#define DATASOURCE_H
21
28namespace ufmt {
29class CRingItem;
30class RingItemFactoryBase;
31} // namespace ufmt
32
49protected:
50 ufmt::RingItemFactoryBase *m_pFactory;
51
52public:
57 DataSource(ufmt::RingItemFactoryBase *pFactory);
59 virtual ~DataSource() = default;
65 virtual ufmt::CRingItem *getItem() = 0;
67 void setFactory(ufmt::RingItemFactoryBase *pFactory);
68};
69
70#endif
Abstract base class for DDAS data sources.
Definition: DataSource.h:48
virtual ufmt::CRingItem * getItem()=0
Pure-virtual method to access a ring item from the data source. Must be implemented in derived classe...
ufmt::RingItemFactoryBase * m_pFactory
Ptr to our ring item factory.
Definition: DataSource.h:50
void setFactory(ufmt::RingItemFactoryBase *pFactory)
Set a new factory.
Definition: DataSource.cpp:41
DataSource(ufmt::RingItemFactoryBase *pFactory)
Constructor.
Definition: DataSource.cpp:34
virtual ~DataSource()=default
Destructor.
Definition: DataSource.h:28