OpenMS
Loading...
Searching...
No Matches
QPXValueValidation.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Timo Sachsenberg $
6// $Authors: Timo Sachsenberg $
7// --------------------------------------------------------------------------
8
9#pragma once
10
11#include <OpenMS/config.h>
12
13#include <memory>
14#include <string>
15#include <vector>
16
17namespace arrow
18{
19 class Table;
20}
21
22namespace OpenMS
23{
74 class OPENMS_DLLAPI QPXValueValidation
75 {
76 public:
78 enum class View
79 {
80 PSM,
81 FEATURE,
82 PROTEIN_GROUP
83 };
84
86 struct OPENMS_DLLAPI Result
87 {
88 bool valid = true;
89 std::vector<std::string> errors;
90
96 std::string toString() const;
97 };
98
104 explicit QPXValueValidation(View view);
106
109
111 QPXValueValidation& operator=(const QPXValueValidation&) = delete;
112
127 Result validate(const std::shared_ptr<arrow::Table>& table);
128
130 void reset();
131
132 private:
133 struct Impl;
134 std::unique_ptr<Impl> impl_;
135 };
136} // namespace OpenMS
Stateful value and primary-key validator for QPX Arrow tables.
Definition QPXValueValidation.h:75
QPXValueValidation(QPXValueValidation &&) noexcept
QPXValueValidation(View view)
Construct a validator for one QPX view.
View
QPX table whose value contract is checked.
Definition QPXValueValidation.h:79
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Definition ArrowIOHelpers.h:26
STL namespace.
Result of validating one table or streaming batch.
Definition QPXValueValidation.h:87
std::string toString() const
Join all diagnostics into one log-friendly string.
std::vector< std::string > errors
Definition QPXValueValidation.h:89