]> git.mxchange.org Git - simgear.git/commitdiff
Patches from Tony Peden to separate property XML I/O operations into a
authordavid <david>
Fri, 15 Mar 2002 23:16:46 +0000 (23:16 +0000)
committerdavid <david>
Fri, 15 Mar 2002 23:16:46 +0000 (23:16 +0000)
separate header file.  This change will help integrate properties into
JSBSim.

simgear/misc/Makefile.am
simgear/misc/commands.cxx
simgear/misc/props.hxx
simgear/misc/props_io.cxx
simgear/misc/props_io.hxx [new file with mode: 0644]
simgear/misc/props_test.cxx

index 3c846bf94f5c62ebf4956c4c9df1463bbb226ee7..865678b38eb05d9dbbb57bfbe976ed0670934dda 100644 (file)
@@ -6,6 +6,7 @@ include_HEADERS = \
         commands.hxx \
         exception.hxx \
        props.hxx \
+  props_io.hxx \
        sg_path.hxx \
        sgstream.hxx \
        stopwatch.hxx \
index 2280b6642eb54a5c026c34ecf2430455a5555646..a4669f35eb8cc7b6019998bbf8299a04755e3b8e 100644 (file)
@@ -5,6 +5,7 @@
 // $Id$
 
 #include "commands.hxx"
+#include "props_io.hxx"
 
 
 \f
index 977edca1e66e247c9ef7c0b896c55b52dae63ea8..0bd2f333cd1a48156cc24bc9af789efbc6af49f1 100644 (file)
@@ -1108,46 +1108,6 @@ private:
 
 };
 
-
-\f
-////////////////////////////////////////////////////////////////////////
-// I/O functions.
-////////////////////////////////////////////////////////////////////////
-
-
-/**
- * Read properties from an XML input stream.
- */
-void readProperties (istream &input, SGPropertyNode * start_node,
-                    const string &base = "");
-
-
-/**
- * Read properties from an XML file.
- */
-void readProperties (const string &file, SGPropertyNode * start_node);
-
-
-/**
- * Write properties to an XML output stream.
- */
-void writeProperties (ostream &output, const SGPropertyNode * start_node,
-                     bool write_all = false);
-
-
-/**
- * Write properties to an XML file.
- */
-void writeProperties (const string &file, const SGPropertyNode * start_node,
-                     bool write_all = false);
-
-
-/**
- * Copy properties from one node to another.
- */
-bool copyProperties (const SGPropertyNode *in, SGPropertyNode *out);
-
-
 #endif // __PROPS_HXX
 
 // end of props.hxx
index 54080292dc87d965311444cca41e53b91234e5db..706ab6b85cb373f0e18cd995069b329260f14c13 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "sg_path.hxx"
 #include "props.hxx"
+#include "props_io.hxx"
 
 #include STL_IOSTREAM
 #if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
diff --git a/simgear/misc/props_io.hxx b/simgear/misc/props_io.hxx
new file mode 100644 (file)
index 0000000..f5ed425
--- /dev/null
@@ -0,0 +1,68 @@
+/**
+ * \file props_io.hxx
+ * Interface definition for property list io.
+ * Started Fall 2000 by David Megginson, david@megginson.com
+ * This code is released into the Public Domain.
+ *
+ * See props.html for documentation [replace with URL when available].
+ *
+ * $Id$
+ */
+
+#ifndef __PROPS_IO_HXX
+#define __PROPS_IO_HXX
+
+#include <simgear/compiler.h>
+#include <simgear/misc/props.hxx>
+
+#include <stdio.h>
+
+#include STL_STRING
+#include <vector>
+#include <map>
+#include STL_IOSTREAM
+
+SG_USING_STD(string);
+SG_USING_STD(vector);
+SG_USING_STD(map);
+#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
+SG_USING_STD(istream);
+SG_USING_STD(ostream);
+#endif
+
+/**
+ * Read properties from an XML input stream.
+ */
+void readProperties (istream &input, SGPropertyNode * start_node,
+                    const string &base = "");
+
+
+/**
+ * Read properties from an XML file.
+ */
+void readProperties (const string &file, SGPropertyNode * start_node);
+
+
+/**
+ * Write properties to an XML output stream.
+ */
+void writeProperties (ostream &output, const SGPropertyNode * start_node,
+                     bool write_all = false);
+
+
+/**
+ * Write properties to an XML file.
+ */
+void writeProperties (const string &file, const SGPropertyNode * start_node,
+                     bool write_all = false);
+
+
+/**
+ * Copy properties from one node to another.
+ */
+bool copyProperties (const SGPropertyNode *in, SGPropertyNode *out);
+
+
+#endif // __PROPS_IO_HXX
+
+// end of props_io.hxx
index 15a48abca1ee50039e8d7283684d34a573338b20..6f847b5538015776ac0184068a88a7b0599ae0eb 100644 (file)
@@ -7,6 +7,7 @@
 
 #include STL_IOSTREAM
 #include "props.hxx"
+#include "props_io.hxx"
 
 #if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(cout);