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>
26 * Read properties from an XML input stream.
28 void readProperties (std::istream &input, SGPropertyNode * start_node,
29 const std::string &base = "", int default_mode = 0,
30 bool extended = false);
34 * Read properties from an XML file.
36 void readProperties (const std::string &file, SGPropertyNode * start_node,
37 int default_mode = 0, bool extended = false);
41 * Read properties from an in-memory buffer.
43 void readProperties (const char *buf, const int size,
44 SGPropertyNode * start_node, int default_mode = 0,
45 bool extended = false);
49 * Write properties to an XML output stream.
51 void writeProperties (std::ostream &output, const SGPropertyNode * start_node,
52 bool write_all = false,
53 SGPropertyNode::Attribute archive_flag = SGPropertyNode::ARCHIVE);
57 * Write properties to an XML file.
59 void writeProperties (const std::string &file,
60 const SGPropertyNode * start_node,
61 bool write_all = false,
62 SGPropertyNode::Attribute archive_flag = SGPropertyNode::ARCHIVE);
66 * Copy properties from one node to another.
68 bool copyProperties (const SGPropertyNode *in, SGPropertyNode *out);
71 #endif // __PROPS_IO_HXX
73 // end of props_io.hxx