libpappsomspp
Library for mass spectrometry
msrunid.h
Go to the documentation of this file.
1
/*******************************************************************************
2
* Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
3
*
4
* This file is part of the PAPPSOms++ library.
5
*
6
* PAPPSOms++ is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* PAPPSOms++ is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
18
*
19
* Contributors:
20
* Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
21
*implementation
22
******************************************************************************/
23
24
25
#pragma once
26
27
/////////////////////// StdLib includes
28
#include <memory>
29
30
31
/////////////////////// Qt includes
32
#include <QString>
33
#include <QMetaType>
34
35
36
/////////////////////// Local includes
37
#include "../types.h"
38
#include "../exportinmportconfig.h"
39
40
41
namespace
pappso
42
{
43
44
class
MsRunId;
45
typedef
std::shared_ptr<const MsRunId>
MsRunIdCstSPtr
;
46
47
48
/** @brief MS run identity
49
* MsRunId identifies an MS run with a unique ID (XmlId)
50
* and contains eventually informations on its location (local disk path or URL)
51
*/
52
class
PMSPP_LIB_DECL
MsRunId
53
{
54
public
:
55
MsRunId();
56
MsRunId(
const
QString &file_name);
57
MsRunId(
const
QString &file_name,
const
QString &run_id);
58
MsRunId(
const
MsRunId &other);
59
virtual
~MsRunId();
60
61
bool
operator==
(
const
MsRunId &other)
const
;
62
MsRunId &operator=(
const
MsRunId &other);
63
64
void
setFileName(
const
QString &file_name);
65
const
QString &getFileName()
const
;
66
67
void
setRunId(
const
QString &run_id);
68
const
QString &getRunId()
const
;
69
70
/** @brief set an XML unique identifier for this MsRunId
71
* @param xml_id this id must respect XML constraints (no space characters)
72
*/
73
void
setXmlId(
const
QString &xml_id);
74
const
QString &getXmlId()
const
;
75
76
/** @brief set a sample name for this MsRunId
77
*/
78
void
setSampleName(
const
QString &name);
79
const
QString &getSampleName()
const
;
80
81
void
setMzFormat(
MzFormat
format);
82
MzFormat
getMzFormat()
const
;
83
84
QString toString()
const
;
85
86
bool
isValid()
const
;
87
88
private
:
89
QString m_fileName =
"NOT_SET"
;
90
QString m_runId;
91
QString m_xmlId;
/* a1.... */
92
QString m_sampleName;
93
MzFormat
m_mzFormat =
MzFormat::mzXML
;
94
};
95
96
97
}
// namespace pappso
98
99
100
Q_DECLARE_METATYPE
(
pappso::MsRunId
);
101
extern
int
msRunIdMetaTypeId
;
102
103
Q_DECLARE_METATYPE
(
pappso::MsRunIdCstSPtr
);
104
extern
int
msRunIdCstSPtrMetaTypeId
;
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition:
exportinmportconfig.h:14
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks
Definition:
aa.cpp:39
pappso::MsRunIdCstSPtr
std::shared_ptr< const MsRunId > MsRunIdCstSPtr
Definition:
msrunid.h:65
pappso::operator==
bool operator==(Aa const &l, Aa const &r)
Definition:
aa.cpp:300
pappso::MzFormat::mzXML
@ mzXML
mzXML
pappso::MsRunId
MS run identity MsRunId identifies an MS run with a unique ID (XmlId) and contains eventually informa...
Definition:
msrunid.h:74
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(pappso::MsRunId)
msRunIdCstSPtrMetaTypeId
int msRunIdCstSPtrMetaTypeId
Definition:
msrunid.cpp:31
msRunIdMetaTypeId
int msRunIdMetaTypeId
Definition:
msrunid.cpp:28
pappso::MzFormat
MzFormat
Definition:
types.h:128
pappsomspp
msrun
msrunid.h
Generated on Tue Aug 25 2020 11:13:48 for libpappsomspp by
1.8.18