InConfig Class Reference

#include <InStreams.h>

Inheritance diagram for InConfig:

InText StreamReader InStream< InFile, InConfig > InStream< InMemory, InConfig > InStream< InMessageQueue, InConfig > InConfigFile InConfigMemory InConfigMessage List of all members.

Public Member Functions

 InConfig ()

Protected Member Functions

void create (const char *sectionName, PhysicalInStream &stream)
virtual bool isWhitespace ()
virtual void skipWhitespace (PhysicalInStream &stream)
virtual void nextChar (PhysicalInStream &stream)

Private Member Functions

void skipLine (PhysicalInStream &stream)
void skipComment (PhysicalInStream &stream)

Private Attributes

bool readSection

Detailed Description

The class InConfig reads text data from config (file) streams that contain comments and sections. The following comment styles are supported: / * comment * / (ignore the space between "*" and "/") // comment till endl # comment till endl Note that "/" is not allowed elsewhere in the stream.

Definition at line 469 of file InStreams.h.


Constructor & Destructor Documentation

InConfig::InConfig (  )  [inline]

Default constructor

Definition at line 475 of file InStreams.h.


Member Function Documentation

void InConfig::create ( const char *  sectionName,
PhysicalInStream stream 
) [protected]

Creates the reader.

Parameters:
sectionName If given the section is searched
stream The medium that should be read from.

Definition at line 69 of file InStreams.cpp.

References ASSERT, PhysicalInStream::exists(), InText::isEof(), readSection, and InText::readString().

Referenced by InConfigFile::InConfigFile(), and InConfigMemory::InConfigMemory().

bool InConfig::isWhitespace (  )  [protected, virtual]

The function determines whether the current character is a whitespace. In this context, the start of

Reimplemented from InText.

Definition at line 91 of file InStreams.cpp.

References InText::isWhitespace(), and InText::theChar.

Referenced by skipWhitespace().

void InConfig::nextChar ( PhysicalInStream stream  )  [protected, virtual]

The function reads the next character from the stream.

Reimplemented from InText.

Definition at line 118 of file InStreams.cpp.

References InText::isEof(), InText::nextChar(), readSection, and InText::theChar.

Referenced by skipComment(), skipLine(), and skipWhitespace().

void InConfig::skipComment ( PhysicalInStream stream  )  [private]

The functions skip all characters to the end of the comment.

Definition at line 134 of file InStreams.cpp.

References InText::isEof(), nextChar(), and InText::theChar.

Referenced by skipWhitespace().

void InConfig::skipLine ( PhysicalInStream stream  )  [private]

The functions skip all characters to the end of the line.

Definition at line 126 of file InStreams.cpp.

References InText::isEof(), nextChar(), and InText::theChar.

Referenced by skipWhitespace().

void InConfig::skipWhitespace ( PhysicalInStream stream  )  [protected, virtual]

The function skips the whitespace.

Reimplemented from InText.

Definition at line 96 of file InStreams.cpp.

References ASSERT, InText::isEof(), InText::isWhitespace(), isWhitespace(), nextChar(), skipComment(), skipLine(), and InText::theChar.


Member Data Documentation

bool InConfig::readSection [private]

Are we reading a section?

Definition at line 503 of file InStreams.h.

Referenced by create(), and nextChar().


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:38:25 2006 for DT2005.panorama by  doxygen 1.4.7