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.
7 * See props.html for documentation [replace with URL when available].
12 #ifndef __PROPS_IO_HXX
13 #define __PROPS_IO_HXX
15 #include <simgear/compiler.h>
16 #include <simgear/props/props.hxx>
28 SG_USING_STD(istream);
29 SG_USING_STD(ostream);
32 * Read properties from an XML input stream.
34 void readProperties (istream &input, SGPropertyNode * start_node,
35 const string &base = "", int default_mode = 0);
39 * Read properties from an XML file.
41 void readProperties (const string &file, SGPropertyNode * start_node,
42 int default_mode = 0);
46 * Read properties from an in-memory buffer.
48 void readProperties (const char *buf, const int size,
49 SGPropertyNode * start_node, int default_mode = 0);
53 * Write properties to an XML output stream.
55 void writeProperties (ostream &output, const SGPropertyNode * start_node,
56 bool write_all = false,
57 SGPropertyNode::Attribute archive_flag = SGPropertyNode::ARCHIVE);
61 * Write properties to an XML file.
63 void writeProperties (const string &file, const SGPropertyNode * start_node,
64 bool write_all = false,
65 SGPropertyNode::Attribute archive_flag = SGPropertyNode::ARCHIVE);
69 * Copy properties from one node to another.
71 bool copyProperties (const SGPropertyNode *in, SGPropertyNode *out);
74 #endif // __PROPS_IO_HXX
76 // end of props_io.hxx