Generator.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2007 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/Util/tempo/Pulsar/Generator.h
10 
11 #ifndef __PulsarGenerator_h
12 #define __PulsarGenerator_h
13 
14 #include "Reference.h"
15 #include "Configuration.h"
16 #include "MJD.h"
17 
18 namespace Pulsar {
19 
20  class Predictor;
21  class Parameters;
22 
24 
26  class Generator : public Reference::Able {
27 
28  public:
29 
31  virtual Generator* clone () const = 0;
32 
34  virtual void set_parameters (const Parameters*) = 0;
35 
37  virtual void set_time_span (const MJD& start, const MJD& finish) = 0;
38 
40  virtual void set_frequency_span (long double low, long double high) = 0;
41 
43  virtual void set_site (const std::string&) = 0;
44 
46  virtual Predictor* generate () const = 0;
47 
49  static Generator* get_default ();
50 
52  static Generator* factory (const Parameters*);
53 
54  class Interpreter;
55 
56  protected:
57 
60 
61  };
62 
63 }
64 
65 #endif
@ Pulsar
A pulsar.
Definition: Types.h:63
virtual Generator * clone() const =0
Return a new, copy constructed instance of self.
virtual void set_time_span(const MJD &start, const MJD &finish)=0
Set the range of epochs over which to generate.
static Configuration::Parameter< Generator * > & get_default_generator()
Default generator of new predictors.
static Generator * get_default()
Return a pointer to a new Generator of the default derived type.
Definition: Generator_default.C:58
static Generator * factory(const Parameters *)
Return a pointer to a new Generator that can best handle the parameters.
Definition: Generator_factory.C:63
virtual void set_site(const std::string &)=0
Set the site at which the signal is observed.
Generator of functions that predict pulse phase.
Definition: Generator.h:31
Manages Reference::To references to the instance.
Definition: ReferenceAble.h:40
virtual void set_parameters(const Parameters *)=0
Set the parameters used to generate the predictor.
Functions that predict pulse phase.
Definition: Predictor.h:33
A configurable parameter.
Definition: Configuration.h:47
virtual void set_frequency_span(long double low, long double high)=0
Set the range of frequencies over which to generate.
virtual Predictor * generate() const =0
Return a new Predictor instance.
Class for representing modified Julian dates with high precision.
Definition: MJD.h:27
Storage of pulsar parameters used to create a Predictor.
Definition: Parameters.h:28
Interprets configuration strings into the default generator.
Definition: GeneratorInterpreter.h:26

Generated using doxygen 1.8.17