libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
cvparam.h
Go to the documentation of this file.
1
/**
2
* \file pappsomspp/core/processing/cbor/mzcbor/cvparam.h
3
* \date 23/11/2025
4
* \author Olivier Langella
5
* \brief PSI cvParam object for mzML/mzCBOR
6
*/
7
8
/*******************************************************************************
9
* Copyright (c) 2025 Olivier Langella <Olivier.Langella@universite-paris-saclay.fr>.
10
*
11
* This file is part of PAPPSOms-tools.
12
*
13
* PAPPSOms-tools is free software: you can redistribute it and/or modify
14
* it under the terms of the GNU General Public License as published by
15
* the Free Software Foundation, either version 3 of the License, or
16
* (at your option) any later version.
17
*
18
* PAPPSOms-tools is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU General Public License for more details.
22
*
23
* You should have received a copy of the GNU General Public License
24
* along with PAPPSOms-tools. If not, see <http://www.gnu.org/licenses/>.
25
*
26
******************************************************************************/
27
28
29
#pragma once
30
#include <QString>
31
#include <QXmlStreamWriter>
32
#include <QCborStreamReader>
33
#include <qjsonobject.h>
34
#include "
pappsomspp/core/processing/cbor/cborstreamreader.h
"
35
#include "
pappsomspp/core/processing/cbor/cborstreamwriter.h
"
36
37
namespace
pappso
38
{
39
namespace
cbor
40
{
41
namespace
mzcbor
42
{
43
/**
44
* @todo write docs
45
*/
46
struct
PMSPP_LIB_DECL
CvParam
47
{
48
void
fromCbor
(
CborStreamReader
&reader);
49
void
fromQCborMap
(
const
QCborMap &reader);
50
void
toCbor
(
CborStreamWriter
&writer);
51
52
/** @brief reads the XML attributes of the cvParam element
53
* Inside the cvParam XML element, reads the attributes and go to next XML element
54
* @param reader XML stream reader
55
*/
56
void
fromMzml
(QXmlStreamReader &reader);
57
void
toMzml
(QXmlStreamWriter &writer);
58
59
60
/** @brief write the structure to a JSON object
61
* @result QJsonObject
62
*/
63
QJsonObject
toJsonObject
()
const
;
64
65
66
void
xmlValueToCbor
(
CborStreamWriter
&writer,
const
QStringView &value_str);
67
68
void
setValue
(
const
QString &value_str);
69
70
std::uint8_t
getExpectedUint8
()
const
;
71
double
getExpectedDouble
()
const
;
72
qint64
getExpectedQint64
()
const
;
73
74
QString
cvRef
;
75
QString
accession
;
76
double
valueDouble
= nan(
""
);
77
qint64
valueInt
= std::numeric_limits<qint64>::max();
78
QString
valueStr
;
79
QString
name
;
80
QString
unitAccession
;
81
QString
unitName
;
82
QString
unitCvRef
;
83
84
QCborStreamReader::Type
cborType
= QCborStreamReader::Type::Invalid;
85
};
86
}
// namespace mzcbor
87
}
// namespace cbor
88
}
// namespace pappso
cborstreamreader.h
cborstreamwriter.h
pappso::cbor::CborStreamReader
simple override of the raw QCborStreamReader This adds convenient functions to put CBOR data into C++...
Definition
cborstreamreader.h:47
pappso::cbor::CborStreamWriter
overrides QCborStreamWriter base class to provide convenient functions
Definition
cborstreamwriter.h:46
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition
export-import-config.h:14
pappso::cbor::mzcbor
Definition
binarydataarray.h:41
pappso::cbor
Definition
cborstreamreader.cpp:35
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
pappso::cbor::mzcbor::CvParam
Definition
cvparam.h:47
pappso::cbor::mzcbor::CvParam::valueStr
QString valueStr
Definition
cvparam.h:78
pappso::cbor::mzcbor::CvParam::fromCbor
void fromCbor(CborStreamReader &reader)
Definition
cvparam.cpp:92
pappso::cbor::mzcbor::CvParam::cvRef
QString cvRef
Definition
cvparam.h:74
pappso::cbor::mzcbor::CvParam::valueDouble
double valueDouble
Definition
cvparam.h:76
pappso::cbor::mzcbor::CvParam::toJsonObject
QJsonObject toJsonObject() const
write the structure to a JSON object
Definition
cvparam.cpp:246
pappso::cbor::mzcbor::CvParam::accession
QString accession
Definition
cvparam.h:75
pappso::cbor::mzcbor::CvParam::unitName
QString unitName
Definition
cvparam.h:81
pappso::cbor::mzcbor::CvParam::cborType
QCborStreamReader::Type cborType
Definition
cvparam.h:84
pappso::cbor::mzcbor::CvParam::valueInt
qint64 valueInt
Definition
cvparam.h:77
pappso::cbor::mzcbor::CvParam::setValue
void setValue(const QString &value_str)
Definition
cvparam.cpp:280
pappso::cbor::mzcbor::CvParam::unitCvRef
QString unitCvRef
Definition
cvparam.h:82
pappso::cbor::mzcbor::CvParam::xmlValueToCbor
void xmlValueToCbor(CborStreamWriter &writer, const QStringView &value_str)
Definition
cvparam.cpp:376
pappso::cbor::mzcbor::CvParam::fromQCborMap
void fromQCborMap(const QCborMap &reader)
Definition
cvparam.cpp:36
pappso::cbor::mzcbor::CvParam::fromMzml
void fromMzml(QXmlStreamReader &reader)
reads the XML attributes of the cvParam element Inside the cvParam XML element, reads the attributes ...
Definition
cvparam.cpp:177
pappso::cbor::mzcbor::CvParam::toCbor
void toCbor(CborStreamWriter &writer)
Definition
cvparam.cpp:217
pappso::cbor::mzcbor::CvParam::unitAccession
QString unitAccession
Definition
cvparam.h:80
pappso::cbor::mzcbor::CvParam::getExpectedQint64
qint64 getExpectedQint64() const
Definition
cvparam.cpp:343
pappso::cbor::mzcbor::CvParam::toMzml
void toMzml(QXmlStreamWriter &writer)
Definition
cvparam.cpp:288
pappso::cbor::mzcbor::CvParam::getExpectedUint8
std::uint8_t getExpectedUint8() const
Definition
cvparam.cpp:327
pappso::cbor::mzcbor::CvParam::name
QString name
Definition
cvparam.h:79
pappso::cbor::mzcbor::CvParam::getExpectedDouble
double getExpectedDouble() const
Definition
cvparam.cpp:359
pappsomspp
core
processing
cbor
mzcbor
cvparam.h
Generated on
for libpappsomspp by
1.17.0