CalibratorType.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// psrchive/Base/Classes/Pulsar/CalibratorType.h
10
11#ifndef __CalibratorType_H
12#define __CalibratorType_H
13
14#include "Pulsar/Calibrator.h"
15#include "Identifiable.h"
16
17namespace Pulsar
18{
25 class Calibrator::Type : public Identifiable
26 {
27 public:
28
30 static Type* factory (const std::string& name);
31
33 static Type* factory (const Calibrator*);
34
36 virtual std::string get_name () const { return get_identity(); }
37
39 virtual unsigned get_nparam () const = 0;
40
42 virtual Type* clone () const = 0;
43
45 virtual bool is_a (const Type* that) const;
46
48 template<class T>
49 bool is_a () const
50 {
51 return dynamic_cast<const T*> (this) != 0;
52 }
53
55 class Interface;
56
57 };
58}
59
60#endif
Definition CalibratorType.h:26
static Type * factory(const std::string &name)
Construct a new instance of Calibrator::Type, based on name.
Definition CalibratorType.C:12
virtual Type * clone() const =0
Return a new instance of derived type.
virtual unsigned get_nparam() const =0
Return the number of parameters that describe the transformation.
virtual std::string get_name() const
Return the name of the calibrator type.
Definition CalibratorType.h:36
bool is_a() const
Return true if this is a T.
Definition CalibratorType.h:49
Calibrator()
Default constructor.
Definition Calibrator.C:64
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0