OpenMS
Loading...
Searching...
No Matches
ParamCTDFile.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: Ruben Grünberg $
6// $Authors: Ruben Grünberg $
7// --------------------------------------------------------------------------
8
9#pragma once
10
11#include <string>
14
15namespace OpenMS
16{
17
23 class OPENMS_DLLAPI ParamCTDFile
24 {
25 public:
26 ParamCTDFile() = default;
27
28 ~ParamCTDFile() = default;
29
39 void store(const std::string& filename, const Param& param, const ToolInfo& tool_info) const;
40
48 void writeCTDToStream(std::ostream* os_ptr, const Param& param, const ToolInfo& tool_info) const;
49
50 private:
59 static std::string escapeXML(const std::string& to_escape);
60
68 static void replace(std::string& replace_in, char to_replace, const std::string& replace_with);
69
70 const std::string schema_location_ = "/SCHEMAS/Param_1_8_0.xsd";
71 const std::string schema_version_ = "1.8.0";
72 };
73}
Serializes a Param class in paramCTD file format. Note: only storing is currently possible.
Definition ParamCTDFile.h:24
static void replace(std::string &replace_in, char to_replace, const std::string &replace_with)
Replace all occurrences of a character in a string with a string.
~ParamCTDFile()=default
Constructor.
void store(const std::string &filename, const Param &param, const ToolInfo &tool_info) const
Destructor.
static std::string escapeXML(const std::string &to_escape)
Escapes certain characters in a string that are not allowed in XML Escaped characters are: & < > " '.
void writeCTDToStream(std::ostream *os_ptr, const Param &param, const ToolInfo &tool_info) const
Write CTD to output stream.
Management and storage of parameters / INI files.
Definition Param.h:46
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Tool metadata shared by parameter-file serializers.
Definition ToolInfo.h:20