OpenMS
Loading...
Searching...
No Matches
ParamXMLHandler.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: Marc Sturm, Stephan Aiche $
7// --------------------------------------------------------------------------
8
9#pragma once
10
13
14#include <vector>
15#include <map>
16
17namespace OpenMS
18{
19 namespace Internal
20 {
25 class OPENMS_DLLAPI ParamXMLHandler :
26 public XMLHandler
27 {
28public:
30 ParamXMLHandler(Param& param, const String& filename, const String& version);
32 ~ParamXMLHandler() override;
33
34 // Docu in base class
35 void endElement(const XMLCh* const uri, const XMLCh* const local_name, const XMLCh* const qname) override;
36
37 // Docu in base class
38 void startElement(const XMLCh* const uri, const XMLCh* const local_name, const XMLCh* const qname, const xercesc::Attributes& attributes) override;
39
40protected:
46 std::map<String, String> descriptions_;
47
49 struct
50 {
51 String name;
52 String type;
53 std::vector<std::string> stringlist;
54 IntList intlist;
55 DoubleList doublelist;
56 std::vector<std::string> tags;
57 String description;
58 String restrictions;
59 Int restrictions_index;
60 } list_;
61
62private:
65 };
66
67 } // namespace Internal
68} // namespace OpenMS
69
char16_t XMLCh
Definition ClassTest.h:28
XML Handler for Param files.
Definition ParamXMLHandler.h:27
void endElement(const XMLCh *const uri, const XMLCh *const local_name, const XMLCh *const qname) override
ParamXMLHandler(Param &param, const String &filename, const String &version)
Default constructor.
~ParamXMLHandler() override
Destructor.
Param & param_
Reference to the Param object to fill.
Definition ParamXMLHandler.h:44
String path_
The current absolute path (concatenation of nodes_ with : in between)
Definition ParamXMLHandler.h:42
std::map< String, String > descriptions_
Map of node descriptions (they are set at the end of parsing)
Definition ParamXMLHandler.h:46
void startElement(const XMLCh *const uri, const XMLCh *const local_name, const XMLCh *const qname, const xercesc::Attributes &attributes) override
Base class for XML handlers.
Definition XMLHandler.h:328
Management and storage of parameters / INI files.
Definition Param.h:46
A more convenient string class.
Definition String.h:34
int Int
Signed integer type.
Definition Types.h:72
std::vector< Int > IntList
Vector of signed integers.
Definition ListUtils.h:29
std::vector< double > DoubleList
Vector of double precision real types.
Definition ListUtils.h:36
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19