OpenMS
2.8.0
|
The file pendant of the Param class used to load and store the param datastructure as paramXML. More...
#include <OpenMS/FORMAT/ParamXMLFile.h>
Public Member Functions | |
ParamXMLFile () | |
Constructor. More... | |
void | store (const String &filename, const Param ¶m) const |
Write XML file. More... | |
void | writeXMLToStream (std::ostream *os_ptr, const Param ¶m) const |
Write XML to output stream. More... | |
void | load (const String &filename, Param ¶m) |
Read XML file. More... | |
Public Member Functions inherited from XMLFile | |
XMLFile () | |
Default constructor. More... | |
XMLFile (const String &schema_location, const String &version) | |
Constructor that sets the schema location. More... | |
virtual | ~XMLFile () |
Destructor. More... | |
bool | isValid (const String &filename, std::ostream &os) |
Checks if a file validates against the XML schema. More... | |
const String & | getVersion () const |
return the version of the schema More... | |
Additional Inherited Members | |
Protected Member Functions inherited from XMLFile | |
void | parse_ (const String &filename, XMLHandler *handler) |
Parses the XML file given by filename using the handler given by handler . More... | |
void | parseBuffer_ (const std::string &buffer, XMLHandler *handler) |
Parses the in-memory buffer given by buffer using the handler given by handler . More... | |
void | save_ (const String &filename, XMLHandler *handler) const |
Stores the contents of the XML handler given by handler in the file given by filename . More... | |
void | enforceEncoding_ (const String &encoding) |
Protected Attributes inherited from XMLFile | |
String | schema_location_ |
XML schema file location. More... | |
String | schema_version_ |
Version string. More... | |
String | enforced_encoding_ |
Encoding string that replaces the encoding (system dependent or specified in the XML). Disabled if empty. Used as a workaround for XTandem output xml. More... | |
The file pendant of the Param class used to load and store the param datastructure as paramXML.
A documented schema for this format can be found at https://github.com/OpenMS/OpenMS/tree/develop/share/OpenMS/SCHEMAS
ParamXMLFile | ( | ) |
Constructor.
Read XML file.
filename | The file from where to read the Param object. |
param | The param object where the read data should be stored. |
Exception::FileNotFound | is thrown if the file could not be found |
Exception::ParseError | is thrown if an error occurs during parsing |
Referenced by TOPPASBase::loadPreferences(), TOPPViewBase::loadPreferences(), main(), INIFileEditorWindow::openFile(), and DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::readEnzymesFromFile_().
Write XML file.
filename | The filename where the param data structure should be stored. |
param | The Param class that should be stored in the file. |
Exception::UnableToCreateFile | is thrown if the file could not be created |
Referenced by INIFileEditorWindow::saveFile(), INIFileEditorWindow::saveFileAs(), TOPPASBase::savePreferences(), and TOPPViewBase::savePreferences().