]> git.mxchange.org Git - simgear.git/blob - simgear/props/props_io.hxx
- new FSF addresses
[simgear.git] / simgear / props / props_io.hxx
1 /**
2  * \file props_io.hxx
3  * Interface definition for property list io.
4  * Started Fall 2000 by David Megginson, david@megginson.com
5  * This code is released into the Public Domain.
6  *
7  * See props.html for documentation [replace with URL when available].
8  *
9  * $Id$
10  */
11
12 #ifndef __PROPS_IO_HXX
13 #define __PROPS_IO_HXX
14
15 #include <simgear/compiler.h>
16 #include <simgear/props/props.hxx>
17
18 #include <stdio.h>
19
20 #include STL_STRING
21 #include <vector>
22 #include <map>
23 #include STL_IOSTREAM
24
25 SG_USING_STD(string);
26 SG_USING_STD(vector);
27 SG_USING_STD(map);
28 SG_USING_STD(istream);
29 SG_USING_STD(ostream);
30
31 /**
32  * Read properties from an XML input stream.
33  */
34 void readProperties (istream &input, SGPropertyNode * start_node,
35                      const string &base = "", int default_mode = 0);
36
37
38 /**
39  * Read properties from an XML file.
40  */
41 void readProperties (const string &file, SGPropertyNode * start_node,
42                      int default_mode = 0);
43
44
45 /**
46  * Read properties from an in-memory buffer.
47  */
48 void readProperties (const char *buf, const int size,
49                      SGPropertyNode * start_node, int default_mode = 0);
50
51
52 /**
53  * Write properties to an XML output stream.
54  */
55 void writeProperties (ostream &output, const SGPropertyNode * start_node,
56                       bool write_all = false,
57                       SGPropertyNode::Attribute archive_flag = SGPropertyNode::ARCHIVE);
58
59
60 /**
61  * Write properties to an XML file.
62  */
63 void writeProperties (const string &file, const SGPropertyNode * start_node,
64                       bool write_all = false,
65                       SGPropertyNode::Attribute archive_flag = SGPropertyNode::ARCHIVE);
66
67
68 /**
69  * Copy properties from one node to another.
70  */
71 bool copyProperties (const SGPropertyNode *in, SGPropertyNode *out);
72
73
74 #endif // __PROPS_IO_HXX
75
76 // end of props_io.hxx