HasInput.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2009 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // dspsr/Kernel/Classes/dsp/HasInput.h
10 
11 #ifndef __dsp_HasInput_h
12 #define __dsp_HasInput_h
13 
14 #include "ReferenceTo.h"
15 
16 namespace dsp
17 {
19  template <class In>
20  class HasInput
21  {
22  public:
23 
25  virtual ~HasInput () {}
26 
28  virtual void set_input (const In* _input) { input = _input; }
29 
31  const In* get_input () const { return input; }
32 
34  bool has_input() const { return input; }
35 
36  protected:
37 
40  };
41 }
42 
43 #endif
bool has_input() const
Returns true if input is set.
Definition: HasInput.h:44
const In * get_input() const
Return pointer to the container from which input data will be read.
Definition: HasInput.h:41
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
virtual void set_input(const In *_input)
Set the container from which input data will be read.
Definition: HasInput.h:38
virtual ~HasInput()
Destructor.
Definition: HasInput.h:35
Reference::To< const In > input
Container from which input data will be read.
Definition: HasInput.h:49

Generated using doxygen 1.8.17