]> git.mxchange.org Git - simgear.git/blob - simgear/misc/props_io.hxx
Added a ptr() method to SGPropertyNode_ptr to get the raw pointer.
[simgear.git] / simgear / misc / 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/misc/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 #if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
29 SG_USING_STD(istream);
30 SG_USING_STD(ostream);
31 #endif
32
33 /**
34  * Read properties from an XML input stream.
35  */
36 void readProperties (istream &input, SGPropertyNode * start_node,
37                      const string &base = "");
38
39
40 /**
41  * Read properties from an XML file.
42  */
43 void readProperties (const string &file, SGPropertyNode * start_node);
44
45
46 /**
47  * Write properties to an XML output stream.
48  */
49 void writeProperties (ostream &output, const SGPropertyNode * start_node,
50                       bool write_all = false);
51
52
53 /**
54  * Write properties to an XML file.
55  */
56 void writeProperties (const string &file, const SGPropertyNode * start_node,
57                       bool write_all = false);
58
59
60 /**
61  * Copy properties from one node to another.
62  */
63 bool copyProperties (const SGPropertyNode *in, SGPropertyNode *out);
64
65
66 #endif // __PROPS_IO_HXX
67
68 // end of props_io.hxx