Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

dt_stream_validator.h File Reference


Detailed Description

A utility for verifying the validity of a data tree stream.

Definition in file dt_stream_validator.h.

Go to the source code of this file.

Functions

dt_writerdt_create_validator_writer (dt_writer *delegate)
 Creates a writer that verifies the validity of the dt_step sequence it receives.

dt_bool dt_validator_writer_completed (dt_writer *validator)
 Checks whether validator has received a dt_end step.


Function Documentation

dt_writer* dt_create_validator_writer dt_writer delegate  ) 
 

Creates a writer that verifies the validity of the dt_step sequence it receives.

This writer can be used as a filter, which verifies that an input source (such as a file parser) provides a valid data structure.

Parameters:
delegate Optional pointer to an existing dt_writer instance to which each dt_step that has successfully been validated will be forwarded.

Definition at line 27 of file dt_stream_validator.c.

dt_bool dt_validator_writer_completed dt_writer validator  ) 
 

Checks whether validator has received a dt_end step.

Because a datatree transmission may be truncated even though it does not contain an error, this function can be called to verify that the transmission was complete and successful.

Returns:
  • A non-zero value if the transmission was complete and a dt_end step was received.
  • zero if the object has not received a complete transmission (or it is not a validator_writer).

Definition at line 133 of file dt_stream_validator.c.


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