ARTS  2.2.66
test_xml.cc
Go to the documentation of this file.
1 /* Copyright (C) 2003-2012 Oliver Lemke <olemke@core-dump.info>
2 
3  This program is free software; you can redistribute it and/or
4  modify it under the terms of the GNU General Public License as
5  published by the Free Software Foundation; either version 2 of the
6  License, or (at your option) any 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 #include <iostream>
19 #include "arts.h"
20 #include "matpackII.h"
21 #include "xml_io.h"
22 #include "exceptions.h"
23 #include "absorption.h"
24 #include "global_data.h"
25 
26 
27 int
28 main (int /*argc*/, char * /*argv*/ [])
29 {
31 
33  try
34  {
36  cout << "Wrote species_data: " << endl;
37 
38  Array<SpeciesRecord> my_species_data;
39 
40  xml_read_from_file ("sdata1.xml", my_species_data, Verbosity());
41  cout << "Read species_data: " << endl;
42 
43  xml_write_to_file ("sdata2.xml", my_species_data, FILE_TYPE_ASCII, 0, Verbosity());
44  cout << "Wrote species_data: " << endl;
45  }
46  catch (runtime_error e)
47  {
48  cerr << e.what ();
49  }
50 
51  return (0);
52 }
exceptions.h
The declarations of all the exception classes.
absorption.h
Declarations required for the calculation of absorption coefficients.
global_data::species_data
const Array< SpeciesRecord > species_data
Species Data.
Definition: partition_function_data.cc:43
Array
This can be used to make arrays out of anything.
Definition: array.h:107
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
Verbosity
Definition: messages.h:50
global_data.h
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
matpackII.h
Header file for sparse matrices.
FILE_TYPE_ASCII
@ FILE_TYPE_ASCII
Definition: xml_io.h:39
main
int main(int, char *[])
Definition: test_xml.cc:28
define_species_data
void define_species_data()
Definition: species_data.cc:158
arts.h
The global header file for ARTS.
xml_io.h
This file contains basic functions to handle XML data files.