props_io.cxx File Reference

Started Fall 2000 by David Megginson, david@megginson.com This code is released into the Public Domain. More...

#include <simgear/compiler.h>
#include <stdlib.h>
#include <simgear/sg_inlines.h>
#include <simgear/debug/logstream.hxx>
#include <simgear/misc/sg_path.hxx>
#include <simgear/xml/easyxml.hxx>
#include "props.hxx"
#include "props_io.hxx"
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>

Go to the source code of this file.

Functions

void readProperties (istream &input, SGPropertyNode *start_node, const string &base, int default_mode)
 Read properties from an input stream.
void readProperties (const string &file, SGPropertyNode *start_node, int default_mode)
 Read properties from a file.
void readProperties (const char *buf, const int size, SGPropertyNode *start_node, int default_mode)
 Read properties from an in-memory buffer.
bool copyProperties (const SGPropertyNode *in, SGPropertyNode *out)
 Copy one property tree to another.


Detailed Description

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
props_io.cxx,v 1.23 2008/10/14 11:03:39 mfranz Exp

Definition in file props_io.cxx.


Function Documentation

bool copyProperties ( const SGPropertyNode in,
SGPropertyNode out 
)

Copy one property tree to another.

Copy properties from one node to another.

Parameters:
in The source property tree.
out The destination property tree.
Returns:
true if all properties were copied, false if some failed (for example, if the property's value is tied read-only).

Definition at line 600 of file props_io.cxx.

void readProperties ( const char *  buf,
const int  size,
SGPropertyNode start_node,
int  default_mode 
)

Read properties from an in-memory buffer.

Parameters:
buf A character buffer containing the xml data.
size The size/length of the buffer in bytes
start_node The root node for reading properties.
Returns:
true if the read succeeded, false otherwise.

Definition at line 382 of file props_io.cxx.

void readProperties ( const string &  file,
SGPropertyNode start_node,
int  default_mode 
)

Read properties from a file.

Parameters:
file A string containing the file path.
start_node The root node for reading properties.
Returns:
true if the read succeeded, false otherwise.

Definition at line 364 of file props_io.cxx.

void readProperties ( istream &  input,
SGPropertyNode start_node,
const string &  base,
int  default_mode 
)

Read properties from an input stream.

Parameters:
input The input stream containing an XML property file.
start_node The root node for reading properties.
base A base path for resolving external include references.
Returns:
true if the read succeeded, false otherwise.

Definition at line 346 of file props_io.cxx.


Generated on Thu Dec 18 15:17:27 2008 for SimGear by  doxygen 1.5.6