UniversalInputBuffering.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2011 by Willem van Straten and Andrew Jameson
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 #ifndef __UniversalInputBuffering_h
10 #define __UniversalInputBuffering_h
11 
12 #include "dsp/InputBuffering.h"
13 
14 namespace dsp {
15 
17  template<typename Class, typename Method>
18  class UniversalInputBuffering : public InputBuffering
19  {
20  public:
21 
23  UniversalInputBuffering (Class* c, Method m)
24  : InputBuffering (static_cast<HasInput<TimeSeries>*>(target)) { instance = c; method = m ; }
25 
27  const TimeSeries* get_input () { return (instance->*method)(); }
28 
29  protected:
30  Class* instance;
31  Method method;
32  };
33 
34  template<typename Class, typename Method>
36  new_UniversalInputBuffering (Class* target, Method method)
37  {
38  return new UniversalInputBuffering<Class, Method> (target, method);
39  }
40 
41 }
42 
43 #endif // !defined(__InputBuffering_h)
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
UniversalInputBuffering(Class *c, Method m)
Default constructor.
Definition: UniversalInputBuffering.h:33
Buffers any TimeSeries used by Transformation.
Definition: UniversalInputBuffering.h:23
const TimeSeries * get_input()
Get the TimeSeries to be buffered.
Definition: UniversalInputBuffering.h:37
HasInput< TimeSeries > * target
The target with input TimeSeries to be buffered.
Definition: InputBuffering.h:67
Buffers the Transformation input.
Definition: InputBuffering.h:26
Arrays of consecutive samples for each polarization and frequency channel.
Definition: TimeSeries.h:29
Attaches to Operations with input.
Definition: HasInput.h:25

Generated using doxygen 1.8.17