HasOutput.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/HasOutput.h
10 
11 #ifndef __dsp_HasOutput_h
12 #define __dsp_HasOutput_h
13 
14 #include "ReferenceTo.h"
15 
16 namespace dsp
17 {
19  template <class Out>
20  class HasOutput
21  {
22  public:
23 
25  virtual ~HasOutput () {}
26 
28  virtual void set_output (Out* _output) { output = _output; }
29 
31  virtual Out* get_output () const { return output; }
32 
34  bool has_output() const { return output.ptr(); }
35 
36  protected:
37 
40  };
41 }
42 
43 #endif
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
bool has_output() const
Returns true if output is set.
Definition: HasOutput.h:44
virtual void set_output(Out *_output)
Set the container into which output data will be written.
Definition: HasOutput.h:38
const Type * ptr() const
virtual Out * get_output() const
Return pointer to the container into which output data will be written.
Definition: HasOutput.h:41
virtual ~HasOutput()
Destructor.
Definition: HasOutput.h:35
Reference::To< Out > output
Container into which output data will be written.
Definition: HasOutput.h:49

Generated using doxygen 1.8.17