nidas  v1.2-1520
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 
34 namespace nidas { namespace core {
35 
36 class SampleClient;
37 class SampleTag;
38 class Sample;
39 
48 class SampleSource {
49 public:
50 
51  virtual ~SampleSource() {}
52 
60  virtual SampleSource* getRawSampleSource() = 0;
61 
70 
75  virtual void addSampleTag(const SampleTag*)
76  throw (nidas::util::InvalidParameterException) = 0;
77 
78  virtual void removeSampleTag(const SampleTag*) throw () = 0;
79 
83  virtual std::list<const SampleTag*> getSampleTags() const = 0;
84 
85  virtual SampleTagIterator getSampleTagIterator() const = 0;
86 
92  virtual void addSampleClient(SampleClient* c) throw() = 0;
93 
97  virtual void removeSampleClient(SampleClient* c) throw() = 0;
98 
104  virtual void addSampleClientForTag(SampleClient* c,const SampleTag*) throw() = 0;
110  virtual void removeSampleClientForTag(SampleClient* c,const SampleTag*) throw() = 0;
111 
115  virtual int getClientCount() const throw() = 0;
116 
124  virtual void flush() throw() = 0;
125 
126  virtual const SampleStats& getSampleStats() const = 0;
127 
128 };
129 
130 }} // namespace nidas namespace core
131 
132 
133 #endif
virtual const SampleStats & getSampleStats() const =0
virtual std::list< const SampleTag * > getSampleTags() const =0
What SampleTags am I a SampleSource for?
virtual int getClientCount() const =0
How many SampleClients are currently in my list.
virtual void removeSampleClient(SampleClient *c)=0
Remove a SampleClient from this SampleSource.
virtual void removeSampleClientForTag(SampleClient *c, const SampleTag *)=0
Remove a SampleClient for a given SampleTag from this SampleSource.
virtual SampleSource * getProcessedSampleSource()=0
Several objects in NIDAS can be both a SampleSource of raw Samples and processed Samples.
virtual void removeSampleTag(const SampleTag *)=0
virtual void addSampleClientForTag(SampleClient *c, const SampleTag *)=0
Add a SampleClient to this SampleSource.
Pure virtual interface for a source of Samples.
Definition: SampleSource.h:48
virtual void addSampleClient(SampleClient *c)=0
Add a SampleClient of all Samples to this SampleSource.
Pure virtual interface of a client of Samples.
Definition: SampleClient.h:38
virtual SampleSource * getRawSampleSource()=0
Several objects in NIDAS can be both a SampleSource of raw Samples and processed Samples.
Class for iterating over the SampleTags of a Project, Site, DSMConfig, or a SampleSource.
Definition: NidsIterators.h:217
virtual SampleTagIterator getSampleTagIterator() const =0
Class describing a group of variables that are sampled and handled together.
Definition: SampleTag.h:87
virtual void addSampleTag(const SampleTag *)=0
Add a SampleTag to this SampleSource.
A source of samples.
Definition: SampleStats.h:41
virtual void flush()=0
Request that this SampleSource flush it&#39;s samples.
virtual ~SampleSource()
Definition: SampleSource.h:51