#include <IniParser.h>
Public Member Functions | |
| IniParser () | |
| ~IniParser () | |
| void | initFiles (const char *fn) |
| void | initFiles (const YCPList &f) |
| int | initMachine (const YCPMap &scr) |
| bool | isStarted () |
| int | parse () |
| void | UpdateIfModif () |
| int | write () |
| bool | sectionNeedsEnd (int i) |
| string | getFileName (const string &sec, int rb) |
| bool | HaveRewrites () const |
| bool | repeatNames () const |
| accessor method | |
| bool | isFlat () const |
| accessor method | |
| string | changeCase (const string &str) const |
Public Attributes | |
| set< string > | deleted_sections |
| IniSection | inifile |
Private Member Functions | |
| time_t | getTimeStamp () |
| int | scanner_start (const char *fn) |
| void | scanner_stop () |
| int | scanner_get (string &s) |
| int | parse_helper (IniSection &ini) |
| int | write_helper (IniSection &ini, ofstream &of, int depth) |
Private Attributes | |
| time_t | timestamp |
| map< string, FileDescr > | multi_files |
| string | file |
| bool | line_can_continue |
| bool | ignore_case_regexps |
| bool | ignore_case |
| bool | prefer_uppercase |
| bool | first_upper |
| bool | no_nested_sections |
| bool | global_values |
| bool | repeat_names |
| bool | comments_last |
| bool | join_multiline |
| bool | no_finalcomment_kill |
| bool | read_only |
| bool | flat |
| string | subindent |
| vector< Regex > | linecomments |
| vector< Regex > | comments |
| vector< section > | sections |
| vector< param > | params |
| vector< IoPattern > | rewrites |
| ifstream | scanner |
| string | scanner_file |
| int | scanner_line |
| bool | started |
| bool | multiple_files |
| vector< string > | files |
|
|
|
|
|
|
|
|
change case of string
|
|
||||||||||||
|
Get the file name of section. If there is a rewrite rule rb, rewrites section name to file name using the rule rb.
|
|
|
Get time stamp of file in sinble file mode. |
|
|
Using file name rewriting? |
|
|
Sets parser to multiple file mode and sets the glob-expressions.
|
|
|
Sets parser to single file mode and sets the file name to read.
|
|
|
Sets flags and regular expressions.
|
|
|
accessor method
|
|
|
|
|
|
Parse the ini files. Parser must be started before this function is called. |
|
|
Parse one ini file and build a structure of IniSection. |
|
|
accessor method
|
|
|
get line from ini file. |
|
|
Open ini file. |
|
|
Close ini file. |
|
|
Does a section have end-mark defined?
|
|
|
Check the ini files and in case some of them changed externally, reload it. |
|
|
Write changed ini files on disk |
|
||||||||||||||||
|
Write one ini file. |
|
|
Regular expressions for comments over part of the line. |
|
|
lines are parsed for comments after they are parsed for values |
|
|
If Write (.s.section_name, nil) was called in multiple files mode, than the file section_name has to be removed at the end. But as we have file name rewrite rules, section_name needn't be file name. Hence it is necessary to convert section_name to file name before inserting to deleted_sections. |
|
|
File name of the ini file -- single file mode only. |
|
|
Vector of globe-expressions. |
|
|
if ignore case, outputs first upper and other lower If not first_upper, nor prefer_uppercase is set, keys and values are saved in lower case. |
|
|
ini file sections are created in flat-mode |
|
|
values at the top level(not in section) are allowed |
|
|
ignore case in keys and section names |
|
|
ignore case in regexps |
|
|
Toplevel ini section. |
|
|
multiline values are connected into one |
|
|
if there is \ at the end of line, next line is appended to the current one |
|
|
Regular expression for comments over whole line. |
|
|
Times of last modification of read files, used in multiple files mode. |
|
|
Multiple files mode or single file mode? |
|
|
do not kill empty lines at final comment at the end of top-level section |
|
|
nested sections are not allowed |
|
|
Regular expressions for parameters (keys/values). |
|
|
if ignore case, prefer upper case when saving |
|
|
read-only |
|
|
more values or sections of the same name are allowed |
|
|
Regular expressions for rewrite rules. |
|
|
opened file for scanner |
|
|
name of scanned file |
|
|
line number of scanned file |
|
|
Regular expressions for sections. |
|
|
set to true in initMachine (after internal parsing structures are initialized, when IniParser is ready to work). |
|
|
this string is printed before each line in subsections |
|
|
Time of last modification of file, used in single file mode. |
1.4.4