Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/inistream.h')
-rw-r--r--src/inistream.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/inistream.h b/src/inistream.h
index 08a6ef4..5ff1237 100644
--- a/src/inistream.h
+++ b/src/inistream.h
@@ -31,17 +31,17 @@ public:
bool getline(QTextStream &textstream);
/// current section label
- inline QString section() const {
+ inline const QString & section() const {
return section_current;
}
/// current key
- inline QString key() const {
+ inline const QString & key() const {
return key_current;
}
/// current value
- inline QString value() const {
+ inline const QString & value() const {
return value_current;
}
@@ -49,6 +49,11 @@ public:
inline unsigned int line() const {
return line_number;
}
+
+ /// comment string for the current section or key/value pair
+ inline const QString & comment() const {
+ return comment_current;
+ }
/// true if the last read statement was a section header
bool got_section() const;
@@ -94,6 +99,9 @@ private:
QString section_current;
QString key_current;
QString value_current;
+
+ QString comment_current;
+ QString comment_next;
bool last_read_was_key;
bool last_read_was_section;