Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

dt_stream_text.h File Reference


Detailed Description

Tree streaming object that support a simple text file format The objects that can be created using this header allow the conversion of a data tree to/from a structured textual form.

The text format is defined as follows:

By default, the output text files are automatically indented for readability.

Definition in file dt_stream_text.h.

Go to the source code of this file.

Enumerations

enum  dt_text_mode_flags { dt_text_packed = 1<<0, dt_text_crlf = 1<<1 }
 Formatting flags (currently only relevant to the output/writer object). More...


Functions

dt_reader_ * dt_create_text_reader (FILE *src, dt_text_mode_flags mode)
 Create a reader that will decode the condents of the specified file.

dt_writer_ * dt_create_text_writer (FILE *dst, dt_text_mode_flags mode)
 Create a writer that will decode the condents of the specified file.


Enumeration Type Documentation

enum dt_text_mode_flags
 

Formatting flags (currently only relevant to the output/writer object).

Enumeration values:
dt_text_packed  output in compact form (minimal spacing)
dt_text_crlf  explicitly output CR+LF on every line end

Definition at line 36 of file dt_stream_text.h.


Function Documentation

struct dt_reader_* dt_create_text_reader FILE *  src,
dt_text_mode_flags  mode
 

Create a reader that will decode the condents of the specified file.

The caller retains ownership of the source file handle (src), and is responsible for closing it after destruction of the reader object.

Note:
This reader object only checks the structure, not the syntax, of the input file. For most purposes, it is useful to filter its ouput using a stream validator (
See also:
dt_stream_validator).

Definition at line 56 of file dt_stream_text.c.

struct dt_writer_* dt_create_text_writer FILE *  dst,
dt_text_mode_flags  mode
 

Create a writer that will decode the condents of the specified file.

The caller retains ownership of the output file handle (src), and is responsible for closing it after destruction of the writer object.

Definition at line 223 of file dt_stream_text.c.


Generated on Sun Jun 1 16:35:38 2003 for datatree by doxygen 1.3.1