ARTS  2.2.66
xml_io.h
Go to the documentation of this file.
1 /* Copyright (C) 2002-2012 Oliver Lemke <olemke@core-dump.info>
2 
3  This program is free software; you can redistribute it and/or modify it
4  under the terms of the GNU General Public License as published by the
5  Free Software Foundation; either version 2, or (at your option) any
6  later version.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16  USA. */
17 
18 
20 // File description
22 
32 #ifndef xml_io_h
33 #define xml_io_h
34 
35 #include "mystring.h"
36 #include "absorption.h"
37 
38 enum FileType{
42 };
43 
46 
47 
49 // Default file names
51 
52 void filename_xml(String& filename, const String& varname);
53 
54 void filename_xml_with_index(String& filename,
55  const Index& file_index,
56  const String& varname);
57 
58 
60 // Generic IO routines for XML files
62 
63 template<typename T>
64 void xml_read_from_file(const String& filename,
65  T& type,
66  const Verbosity& verbosity);
67 
68 void xml_read_arts_catalogue_from_file(const String& filename,
69  ArrayOfLineRecord& type,
70  const Numeric& fmin,
71  const Numeric& fmax,
72  const Verbosity& verbosity);
73 
74 template<typename T>
75 void xml_write_to_file(const String& filename,
76  const T& type,
77  const FileType ftype,
78  const Index no_clobber,
79  const Verbosity& verbosity);
80 
81 template<typename T>
82 void xml_read_from_file(const String&, T&, const Verbosity&);
83 
84 template<typename T>
85 void xml_write_to_file(const String&, const T&, FileType, const Verbosity&);
86 
87 #endif
NumericType
NumericType
Definition: xml_io.h:44
absorption.h
Declarations required for the calculation of absorption coefficients.
FILE_TYPE_BINARY
@ FILE_TYPE_BINARY
Definition: xml_io.h:41
xml_read_arts_catalogue_from_file
void xml_read_arts_catalogue_from_file(const String &filename, ArrayOfLineRecord &type, const Numeric &fmin, const Numeric &fmax, const Verbosity &verbosity)
Definition: xml_io.cc:900
xml_read_from_file
void xml_read_from_file(const String &filename, T &type, const Verbosity &verbosity)
Reads data from XML file.
Definition: xml_io.cc:831
Array
This can be used to make arrays out of anything.
Definition: array.h:107
NUMERIC_TYPE_DOUBLE
@ NUMERIC_TYPE_DOUBLE
Definition: xml_io.h:44
FILE_TYPE_ZIPPED_ASCII
@ FILE_TYPE_ZIPPED_ASCII
Definition: xml_io.h:40
my_basic_string
The implementation for String, the ARTS string class.
Definition: mystring.h:64
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:29
Verbosity
Definition: messages.h:50
xml_write_to_file
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.
Definition: xml_io.cc:982
filename_xml_with_index
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.
Definition: xml_io.cc:370
ENDIAN_TYPE_LITTLE
@ ENDIAN_TYPE_LITTLE
Definition: xml_io.h:45
filename_xml
void filename_xml(String &filename, const String &varname)
Gives the default filename for the XML formats.
Definition: xml_io.cc:350
NUMERIC_TYPE_FLOAT
@ NUMERIC_TYPE_FLOAT
Definition: xml_io.h:44
FileType
FileType
Definition: xml_io.h:38
ENDIAN_TYPE_BIG
@ ENDIAN_TYPE_BIG
Definition: xml_io.h:45
EndianType
EndianType
Definition: xml_io.h:45
FILE_TYPE_ASCII
@ FILE_TYPE_ASCII
Definition: xml_io.h:39
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:35
mystring.h
This file contains the definition of String, the ARTS string class.