SimGear - Simulator Construction Tools
props_io.hxx File Reference
#include <simgear/compiler.h>
#include <simgear/props/props.hxx>
#include <string>
#include <iosfwd>

Go to the source code of this file.

Functions

bool copyProperties (const SGPropertyNode *in, SGPropertyNode *out)
 
bool copyPropertiesWithAttribute (const SGPropertyNode *in, SGPropertyNode *out, SGPropertyNode::Attribute attr)
 
void readProperties (std::istream &input, SGPropertyNode *start_node, const std::string &base="", int default_mode=0, bool extended=false)
 
void readProperties (const SGPath &file, SGPropertyNode *start_node, int default_mode=0, bool extended=false)
 
void readProperties (const char *buf, const int size, SGPropertyNode *start_node, int default_mode=0, bool extended=false)
 
void writeProperties (std::ostream &output, const SGPropertyNode *start_node, bool write_all=false, SGPropertyNode::Attribute archive_flag=SGPropertyNode::ARCHIVE)
 
void writeProperties (const SGPath &file, const SGPropertyNode *start_node, bool write_all=false, SGPropertyNode::Attribute archive_flag=SGPropertyNode::ARCHIVE)
 

Detailed Description

Interface definition for property list io. Started Fall 2000 by David Megginson, david.nosp@m.@meg.nosp@m.ginso.nosp@m.n.co.nosp@m.m This code is released into the Public Domain.

See props.html for documentation [replace with URL when available].

$Id$

Definition in file props_io.hxx.

Function Documentation

bool copyProperties ( const SGPropertyNode in,
SGPropertyNode out 
)

Copy properties from one node to another.

Copy one property tree to another.

Parameters
inThe source property tree.
outThe 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 788 of file props_io.cxx.

Referenced by SGMaterial::buildEffectProperties(), PropsVisitor::endElement(), SGBinding::fire(), simgear::effect::mergePropertyTrees(), simgear::pkg::Catalog::parseProps(), and sgLoad3DModel_internal().

bool copyPropertiesWithAttribute ( const SGPropertyNode in,
SGPropertyNode out,
SGPropertyNode::Attribute  attr 
)

Definition at line 822 of file props_io.cxx.

void readProperties ( std::istream &  input,
SGPropertyNode start_node,
const std::string &  base = "",
int  default_mode = 0,
bool  extended = false 
)

Read properties from an XML input stream.

void readProperties ( const SGPath file,
SGPropertyNode start_node,
int  default_mode,
bool  extended 
)

Read properties from an XML file.

Read properties from a file.

Parameters
fileA string containing the file path.
start_nodeThe root node for reading properties.
Returns
true if the read succeeded, false otherwise.

Definition at line 438 of file props_io.cxx.

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

Read properties from an in-memory buffer.

Read properties from an in-memory buffer.

Parameters
bufA character buffer containing the xml data.
sizeThe size/length of the buffer in bytes
start_nodeThe root node for reading properties.
Returns
true if the read succeeded, false otherwise.

Definition at line 456 of file props_io.cxx.

void writeProperties ( std::ostream &  output,
const SGPropertyNode start_node,
bool  write_all = false,
SGPropertyNode::Attribute  archive_flag = SGPropertyNode::ARCHIVE 
)
void writeProperties ( const SGPath file,
const SGPropertyNode start_node,
bool  write_all = false,
SGPropertyNode::Attribute  archive_flag = SGPropertyNode::ARCHIVE 
)

Write properties to an XML file.

Definition at line 694 of file props_io.cxx.