xml_io.h File Reference

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

#include "mystring.h"
#include "absorption.h"

Include dependency graph for xml_io.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  FileType { FILE_TYPE_ASCII, FILE_TYPE_ZIPPED_ASCII, FILE_TYPE_BINARY }
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.
void filename_xml_with_index (String &filename, const Index &file_index, const String &varname)
 Gives the default filename, with file index, for the XML formats.
template<typename T>
void xml_read_from_file (const String &filename, T &type)
 Reads data from XML file.
void xml_read_arts_catalogue_from_file (const String &filename, ArrayOfLineRecord &type, const Numeric &fmin, const Numeric &fmax)
template<typename T>
void xml_write_to_file (const String &filename, const T &type, const FileType ftype=FILE_TYPE_ASCII)
 Write data to XML file.


Detailed Description

This file contains basic functions to handle XML data files.

Author:
Oliver Lemke <olemke@core-dump.info>
Date:
2002-05-10

Definition in file xml_io.h.


Enumeration Type Documentation

enum EndianType

Enumerator:
ENDIAN_TYPE_LITTLE 
ENDIAN_TYPE_BIG 

Definition at line 45 of file xml_io.h.

enum FileType

Enumerator:
FILE_TYPE_ASCII 
FILE_TYPE_ZIPPED_ASCII 
FILE_TYPE_BINARY 

Definition at line 38 of file xml_io.h.

Enumerator:
NUMERIC_TYPE_FLOAT 
NUMERIC_TYPE_DOUBLE 

Definition at line 44 of file xml_io.h.


Function Documentation

void filename_xml ( String filename,
const String varname 
)

Gives the default filename for the XML formats.

The default name is only used if the filename is empty.

Parameters:
filename filename
varname variable name

Definition at line 362 of file xml_io.cc.

References out_basename.

Referenced by Cloudbox_ppath_rteCalc(), ReadXML(), and WriteXML().

void filename_xml_with_index ( String filename,
const Index file_index,
const String varname 
)

Gives the default filename, with file index, for the XML formats.

The default name is only used if the filename is empty.

Parameters:
[out] filename filename
[in] file_index Index appended to the filename
[in] varname variable name

Definition at line 383 of file xml_io.cc.

References out_basename.

Referenced by WriteXMLIndexed().

void xml_read_arts_catalogue_from_file ( const String filename,
ArrayOfLineRecord type,
const Numeric fmin,
const Numeric fmax 
)

template<typename T>
void xml_read_from_file ( const String filename,
T &  type 
) [inline]

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.

Parameters:
filename XML filename
type Generic return value

Definition at line 847 of file xml_io.cc.

References FILE_TYPE_ASCII, find_file(), out2, xml_open_input_file(), xml_read_footer_from_stream(), xml_read_from_stream(), and xml_read_header_from_stream().

Referenced by AtmRawRead(), DoitAngularGridsSet(), magfield_nk(), main(), ParticleTypeAdd(), ParticleTypeAddAll(), ReadXML(), test45(), test46(), ybatchMetProfiles(), and ybatchMetProfilesClear().

template<typename T>
void xml_write_to_file ( const String filename,
const T &  type,
const FileType  ftype 
) [inline]

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.

Parameters:
filename XML filename
type Generic input value
ftype File type

Definition at line 1002 of file xml_io.cc.

References FILE_TYPE_ASCII, FILE_TYPE_ZIPPED_ASCII, out2, xml_open_output_file(), xml_write_footer_to_stream(), xml_write_header_to_stream(), and xml_write_to_stream().

Referenced by Cloudbox_ppath_rteCalc(), DoitWriteIterationFields(), main(), scat_data_rawCheck(), test45(), test46(), WriteXML(), and ybatchMetProfilesClear().


Generated on Mon Mar 23 14:06:55 2009 for ARTS by  doxygen 1.5.6