Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
XMLHandler.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2013.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Chris Bielow $
32 // $Authors: Marc Sturm, Chris Bielow $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_FORMAT_HANDLERS_XMLHANDLER_H
36 #define OPENMS_FORMAT_HANDLERS_XMLHANDLER_H
37 
38 #include <iostream>
39 
40 #include <OpenMS/CONCEPT/Types.h>
41 #include <OpenMS/CONCEPT/Macros.h>
42 
45 
46 #include <xercesc/sax2/DefaultHandler.hpp>
47 #include <xercesc/sax/Locator.hpp>
48 #include <xercesc/sax2/Attributes.hpp>
49 
50 #include <algorithm>
51 
52 namespace OpenMS
53 {
54  namespace Internal
55  {
56 
58  class OPENMS_DLLAPI StringManager
59  {
60 public:
62  StringManager();
63 
65  ~StringManager();
66 
68  void clear();
69 
71  XMLCh * convert(const char * str) const;
72 
74  XMLCh * convert(const std::string & str) const;
75 
77  XMLCh * convert(const String & str) const;
78 
80  char * convert(const XMLCh * str) const;
81 private:
82  mutable std::vector<XMLCh *> xml_strings_;
83  mutable std::vector<char *> c_strings_;
84  };
85 
89  class OPENMS_DLLAPI XMLHandler :
90  public xercesc::DefaultHandler
91  {
92 public:
94  class OPENMS_DLLAPI EndParsingSoftly :
96  {
97 public:
98  EndParsingSoftly(const char * file, int line, const char * function) :
99  Exception::BaseException(file, line, function)
100  {
101  }
102 
103  };
104 
107  {
109  STORE
110  };
111 
113  XMLHandler(const String & filename, const String & version);
115  virtual ~XMLHandler();
116 
118  void reset();
119 
120 
127  void fatalError(const xercesc::SAXParseException & exception);
128  void error(const xercesc::SAXParseException & exception);
129  void warning(const xercesc::SAXParseException & exception);
131 
133  void fatalError(ActionMode mode, const String & msg, UInt line = 0, UInt column = 0) const;
135  void error(ActionMode mode, const String & msg, UInt line = 0, UInt column = 0) const;
137  void warning(ActionMode mode, const String & msg, UInt line = 0, UInt column = 0) const;
138 
140  virtual void characters(const XMLCh * const chars, const XMLSize_t length);
142  virtual void startElement(const XMLCh * const uri, const XMLCh * const localname, const XMLCh * const qname, const xercesc::Attributes & attrs);
144  virtual void endElement(const XMLCh * const uri, const XMLCh * const localname, const XMLCh * const qname);
145 
147  virtual void writeTo(std::ostream & /*os*/)
148  {
149  }
150 
152  String errorString();
153 
154 protected:
157 
160 
163 
166 
172  std::vector<String> open_tags_;
173 
175  inline bool equal_(const XMLCh * a, const XMLCh * b)
176  {
177  return xercesc::XMLString::compareString(a, b) == 0;
178  }
179 
181 
182 
184  void writeUserParam_(const String & tag_name, std::ostream & os, const MetaInfoInterface & meta, UInt indent) const;
185 
187 
189 
190 
192  std::vector<std::vector<String> > cv_terms_;
193 
196  inline SignedSize cvStringToEnum_(const Size section, const String & term, const char * message, const SignedSize result_on_error = 0)
197  {
198  OPENMS_PRECONDITION(section < cv_terms_.size(), "cvStringToEnum_: Index overflow (section number too large)");
199 
200  std::vector<String>::const_iterator it = std::find(cv_terms_[section].begin(), cv_terms_[section].end(), term);
201  if (it != cv_terms_[section].end())
202  {
203  return it - cv_terms_[section].begin();
204  }
205  else
206  {
207  warning(LOAD, String("Unexpected CV entry '") + message + "'='" + term + "'");
208  return result_on_error;
209  }
210  }
211 
213 
215 
216 
218  inline Int asInt_(const String & in)
219  {
220  Int res = 0;
221  try
222  {
223  res = in.toInt();
224  }
226  {
227  error(LOAD, String("Int conversion error of \"") + in + "\"");
228  }
229  return res;
230  }
231 
233  inline Int asInt_(const XMLCh * in)
234  {
235  return xercesc::XMLString::parseInt(in);
236  }
237 
239  inline UInt asUInt_(const String & in)
240  {
241  UInt res = 0;
242  try
243  {
244  Int tmp = in.toInt();
245  if (tmp < 0)
246  {
247  Exception::ConversionError(__FILE__, __LINE__, __PRETTY_FUNCTION__, "");
248  }
249  res = UInt(tmp);
250  }
252  {
253  error(LOAD, String("UInt conversion error of \"") + in + "\"");
254  }
255  return res;
256  }
257 
259  inline double asDouble_(const String & in)
260  {
261  double res = 0.0;
262  try
263  {
264  res = in.toDouble();
265  }
267  {
268  error(LOAD, String("Double conversion error of \"") + in + "\"");
269  }
270  return res;
271  }
272 
274  inline float asFloat_(const String & in)
275  {
276  float res = 0.0;
277  try
278  {
279  res = in.toFloat();
280  }
282  {
283  error(LOAD, String("Float conversion error of \"") + in + "\"");
284  }
285  return res;
286  }
287 
294  inline bool asBool_(const String & in)
295  {
296  if (in == "true" || in == "TRUE" || in == "True" || in == "1")
297  {
298  return true;
299  }
300  else if (in == "false" || in == "FALSE" || in == "False" || in == "0")
301  {
302  return false;
303  }
304  else
305  {
306  error(LOAD, String("Boolean conversion error of \"") + in + "\"");
307  }
308  return false;
309  }
310 
312  inline DateTime asDateTime_(String date_string)
313  {
314  DateTime date_time;
315  if (date_string != "")
316  {
317  try
318  {
319  //strip away milliseconds
320  date_string.trim();
321  date_string = date_string.substr(0, 19);
322  date_time.set(date_string);
323  }
324  catch (Exception::ParseError err)
325  {
326  error(LOAD, String("DateTime conversion error of \"") + date_string + "\"");
327  }
328  }
329  return date_time;
330  }
331 
333 
335 
336 
338  inline char * attributeAsString_(const xercesc::Attributes & a, const char * name) const
339  {
340  const XMLCh * val = a.getValue(sm_.convert(name));
341  if (val == 0) fatalError(LOAD, String("Required attribute '") + name + "' not present!");
342  return sm_.convert(val);
343  }
344 
346  inline Int attributeAsInt_(const xercesc::Attributes & a, const char * name) const
347  {
348  const XMLCh * val = a.getValue(sm_.convert(name));
349  if (val == 0) fatalError(LOAD, String("Required attribute '") + name + "' not present!");
350  return xercesc::XMLString::parseInt(val);
351  }
352 
354  inline DoubleReal attributeAsDouble_(const xercesc::Attributes & a, const char * name) const
355  {
356  const XMLCh * val = a.getValue(sm_.convert(name));
357  if (val == 0) fatalError(LOAD, String("Required attribute '") + name + "' not present!");
358  return String(sm_.convert(val)).toDouble();
359  }
360 
362  inline DoubleList attributeAsDoubleList_(const xercesc::Attributes & a, const char * name) const
363  {
364  String tmp(expectList_(attributeAsString_(a, name)));
365  return DoubleList::create(tmp.substr(1, tmp.size() - 2));
366  }
367 
369  inline IntList attributeAsIntList_(const xercesc::Attributes & a, const char * name) const
370  {
371  String tmp(expectList_(attributeAsString_(a, name)));
372  return IntList::create(tmp.substr(1, tmp.size() - 2));
373  }
374 
376  inline StringList attributeAsStringList_(const xercesc::Attributes & a, const char * name) const
377  {
378  String tmp(expectList_(attributeAsString_(a, name)));
379  return StringList::create(tmp.substr(1, tmp.size() - 2));
380  }
381 
387  inline bool optionalAttributeAsString_(String & value, const xercesc::Attributes & a, const char * name) const
388  {
389  const XMLCh * val = a.getValue(sm_.convert(name));
390  if (val != 0)
391  {
392  value = sm_.convert(val);
393  return true;
394  }
395  return false;
396  }
397 
403  inline bool optionalAttributeAsInt_(Int & value, const xercesc::Attributes & a, const char * name) const
404  {
405  const XMLCh * val = a.getValue(sm_.convert(name));
406  if (val != 0)
407  {
408  value = xercesc::XMLString::parseInt(val);
409  return true;
410  }
411  return false;
412  }
413 
419  inline bool optionalAttributeAsUInt_(UInt & value, const xercesc::Attributes & a, const char * name) const
420  {
421  const XMLCh * val = a.getValue(sm_.convert(name));
422  if (val != 0)
423  {
424  value = xercesc::XMLString::parseInt(val);
425  return true;
426  }
427  return false;
428  }
429 
435  inline bool optionalAttributeAsDouble_(DoubleReal & value, const xercesc::Attributes & a, const char * name) const
436  {
437  const XMLCh * val = a.getValue(sm_.convert(name));
438  if (val != 0)
439  {
440  value = String(sm_.convert(val)).toDouble();
441  return true;
442  }
443  return false;
444  }
445 
451  inline bool optionalAttributeAsDoubleList_(DoubleList & value, const xercesc::Attributes & a, const char * name) const
452  {
453  const XMLCh * val = a.getValue(sm_.convert(name));
454  if (val != 0)
455  {
456  value = attributeAsDoubleList_(a, name);
457  return true;
458  }
459  return false;
460  }
461 
467  inline bool optionalAttributeAsStringList_(StringList & value, const xercesc::Attributes & a, const char * name) const
468  {
469  const XMLCh * val = a.getValue(sm_.convert(name));
470  if (val != 0)
471  {
472  value = attributeAsStringList_(a, name);
473  return true;
474  }
475  return false;
476  }
477 
483  inline bool optionalAttributeAsIntList_(IntList & value, const xercesc::Attributes & a, const char * name) const
484  {
485  const XMLCh * val = a.getValue(sm_.convert(name));
486  if (val != 0)
487  {
488  value = attributeAsIntList_(a, name);
489  return true;
490  }
491  return false;
492  }
493 
495  inline char * attributeAsString_(const xercesc::Attributes & a, const XMLCh * name) const
496  {
497  const XMLCh * val = a.getValue(name);
498  if (val == 0) fatalError(LOAD, String("Required attribute '") + sm_.convert(name) + "' not present!");
499  return sm_.convert(val);
500  }
501 
503  inline Int attributeAsInt_(const xercesc::Attributes & a, const XMLCh * name) const
504  {
505  const XMLCh * val = a.getValue(name);
506  if (val == 0) fatalError(LOAD, String("Required attribute '") + sm_.convert(name) + "' not present!");
507  return xercesc::XMLString::parseInt(val);
508  }
509 
511  inline DoubleReal attributeAsDouble_(const xercesc::Attributes & a, const XMLCh * name) const
512  {
513  const XMLCh * val = a.getValue(name);
514  if (val == 0) fatalError(LOAD, String("Required attribute '") + sm_.convert(name) + "' not present!");
515  return String(sm_.convert(val)).toDouble();
516  }
517 
519  inline DoubleList attributeAsDoubleList_(const xercesc::Attributes & a, const XMLCh * name) const
520  {
521  String tmp(expectList_(attributeAsString_(a, name)));
522  return DoubleList::create(tmp.substr(1, tmp.size() - 2));
523  }
524 
526  inline IntList attributeAsIntList_(const xercesc::Attributes & a, const XMLCh * name) const
527  {
528  String tmp(expectList_(attributeAsString_(a, name)));
529  return IntList::create(tmp.substr(1, tmp.size() - 2));
530  }
531 
533  inline StringList attributeAsStringList_(const xercesc::Attributes & a, const XMLCh * name) const
534  {
535  String tmp(expectList_(attributeAsString_(a, name)));
536  return StringList::create(tmp.substr(1, tmp.size() - 2));
537  }
538 
540  inline bool optionalAttributeAsString_(String & value, const xercesc::Attributes & a, const XMLCh * name) const
541  {
542  const XMLCh * val = a.getValue(name);
543  if (val != 0)
544  {
545  char * tmp2 = sm_.convert(val);
546  if (String(tmp2) != "")
547  {
548  value = tmp2;
549  return true;
550  }
551  }
552  return false;
553  }
554 
556  inline bool optionalAttributeAsInt_(Int & value, const xercesc::Attributes & a, const XMLCh * name) const
557  {
558  const XMLCh * val = a.getValue(name);
559  if (val != 0)
560  {
561  value = xercesc::XMLString::parseInt(val);
562  return true;
563  }
564  return false;
565  }
566 
568  inline bool optionalAttributeAsUInt_(UInt & value, const xercesc::Attributes & a, const XMLCh * name) const
569  {
570  const XMLCh * val = a.getValue(name);
571  if (val != 0)
572  {
573  value = xercesc::XMLString::parseInt(val);
574  return true;
575  }
576  return false;
577  }
578 
580  inline bool optionalAttributeAsDouble_(DoubleReal & value, const xercesc::Attributes & a, const XMLCh * name) const
581  {
582  const XMLCh * val = a.getValue(name);
583  if (val != 0)
584  {
585  value = String(sm_.convert(val)).toDouble();
586  return true;
587  }
588  return false;
589  }
590 
596  inline bool optionalAttributeAsDoubleList_(DoubleList & value, const xercesc::Attributes & a, const XMLCh * name) const
597  {
598  const XMLCh * val = a.getValue(name);
599  if (val != 0)
600  {
601  value = attributeAsDoubleList_(a, name);
602  return true;
603  }
604  return false;
605  }
606 
612  inline bool optionalAttributeAsIntList_(IntList & value, const xercesc::Attributes & a, const XMLCh * name) const
613  {
614  const XMLCh * val = a.getValue(name);
615  if (val != 0)
616  {
617  value = attributeAsIntList_(a, name);
618  return true;
619  }
620  return false;
621  }
622 
628  inline bool optionalAttributeAsStringList_(StringList & value, const xercesc::Attributes & a, const XMLCh * name) const
629  {
630  const XMLCh * val = a.getValue(name);
631  if (val != 0)
632  {
633  value = attributeAsStringList_(a, name);
634  return true;
635  }
636  return false;
637  }
638 
640 
641 private:
643  XMLHandler();
644 
645  inline String expectList_(const char * str) const
646  {
647  String tmp(str);
648  if (!(tmp.hasPrefix('[') && tmp.hasSuffix(']')))
649  {
650  fatalError(LOAD, String("List argument is not a string representation of a list!"));
651  }
652  return tmp;
653  }
654 
655  };
656 
657  } // namespace Internal
658 } // namespace OpenMS
659 
660 #endif // OPENMS_FORMAT_HANDLERS_XMLHANDLER_H
std::vector< String > open_tags_
Stack of open XML tags.
Definition: XMLHandler.h:172
IntList attributeAsIntList_(const xercesc::Attributes &a, const char *name) const
Converts an attribute to an IntList.
Definition: XMLHandler.h:369
bool optionalAttributeAsString_(String &value, const xercesc::Attributes &a, const char *name) const
Assigns the attribute content to the String value if the attribute is present.
Definition: XMLHandler.h:387
bool optionalAttributeAsDoubleList_(DoubleList &value, const xercesc::Attributes &a, const XMLCh *name) const
Assigns the attribute content to the DoubleList value if the attribute is present.
Definition: XMLHandler.h:596
A more convenient string class.
Definition: String.h:56
static DoubleList create(const String &list)
Returns a list that is created by splitting the given comma-separated string (String are not trimmed!...
bool optionalAttributeAsDouble_(DoubleReal &value, const xercesc::Attributes &a, const XMLCh *name) const
Assigns the attribute content to the DoubleReal value if the attribute is present.
Definition: XMLHandler.h:580
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:94
Int asInt_(const XMLCh *in)
Conversion of a Xerces string to an integer value.
Definition: XMLHandler.h:233
DoubleReal toDouble() const
Conversion to double.
String version_
Schema version.
Definition: XMLHandler.h:162
bool equal_(const XMLCh *a, const XMLCh *b)
Returns if two xerces strings are equal.
Definition: XMLHandler.h:175
IntList attributeAsIntList_(const xercesc::Attributes &a, const XMLCh *name) const
Converts an attribute to a IntList.
Definition: XMLHandler.h:526
void set(UInt month, UInt day, UInt year, UInt hour, UInt minute, UInt second)
sets data from six integers
bool optionalAttributeAsIntList_(IntList &value, const xercesc::Attributes &a, const XMLCh *name) const
Assigns the attribute content to the IntList value if the attribute is present.
Definition: XMLHandler.h:612
SignedSize cvStringToEnum_(const Size section, const String &term, const char *message, const SignedSize result_on_error=0)
Definition: XMLHandler.h:196
bool optionalAttributeAsInt_(Int &value, const xercesc::Attributes &a, const XMLCh *name) const
Assigns the attribute content to the Int value if the attribute is present.
Definition: XMLHandler.h:556
bool hasSuffix(const String &string) const
true if String ends with string, false otherwise
#define OPENMS_PRECONDITION(condition, message)
Precondition macro.
Definition: Macros.h:107
unsigned int UInt
Unsigned integer type.
Definition: Types.h:92
char * attributeAsString_(const xercesc::Attributes &a, const XMLCh *name) const
Converts an attribute to a String.
Definition: XMLHandler.h:495
bool optionalAttributeAsInt_(Int &value, const xercesc::Attributes &a, const char *name) const
Assigns the attribute content to the Int value if the attribute is present.
Definition: XMLHandler.h:403
Base class for XML handlers.
Definition: XMLHandler.h:89
DateTime asDateTime_(String date_string)
Conversion of a xs:datetime string to a DataTime value.
Definition: XMLHandler.h:312
UInt asUInt_(const String &in)
Conversion of a String to an unsigned integer value.
Definition: XMLHandler.h:239
ptrdiff_t SignedSize
Signed Size type e.g. used as pointer difference.
Definition: Types.h:151
ActionMode
Action to set the current mode (for error messages)
Definition: XMLHandler.h:106
Helper class for XML parsing that handles the memory management for conversions of Xerces strings...
Definition: XMLHandler.h:58
Int attributeAsInt_(const xercesc::Attributes &a, const char *name) const
Converts an attribute to a Int.
Definition: XMLHandler.h:346
bool optionalAttributeAsUInt_(UInt &value, const xercesc::Attributes &a, const XMLCh *name) const
Assigns the attribute content to the UInt value if the attribute is present.
Definition: XMLHandler.h:568
bool optionalAttributeAsStringList_(StringList &value, const xercesc::Attributes &a, const char *name) const
Assigns the attribute content to the StringList value if the attribute is present.
Definition: XMLHandler.h:467
String error_message_
Error message of the last error.
Definition: XMLHandler.h:156
DoubleReal attributeAsDouble_(const xercesc::Attributes &a, const char *name) const
Converts an attribute to a DoubleReal.
Definition: XMLHandler.h:354
Int toInt() const
Conversion to int.
EndParsingSoftly(const char *file, int line, const char *function)
Definition: XMLHandler.h:98
String expectList_(const char *str) const
Definition: XMLHandler.h:645
std::vector< XMLCh * > xml_strings_
Definition: XMLHandler.h:82
DoubleList attributeAsDoubleList_(const xercesc::Attributes &a, const char *name) const
Converts an attribute to a DoubleList.
Definition: XMLHandler.h:362
int exception
(Used by various macros. Indicates a rough category of the exception being caught.)
StringList attributeAsStringList_(const xercesc::Attributes &a, const char *name) const
Converts an attribute to an StringList.
Definition: XMLHandler.h:376
float asFloat_(const String &in)
Conversion of a String to a float value.
Definition: XMLHandler.h:274
bool optionalAttributeAsUInt_(UInt &value, const xercesc::Attributes &a, const char *name) const
Assigns the attribute content to the UInt value if the attribute is present.
Definition: XMLHandler.h:419
String & trim()
removes whitespaces (space, tab, line feed, carriage return) at the beginning and the end of the stri...
bool asBool_(const String &in)
Conversion of a string to a boolean value.
Definition: XMLHandler.h:294
String file_
File name.
Definition: XMLHandler.h:159
static StringList create(const String &list, const char splitter= ',')
Returns a list that is created by splitting the given (comma-separated) string (String are not trimme...
DoubleList attributeAsDoubleList_(const xercesc::Attributes &a, const XMLCh *name) const
Converts an attribute to a DoubleList.
Definition: XMLHandler.h:519
char * attributeAsString_(const xercesc::Attributes &a, const char *name) const
Converts an attribute to a String.
Definition: XMLHandler.h:338
Exception base class.
Definition: Exception.h:90
Interface for classes that can store arbitrary meta information (Type-Name-Value tuples).
Definition: MetaInfoInterface.h:61
Invalid conversion exception.
Definition: Exception.h:363
Loading a file.
Definition: XMLHandler.h:108
Real toFloat() const
Conversion to float.
double asDouble_(const String &in)
Conversion of a String to a double value.
Definition: XMLHandler.h:259
StringManager sm_
Helper class for string conversion.
Definition: XMLHandler.h:165
String list.
Definition: StringList.h:56
Int asInt_(const String &in)
Conversion of a String to an integer value.
Definition: XMLHandler.h:218
bool optionalAttributeAsString_(String &value, const xercesc::Attributes &a, const XMLCh *name) const
Assigns the attribute content to the String value if the attribute is present.
Definition: XMLHandler.h:540
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:144
DateTime Class.
Definition: DateTime.h:55
bool optionalAttributeAsDouble_(DoubleReal &value, const xercesc::Attributes &a, const char *name) const
Assigns the attribute content to the DoubleReal value if the attribute is present.
Definition: XMLHandler.h:435
String substr(size_t pos=0, size_t n=npos) const
Wrapper for the STL substr() method. Returns a String object with its contents initialized to a subst...
static IntList create(const String &list)
Returns a list that is created by splitting the given comma-separated string (String are not trimmed!...
DoubleReal attributeAsDouble_(const xercesc::Attributes &a, const XMLCh *name) const
Converts an attribute to a DoubleReal.
Definition: XMLHandler.h:511
Int attributeAsInt_(const xercesc::Attributes &a, const XMLCh *name) const
Converts an attribute to a Int.
Definition: XMLHandler.h:503
std::vector< std::vector< String > > cv_terms_
Array of CV term lists (one sublist denotes one term and it&#39;s children)
Definition: XMLHandler.h:192
std::vector< char * > c_strings_
Definition: XMLHandler.h:83
int Int
Signed integer type.
Definition: Types.h:100
bool optionalAttributeAsIntList_(IntList &value, const xercesc::Attributes &a, const char *name) const
Assigns the attribute content to the IntList value if the attribute is present.
Definition: XMLHandler.h:483
virtual void writeTo(std::ostream &)
Writes the contents to a stream.
Definition: XMLHandler.h:147
DoubleReal list.
Definition: DoubleList.h:56
bool optionalAttributeAsDoubleList_(DoubleList &value, const xercesc::Attributes &a, const char *name) const
Assigns the attribute content to the DoubleList value if the attribute is present.
Definition: XMLHandler.h:451
StringList attributeAsStringList_(const xercesc::Attributes &a, const XMLCh *name) const
Converts an attribute to a StringList.
Definition: XMLHandler.h:533
bool hasPrefix(const String &string) const
true if String begins with string, false otherwise
Parse Error exception.
Definition: Exception.h:608
Int list.
Definition: IntList.h:56
bool optionalAttributeAsStringList_(StringList &value, const xercesc::Attributes &a, const XMLCh *name) const
Assigns the attribute content to the StringList value if the attribute is present.
Definition: XMLHandler.h:628

OpenMS / TOPP release 1.11.1 Documentation generated on Thu Nov 14 2013 11:19:23 using doxygen 1.8.5