io Namespace Reference


Classes

class  serializable
class  legacy_reader
 Implements the io::reader interface using the "legacy" data format. More...
class  legacy_writer
 Implements the io::writer interface using the "legacy" data format. More...
class  proxy
 proxy makes a proxy serializable that behaves as if it were another type. More...
class  const_proxy
 const_proxy is just like proxy except for const objects. More...
class  attrib_map
class  read_version_error
class  reader
class  object_map
class  write_id_map
 Translate nub::uid values into a repeatable id sequence for the XML file. More...
class  write_version_error
class  writer
class  xml_parser

Namespaces

namespace  read_utils
 Utilities for reading sequences from a io::reader.
namespace  write_utils
 Utilities for writing sequences to a io::writer.

Typedefs

typedef signed long version_id
 This type is used for verion ids during the read+write process.

Functions

shared_ptr< io::readermake_asw_reader (std::istream &os)
 Make an ASW reader that reads from the given std::ostream.
shared_ptr< io::readermake_asw_reader (const char *filename)
 Make an ASW reader that reads from the named file.
shared_ptr< io::writermake_asw_writer (std::ostream &os)
 Make an ASW writer that writes to the given std::ostream.
shared_ptr< io::writermake_asw_writer (const char *filename)
 Make an ASW writer that writes to the named file.
unsigned int attrib_count (const io::serializable &obj)
template<class C>
nub::ref< serializablemake_proxy (C *ref)
template<class C>
nub::ref< const serializablemake_const_proxy (const C *ref)
fstring write_lgx (nub::ref< io::serializable > obj)
void read_lgx (nub::ref< io::serializable > obj, const char *buf)
fstring write_asw (nub::ref< io::serializable > obj)
void read_asw (nub::ref< io::serializable > obj, const char *buf)
fstring write_gvx (nub::ref< io::serializable > obj)
void save_asw (nub::ref< io::serializable > obj, fstring fname)
void load_asw (nub::ref< io::serializable > obj, fstring fname)
void save_gvx (nub::ref< io::serializable > obj, fstring filename)
nub::ref< io::serializableretrieve_asw (fstring fname)
nub::ref< io::serializableload_gvx (const char *filename)
void xml_debug (const char *filename)
shared_ptr< io::writermake_xml_writer (std::ostream &os)
 Make an XML writer that writes to std::ostream.
shared_ptr< io::writermake_xml_writer (const char *filename)
 Make an XML writer that writes to the file named filename.


Function Documentation

unsigned int io::attrib_count ( const io::serializable obj  ) 

Returns the number of attributes that are written in the object's write_to() function. This implementation simply calls write_to() with a dummy writer and counts how many attributes are written.

Definition at line 86 of file attribcount.cc.

References GVX_TRACE, and io::serializable::write_to().

rutz::shared_ptr< io::reader > io::make_asw_reader ( std::istream &  os  ) 

Make an ASW reader that reads from the given std::ostream.

The returned io::reader will restore objects from an input stream containing ASW-formatted data, which is a human-readable text format. With this data format, objects may read and write their attributes in any order.

Definition at line 507 of file asciistreamreader.cc.

References rutz::make_shared().

Referenced by load_asw(), read_asw(), and retrieve_asw().

rutz::shared_ptr< io::writer > io::make_asw_writer ( std::ostream &  os  ) 

Make an ASW writer that writes to the given std::ostream.

The returned io::writer serializes objects to an output stream in the human-readable ASW plaintext format. With this data format, objects may read and write their attributes in any order.

Definition at line 360 of file asciistreamwriter.cc.

References rutz::make_shared().

Referenced by save_asw(), and write_asw().


The software described here is Copyright (c) 1998-2005, Rob Peters.
This page was generated Mon Feb 11 05:08:45 2008 by Doxygen version 1.5.2.