Responsible for parsing an string from an ini file, and creating an IniData structure.
More...
|
virtual bool | LineContainsAComment (string line) |
| Checks if a given string contains a comment.
|
|
virtual bool | LineMatchesASection (string line) |
| Checks if a given string represents a section delimiter.
|
|
virtual bool | LineMatchesAKeyValuePair (string line) |
| Checks if a given string represents a key / value pair.
|
|
virtual string | ExtractComment (string line) |
| Removes a comment from a string if exist, and returns the string without the comment substring.
|
|
virtual void | ProcessLine (string currentLine, IniData currentIniData) |
| Processes one line and parses the data found in that line (section or key/value pair who may or may not have comments)
|
|
virtual void | ProcessSection (string line, IniData currentIniData) |
| Proccess a string which contains an ini section.
|
|
virtual void | ProcessKeyValuePair (string line, IniData currentIniData) |
| Processes a string containing an ini key/value pair.
|
|
virtual string | ExtractKey (string s) |
| Extracts the key portion of a string containing a key/value pair..
|
|
virtual string | ExtractValue (string s) |
| Extracts the value portion of a string containing a key/value pair..
|
|
|
IIniParserConfiguration | Configuration [get] |
| Configuration that defines the behaviour and constraints that the parser must follow.
|
|
Responsible for parsing an string from an ini file, and creating an IniData structure.
◆ IniDataParser() [1/2]
IniParser.Parser.IniDataParser.IniDataParser |
( |
| ) |
|
|
inline |
Ctor.
The parser uses a DefaultIniParserConfiguration by default
◆ IniDataParser() [2/2]
Ctor.
- Parameters
-
parserConfiguration | Parser's IIniParserConfiguration instance. |
◆ ExtractComment()
virtual string IniParser.Parser.IniDataParser.ExtractComment |
( |
string |
line | ) |
|
|
inlineprotectedvirtual |
Removes a comment from a string if exist, and returns the string without the comment substring.
- Parameters
-
line | The string we want to remove the comments from. |
- Returns
- The string s without comments.
◆ ExtractKey()
virtual string IniParser.Parser.IniDataParser.ExtractKey |
( |
string |
s | ) |
|
|
inlineprotectedvirtual |
Extracts the key portion of a string containing a key/value pair..
- Parameters
-
s |
The string to be processed, which contains a key/value pair |
- Returns
- The name of the extracted key.
◆ ExtractValue()
virtual string IniParser.Parser.IniDataParser.ExtractValue |
( |
string |
s | ) |
|
|
inlineprotectedvirtual |
Extracts the value portion of a string containing a key/value pair..
- Parameters
-
s | The string to be processed, which contains a key/value pair |
- Returns
- The name of the extracted value.
◆ LineContainsAComment()
virtual bool IniParser.Parser.IniDataParser.LineContainsAComment |
( |
string |
line | ) |
|
|
inlineprotectedvirtual |
Checks if a given string contains a comment.
- Parameters
-
line | The string to be checked. |
- Returns
true
if any substring from s is a comment, false
otherwise.
◆ LineMatchesAKeyValuePair()
virtual bool IniParser.Parser.IniDataParser.LineMatchesAKeyValuePair |
( |
string |
line | ) |
|
|
inlineprotectedvirtual |
Checks if a given string represents a key / value pair.
- Parameters
-
line | The string to be checked. |
- Returns
true
if the string represents a key / value pair, false
otherwise.
◆ LineMatchesASection()
virtual bool IniParser.Parser.IniDataParser.LineMatchesASection |
( |
string |
line | ) |
|
|
inlineprotectedvirtual |
Checks if a given string represents a section delimiter.
- Parameters
-
line | The string to be checked. |
- Returns
true
if the string represents a section, false
otherwise.
◆ Parse()
IniData IniParser.Parser.IniDataParser.Parse |
( |
string |
iniDataString | ) |
|
|
inline |
Parses a string containing valid ini data.
- Parameters
-
iniDataString | String with data |
- Returns
- An IniData instance with the data contained in the iniDataString correctly parsed an structured.
- Exceptions
-
ParsingException | Thrown if the data could not be parsed |
◆ ProcessKeyValuePair()
virtual void IniParser.Parser.IniDataParser.ProcessKeyValuePair |
( |
string |
line, |
|
|
IniData |
currentIniData |
|
) |
| |
|
inlineprotectedvirtual |
Processes a string containing an ini key/value pair.
- Parameters
-
line | The string to be processed |
◆ ProcessLine()
virtual void IniParser.Parser.IniDataParser.ProcessLine |
( |
string |
currentLine, |
|
|
IniData |
currentIniData |
|
) |
| |
|
inlineprotectedvirtual |
Processes one line and parses the data found in that line (section or key/value pair who may or may not have comments)
- Parameters
-
currentLine | The string with the line to process |
◆ ProcessSection()
virtual void IniParser.Parser.IniDataParser.ProcessSection |
( |
string |
line, |
|
|
IniData |
currentIniData |
|
) |
| |
|
inlineprotectedvirtual |
Proccess a string which contains an ini section.
- Parameters
-
line | The string to be processed |
The documentation for this class was generated from the following file:
- C:/Transhuman/S2/Assets/Plugins/AutoConfig/IniFileParser/Parser/IniDataParser.cs