27 #ifndef NIDAS_CORE_SAMPLESOURCESUPPORT_H
28 #define NIDAS_CORE_SAMPLESOURCESUPPORT_H
36 namespace nidas {
namespace core {
142 void distribute(
const std::list<const Sample*>& samps)
throw();
void setKeepStats(bool val)
Definition: SampleSourceSupport.h:154
SampleClientList _clients
Current clients of all samples.
Definition: SampleSourceSupport.h:173
void removeSampleTag(const SampleTag *tag)
Definition: SampleSourceSupport.cc:67
Pure virtual interface for a source of Samples.
Definition: SampleSource.h:48
SampleTagIterator getSampleTagIterator() const
Definition: SampleSourceSupport.cc:75
SampleStats _stats
Definition: SampleSourceSupport.h:184
A source of samples.
Definition: SampleSourceSupport.h:47
void removeSampleClient(SampleClient *c)
Remove a SampleClient from this SampleSource This will also remove a SampleClient if it has been adde...
Definition: SampleSourceSupport.cc:88
bool getKeepStats() const
Definition: SampleSourceSupport.h:159
void removeSampleClientForTag(SampleClient *c, const SampleTag *)
Add a SampleClient to this SampleSource.
Definition: SampleSourceSupport.cc:121
void addSampleClient(SampleClient *c)
Add a SampleClient to this SampleSource.
Definition: SampleSourceSupport.cc:80
Pure virtual interface of a client of Samples.
Definition: SampleClient.h:38
const SampleStats & getSampleStats() const
Definition: SampleSourceSupport.h:149
std::map< dsm_sample_id_t, SampleClientList > _clientsBySampleId
Current clients of specific samples.
Definition: SampleSourceSupport.h:178
nidas::util::Mutex _clientMapLock
Definition: SampleSourceSupport.h:182
void removeAllSampleClients()
Big cleanup.
Definition: SampleSourceSupport.h:116
SampleSourceSupport & operator=(const SampleSourceSupport &x)
No assignment.
void lock()
Lock the Mutex.
Definition: ThreadSupport.h:206
Interface to a data sample.
Definition: Sample.h:189
A list of SampleClients.
Definition: SampleClientList.h:41
SampleSource * getRawSampleSource()
Several objects in NIDAS can be both a SampleSource of raw Samples and processed Samples.
Definition: SampleSourceSupport.h:60
Class for iterating over the SampleTags of a Project, Site, DSMConfig, or a SampleSource.
Definition: NidsIterators.h:217
nidas::util::Mutex _tagsMutex
Definition: SampleSourceSupport.h:166
Class describing a group of variables that are sampled and handled together.
Definition: SampleTag.h:87
void distribute(const Sample *s)
Distribute a sample to my clients, calling the receive() method of each client, passing the const poi...
Definition: SampleSourceSupport.cc:141
void addSampleClientForTag(SampleClient *c, const SampleTag *)
Add a SampleClient to this SampleSource.
Definition: SampleSourceSupport.cc:101
virtual void removeAll()
Big cleanup.
Definition: SampleClientList.cc:80
std::list< const SampleTag * > _sampleTags
Definition: SampleSourceSupport.h:168
A source of samples.
Definition: SampleStats.h:41
std::set< SampleClient * > _clientSet
Definition: SampleSourceSupport.h:180
virtual ~SampleSourceSupport()
Definition: SampleSourceSupport.h:58
bool _raw
Definition: SampleSourceSupport.h:186
SampleSourceSupport(bool raw)
Definition: SampleSourceSupport.cc:37
int getClientCount() const
How many SampleClients are currently in my list.
Definition: SampleSourceSupport.cc:136
std::list< const SampleTag * > getSampleTags() const
What SampleTags am I a SampleSource for?
Definition: SampleSourceSupport.cc:54
A C++ wrapper for a POSIX mutex.
Definition: ThreadSupport.h:154
SampleSource * getProcessedSampleSource()
Several objects in NIDAS can be both a SampleSource of raw Samples and processed Samples.
Definition: SampleSourceSupport.h:66
bool _keepStats
Definition: SampleSourceSupport.h:188
void unlock()
Unlock the Mutex.
Definition: ThreadSupport.h:218
void addSampleTag(const SampleTag *tag)
Add a SampleTag to this SampleSource.
Definition: SampleSourceSupport.cc:60
void flush()
This implementation of SampleSource::flush() does nothing.
Definition: SampleSourceSupport.h:147