ARTS
2.3.1285(git:92a29ea9-dirty)
|
This file contains basic functions to handle XML data files. More...
Go to the source code of this file.
Enumerations | |
enum | FileType : Index { FILE_TYPE_ASCII = 0, FILE_TYPE_ZIPPED_ASCII = 1, FILE_TYPE_BINARY = 2 } |
enum | NumericType { NUMERIC_TYPE_FLOAT, NUMERIC_TYPE_DOUBLE } |
enum | EndianType { ENDIAN_TYPE_LITTLE, ENDIAN_TYPE_BIG } |
Functions | |
void | filename_xml (String &filename, const String &varname) |
Gives the default filename for the XML formats. More... | |
void | filename_xml_with_index (String &filename, const Index &file_index, const String &varname, const Index &digits=0) |
Gives the default filename, with file index, for the XML formats. More... | |
template<typename T > | |
void | xml_read_from_file (const String &filename, T &type, const Verbosity &verbosity) |
Reads data from XML file. More... | |
template<typename T > | |
void | xml_write_to_file (const String &filename, const T &type, const FileType ftype, const Index no_clobber, const Verbosity &verbosity) |
Write data to XML file. More... | |
template<typename T > | |
void | xml_write_to_file (const String &, const T &, FileType, const Verbosity &) |
FileType | string2filetype (const String &file_format) |
This file contains basic functions to handle XML data files.
Definition in file xml_io.h.
enum EndianType |
enum NumericType |
Gives the default filename for the XML formats.
The default name is only used if the filename is empty.
filename | filename |
varname | variable name |
Definition at line 434 of file xml_io.cc.
References out_basename.
Referenced by ReadXML(), and WriteXML().
void filename_xml_with_index | ( | String & | filename, |
const Index & | file_index, | ||
const String & | varname, | ||
const Index & | digits | ||
) |
Gives the default filename, with file index, for the XML formats.
The default name is only used if the filename is empty.
[out] | filename | filename |
[in] | file_index | Index appended to the filename |
[in] | varname | variable name |
[in] | digits | Width for padding with zeros |
Definition at line 450 of file xml_io.cc.
References out_basename, and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
Referenced by ppathWriteXMLPartial(), ReadXMLIndexed(), and WriteXMLIndexed().
Definition at line 79 of file xml_io.h.
References FILE_TYPE_ASCII, FILE_TYPE_BINARY, and FILE_TYPE_ZIPPED_ASCII.
Referenced by WriteXML().
void xml_read_from_file | ( | const String & | filename, |
T & | type, | ||
const Verbosity & | verbosity | ||
) |
Reads data from XML file.
This is a generic functions that is used to read the XML header and footer info and calls the overloaded functions to read the data.
filename | XML filename |
type | Generic return value |
Definition at line 901 of file xml_io.cc.
References CREATE_OUT2, FILE_TYPE_ASCII, find_xml_file(), xml_open_input_file(), xml_read_footer_from_stream(), xml_read_from_stream(), and xml_read_header_from_stream().
Referenced by abs_cia_dataReadFromXML(), AtmRawRead(), AtmWithNLTERawRead(), collision_coefficientsFromSplitFiles(), DOAngularGridsSet(), magfield_nk(), MagRawRead(), main(), ReadXML(), ReadXMLIndexed(), ScatElementsPndAndScatAdd(), ScatElementsToabs_speciesAdd(), ScatSpeciesPndAndScatAdd(), ScatSpeciesScatAndMetaRead(), test45(), test46(), test_xml_io(), WindRawRead(), ybatchMetProfiles(), ybatchMetProfilesClear(), and z_surfaceFromFileAndGrid().
void xml_write_to_file | ( | const String & | filename, |
const T & | type, | ||
const FileType | ftype, | ||
const Index | no_clobber, | ||
const Verbosity & | verbosity | ||
) |
Write data to XML file.
This is a generic functions that is used to write the XML header and footer info and calls the overloaded functions to write the data.
filename | XML filename |
type | Generic input value |
no_clobber | 0: Overwrite, 1: Use unique filename |
ftype | File type |
Definition at line 972 of file xml_io.cc.
References add_basedir(), CREATE_OUT2, FILE_TYPE_ASCII, FILE_TYPE_ZIPPED_ASCII, make_filename_unique(), xml_open_output_file(), xml_write_footer_to_stream(), xml_write_header_to_stream(), and xml_write_to_stream().
Referenced by DoitWriteIterationFields(), main(), test_xml_io(), WriteXML(), and ybatchMetProfilesClear().