OpenMS
Loading...
Searching...
No Matches
XMLHandler.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: Chris Bielow $
6// $Authors: Marc Sturm, Chris Bielow $
7// --------------------------------------------------------------------------
8
9#pragma once
10
13
14
19
20#include <iosfwd>
21#include <string>
22#include <string_view>
23
24
25namespace OpenMS
26{
27 class ControlledVocabulary;
28 class CVTerm;
29 class MetaInfoInterface;
30 class ProteinIdentification;
31
32 namespace Internal
33 {
34
35 // XMLCh string handling lives in StringManager (Xerces-free public API);
36 // shared_xerces_ptr / unique_xerces_ptr / CONST_XMLCH are declared there.
37
41 class OPENMS_DLLAPI XMLHandler
42 {
43public:
44
46 class OPENMS_DLLAPI EndParsingSoftly :
48 {
49 public:
50 EndParsingSoftly(const char * file, int line, const char * function) :
51 Exception::BaseException(file, line, function)
52 {
53 }
54
55 };
56
59 {
61 STORE
62 };
63
65 {
66 LD_ALLDATA, // default; load all data
67 LD_RAWCOUNTS, // only count the total number of spectra and chromatograms (usually very fast)
68 LD_COUNTS_WITHOPTIONS // count the number of spectra, while respecting PeakFileOptions (msLevel and RTRange) and chromatograms (fast)
69 };
70
71
73 XMLHandler(const std::string & filename, const std::string & version);
75 virtual ~XMLHandler();
76
78 void reset();
79
81 void fatalError(ActionMode mode, const std::string & msg, UInt line = 0, UInt column = 0) const;
83 void error(ActionMode mode, const std::string & msg, UInt line = 0, UInt column = 0) const;
85 void warning(ActionMode mode, const std::string & msg, UInt line = 0, UInt column = 0) const;
86
97 virtual void onStartElement(const char16_t * qname, const XMLAttributes & attributes);
99 virtual void onEndElement(const char16_t * qname);
101 virtual void onCharacters(const char16_t * chars, Size length);
103
105 virtual void writeTo(std::ostream & /*os*/);
106
108 virtual LOADDETAIL getLoadDetail() const;
109
111 virtual void setLoadDetail(const LOADDETAIL d);
112
120 static std::string writeXMLEscape(const std::string& to_escape)
121 {
122 std::string _copy = to_escape;
123 // has() is cheap, so check before calling substitute(), since substitute() will usually happen rarely
124 if (StringUtils::has(_copy, '&')) StringUtils::substitute(_copy, "&","&amp;");
125 if (StringUtils::has(_copy, '>')) StringUtils::substitute(_copy, ">","&gt;");
126 if (StringUtils::has(_copy, '"')) StringUtils::substitute(_copy, "\"","&quot;");
127 if (StringUtils::has(_copy, '<')) StringUtils::substitute(_copy, "<","&lt;");
128 if (StringUtils::has(_copy, '\'')) StringUtils::substitute(_copy, "'","&apos;");
129
130 return _copy;
131 }
132
146 static DataValue fromXSDString(const std::string& type, const std::string& value)
147 {
148 DataValue data_value;
149 // float type
150 if (type == "xsd:double" || type == "xsd:float" || type == "xsd:decimal")
151 {
152 data_value = DataValue(StringUtils::toDouble(value));
153 }
154 // <=32 bit integer types
155 else if (type == "xsd:byte" || // 8bit signed
156 type == "xsd:int" || // 32bit signed
157 type == "xsd:unsignedShort" || // 16bit unsigned
158 type == "xsd:short" || // 16bit signed
159 type == "xsd:unsignedByte" || type == "xsd:unsignedInt")
160 {
161 data_value = DataValue(StringUtils::toInt32(value));
162 }
163 // 64 bit integer types
164 else if (type == "xsd:long" || type == "xsd:unsignedLong" || // 64bit signed or unsigned respectively
165 type == "xsd:integer" || type == "xsd:negativeInteger" || // any 'integer' has arbitrary size... but we have to cope with 64bit for now.
166 type == "xsd:nonNegativeInteger" || type == "xsd:nonPositiveInteger" || type == "xsd:positiveInteger")
167 {
168 data_value = DataValue(StringUtils::toInt64(value)); // internally a signed 64-bit integer. So if someone uses 2^64-1 as value, toInt64() will raise an exception...
169 }
170 // everything else is treated as a string
171 else
172 {
173 data_value = DataValue(value);
174 }
175 return data_value;
176 }
177
178
191 DataValue cvParamToValue(const ControlledVocabulary& cv, const std::string& parent_tag,
192 const std::string& accession, const std::string& name, const std::string& value,
193 const std::string& unit_accession) const;
194
203 DataValue cvParamToValue(const ControlledVocabulary& cv, const CVTerm& raw_term) const;
204
207 void checkUniqueIdentifiers_(const std::vector<ProteinIdentification>& prot_ids) const;
208
209protected:
211 std::string file_;
212
214 std::string version_;
215
218
224 std::vector<std::string> open_tags_;
225
228
229
231 inline bool equal_(const char16_t * a, const char16_t * b) const
232 {
233 // Guard null pointers before constructing views: u16string_view(nullptr)
234 // is UB, whereas the previous XMLString::compareString tolerated nulls
235 // (both null => equal, one null => unequal), which this reproduces.
236 if (a == nullptr || b == nullptr) return a == b;
237 return std::u16string_view(a) == std::u16string_view(b);
238 }
239
241
242
244 void writeUserParam_(const std::string & tag_name, std::ostream & os, const MetaInfoInterface & meta, UInt indent) const;
245
247
249
250
252 std::vector<std::vector<std::string> > cv_terms_;
253
256 SignedSize cvStringToEnum_(const Size section, const std::string & term, const char * message, const SignedSize result_on_error = 0);
257
259
261
262
264 inline Int asInt_(const std::string & in) const
265 {
266 Int res = 0;
267 try
268 {
269 res = StringUtils::toInt32(in);
270 }
272 {
273 error(LOAD,std::string("Int conversion error of \"") + in + "\"");
274 }
275 return res;
276 }
277
279 inline Int asInt_(const char16_t * in) const
280 {
281 return sm_.parseInt(in);
282 }
283
285 inline UInt asUInt_(const std::string & in) const
286 {
287 UInt res = 0;
288 try
289 {
290 Int tmp = StringUtils::toInt32(in);
291 if (tmp < 0)
292 {
293 throw Exception::ConversionError(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, "");
294 }
295 res = UInt(tmp);
296 }
298 {
299 error(LOAD,std::string("UInt conversion error of \"") + in + "\"");
300 }
301 return res;
302 }
303
305 inline double asDouble_(const std::string & in) const
306 {
307 double res = 0.0;
308 try
309 {
310 res = StringUtils::toDouble(in);
311 }
313 {
314 error(LOAD,std::string("Double conversion error of \"") + in + "\"");
315 }
316 return res;
317 }
318
320 inline float asFloat_(const std::string & in) const
321 {
322 float res = 0.0;
323 try
324 {
325 res = StringUtils::toFloat(in);
326 }
328 {
329 error(LOAD,std::string("Float conversion error of \"") + in + "\"");
330 }
331 return res;
332 }
333
341 inline bool asBool_(const std::string & in) const
342 {
343 if (in == "true" || in == "TRUE" || in == "True" || in == "1")
344 {
345 return true;
346 }
347 else if (in == "false" || in == "FALSE" || in == "False" || in == "0")
348 {
349 return false;
350 }
351 else
352 {
353 error(LOAD,std::string("Boolean conversion error of \"") + in + "\"");
354 }
355 return false;
356 }
357
359 inline DateTime asDateTime_(std::string date_string) const
360 {
361 DateTime date_time;
362 if (!date_string.empty())
363 {
364 try
365 {
366 //strip away milliseconds
367 StringUtils::trim(date_string);
368 date_string = StringUtils::substr(date_string, 0, 19);
369 date_time.set(date_string);
370 }
371 catch (Exception::ParseError& /*err*/ )
372 {
373 error(LOAD,std::string("DateTime conversion error of \"") + date_string + "\"");
374 }
375 }
376 return date_time;
377 }
378
380
382
383
385 inline std::string attributeAsString_(const XMLAttributes & a, const char * name) const
386 {
387 const char16_t * val = a.value(name);
388 if (val == nullptr) fatalError(LOAD,std::string("Required attribute '") + name + "' not present!");
389 return sm_.convert(val);
390 }
391
393 inline Int attributeAsInt_(const XMLAttributes & a, const char * name) const
394 {
395 const char16_t * val = a.value(name);
396 if (val == nullptr) fatalError(LOAD,std::string("Required attribute '") + name + "' not present!");
397 return sm_.parseInt(val);
398 }
399
401 inline double attributeAsDouble_(const XMLAttributes & a, const char * name) const
402 {
403 const char16_t * val = a.value(name);
404 if (val == nullptr) fatalError(LOAD,std::string("Required attribute '") + name + "' not present!");
405 return StringUtils::toDouble(sm_.convert(val));
406 }
407
409 DoubleList attributeAsDoubleList_(const XMLAttributes & a, const char * name) const;
410
412 IntList attributeAsIntList_(const XMLAttributes & a, const char * name) const;
413
415 StringList attributeAsStringList_(const XMLAttributes & a, const char * name) const;
416
422 inline bool optionalAttributeAsString_(std::string & value, const XMLAttributes & a, const char * name) const
423 {
424 const char16_t * val = a.value(name);
425 if (val != nullptr)
426 {
427 value = sm_.convert(val);
428 return true;
429 }
430 return false;
431 }
432
438 inline bool optionalAttributeAsInt_(Int & value, const XMLAttributes & a, const char * name) const
439 {
440 const char16_t * val = a.value(name);
441 if (val != nullptr)
442 {
443 value = sm_.parseInt(val);
444 return true;
445 }
446 return false;
447 }
448
454 inline bool optionalAttributeAsUInt_(UInt & value, const XMLAttributes & a, const char * name) const
455 {
456 const char16_t * val = a.value(name);
457 if (val != nullptr)
458 {
459 value = sm_.parseInt(val);
460 return true;
461 }
462 return false;
463 }
464
470 inline bool optionalAttributeAsDouble_(double & value, const XMLAttributes & a, const char * name) const
471 {
472 const char16_t * val = a.value(name);
473 if (val != nullptr)
474 {
475 value =StringUtils::toDouble(sm_.convert(val));
476 return true;
477 }
478 return false;
479 }
480
486 inline bool optionalAttributeAsDoubleList_(DoubleList & value, const XMLAttributes & a, const char * name) const
487 {
488 const char16_t * val = a.value(name);
489 if (val != nullptr)
490 {
491 value = attributeAsDoubleList_(a, name);
492 return true;
493 }
494 return false;
495 }
496
502 inline bool optionalAttributeAsStringList_(StringList & value, const XMLAttributes & a, const char * name) const
503 {
504 const char16_t * val = a.value(name);
505 if (val != nullptr)
506 {
507 value = attributeAsStringList_(a, name);
508 return true;
509 }
510 return false;
511 }
512
518 inline bool optionalAttributeAsIntList_(IntList & value, const XMLAttributes & a, const char * name) const
519 {
520 const char16_t * val = a.value(name);
521 if (val != nullptr)
522 {
523 value = attributeAsIntList_(a, name);
524 return true;
525 }
526 return false;
527 }
528
530 inline std::string attributeAsString_(const XMLAttributes & a, const char16_t * name) const
531 {
532 const char16_t * val = a.value(name);
533 if (val == nullptr) fatalError(LOAD,std::string("Required attribute '") + sm_.convert(name) + "' not present!");
534 return sm_.convert(val);
535 }
536
538 inline Int attributeAsInt_(const XMLAttributes & a, const char16_t * name) const
539 {
540 const char16_t * val = a.value(name);
541 if (val == nullptr) fatalError(LOAD,std::string("Required attribute '") + sm_.convert(name) + "' not present!");
542 return sm_.parseInt(val);
543 }
544
546 inline double attributeAsDouble_(const XMLAttributes & a, const char16_t * name) const
547 {
548 const char16_t * val = a.value(name);
549 if (val == nullptr) fatalError(LOAD,std::string("Required attribute '") + sm_.convert(name) + "' not present!");
550 return StringUtils::toDouble(sm_.convert(val));
551 }
552
554 DoubleList attributeAsDoubleList_(const XMLAttributes & a, const char16_t * name) const;
555
557 IntList attributeAsIntList_(const XMLAttributes & a, const char16_t * name) const;
558
560 StringList attributeAsStringList_(const XMLAttributes & a, const char16_t * name) const;
561
563 inline bool optionalAttributeAsString_(std::string& value, const XMLAttributes & a, const char16_t * name) const
564 {
565 const char16_t * val = a.value(name);
566 if (val != nullptr)
567 {
568 value = sm_.convert(val);
569 return !value.empty();
570 }
571 return false;
572 }
573
575 inline bool optionalAttributeAsInt_(Int & value, const XMLAttributes & a, const char16_t * name) const
576 {
577 const char16_t * val = a.value(name);
578 if (val != nullptr)
579 {
580 value = sm_.parseInt(val);
581 return true;
582 }
583 return false;
584 }
585
587 inline bool optionalAttributeAsUInt_(UInt & value, const XMLAttributes & a, const char16_t * name) const
588 {
589 const char16_t * val = a.value(name);
590 if (val != nullptr)
591 {
592 value = sm_.parseInt(val);
593 return true;
594 }
595 return false;
596 }
597
599 inline bool optionalAttributeAsDouble_(double & value, const XMLAttributes & a, const char16_t * name) const
600 {
601 const char16_t * val = a.value(name);
602 if (val != nullptr)
603 {
604 value = StringUtils::toDouble(sm_.convert(val));
605 return true;
606 }
607 return false;
608 }
609
615 inline bool optionalAttributeAsDoubleList_(DoubleList & value, const XMLAttributes & a, const char16_t * name) const
616 {
617 const char16_t * val = a.value(name);
618 if (val != nullptr)
619 {
620 value = attributeAsDoubleList_(a, name);
621 return true;
622 }
623 return false;
624 }
625
631 inline bool optionalAttributeAsIntList_(IntList & value, const XMLAttributes & a, const char16_t * name) const
632 {
633 const char16_t * val = a.value(name);
634 if (val != nullptr)
635 {
636 value = attributeAsIntList_(a, name);
637 return true;
638 }
639 return false;
640 }
641
647 inline bool optionalAttributeAsStringList_(StringList & value, const XMLAttributes & a, const char16_t * name) const
648 {
649 const char16_t * val = a.value(name);
650 if (val != nullptr)
651 {
652 value = attributeAsStringList_(a, name);
653 return true;
654 }
655 return false;
656 }
657
659
660private:
663
664 inline const std::string& expectList_(const std::string& str) const
665 {
666 if (!(StringUtils::hasPrefix(str, '[') && StringUtils::hasSuffix(str, ']')))
667 {
668 fatalError(LOAD,std::string("List argument is not a string representation of a list!"));
669 }
670 return str;
671 }
672
673 };
674
675 } // namespace Internal
676} // namespace OpenMS
677
678
Representation of controlled vocabulary term.
Definition CVTerm.h:28
Definition ControlledVocabulary.h:29
Class to hold strings, numeric values, lists of strings and lists of numeric values.
Definition DataValue.h:33
DateTime Class.
Definition DateTime.h:31
void set(UInt month, UInt day, UInt year, UInt hour, UInt minute, UInt second)
sets data from six integers
Exception base class.
Definition Exception.h:63
Invalid conversion exception.
Definition Exception.h:331
Parse Error exception.
Definition Exception.h:596
Helper class for XML parsing that handles the conversions of Xerces strings.
Definition StringManager.h:190
static XercesString convert(const char *str)
Transcode the supplied C string to a UTF-16 string.
static Int parseInt(const char16_t *str)
Parse an integer from a UTF-16 numeric string (as Xerces' XMLString::parseInt would).
Xerces-free, lightweight view over the attribute list of an XML element.
Definition XMLAttributes.h:32
const char16_t * value(const char16_t *qname) const
Value of the attribute named qname (UTF-16 code units), or nullptr if absent.
Exception that is thrown if the parsing is ended by some event (e.g. if only a prefix of the XML file...
Definition XMLHandler.h:48
EndParsingSoftly(const char *file, int line, const char *function)
Definition XMLHandler.h:50
Base class for XML handlers.
Definition XMLHandler.h:42
float asFloat_(const std::string &in) const
Conversion of a std::string to a float value.
Definition XMLHandler.h:320
SignedSize cvStringToEnum_(const Size section, const std::string &term, const char *message, const SignedSize result_on_error=0)
UInt asUInt_(const std::string &in) const
Conversion of a std::string to an unsigned integer value.
Definition XMLHandler.h:285
virtual LOADDETAIL getLoadDetail() const
handler which support partial loading, implement this method
bool optionalAttributeAsDouble_(double &value, const XMLAttributes &a, const char16_t *name) const
Assigns the attribute content to the double value if the attribute is present.
Definition XMLHandler.h:599
bool optionalAttributeAsString_(std::string &value, const XMLAttributes &a, const char16_t *name) const
Assigns the attribute content to the String value if the attribute is present.
Definition XMLHandler.h:563
LOADDETAIL load_detail_
parse only until total number of scans and chroms have been determined from attributes
Definition XMLHandler.h:227
bool optionalAttributeAsIntList_(IntList &value, const XMLAttributes &a, const char *name) const
Assigns the attribute content to the IntList value if the attribute is present.
Definition XMLHandler.h:518
virtual void setLoadDetail(const LOADDETAIL d)
handler which support partial loading, implement this method
Int asInt_(const std::string &in) const
Conversion of a std::string to an integer value.
Definition XMLHandler.h:264
void checkUniqueIdentifiers_(const std::vector< ProteinIdentification > &prot_ids) const
void warning(ActionMode mode, const std::string &msg, UInt line=0, UInt column=0) const
Warning handler.
static std::string writeXMLEscape(const std::string &to_escape)
Escapes a string and returns the escaped string.
Definition XMLHandler.h:120
StringList attributeAsStringList_(const XMLAttributes &a, const char16_t *name) const
Converts an attribute to a StringList.
XMLHandler()
Not implemented.
Int attributeAsInt_(const XMLAttributes &a, const char16_t *name) const
Converts an attribute to a Int.
Definition XMLHandler.h:538
StringList attributeAsStringList_(const XMLAttributes &a, const char *name) const
Converts an attribute to an StringList.
Int asInt_(const char16_t *in) const
Conversion of a Xerces string to an integer value.
Definition XMLHandler.h:279
double attributeAsDouble_(const XMLAttributes &a, const char *name) const
Converts an attribute to a double.
Definition XMLHandler.h:401
DataValue cvParamToValue(const ControlledVocabulary &cv, const std::string &parent_tag, const std::string &accession, const std::string &name, const std::string &value, const std::string &unit_accession) const
Convert the value of a <cvParam value=.> (as commonly found in PSI schemata) to the DataValue with th...
bool optionalAttributeAsStringList_(StringList &value, const XMLAttributes &a, const char *name) const
Assigns the attribute content to the StringList value if the attribute is present.
Definition XMLHandler.h:502
std::string attributeAsString_(const XMLAttributes &a, const char16_t *name) const
Converts an attribute to a String.
Definition XMLHandler.h:530
bool optionalAttributeAsDoubleList_(DoubleList &value, const XMLAttributes &a, const char *name) const
Assigns the attribute content to the DoubleList value if the attribute is present.
Definition XMLHandler.h:486
LOADDETAIL
Definition XMLHandler.h:65
@ LD_RAWCOUNTS
Definition XMLHandler.h:67
@ LD_ALLDATA
Definition XMLHandler.h:66
virtual void onCharacters(const char16_t *chars, Size length)
Parsing method for character data.
std::string version_
Schema version.
Definition XMLHandler.h:214
Int attributeAsInt_(const XMLAttributes &a, const char *name) const
Converts an attribute to a Int.
Definition XMLHandler.h:393
void fatalError(ActionMode mode, const std::string &msg, UInt line=0, UInt column=0) const
Fatal error handler. Throws a ParseError exception.
std::string attributeAsString_(const XMLAttributes &a, const char *name) const
Converts an attribute to a String.
Definition XMLHandler.h:385
ActionMode
Action to set the current mode (for error messages)
Definition XMLHandler.h:59
@ LOAD
Loading a file.
Definition XMLHandler.h:60
virtual void onStartElement(const char16_t *qname, const XMLAttributes &attributes)
Parsing method for opening tags.
void writeUserParam_(const std::string &tag_name, std::ostream &os, const MetaInfoInterface &meta, UInt indent) const
Writes the content of MetaInfoInterface to the file.
bool asBool_(const std::string &in) const
Conversion of a string to a boolean value.
Definition XMLHandler.h:341
bool optionalAttributeAsUInt_(UInt &value, const XMLAttributes &a, const char *name) const
Assigns the attribute content to the UInt value if the attribute is present.
Definition XMLHandler.h:454
DoubleList attributeAsDoubleList_(const XMLAttributes &a, const char16_t *name) const
Converts an attribute to a DoubleList.
bool optionalAttributeAsUInt_(UInt &value, const XMLAttributes &a, const char16_t *name) const
Assigns the attribute content to the UInt value if the attribute is present.
Definition XMLHandler.h:587
static DataValue fromXSDString(const std::string &type, const std::string &value)
Convert an XSD type (e.g. 'xsd:double') to a DataValue.
Definition XMLHandler.h:146
bool equal_(const char16_t *a, const char16_t *b) const
Returns if two Xerces strings are equal.
Definition XMLHandler.h:231
StringManager sm_
Helper class for string conversion.
Definition XMLHandler.h:217
const std::string & expectList_(const std::string &str) const
Definition XMLHandler.h:664
void error(ActionMode mode, const std::string &msg, UInt line=0, UInt column=0) const
Error handler for recoverable errors.
XMLHandler(const std::string &filename, const std::string &version)
Default constructor.
double asDouble_(const std::string &in) const
Conversion of a std::string to a double value.
Definition XMLHandler.h:305
bool optionalAttributeAsStringList_(StringList &value, const XMLAttributes &a, const char16_t *name) const
Assigns the attribute content to the StringList value if the attribute is present.
Definition XMLHandler.h:647
DataValue cvParamToValue(const ControlledVocabulary &cv, const CVTerm &raw_term) const
Convert the value of a <cvParam value=.> (as commonly found in PSI schemata) to the DataValue with th...
IntList attributeAsIntList_(const XMLAttributes &a, const char16_t *name) const
Converts an attribute to a IntList.
std::string file_
File name.
Definition XMLHandler.h:211
double attributeAsDouble_(const XMLAttributes &a, const char16_t *name) const
Converts an attribute to a double.
Definition XMLHandler.h:546
bool optionalAttributeAsDouble_(double &value, const XMLAttributes &a, const char *name) const
Assigns the attribute content to the double value if the attribute is present.
Definition XMLHandler.h:470
bool optionalAttributeAsInt_(Int &value, const XMLAttributes &a, const char16_t *name) const
Assigns the attribute content to the Int value if the attribute is present.
Definition XMLHandler.h:575
virtual void writeTo(std::ostream &)
Writes the contents to a stream.
bool optionalAttributeAsIntList_(IntList &value, const XMLAttributes &a, const char16_t *name) const
Assigns the attribute content to the IntList value if the attribute is present.
Definition XMLHandler.h:631
std::vector< std::vector< std::string > > cv_terms_
Array of CV term lists (one sublist denotes one term and it's children)
Definition XMLHandler.h:252
IntList attributeAsIntList_(const XMLAttributes &a, const char *name) const
Converts an attribute to an IntList.
DateTime asDateTime_(std::string date_string) const
Conversion of a xs:datetime string to a DateTime value.
Definition XMLHandler.h:359
bool optionalAttributeAsDoubleList_(DoubleList &value, const XMLAttributes &a, const char16_t *name) const
Assigns the attribute content to the DoubleList value if the attribute is present.
Definition XMLHandler.h:615
void reset()
Release internal memory used for parsing (call.
std::vector< std::string > open_tags_
Stack of open XML tags.
Definition XMLHandler.h:224
bool optionalAttributeAsString_(std::string &value, const XMLAttributes &a, const char *name) const
Assigns the attribute content to the String value if the attribute is present.
Definition XMLHandler.h:422
DoubleList attributeAsDoubleList_(const XMLAttributes &a, const char *name) const
Converts an attribute to a DoubleList.
virtual ~XMLHandler()
Destructor.
bool optionalAttributeAsInt_(Int &value, const XMLAttributes &a, const char *name) const
Assigns the attribute content to the Int value if the attribute is present.
Definition XMLHandler.h:438
virtual void onEndElement(const char16_t *qname)
Parsing method for closing tags.
Interface for classes that can store arbitrary meta information (Type-Name-Value tuples).
Definition MetaInfoInterface.h:35
int Int
Signed integer type.
Definition Types.h:72
unsigned int UInt
Unsigned integer type.
Definition Types.h:64
ptrdiff_t SignedSize
Signed Size type e.g. used as pointer difference.
Definition Types.h:104
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
std::vector< Int > IntList
Vector of signed integers.
Definition TypeAliases.h:24
std::vector< double > DoubleList
Vector of double precision real types.
Definition TypeAliases.h:31
std::vector< std::string > StringList
Vector of String.
Definition TypeAliases.h:39
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19