Loading...
Searching...
No Matches
binarydataarray.h
Go to the documentation of this file.
/**
* \file pappsomspp/core/processing/cbor/mzcbor/binarydataarray.h
* \date 25/11/2025
* \author Olivier Langella
* \brief PSI BinaryDataArray object for mzML/mzCBOR
*/
/*******************************************************************************
* Copyright (c) 2025 Olivier Langella <Olivier.Langella@universite-paris-saclay.fr>.
*
* This file is part of PAPPSOms-tools.
*
* PAPPSOms-tools is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PAPPSOms-tools is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PAPPSOms-tools. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#pragma once
#include <QString>
#include <QXmlStreamWriter>
#include <QXmlStreamReader>
#include "pappsomspp/core/processing/cbor/cborstreamreader.h"
#include "pappsomspp/core/processing/cbor/cborstreamwriter.h"
namespace pappso
{
namespace cbor
{
namespace mzcbor
{
struct PMSPP_LIB_DECL BinaryDataArray
{
void fromCbor(CborStreamReader &reader);
void toCbor(CborStreamWriter &writer);
void fromMzml(QXmlStreamReader &reader);
void toMzml(QXmlStreamWriter &writer);
/** @brief write the structure to a JSON object
* needs to decode the binary array
* @result QJsonObject
*/
QJsonObject toJsonObject(std::size_t estimated_length) const;
void decodeVector(std::size_t estimated_length, std::vector<double> &double_list) const;
bool isIntensity() const;
bool isMz() const;
quint8 bits = 64;
bool isInt = false;
QString compress = "zlib";
QString unit;
QByteArray byteArray;
};
} // namespace mzcbor
} // namespace cbor
} // 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:46
pappso::cbor::CborStreamWriter
overrides QCborStreamWriter base class to provide convenient functions
Definition cborstreamwriter.h:45
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::BinaryDataArray
Definition binarydataarray.h:44
pappso::cbor::mzcbor::BinaryDataArray::fromCbor
void fromCbor(CborStreamReader &reader)
Definition binarydataarray.cpp:37
pappso::cbor::mzcbor::BinaryDataArray::isMz
bool isMz() const
Definition binarydataarray.cpp:578
pappso::cbor::mzcbor::BinaryDataArray::isInt
bool isInt
Definition binarydataarray.h:61
pappso::cbor::mzcbor::BinaryDataArray::fromMzml
void fromMzml(QXmlStreamReader &reader)
Definition binarydataarray.cpp:132
pappso::cbor::mzcbor::BinaryDataArray::toMzml
void toMzml(QXmlStreamWriter &writer)
Definition binarydataarray.cpp:290
pappso::cbor::mzcbor::BinaryDataArray::toCbor
void toCbor(CborStreamWriter &writer)
Definition binarydataarray.cpp:111
pappso::cbor::mzcbor::BinaryDataArray::isIntensity
bool isIntensity() const
Definition binarydataarray.cpp:569
pappso::cbor::mzcbor::BinaryDataArray::compress
QString compress
Definition binarydataarray.h:62
pappso::cbor::mzcbor::BinaryDataArray::bits
quint8 bits
Definition binarydataarray.h:60
pappso::cbor::mzcbor::BinaryDataArray::unit
QString unit
Definition binarydataarray.h:63
pappso::cbor::mzcbor::BinaryDataArray::decodeVector
void decodeVector(std::size_t estimated_length, std::vector< double > &double_list) const
Definition binarydataarray.cpp:459
pappso::cbor::mzcbor::BinaryDataArray::byteArray
QByteArray byteArray
Definition binarydataarray.h:65
pappso::cbor::mzcbor::BinaryDataArray::toJsonObject
QJsonObject toJsonObject(std::size_t estimated_length) const
write the structure to a JSON object needs to decode the binary array
Definition binarydataarray.cpp:587