ARTS 2.5.11 (git: 6827797f)
xml_io_general_types.cc File Reference

This file contains basic functions to handle XML data files. More...

#include "arts.h"
#include "xml_io_base.h"
#include "double_imanip.h"

Go to the source code of this file.

Functions

void xml_read_from_stream (istream &is_xml, Index &index, bifstream *pbifs, const Verbosity &verbosity)
 Reads Index from XML input stream.
 
void xml_write_to_stream (ostream &os_xml, const Index &index, bofstream *pbofs, const String &name, const Verbosity &verbosity)
 Writes Index to XML output stream.
 
void xml_read_from_stream (istream &is_xml, Matrix &matrix, bifstream *pbifs, const Verbosity &verbosity)
 Reads Matrix from XML input stream.
 
void xml_write_to_stream (ostream &os_xml, const Matrix &matrix, bofstream *pbofs, const String &name, const Verbosity &verbosity)
 Writes Matrix to XML output stream.
 
void xml_read_from_stream (istream &is_xml, Numeric &numeric, bifstream *pbifs, const Verbosity &verbosity)
 Reads Numeric from XML input stream.
 
void xml_write_to_stream (ostream &os_xml, const Numeric &numeric, bofstream *pbofs, const String &name, const Verbosity &verbosity)
 Writes Numeric to XML output stream.
 
void xml_read_from_stream (istream &is_xml, Sparse &sparse, bifstream *pbifs, const Verbosity &verbosity)
 Reads Sparse from XML input stream.
 
void xml_write_to_stream (ostream &os_xml, const Sparse &sparse, bofstream *pbofs, const String &name, const Verbosity &verbosity)
 Writes Sparse to XML output stream.
 
void xml_read_from_stream (istream &is_xml, String &str, bifstream *, const Verbosity &verbosity)
 Reads String from XML input stream.
 
void xml_write_to_stream (ostream &os_xml, const String &str, bofstream *, const String &name, const Verbosity &verbosity)
 Writes String to XML output stream.
 
void xml_read_from_stream (istream &is_xml, Tensor3 &tensor, bifstream *pbifs, const Verbosity &verbosity)
 Reads Tensor3 from XML input stream.
 
void xml_write_to_stream (ostream &os_xml, const Tensor3 &tensor, bofstream *pbofs, const String &name, const Verbosity &verbosity)
 Writes Tensor3 to XML output stream.
 
void xml_read_from_stream (istream &is_xml, Tensor4 &tensor, bifstream *pbifs, const Verbosity &verbosity)
 Reads Tensor4 from XML input stream.
 
void xml_write_to_stream (ostream &os_xml, const Tensor4 &tensor, bofstream *pbofs, const String &name, const Verbosity &verbosity)
 Writes Tensor4 to XML output stream.
 
void xml_read_from_stream (istream &is_xml, Tensor5 &tensor, bifstream *pbifs, const Verbosity &verbosity)
 Reads Tensor5 from XML input stream.
 
void xml_write_to_stream (ostream &os_xml, const Tensor5 &tensor, bofstream *pbofs, const String &name, const Verbosity &verbosity)
 Writes Tensor5 to XML output stream.
 
void xml_read_from_stream (istream &is_xml, Tensor6 &tensor, bifstream *pbifs, const Verbosity &verbosity)
 Reads Tensor6 from XML input stream.
 
void xml_write_to_stream (ostream &os_xml, const Tensor6 &tensor, bofstream *pbofs, const String &name, const Verbosity &verbosity)
 Writes Tensor6 to XML output stream.
 
void xml_read_from_stream (istream &is_xml, Tensor7 &tensor, bifstream *pbifs, const Verbosity &verbosity)
 Reads Tensor7 from XML input stream.
 
void xml_write_to_stream (ostream &os_xml, const Tensor7 &tensor, bofstream *pbofs, const String &name, const Verbosity &verbosity)
 Writes Tensor7 to XML output stream.
 
void xml_parse_from_stream (istream &is_xml, Vector &vector, bifstream *pbifs, XMLTag &tag, const Verbosity &)
 Parses Vector from XML input stream.
 
void xml_read_from_stream (istream &is_xml, Vector &vector, bifstream *pbifs, const Verbosity &verbosity)
 Reads Vector from XML input stream.
 
void xml_write_to_stream (ostream &os_xml, const Vector &vector, bofstream *pbofs, const String &name, const Verbosity &verbosity)
 Writes Vector to XML output stream.
 

