libpappsomspp
Library for mass spectrometry
datapoint.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4#include <limits>
5#include <memory>
6
7#include <QDataStream>
8
9
10#include "../exportinmportconfig.h"
11#include "../types.h"
12
13
14namespace pappso
15{
16struct DataPoint;
17typedef std::shared_ptr<const DataPoint> DataPointCstSPtr;
18
19
21{
24
25 DataPoint();
26 DataPoint(const DataPoint &other);
28 DataPoint(std::pair<pappso_double, pappso_double> pair);
29 DataPoint(const QString &text);
30
31 // For debugging purposes.
32 //~DataPoint();
33
34 DataPointCstSPtr makeDataPointCstSPtr() const;
35
36 void initialize(pappso_double x, pappso_double y);
37 void initialize(const DataPoint &other);
38 bool initialize(const QString &text);
39
40 void reset();
41
42 void incrementX(pappso_double value);
43 void incrementY(pappso_double value);
44
45 bool operator==(const DataPoint &other) const;
46
47 DataPoint &operator=(const DataPoint &other);
48
49 bool isValid() const;
50
51 QString toString() const;
52 QString toString(int decimals) const;
53};
54
55QDataStream &operator<<(QDataStream &out, const DataPoint &dataPoint);
56QDataStream &operator>>(QDataStream &out, DataPoint &dataPoint);
57} // namespace pappso
58
60extern int dataPointMetaTypeId;
61
int dataPointCstSPtrMetaTypeId
Definition: datapoint.cpp:27
Q_DECLARE_METATYPE(pappso::DataPoint)
int dataPointMetaTypeId
Definition: datapoint.cpp:23
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39
QDataStream & operator>>(QDataStream &instream, MassSpectrum &massSpectrum)
QDataStream & operator<<(QDataStream &outstream, const MassSpectrum &massSpectrum)
double pappso_double
A type definition for doubles.
Definition: types.h:48
std::shared_ptr< const DataPoint > DataPointCstSPtr
Definition: datapoint.h:17
bool operator==(Aa const &l, Aa const &r)
Definition: aa.cpp:280