|
Fast Research Interface Library
Manual and Documentation
|
A simple implementation of a class for reading an initialization file. More...
#include <InitializationFileEntry.h>
Public Member Functions | |
| InitializationFileEntry (const char *FileName=NULL) | |
| Constructor. | |
| ~InitializationFileEntry (void) | |
| Destructor. | |
| char * | GetAll (void) |
| Returns a complete entry. | |
| bool | FindEntry (const char *Name) |
| Looks for an entry that matches Name. | |
| char * | GetValue (void) |
| Returns the value of the current entry (may be empty) | |
| char * | GetName (void) |
| Returns the name of the current entry. | |
| char * | GetSection (void) |
| Returns the name of the current section (may be empty) | |
| bool | NextEntry (void) |
| Set the internal current entry pointer to the successor of the current entry. | |
Protected Member Functions | |
| bool | FindNextSection (void) |
| Set the internal current entry pointer to the beginning of the next section. | |
| bool | Add (const char *Line) |
| Add a line to the list. | |
| void | ReadFile (const char *FileName) |
| Reads the initialization file. | |
Protected Attributes | |
| InitializationFileEntry * | CurrentEntry |
| A pointer to the current entry of the parsed initialization file. | |
| InitializationFileEntry * | Prev |
| A pointer to the previous entry of the parsed initialization file. | |
| InitializationFileEntry * | Next |
| A pointer to the next entry of the parsed initialization file. | |
| char | Name [NAMELEN] |
An array of char values used by the method InitializationFileEntry::GetName() to return the name of the current entry. | |
| char | Value [VALUELEN] |
An array of char values containing the value of the current entry. | |
| char | EntryName [NAMELEN] |
An array of char values containing the name of the current entry. | |
| char | SectionName [NAMELEN] |
An array of char values containing the name of the section of the current entry. | |
| char | CurrentSectionName [NAMELEN] |
An array of char values containing the name of the section of the current entry used by InitializationFileEntry::Add() if a new section was found. | |
A simple implementation of a class for reading an initialization file.
Definition at line 95 of file InitializationFileEntry.h.
| InitializationFileEntry::InitializationFileEntry | ( | const char * | FileName = NULL | ) |
Constructor.
The constructor reads all entry from the initialization file Filename and creates a double-linked list of InitializationFileEntry objects.
| FileName | A pointer to an array of char containing the name of the file that provides the desired initialization values/parameters |
Definition at line 67 of file InitializationFileEntry.cpp.
Destructor.
The destructor deletes all list entries.
Definition at line 90 of file InitializationFileEntry.cpp.
| bool InitializationFileEntry::Add | ( | const char * | Line | ) | [protected] |
Add a line to the list.
| Line | A pointer to an array of char values containing the line to be added. |
true if the line could be addedfalse otherwise Definition at line 117 of file InitializationFileEntry.cpp.
| bool InitializationFileEntry::FindEntry | ( | const char * | Name | ) |
Looks for an entry that matches Name.
If one could be found it sets the internal current entry pointer to this entry and returns true. Otherwise, the current entry pointer will remain unchanged and the return value is false.
| Name | A pointer to an array of char values containing the name of the entry to be looked for |
true if the entry Name was foundfalse otherwise Definition at line 345 of file InitializationFileEntry.cpp.
| bool InitializationFileEntry::FindNextSection | ( | void | ) | [protected] |
Set the internal current entry pointer to the beginning of the next section.
true if another section existsfalse otherwise Definition at line 229 of file InitializationFileEntry.cpp.
| char * InitializationFileEntry::GetAll | ( | void | ) |
Returns a complete entry.
char values containing the current entry Definition at line 293 of file InitializationFileEntry.cpp.
| char * InitializationFileEntry::GetName | ( | void | ) |
Returns the name of the current entry.
char values containing the name of the current entry Definition at line 306 of file InitializationFileEntry.cpp.
| char * InitializationFileEntry::GetSection | ( | void | ) |
Returns the name of the current section (may be empty)
char values containing the name of the current entry section. Definition at line 280 of file InitializationFileEntry.cpp.
| char * InitializationFileEntry::GetValue | ( | void | ) |
Returns the value of the current entry (may be empty)
char values containing the value of the current entry Definition at line 332 of file InitializationFileEntry.cpp.
| bool InitializationFileEntry::NextEntry | ( | void | ) |
Set the internal current entry pointer to the successor of the current entry.
true if another entry existsfalse otherwise Definition at line 209 of file InitializationFileEntry.cpp.
| void InitializationFileEntry::ReadFile | ( | const char * | FileName | ) | [protected] |
Reads the initialization file.
This method reads the contents of the file FileName and stores it in the InitializationFileEntry list.
| FileName | A pointer to an array of char values containing the file name |
Definition at line 382 of file InitializationFileEntry.cpp.
InitializationFileEntry * InitializationFileEntry::CurrentEntry [protected] |
A pointer to the current entry of the parsed initialization file.
Definition at line 283 of file InitializationFileEntry.h.
char InitializationFileEntry::CurrentSectionName[NAMELEN] [protected] |
An array of char values containing the name of the section of the current entry used by InitializationFileEntry::Add() if a new section was found.
Definition at line 349 of file InitializationFileEntry.h.
char InitializationFileEntry::EntryName[NAMELEN] [protected] |
An array of char values containing the name of the current entry.
Definition at line 329 of file InitializationFileEntry.h.
char InitializationFileEntry::Name[NAMELEN] [protected] |
An array of char values used by the method InitializationFileEntry::GetName() to return the name of the current entry.
Definition at line 311 of file InitializationFileEntry.h.
InitializationFileEntry * InitializationFileEntry::Next [protected] |
A pointer to the next entry of the parsed initialization file.
Definition at line 301 of file InitializationFileEntry.h.
InitializationFileEntry * InitializationFileEntry::Prev [protected] |
A pointer to the previous entry of the parsed initialization file.
Definition at line 292 of file InitializationFileEntry.h.
char InitializationFileEntry::SectionName[NAMELEN] [protected] |
An array of char values containing the name of the section of the current entry.
Definition at line 338 of file InitializationFileEntry.h.
char InitializationFileEntry::Value[NAMELEN] [protected] |
An array of char values containing the value of the current entry.
Definition at line 320 of file InitializationFileEntry.h.