]> git.mxchange.org Git - simgear.git/blob - simgear/props/props_io.hxx
Add support for parsing an xml stream from an in memory buffer, rather than
[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 = "");
36
37
38 /**
39  * Read properties from an XML file.
40  */
41 void readProperties (const string &file, SGPropertyNode * start_node);
42
43
44 /**
45  * Read properties from an in-memory buffer.
46  */
47 void readProperties (const char *buf, const int size,
48                      SGPropertyNode * start_node);
49
50
51 /**
52  * Write properties to an XML output stream.
53  */
54 void writeProperties (ostream &output, const SGPropertyNode * start_node,
55                       bool write_all = false);
56
57
58 /**
59  * Write properties to an XML file.
60  */
61 void writeProperties (const string &file, const SGPropertyNode * start_node,
62                       bool write_all = false);
63
64
65 /**
66  * Copy properties from one node to another.
67  */
68 bool copyProperties (const SGPropertyNode *in, SGPropertyNode *out);
69
70
71 #endif // __PROPS_IO_HXX
72
73 // end of props_io.hxx