Plot.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2006-2010 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/Plotting/Pulsar/Plot.h
10
11#ifndef __Pulsar_Plot_h
12#define __Pulsar_Plot_h
13
14#include "Pulsar/PlotAttributes.h"
15#include "TextInterface.h"
16
17namespace Pulsar {
18
19 class Archive;
20 class Processor;
21
23 class Plot : public Reference::Able {
24
25 public:
26
28 static bool verbose;
29
31 Plot ();
32
34 virtual void preprocess (Archive*);
35
37 virtual void plot (const Archive*) = 0;
38
40 virtual void finalize () { }
41
44
47
50
52 virtual void configure (const std::string&);
53
55 class Constructor;
56
58 void set_constructor (Constructor* c) { constructor = c; }
59
61 Constructor* get_constructor ();
62
64 virtual void set_preprocessor (Processor*);
65
67 virtual Processor* get_preprocessor ();
68
70 virtual bool has_preprocessor () const;
71
72 private:
73
74 // used by the configure method
77
78 Reference::To<Processor> preprocessor;
79
82 };
83
90 {
91 public:
92
93 virtual ~Constructor () { }
94
96 virtual Plot* construct () = 0;
97 };
98
99}
100
101#endif
Definition Plot.h:90
Plot()
Default constructor.
Definition Plot.C:14
The primary interface to pulsar observational data.
Definition Archive.h:46
Stores the properties of the plot frame.
Definition PlotAttributes.h:20
Definition Plot.h:90
virtual Plot * construct()=0
Return a new default constructed instance of a derived type.
Constructor * get_constructor()
Get the constructor.
Definition Plot.C:20
virtual TextInterface::Parser * get_interface()=0
Get the text interface to the configuration attributes.
virtual void finalize()
Some plots may postpone plotting.
Definition Plot.h:40
Plot()
Default constructor.
Definition Plot.C:14
virtual void set_preprocessor(Processor *)
Set the pre-processor.
Definition Plot.C:67
virtual void plot(const Archive *)=0
Plot in the current viewport.
virtual Processor * get_preprocessor()
Get the pre-processor.
Definition Plot.C:73
virtual TextInterface::Parser * get_frame_interface()=0
Get the text interface to the frame attributes.
virtual bool has_preprocessor() const
Return true if pre-processor has been set.
Definition Plot.C:79
virtual void preprocess(Archive *)
Process the Archive as needed before calling plot.
Definition Plot.C:61
virtual void configure(const std::string &)
Process a configuration command.
Definition Plot.C:29
static bool verbose
Verbosity flag.
Definition Plot.h:28
void set_constructor(Constructor *c)
Set the constructor.
Definition Plot.h:58
virtual PlotAttributes * get_attributes()=0
Provide access to the plot attributes.
Interface to any object that processes data in an Archive.
Definition Processor.h:23
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0