Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# InConfig Class Reference

The class InConfig reads text data from config (file) streams that contain comments and sections. More...

`#include <InStreams.h>`

Inheritance diagram for InConfig:

[legend]
Collaboration diagram for InConfig:

[legend]
List of all members.

## Public Member Functions
| InConfig ()
| Default constructor.
## Protected Member Functions
void | create (const char *sectionName, PhysicalInStream &stream)
| Creates the reader.
virtual bool | isWhitespace ()
| The function determines whether the current character is a whitespace.
virtual void | skipWhitespace (PhysicalInStream &stream)
| The function skips the whitespace.
virtual void | nextChar (PhysicalInStream &stream)
| The function reads the next character from the stream.
## Private Member Functions
void | skipLine (PhysicalInStream &stream)
| The functions skip all characters to the end of the line.
void | skipComment (PhysicalInStream &stream)
| The functions skip all characters to the end of the comment.
## Private Attributes
bool | readSection
| Are we reading a section?

## 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 458 of file InStreams.h.

## Constructor & Destructor Documentation

InConfig::InConfig | ( |  | ) | `[inline]`

| Default constructor. Definition at line 464 of file InStreams.h. References readSection.

## 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 62 of file InStreams.cpp. References ASSERT, PhysicalInStream::exists(), InText::isEof(), readSection, and InText::readString(). Referenced by InConfigFile::InConfigFile(), and InConfigMemory::InConfigMemory().

Here is the call graph for this function:

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 84 of file InStreams.cpp. References InText::isWhitespace(). Referenced by skipWhitespace().

Here is the call graph for this function:

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

| The function skips the whitespace. Reimplemented from InText. Definition at line 89 of file InStreams.cpp. References ASSERT, InText::isEof(), InText::isWhitespace(), isWhitespace(), nextChar(), skipComment(), and skipLine().

Here is the call graph for this function:

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

| The function reads the next character from the stream. Reimplemented from InText. Definition at line 111 of file InStreams.cpp. References InText::isEof(), InText::nextChar(), and readSection. Referenced by skipComment(), skipLine(), and skipWhitespace().

Here is the call graph for this function:

void InConfig::skipLine | ( | PhysicalInStream & | stream | ) | `[private]`

| The functions skip all characters to the end of the line. Definition at line 119 of file InStreams.cpp. References InText::isEof(), and nextChar(). Referenced by skipWhitespace().

Here is the call graph for this function:

void InConfig::skipComment | ( | PhysicalInStream & | stream | ) | `[private]`

| The functions skip all characters to the end of the comment. Definition at line 127 of file InStreams.cpp. References InText::isEof(), and nextChar(). Referenced by skipWhitespace().

Here is the call graph for this function:

## Member Data Documentation

bool InConfig::readSection`[private]`

| Are we reading a section? Definition at line 492 of file InStreams.h. Referenced by create(), InConfig(), and nextChar().

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

- Tools/Streams/InStreams.h
- Tools/Streams/InStreams.cpp