Patches from Tony Peden to separate property XML I/O operations into a
separate header file. This change will help integrate properties into JSBSim.
This commit is contained in:
@@ -6,6 +6,7 @@ include_HEADERS = \
|
||||
commands.hxx \
|
||||
exception.hxx \
|
||||
props.hxx \
|
||||
props_io.hxx \
|
||||
sg_path.hxx \
|
||||
sgstream.hxx \
|
||||
stopwatch.hxx \
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
// $Id$
|
||||
|
||||
#include "commands.hxx"
|
||||
#include "props_io.hxx"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1108,46 +1108,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
|
||||
@@ -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)
|
||||
|
||||
68
simgear/misc/props_io.hxx
Normal file
68
simgear/misc/props_io.hxx
Normal file
@@ -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
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user