Detailed Description

This file contains basic functions to handle XML data files.

Author
Oliver Lemke olemk.nosp@m.e@co.nosp@m.re-du.nosp@m.mp.i.nosp@m.nfo
Date
2003-06-11

Definition in file xml_io_general_types.cc.

Function Documentation

◆ xml_parse_from_stream()

void xml_parse_from_stream ( istream &  is_xml,
Vector &  vector,
bifstream pbifs,
XMLTag tag,
const Verbosity verbosity 
)

Parses Vector from XML input stream.

Parameters
is_xmlXML Input stream
vectorVector return value
pbifsPointer to binary input stream. NULL in case of ASCII file.
tagXML tag object

Definition at line 1077 of file xml_io_general_types.cc.

References XMLTag::get_attribute_value(), binistream::readDoubleArray(), and xml_data_parse_error().

Referenced by xml_read_from_stream().

◆ xml_read_from_stream() [1/11]

void xml_read_from_stream ( istream &  is_xml,
Index &  index,
bifstream pbifs,
const Verbosity verbosity 
)

Reads Index from XML input stream.

Parameters
is_xmlXML Input stream
indexIndex return value
pbifsPointer to binary input stream. NULL in case of ASCII file.

Definition at line 29 of file xml_io_general_types.cc.

References XMLTag::check_name(), XMLTag::read_from_stream(), and xml_data_parse_error().

◆ xml_read_from_stream() [2/11]

void xml_read_from_stream ( istream &  is_xml,
Matrix &  matrix,
bifstream pbifs,
const Verbosity verbosity 
)

Reads Matrix from XML input stream.

Parameters
is_xmlXML Input stream
matrixMatrix return value
pbifsPointer to binary input stream. NULL in case of ASCII file.

Definition at line 92 of file xml_io_general_types.cc.

References c, XMLTag::check_name(), XMLTag::get_attribute_value(), XMLTag::read_from_stream(), binistream::readDoubleArray(), and xml_data_parse_error().

◆ xml_read_from_stream() [3/11]

void xml_read_from_stream ( istream &  is_xml,
Numeric &  numeric,
bifstream pbifs,
const Verbosity verbosity 
)

Reads Numeric from XML input stream.

Parameters
is_xmlXML Input stream
numericNumeric return value
pbifsPointer to binary input stream. NULL in case of ASCII file.

Definition at line 182 of file xml_io_general_types.cc.

References XMLTag::check_name(), XMLTag::read_from_stream(), and xml_data_parse_error().

◆ xml_read_from_stream() [4/11]

void xml_read_from_stream ( istream &  is_xml,
Sparse &  sparse,
bifstream pbifs,
const Verbosity verbosity 
)

Reads Sparse from XML input stream.

Parameters
is_xmlXML Input stream
sparseSparse return value
pbifsPointer to binary input stream, NULL in case of ASCII file.

Definition at line 247 of file xml_io_general_types.cc.

References XMLTag::check_name(), XMLTag::get_attribute_value(), XMLTag::read_from_stream(), binistream::readDoubleArray(), and xml_data_parse_error().

◆ xml_read_from_stream() [5/11]

void xml_read_from_stream ( istream &  is_xml,
String str,
bifstream ,
const Verbosity verbosity 
)

Reads String from XML input stream.

Parameters
is_xmlXML Input stream
strString return value

Definition at line 443 of file xml_io_general_types.cc.

References XMLTag::check_name(), XMLTag::read_from_stream(), and xml_parse_error().

◆ xml_read_from_stream() [6/11]

void xml_read_from_stream ( istream &  is_xml,
Tensor3 &  tensor,
bifstream pbifs,
const Verbosity verbosity 
)

Reads Tensor3 from XML input stream.

Parameters
is_xmlXML Input stream
tensorTensor return value
pbifsPointer to binary input stream. NULL in case of ASCII file.

Definition at line 531 of file xml_io_general_types.cc.

References c, XMLTag::check_name(), XMLTag::get_attribute_value(), XMLTag::read_from_stream(), binistream::readDoubleArray(), and xml_data_parse_error().

◆ xml_read_from_stream() [7/11]

void xml_read_from_stream ( istream &  is_xml,
Tensor4 &  tensor,
bifstream pbifs,
const Verbosity verbosity 
)

Reads Tensor4 from XML input stream.

Parameters
is_xmlXML Input stream
tensorTensor return value
pbifsPointer to binary input stream. NULL in case of ASCII file.

