SDX::Formats::TabBasedStreamReader Class Reference

Class that reads tab based content from a stream. More...

#include <SDXTabBasedStreamReader.h>

Inheritance diagram for SDX::Formats::TabBasedStreamReader:

SDX::Helpers::StreamReader SDX::ResourceReader

List of all members.

Public Member Functions

 TabBasedStreamReader (std::istream *iStream=0, SDX::ContentHandler *contentHandler=0)

Detailed Description

Class that reads tab based content from a stream.

In a Tab Based File every node has its own (tab based) indentation. An example says more than a thousand words:

 Customer name="Bob 'o Reilly"
	Company "The test company"
	Address "Foo lane 83"
 Customer name="Kent Brockman"
	Company "Another test company"
	Address "Bar avenue 57"
For that file, the following events will get sent to the ContentHandler:
 		contentHandler->writeAttribute("name", "Bob 'o Reily");
 		contentHandler->writeNode("Company", "The test company");
 		contentHandler->writeNode("Address", "Foo lane 83");
 		contentHandler->writeAttribute("name", "Kent Brockman");
 		contentHandler->writeNode("Company", "Another test company");
 		contentHandler->writeNode("Address", "Bar avenue 57");
The avantages of this file format are that it is more compact since nodes don't need closing tags as in for ex. XML, while the ability to nest nodes is not lost (as with CSV). It can also be used to create script-like files like the Validator class does. You can use single and double quotes around node names, attribute names and attribute values. Inside quotes you can use quotes of the other types (like single quotes if you use double quotes, like "Bob 'o Reilly"), spaces and equality signs (=). You can't yet use escaped quotes or return inside quotes. There are plans to implement this in a later version. Or you can do it if you like!

Definition at line 37 of file SDXTabBasedStreamReader.h.

The documentation for this class was generated from the following files:

Generated on Mon Apr 27 16:55:49 2009 for SDX by  doxygen 1.5.8