Loading...
Searching...
No Matches
experiment.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: experiment.h,v 1.11 2005/12/23 17:01:56 amoll Exp $
//
#ifndef BALL_NMR_EXPERIMENT_H
#define BALL_NMR_EXPERIMENT_H
#ifndef BALL_NMR_PEAKLIST_H
# include <BALL/NMR/peakList.h>
#endif
#ifndef BALL_NMR_SHIFTMODULE_H
# include <BALL/NMR/shiftModule.h>
#endif
#ifndef BALL_KERNEL_EXPRESSION_H
# include <BALL/KERNEL/expression.h>
#endif
namespace BALL
{
template <typename PeakListType>
class BALL_EXPORT Experiment
: public ShiftModule
{
public:
BALL_CREATE(Experiment)
typedef typename PeakListType::PeakType PeakType;
Experiment();
Experiment(const Experiment& experiment);
virtual ~Experiment()
;
const PeakListType& getPeakList() const;
const PeakType& getDefaultPeak() const;
void setDefaultPeak(const PeakType& peak);
protected:
PeakListType peak_list_;
PeakType default_peak_;
};
template <typename PeakListType>
Experiment<PeakListType>::Experiment()
: ShiftModule(),
peak_list_(),
default_peak_()
{
}
template <typename PeakListType>
Experiment<PeakListType>::Experiment(const Experiment<PeakListType>& experiment)
: ShiftModule(experiment),
peak_list_(experiment.peak_list_),
default_peak_(experiment.default_peak_)
{
}
template <typename PeakListType>
Experiment<PeakListType>::~Experiment()
{
}
template <typename PeakListType>
const PeakListType& Experiment<PeakListType>::getPeakList() const
{
return peak_list_;
}
template <typename PeakListType>
const typename Experiment<PeakListType>::PeakType& Experiment<PeakListType>::getDefaultPeak() const
{
return default_peak_;
}
template <typename PeakListType>
void Experiment<PeakListType>::setDefaultPeak(const typename Experiment<PeakListType>::PeakType& peak)
{
default_peak_ = peak;
}
typedef Experiment<PeakList1D> Experiment1D;
// ?????
//typedef Experiment<PeakList2D> Experiment2D;
typedef Experiment<PeakList3D> Experiment3D;
class BALL_EXPORT SimpleExperiment1D
: public Experiment1D
{
public:
SimpleExperiment1D();
SimpleExperiment1D(const SimpleExperiment1D& experiment);
virtual ~SimpleExperiment1D()
;
virtual bool start()
;
virtual Processor::Result operator () (Composite& composite)
;
void setExpression(const String& expression);
const Expression& getExpression() const;
protected:
Expression expression_;
};
} //namespace BALL
#endif // BALL_NMR_EXPERIMENT_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
BALL::Composite
Definition composite.h:74
BALL::Experiment
Definition experiment.h:36
BALL::Experiment< PeakList1D >::getPeakList
const PeakList1D & getPeakList() const
BALL::Experiment< PeakList1D >::peak_list_
PeakList1D peak_list_
Definition experiment.h:86
BALL::Experiment::Experiment
Experiment()
Definition experiment.h:91
BALL::Experiment< PeakList1D >::getDefaultPeak
const PeakType & getDefaultPeak() const
BALL::Experiment::PeakType
PeakListType::PeakType PeakType
The peak type.
Definition experiment.h:45
BALL::Experiment< PeakList1D >::default_peak_
PeakType default_peak_
Definition experiment.h:87
BALL::Experiment::~Experiment
virtual ~Experiment()
Definition experiment.h:107
BALL::Experiment< PeakList1D >::setDefaultPeak
void setDefaultPeak(const PeakType &peak)
BALL::Expression
Definition expression.h:80
BALL::Processor::Result
int Result
Definition processor.h:36
BALL::ShiftModule::ShiftModule
ShiftModule()
BALL::SimpleExperiment1D::expression_
Expression expression_
Definition experiment.h:209
BALL::SimpleExperiment1D::~SimpleExperiment1D
virtual ~SimpleExperiment1D()
Destructor.
BALL::SimpleExperiment1D::getExpression
const Expression & getExpression() const
BALL::SimpleExperiment1D::SimpleExperiment1D
SimpleExperiment1D()
Default constructor.
BALL::SimpleExperiment1D::setExpression
void setExpression(const String &expression)
BALL::SimpleExperiment1D::SimpleExperiment1D
SimpleExperiment1D(const SimpleExperiment1D &experiment)
Copy constructor.
BALL::SimpleExperiment1D::start
virtual bool start()
BALL::String
Definition string.h:57
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
expression.h
BALL
Definition constants.h:13
BALL::Experiment1D
Experiment< PeakList1D > Experiment1D
Definition experiment.h:136
BALL::Experiment3D
Experiment< PeakList3D > Experiment3D
Definition experiment.h:145
peakList.h
shiftModule.h