libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
mzcborcopyreplacebase.h
Go to the documentation of this file.
1
/**
2
* \file pappsomspp/core/processing/cbor/mzcbor/copyreplace/mzcborreaderbase.h
3
* \date 2/10/2026
4
* \author Olivier Langella
5
* \brief read mzcbor stream or file, process it and write processed mzcbor output
6
*/
7
8
/*******************************************************************************
9
* Copyright (c) 2026 Olivier Langella <Olivier.Langella@cnrs.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 "
pappsomspp/core/processing/cbor/cborstreamreaderinterface.h
"
31
#include "
pappsomspp/core/processing/cbor/mzcbor/copyreplace/spectrumtube.h
"
32
#include "
pappsomspp/core/processing/cbor/mzcbor/copyreplace/qcborspectrum.h
"
33
#include "
pappsomspp/core/processing/uimonitor/uimonitorinterface.h
"
34
#include "
pappsomspp/core/processing/cbor/cborstreamwriter.h
"
35
namespace
pappso
36
{
37
namespace
cbor
38
{
39
namespace
mzcbor
40
{
41
/**
42
* @brief base class to transform mzCBOR stream in a new mzCBOR output stream
43
*
44
* ensures stream read on regular file or any readable device
45
*/
46
class
PMSPP_LIB_DECL
MzcborCopyReplaceBase
:
public
CborStreamReaderInterface
47
{
48
public
:
49
/**
50
* Default constructor
51
*/
52
MzcborCopyReplaceBase
(
CborStreamWriter
*cbor_output_p,
const
QString &operation);
53
54
/**
55
* Destructor
56
*/
57
virtual
~MzcborCopyReplaceBase
();
58
59
/**
60
* @brief read mzCBOR file
61
* @param cborp file pointer
62
* @param monitor monitor read progress and messages
63
*/
64
virtual
void
readCbor
(QFile *cborp,
pappso::UiMonitorInterface
&monitor);
65
66
67
/**
68
* @brief read mzCBOR from any device (memory buffer or else)
69
* @param cborp device pointer
70
* @param monitor monitor read progress and messages
71
*/
72
virtual
void
readCbor
(QIODevice *cborp,
pappso::UiMonitorInterface
&monitor);
73
74
virtual
void
close
();
75
76
77
protected
:
78
void
readRoot
(
pappso::UiMonitorInterface
&monitor);
79
void
readCbor
(
pappso::UiMonitorInterface
&monitor);
80
void
readRun
(
pappso::UiMonitorInterface
&monitor);
81
void
readSpectrumList
(
pappso::UiMonitorInterface
&monitor);
82
83
virtual
void
processQcborSpectrum
(
SpectrumTube
&spectrum_tube,
QcborSpectrum
&cbor_spectrum);
84
85
protected
:
86
bool
m_stopParsing
=
false
;
87
CborStreamWriter
*
mp_cborOutput
;
88
QString
m_operation
;
89
90
private
:
91
bool
m_isMzcbor
=
false
;
92
QString
m_uuid
;
93
};
94
}
// namespace mzcbor
95
}
// namespace cbor
96
}
// namespace pappso
cborstreamreaderinterface.h
cborstreamwriter.h
pappso::UiMonitorInterface
Definition
uimonitorinterface.h:50
pappso::cbor::CborStreamReaderInterface::CborStreamReaderInterface
CborStreamReaderInterface()
Definition
cborstreamreaderinterface.cpp:30
pappso::cbor::CborStreamWriter
overrides QCborStreamWriter base class to provide convenient functions
Definition
cborstreamwriter.h:46
pappso::cbor::mzcbor::MzcborCopyReplaceBase::MzcborCopyReplaceBase
MzcborCopyReplaceBase(CborStreamWriter *cbor_output_p, const QString &operation)
Definition
mzcborcopyreplacebase.cpp:43
pappso::cbor::mzcbor::MzcborCopyReplaceBase::m_uuid
QString m_uuid
Definition
mzcborcopyreplacebase.h:92
pappso::cbor::mzcbor::MzcborCopyReplaceBase::close
virtual void close()
convenient function to clean pointer before leaving
Definition
mzcborcopyreplacebase.cpp:55
pappso::cbor::mzcbor::MzcborCopyReplaceBase::readSpectrumList
void readSpectrumList(pappso::UiMonitorInterface &monitor)
Definition
mzcborcopyreplacebase.cpp:257
pappso::cbor::mzcbor::MzcborCopyReplaceBase::mp_cborOutput
CborStreamWriter * mp_cborOutput
Definition
mzcborcopyreplacebase.h:87
pappso::cbor::mzcbor::MzcborCopyReplaceBase::processQcborSpectrum
virtual void processQcborSpectrum(SpectrumTube &spectrum_tube, QcborSpectrum &cbor_spectrum)
Definition
mzcborcopyreplacebase.cpp:337
pappso::cbor::mzcbor::MzcborCopyReplaceBase::m_operation
QString m_operation
Definition
mzcborcopyreplacebase.h:88
pappso::cbor::mzcbor::MzcborCopyReplaceBase::m_isMzcbor
bool m_isMzcbor
Definition
mzcborcopyreplacebase.h:91
pappso::cbor::mzcbor::MzcborCopyReplaceBase::readRoot
void readRoot(pappso::UiMonitorInterface &monitor)
Definition
mzcborcopyreplacebase.cpp:88
pappso::cbor::mzcbor::MzcborCopyReplaceBase::readRun
void readRun(pappso::UiMonitorInterface &monitor)
Definition
mzcborcopyreplacebase.cpp:198
pappso::cbor::mzcbor::MzcborCopyReplaceBase::readCbor
virtual void readCbor(QFile *cborp, pappso::UiMonitorInterface &monitor)
read mzCBOR file
Definition
mzcborcopyreplacebase.cpp:60
pappso::cbor::mzcbor::MzcborCopyReplaceBase::m_stopParsing
bool m_stopParsing
Definition
mzcborcopyreplacebase.h:86
pappso::cbor::mzcbor::QcborSpectrum
Definition
qcborspectrum.h:48
pappso::cbor::mzcbor::SpectrumTube
Definition
spectrumtube.h:49
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
qcborspectrum.h
Low level CBOR map to store an mzCBOR Spectrum object.
spectrumtube.h
buffer to store a whole spectrum list
uimonitorinterface.h
pappsomspp
core
processing
cbor
mzcbor
copyreplace
mzcborcopyreplacebase.h
Generated on
for libpappsomspp by
1.17.0