Definition at line 626 of file xml_io_general_types.cc.

References b, c, XMLTag::check_name(), XMLTag::get_attribute_value(), XMLTag::read_from_stream(), binistream::readDoubleArray(), and xml_data_parse_error().

◆ xml_read_from_stream() [8/11]

void xml_read_from_stream ( istream &  is_xml,
Tensor5 &  tensor,
bifstream pbifs,
const Verbosity verbosity 
)

Reads Tensor5 from XML input stream.

Parameters
is_xmlXML Input stream
tensorTensor return value
pbifsPointer to binary input stream. NULL in case of ASCII file.

Definition at line 728 of file xml_io_general_types.cc.

References b, c, XMLTag::check_name(), XMLTag::get_attribute_value(), XMLTag::read_from_stream(), binistream::readDoubleArray(), and xml_data_parse_error().

◆ xml_read_from_stream() [9/11]

void xml_read_from_stream ( istream &  is_xml,
Tensor6 &  tensor,
bifstream pbifs,
const Verbosity verbosity 
)

Reads Tensor6 from XML input stream.

Parameters
is_xmlXML Input stream
tensorTensor return value
pbifsPointer to binary input stream. NULL in case of ASCII file.

Definition at line 837 of file xml_io_general_types.cc.

References b, c, XMLTag::check_name(), XMLTag::get_attribute_value(), XMLTag::read_from_stream(), binistream::readDoubleArray(), v, and xml_data_parse_error().

◆ xml_read_from_stream() [10/11]

void xml_read_from_stream ( istream &  is_xml,
Tensor7 &  tensor,
bifstream pbifs,
const Verbosity verbosity 
)

Reads Tensor7 from XML input stream.

Parameters
is_xmlXML Input stream
tensorTensor return value
pbifsPointer to binary input stream. NULL in case of ASCII file.

Definition at line 953 of file xml_io_general_types.cc.

References b, c, XMLTag::check_name(), XMLTag::get_attribute_value(), XMLTag::read_from_stream(), binistream::readDoubleArray(), v, and xml_data_parse_error().

◆ xml_read_from_stream() [11/11]

void xml_read_from_stream ( istream &  is_xml,
Vector &  vector,
bifstream pbifs,
const Verbosity verbosity 
)

Reads Vector from XML input stream.

Parameters
is_xmlXML Input stream
vectorVector return value
pbifsPointer to binary input stream. NULL in case of ASCII file.

Definition at line 1108 of file xml_io_general_types.cc.

References XMLTag::check_name(), XMLTag::read_from_stream(), and xml_parse_from_stream().

◆ xml_write_to_stream() [1/11]

void xml_write_to_stream ( ostream &  os_xml,
const Index &  index,
bofstream pbofs,
const String name,
const Verbosity verbosity 
)

Writes Index to XML output stream.

Parameters
os_xmlXML Output stream
indexIndex value
pbofsPointer to binary file stream. NULL for ASCII output.
nameOptional name attribute

Definition at line 61 of file xml_io_general_types.cc.

References XMLTag::add_attribute(), XMLTag::set_name(), and XMLTag::write_to_stream().

◆ xml_write_to_stream() [2/11]

void xml_write_to_stream ( ostream &  os_xml,
const Matrix &  matrix,
bofstream pbofs,
const String name,
const Verbosity verbosity 
)

Writes Matrix to XML output stream.

Parameters
os_xmlXML Output stream
matrixMatrix
pbofsPointer to binary file stream. NULL for ASCII output.
nameOptional name attribute

Definition at line 133 of file xml_io_general_types.cc.

References XMLTag::add_attribute(), c, XMLTag::set_name(), XMLTag::write_to_stream(), and xml_set_stream_precision().

◆ xml_write_to_stream() [3/11]

void xml_write_to_stream ( ostream &  os_xml,
const Numeric &  numeric,
bofstream pbofs,
const String name,
const Verbosity verbosity 
)

Writes Numeric to XML output stream.

Parameters
os_xmlXML Output stream
numericNumeric value
pbofsPointer to binary file stream. NULL for ASCII output.
nameOptional name attribute

Definition at line 214 of file xml_io_general_types.cc.

References XMLTag::add_attribute(), XMLTag::set_name(), XMLTag::write_to_stream(), and xml_set_stream_precision().

◆ xml_write_to_stream() [4/11]

void xml_write_to_stream ( ostream &  os_xml,
const Sparse &  sparse,
bofstream pbofs,
const String name,
const Verbosity verbosity 
)

