xml_io_private.h File Reference

This file contains private function declarations and template instantiation to handle XML data files. More...

#include "xml_io.h"
#include <stdexcept>
#include <cfloat>
#include "matpackVII.h"
#include "array.h"
#include "messages.h"
#include "ppath.h"
#include "agenda_class.h"
#include "absorption.h"
#include "gas_abs_lookup.h"
#include "optproperties.h"
#include "bifstream.h"
#include "bofstream.h"

Include dependency graph for xml_io_private.h:

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

Go to the source code of this file.

Classes

class  XMLAttribute
 XML attribute class. More...
class  ArtsXMLTag
 The ARTS XML tag class. More...

Functions

void xml_open_output_file (ostream &file, const String &name)
void xml_open_input_file (ifstream &file, const String &name)
 Open file for XML input.
void xml_parse_error (const String &str_error)
 Throws XML parser runtime error.
void xml_data_parse_error (ArtsXMLTag &tag, String str_error)
 Throws XML parser runtime error.
void xml_read_header_from_stream (istream &is, FileType &ftype, NumericType &ntype, EndianType &etype)
 Reads XML header and root tag.
void xml_read_footer_from_stream (istream &is)
 Reads closing root tag.
void xml_write_header_to_stream (ostream &os, FileType ftype)
 Writes XML header and root tag.
void xml_write_footer_to_stream (ostream &os)
 Write closing root tag.
void xml_set_stream_precision (ostream &os)


Detailed Description

This file contains private function declarations and template instantiation to handle XML data files.

Author:
Oliver Lemke <olemke@core-dump.info>
Date:
2002-11-06

Definition in file xml_io_private.h.


Function Documentation

void xml_data_parse_error ( ArtsXMLTag tag,
String  str_error 
)

Throws XML parser runtime error.

This is used quite often inside the data parsing routines so it's a function for itself.

Parameters:
tag ArtsXMLTag
str_error Error description

Definition at line 635 of file xml_io.cc.

References ArtsXMLTag::write_to_stream().

Referenced by xml_parse_from_stream(), and xml_read_from_stream().

void xml_open_input_file ( ifstream &  ifs,
const String name 
)

Open file for XML input.

This function opens an XML file for reading.

Parameters:
ifs Input filestream
name Filename

Definition at line 521 of file xml_io.cc.

References out3.

Referenced by xml_read_arts_catalogue_from_file(), and xml_read_from_file().

void xml_open_output_file ( ostream &  file,
const String name 
)

void xml_parse_error ( const String str_error  ) 

Throws XML parser runtime error.

This is used quite often inside the parsing routines so it's a function for itself.

Parameters:
str_error Error description

Definition at line 617 of file xml_io.cc.

Referenced by ArtsXMLTag::check_attribute(), ArtsXMLTag::check_name(), ArtsXMLTag::get_attribute_value(), ArtsXMLTag::read_from_stream(), xml_read_from_stream(), and xml_read_header_from_stream().

void xml_read_footer_from_stream ( istream &  is  ) 

Reads closing root tag.

Checks whether XML file ends correctly with </arts>.

Parameters:
is Input stream

Definition at line 756 of file xml_io.cc.

References ArtsXMLTag::check_name(), and ArtsXMLTag::read_from_stream().

Referenced by xml_read_arts_catalogue_from_file(), and xml_read_from_file().

void xml_read_header_from_stream ( istream &  is,
FileType ftype,
NumericType ntype,
EndianType etype 
)

Reads XML header and root tag.

Check whether XML file has correct version tag and reads arts root tag information.

Parameters:
is Input stream
ftype File type
ntype Numeric type
etype Endian type

Definition at line 658 of file xml_io.cc.

References ArtsXMLTag::check_name(), ENDIAN_TYPE_BIG, ENDIAN_TYPE_LITTLE, FILE_TYPE_ASCII, FILE_TYPE_BINARY, ArtsXMLTag::get_attribute_value(), NUMERIC_TYPE_DOUBLE, NUMERIC_TYPE_FLOAT, ArtsXMLTag::read_from_stream(), and xml_parse_error().

Referenced by xml_read_arts_catalogue_from_file(), and xml_read_from_file().

void xml_set_stream_precision ( ostream &  os  ) 

Definition at line 815 of file xml_io.cc.

References precision.

Referenced by xml_write_to_stream().

void xml_write_footer_to_stream ( ostream &  os  ) 

Write closing root tag.

Parameters:
os Output stream

Definition at line 804 of file xml_io.cc.

References ArtsXMLTag::set_name(), and ArtsXMLTag::write_to_stream().

Referenced by xml_write_to_file().

void xml_write_header_to_stream ( ostream &  os,
FileType  ftype 
)

Writes XML header and root tag.

Parameters:
os Output stream
ftype File type

Definition at line 771 of file xml_io.cc.

References ArtsXMLTag::add_attribute(), FILE_TYPE_ASCII, FILE_TYPE_BINARY, FILE_TYPE_ZIPPED_ASCII, ArtsXMLTag::set_name(), and ArtsXMLTag::write_to_stream().

Referenced by xml_write_to_file().


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