HARDT - The Ham Radio DSP Toolkit
hreader.h
1 #ifndef __HREADER_H
2 #define __HREADER_H
3 
4 #include "hcommand.h"
5 
23 template <class T>
24 class HReader : public HObject
25 {
26  public:
27 
29  virtual ~HReader() = default;
30 
32  virtual int Read(T* dest, size_t blocksize) = 0;
33 
35  virtual bool Start()
36  {
37  return true;
38  }
39 
41  virtual bool Stop()
42  {
43  return true;
44  }
45 
48  {
49  return (HReader<T>*) this;
50  }
51 
58  virtual bool Command(HCommand* command) = 0;
59 };
60 
61 #define READER (HReader<T>*)
62 
63 #endif
HReader::Command
virtual bool Command(HCommand *command)=0
HReader::Stop
virtual bool Stop()
Definition: hreader.h:41
HReader::~HReader
virtual ~HReader()=default
HReader::Start
virtual bool Start()
Definition: hreader.h:35
HReader
Definition: hreader.h:24
HReader::Reader
HReader< T > * Reader()
Definition: hreader.h:47
HCommand
Definition: hcommand.h:81
HReader::Read
virtual int Read(T *dest, size_t blocksize)=0
HObject
Definition: hobject.h:14