Writes Sparse to XML output stream.

Parameters
os_xmlXML Output stream
sparseSparse
pbofsPointer to binary file stream. NULL for ASCII output.
nameOptional name attribute

Definition at line 347 of file xml_io_general_types.cc.

References XMLTag::add_attribute(), XMLTag::set_name(), XMLTag::write_to_stream(), and xml_set_stream_precision().

◆ xml_write_to_stream() [5/11]

void xml_write_to_stream ( ostream &  os_xml,
const String str,
bofstream ,
const String name,
const Verbosity verbosity 
)

Writes String to XML output stream.

Parameters
os_xmlXML Output stream
strString value
nameOptional name attribute

Definition at line 503 of file xml_io_general_types.cc.

References XMLTag::add_attribute(), XMLTag::set_name(), and XMLTag::write_to_stream().

◆ xml_write_to_stream() [6/11]

void xml_write_to_stream ( ostream &  os_xml,
const Tensor3 &  tensor,
bofstream pbofs,
const String name,
const Verbosity verbosity 
)

Writes Tensor3 to XML output stream.

Parameters
os_xmlXML Output stream
tensorTensor
pbofsPointer to binary file stream. NULL for ASCII output.
nameOptional name attribute

Definition at line 576 of file xml_io_general_types.cc.

References XMLTag::add_attribute(), c, XMLTag::set_name(), XMLTag::write_to_stream(), and xml_set_stream_precision().

◆ xml_write_to_stream() [7/11]

void xml_write_to_stream ( ostream &  os_xml,
const Tensor4 &  tensor,
bofstream pbofs,
const String name,
const Verbosity verbosity 
)

Writes Tensor4 to XML output stream.

Parameters
os_xmlXML Output stream
tensorTensor
pbofsPointer to binary file stream. NULL for ASCII output.
nameOptional name attribute

Definition at line 675 of file xml_io_general_types.cc.

References XMLTag::add_attribute(), b, c, XMLTag::set_name(), XMLTag::write_to_stream(), and xml_set_stream_precision().

◆ xml_write_to_stream() [8/11]

void xml_write_to_stream ( ostream &  os_xml,
const Tensor5 &  tensor,
bofstream pbofs,
const String name,
const Verbosity verbosity 
)

Writes Tensor5 to XML output stream.

Parameters
os_xmlXML Output stream
tensorTensor
pbofsPointer to binary file stream. NULL for ASCII output.
nameOptional name attribute

Definition at line 781 of file xml_io_general_types.cc.

References XMLTag::add_attribute(), b, c, XMLTag::set_name(), XMLTag::write_to_stream(), and xml_set_stream_precision().

◆ xml_write_to_stream() [9/11]

void xml_write_to_stream ( ostream &  os_xml,
const Tensor6 &  tensor,
bofstream pbofs,
const String name,
const Verbosity verbosity 
)

Writes Tensor6 to XML output stream.

Parameters
os_xmlXML Output stream
tensorTensor
pbofsPointer to binary file stream. NULL for ASCII output.
nameOptional name attribute

Definition at line 894 of file xml_io_general_types.cc.

References XMLTag::add_attribute(), b, c, XMLTag::set_name(), v, XMLTag::write_to_stream(), and xml_set_stream_precision().

◆ xml_write_to_stream() [10/11]

void xml_write_to_stream ( ostream &  os_xml,
const Tensor7 &  tensor,
bofstream pbofs,
const String name,
const Verbosity verbosity 
)

Writes Tensor7 to XML output stream.

Parameters
os_xmlXML Output stream
tensorTensor
pbofsPointer to binary file stream. NULL for ASCII output.
nameOptional name attribute

Definition at line 1014 of file xml_io_general_types.cc.

References XMLTag::add_attribute(), b, c, XMLTag::set_name(), v, XMLTag::write_to_stream(), and xml_set_stream_precision().

◆ xml_write_to_stream() [11/11]

void xml_write_to_stream ( ostream &  os_xml,
const Vector &  vector,
bofstream pbofs,
const String name,
const Verbosity verbosity 
)

Writes Vector to XML output stream.

Parameters
os_xmlXML Output stream
vectorVector
pbofsPointer to binary file stream. NULL for ASCII output.
nameOptional name attribute

Definition at line 1130 of file xml_io_general_types.cc.

References XMLTag::add_attribute(), XMLTag::set_name(), v, XMLTag::write_to_stream(), and xml_set_stream_precision().