This class turns lines of an INI file into objects of the types Line, Section or Key.
More...
#include <IniLineFactory.h>
This class turns lines of an INI file into objects of the types Line, Section or Key.
- Author
- Helmut Jakoby
- Copyright
- © 1995 Helmut Jakoby
◆ LineFactory() [1/2]
ini::LineFactory::LineFactory |
( |
| ) |
|
◆ ~LineFactory()
virtual ini::LineFactory::~LineFactory |
( |
| ) |
|
|
virtual |
◆ LineFactory() [2/2]
The copy constructor is not available.
◆ getIniLine()
int ini::LineFactory::getIniLine |
( |
Line *& | prIniLine, |
|
|
std::string | sCharLine ) const |
This method returns a pointer to an Line or subclass of Line in the reference 'prIniLine'.
- Parameters
-
[in,out] | prIniLine | Pointer to a newly instantiated Line or subclass. |
[in] | sCharLine | The line from an ini file as string. The text line is evaluated accordingly. |
- Returns
- A return < 0 indicates an error.
- Attention
- The calling instance must remove a supplied valid Line or subclass from memory.
◆ getLineType()
LINE_TYPE ini::LineFactory::getLineType |
( |
std::string | sCharLine | ) |
const |
Returns the type of the entry.
- Parameters
-
[in] | sCharLine | Line to be analyzed as string. |
- Returns
- The determined type of the entry line.
◆ isComment()
bool ini::LineFactory::isComment |
( |
std::string | sCharLine | ) |
const |
|
private |
Checks if the transferred entry is an INI comment.
- Parameters
-
[in] | sCharLine | Line to be analyzed as string. |
- Returns
- Returns true if the passed entry is an INI comment, otherwise false.
◆ isKey()
bool ini::LineFactory::isKey |
( |
std::string | sCharLine | ) |
const |
|
private |
Checks whether the transferred entry is an INI key.
- Parameters
-
[in] | sCharLine | Line to be analyzed as string. |
- Returns
- Returns true, if passed entry is an INI key, otherwise false.
◆ isSection()
bool ini::LineFactory::isSection |
( |
std::string | sCharLine | ) |
const |
|
private |
Checks whether the transferred entry is an INI section.
- Parameters
-
[in] | sCharLine | Line to be analyzed as string. |
- Returns
- Returns true if the given entry is an INI section, otherwise false.
◆ operator=()
The assignment operator is not available.
◆ trim()
void ini::LineFactory::trim |
( |
std::string & | rsCharLine | ) |
const |
Removes leading and trailing spaces {0x20} and TABs {0x09} in the passed string.
- Parameters
-
[in,out] | rsCharLine | Reference to string to be processed. |
The documentation for this class was generated from the following file: