nidas v1.2.3
SampleSource.h
Go to the documentation of this file.
1// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4; -*-
2// vim: set shiftwidth=4 softtabstop=4 expandtab:
3/*
4 ********************************************************************
5 ** NIDAS: NCAR In-situ Data Acquistion Software
6 **
7 ** 2004, Copyright University Corporation for Atmospheric Research
8 **
9 ** This program is free software; you can redistribute it and/or modify
10 ** it under the terms of the GNU General Public License as published by
11 ** the Free Software Foundation; either version 2 of the License, or
12 ** (at your option) any later version.
13 **
14 ** This program is distributed in the hope that it will be useful,
15 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ** GNU General Public License for more details.
18 **
19 ** The LICENSE.txt file accompanying this software contains
20 ** a copy of the GNU General Public License. If it is not found,
21 ** write to the Free Software Foundation, Inc.,
22 ** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 **
24 ********************************************************************
25*/
26
27#ifndef NIDAS_CORE_SAMPLESOURCE_H
28#define NIDAS_CORE_SAMPLESOURCE_H
29
30#include "NidsIterators.h"
31#include "SampleStats.h"
33
34namespace nidas { namespace core {
35
36class SampleClient;
37class SampleTag;
38class Sample;
39
49public:
50
51 virtual ~SampleSource() {}
52
61
70
77 virtual void addSampleTag(const SampleTag*) = 0;
78
82 virtual void removeSampleTag(const SampleTag*) = 0;
83
87 virtual std::list<const SampleTag*> getSampleTags() const = 0;
88
90
98 virtual void addSampleClient(SampleClient* c) = 0;
99
105 virtual void removeSampleClient(SampleClient* c) = 0;
106
114 virtual void addSampleClientForTag(SampleClient* c,const SampleTag*) = 0;
123
129 virtual int getClientCount() const = 0;
130
140 virtual void flush() = 0;
141
142 virtual const SampleStats& getSampleStats() const = 0;
143
144};
145
146}} // namespace nidas namespace core
147
148
149#endif
Pure virtual interface of a client of Samples.
Definition SampleClient.h:38
Pure virtual interface for a source of Samples.
Definition SampleSource.h:48
virtual std::list< const SampleTag * > getSampleTags() const =0
What SampleTags am I a SampleSource for?
virtual void addSampleTag(const SampleTag *)=0
Add a SampleTag to this SampleSource.
virtual void removeSampleClientForTag(SampleClient *c, const SampleTag *)=0
Remove a SampleClient for a given SampleTag from this SampleSource.
virtual void removeSampleClient(SampleClient *c)=0
Remove a SampleClient from this SampleSource.
virtual void addSampleClient(SampleClient *c)=0
Add a SampleClient of all Samples to this SampleSource.
virtual SampleSource * getProcessedSampleSource()=0
Several objects in NIDAS can be both a SampleSource of raw Samples and processed Samples.
virtual int getClientCount() const =0
How many SampleClients are currently in my list.
virtual ~SampleSource()
Definition SampleSource.h:51
virtual void removeSampleTag(const SampleTag *)=0
virtual void addSampleClientForTag(SampleClient *c, const SampleTag *)=0
Add a SampleClient to this SampleSource.
virtual void flush()=0
Request that this SampleSource flush it's samples.
virtual SampleTagIterator getSampleTagIterator() const =0
virtual const SampleStats & getSampleStats() const =0
virtual SampleSource * getRawSampleSource()=0
Several objects in NIDAS can be both a SampleSource of raw Samples and processed Samples.
A source of samples.
Definition SampleStats.h:41
Class for iterating over the SampleTags of a Project, Site, DSMConfig, or a SampleSource.
Definition NidsIterators.h:218
Class describing a group of variables that are sampled and handled together.
Definition SampleTag.h:88
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31