MPQC
3.0.0-alpha
Loading...
Searching...
No Matches
xml.h
1
//
2
// xml.h
3
//
4
// Copyright (C) 2013 David Hollman
5
//
6
// Author: David Hollman
7
//
8
// This file is free software; you can redistribute it and/or modify
9
// it under the terms of the GNU General Public License as published by
10
// the Free Software Foundation; either version 2, or (at your option)
11
// any later version.
12
//
13
// This file is distributed in the hope that it will be useful,
14
// but WITHOUT ANY WARRANTY; without even the implied warranty of
15
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
// GNU General Public License for more details.
17
//
18
// You should have received a copy of the GNU General Public License
19
// along with the MPQC; see the file COPYING. If not, write to
20
// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
21
//
22
23
#ifndef XML_H_
24
#define XML_H_
25
#include <boost/property_tree/ptree.hpp>
26
#include <boost/property_tree/xml_parser.hpp>
27
28
#include <util/misc/exenv.h>
29
#include <util/misc/consumableresources.h>
30
//TODO add option to gzip data streams
31
32
namespace
sc
{
33
34
class
XMLWriter;
35
37
38
class
XMLReader
{
39
40
};
41
43
44
class
XMLWritable
:
virtual
public
RefCount
{
45
public
:
46
virtual
boost::property_tree::ptree& write_xml(boost::property_tree::ptree& pt,
const
XMLWriter
& writer) = 0;
47
virtual
~XMLWritable
() {}
48
};
49
50
class
DescribedXMLWritable
:
public
XMLWritable
,
virtual
public
DescribedClass
{
51
protected
:
52
boost::property_tree::ptree* my_ptree_ = 0;
53
virtual
boost::property_tree::ptree& get_my_ptree(boost::property_tree::ptree& parent, std::string name =
""
);
54
};
55
57
58
class
XMLReadable
{
59
public
:
60
virtual
void
read_xml(boost::property_tree::ptree& pt,
const
XMLReader
& reader) = 0;
61
virtual
~XMLReadable
() {}
62
};
63
65
66
}
// end namespace sc
67
68
69
#endif
/* XML_H_ */
sc::DescribedClass
Classes which need runtime information about themselves and their relationship to other classes can v...
Definition
class.h:233
sc::DescribedXMLWritable
Definition
xml.h:50
sc::RefCount
The base class for all reference counted objects.
Definition
ref.h:192
sc::XMLReadable
Definition
xml.h:58
sc::XMLReader
Definition
xml.h:38
sc::XMLWritable
Definition
xml.h:44
sc::XMLWriter
Definition
xmlwriter.h:223
sc
Contains all MPQC code up to version 3.
Definition
mpqcin.h:14
Generated at Wed Sep 25 2024 02:45:31 for
MPQC
3.0.0-alpha using the documentation package
Doxygen
1.12.0.