UnpackerIterator.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2008 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // dspsr/Kernel/Classes/dsp/UnpackerIterator.h
10 
11 #ifndef __UnpackerIterator_h
12 #define __UnpackerIterator_h
13 
14 #include "dsp/Unpacker.h"
15 
16 namespace dsp {
17 
19  class Unpacker::Iterator
20  {
21 
22  public:
23 
25 
26  Iterator (Implementation* _impl);
27 
28  ~Iterator ();
29 
31  unsigned char operator * () const;
32 
34  void operator ++ ();
35 
37  bool operator < (const unsigned char* ptr);
38 
39  protected:
40 
41  Implementation* impl;
42  };
43 
46  {
47 
48  public:
49 
50  virtual ~Implementation () {}
51 
53  virtual unsigned char get_value () const = 0;
54 
56  virtual void increment () = 0;
57 
59  virtual bool less_than (const unsigned char*) = 0;
60 
61  };
62 }
63 
64 #endif
virtual void increment()=0
Increment operator.
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
unsigned char operator*() const
Dereferencing operator.
Definition: UnpackerIterator.C:21
virtual unsigned char get_value() const =0
Dereferencing operator.
virtual bool less_than(const unsigned char *)=0
Comparison operator.
Unpack LUMP data (4, 8, 16, -16, -32, -64 bits per sample)
Definition: LuMPUnpacker.h:26
void operator++()
Increment operator.
Definition: UnpackerIterator.C:27
static Register & get_register()
Return the list of registered sub-classes.
Definition: Unpacker_registry.C:337
Parent * create(unsigned i) const
Stores information about digital, band-limited, time-varying signals.
Definition: Observation.h:33
Unpacker iterator implementation.
Definition: UnpackerIterator.h:50
static List & get_registry()
unsigned size() const
Abstract base class of Transformations that convert n-bit to float.
Definition: Unpacker.h:42
bool operator<(const unsigned char *ptr)
Comparison operator.
Definition: UnpackerIterator.C:33
static Unpacker * create(const Observation *observation)
Return a pointer to a new instance of the appropriate sub-class.
Definition: Unpacker_create.C:13
Interface to Unpacker iterator implementations.
Definition: UnpackerIterator.h:24
std::string get_machine() const
Return the instrument used to record signal.
Definition: Observation.h:194
Simple 4-bit complex to float unpacker for the LWA files.
Definition: LWAUnpacker.h:23

Generated using doxygen 1.8.17