BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
experiment.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: experiment.h,v 1.11 2005/12/23 17:01:56 amoll Exp $
5 //
6 
7 #ifndef BALL_NMR_EXPERIMENT_H
8 #define BALL_NMR_EXPERIMENT_H
9 
10 #ifndef BALL_NMR_PEAKLIST_H
11 # include <BALL/NMR/peakList.h>
12 #endif
13 
14 #ifndef BALL_NMR_SHIFTMODULE_H
15 # include <BALL/NMR/shiftModule.h>
16 #endif
17 
18 #ifndef BALL_KERNEL_EXPRESSION_H
19 # include <BALL/KERNEL/expression.h>
20 #endif
21 
22 namespace BALL
23 {
33  template <typename PeakListType>
35  : public ShiftModule
36  {
37  public:
38 
40 
41 
44  typedef typename PeakListType::PeakType PeakType;
47 
51 
54  Experiment();
57  Experiment(const Experiment& experiment);
60  virtual ~Experiment()
61  ;
63 
69  const PeakListType& getPeakList() const;
70 
77  const PeakType& getDefaultPeak() const;
78 
82  void setDefaultPeak(const PeakType& peak);
84 
85  protected:
86  PeakListType peak_list_;
88  };
89 
90  template <typename PeakListType>
92  : ShiftModule(),
93  peak_list_(),
94  default_peak_()
95  {
96  }
97 
98  template <typename PeakListType>
100  : ShiftModule(experiment),
101  peak_list_(experiment.peak_list_),
102  default_peak_(experiment.default_peak_)
103  {
104  }
105 
106  template <typename PeakListType>
108 
109  {
110  }
111 
112  template <typename PeakListType>
113  const PeakListType& Experiment<PeakListType>::getPeakList() const
114  {
115  return peak_list_;
116  }
117 
118  template <typename PeakListType>
120  {
121  return default_peak_;
122  }
123 
124  template <typename PeakListType>
126  {
127  default_peak_ = peak;
128  }
129 
137 
140  // ?????
141  //typedef Experiment<PeakList2D> Experiment2D;
142 
147 
158  : public Experiment1D
159  {
160  public:
161 
167 
169  SimpleExperiment1D(const SimpleExperiment1D& experiment);
170 
172  virtual ~SimpleExperiment1D()
173  ;
175 
183  virtual bool start()
184  ;
193  virtual Processor::Result operator () (Composite& composite)
194  ;
196 
202  void setExpression(const String& expression);
205  const Expression& getExpression() const;
207 
208  protected:
210  };
211 
212 } //namespace BALL
213 
214 #endif // BALL_NMR_EXPERIMENT_H
#define BALL_CREATE(name)
Definition: create.h:62
virtual ~Experiment()
Definition: experiment.h:107
Experiment< PeakList1D > Experiment1D
Definition: experiment.h:136
PeakListType peak_list_
Definition: experiment.h:86
void setDefaultPeak(const PeakType &peak)
Definition: experiment.h:125
Experiment< PeakList3D > Experiment3D
Definition: experiment.h:145
PeakType default_peak_
Definition: experiment.h:87
const PeakType & getDefaultPeak() const
Definition: experiment.h:119
const PeakListType & getPeakList() const
Definition: experiment.h:113
PeakListType::PeakType PeakType
The peak type.
Definition: experiment.h:45
#define BALL_EXPORT
Definition: COMMON/global.h:50