HARDT - The Ham Radio DSP Toolkit
hnullwriter.h
1 #ifndef __HNULLWRITER_H
2 #define __HNULLWRITER_H
3 
14 template <class T>
15 class HNullWriter : public HWriter<T>, public HWriterConsumer<T>
16 {
17  public:
18 
21  {}
22 
25  {
26  consumer->SetWriter(this);
27  }
28 
30  int Write(T* src, size_t blocksize)
31  {
32  return blocksize;
33  }
34 
36  void SetWriter(HWriter<T>* writer)
37  {
38  // Writing into empty space
39  }
40 
42  bool Command(HCommand* command) {
43  // No ruther propagation of commands
44  return true;
45  }
46 };
47 
48 #endif
HNullWriter::HNullWriter
HNullWriter(HWriterConsumer< T > *consumer)
Definition: hnullwriter.h:24
HWriter
Definition: hwriter.h:10
HNullWriter::HNullWriter
HNullWriter()
Definition: hnullwriter.h:20
HWriterConsumer::SetWriter
virtual void SetWriter(HWriter< T > *writer)=0
HNullWriter::SetWriter
void SetWriter(HWriter< T > *writer)
Definition: hnullwriter.h:36
HNullWriter::Command
bool Command(HCommand *command)
Definition: hnullwriter.h:42
HNullWriter::Write
int Write(T *src, size_t blocksize)
Definition: hnullwriter.h:30
HCommand
Definition: hcommand.h:81
HNullWriter
Definition: hnullwriter.h:15
HWriterConsumer
Definition: hwriterconsumer.h:8