Index: trunk/src/lib/parser/ini_parser/ini_parser.cc
===================================================================
--- trunk/src/lib/parser/ini_parser/ini_parser.cc	(revision 9881)
+++ trunk/src/lib/parser/ini_parser/ini_parser.cc	(revision 9883)
@@ -16,4 +16,7 @@
                now the File is parsed at the initialisation,
                and informations is gathered there.
+   2006-10-10: Complete reimplementation again :)
+               New STL-like style. The Parser has no state itself
+               Elements as Nodes
 */
 
@@ -264,5 +267,5 @@
  * @return True on success (section was found).
  */
-bool IniParser::Document::setSectionComment(const std::string& sectionName, const std::string& comment)
+bool IniParser::Document::setSectionsComment(const std::string& sectionName, const std::string& comment)
 {
   Section::iterator section = std::find(this->_sections.begin(), this->_sections.end(), sectionName);
@@ -276,5 +279,19 @@
 }
 
-
+/**
+ * @brief Retrieves the comment for a specified section
+ * @param sectionName The name of the section
+ * @returns The Comment of the section.
+ */
+const std::string& IniParser::Document::getSectionsComment(const std::string& sectionName) const
+{
+  Section::const_iterator section = std::find(this->_sections.begin(), this->_sections.end(), sectionName);
+  if (section != this->_sections.end())
+  {
+    return (*section).comment();
+  }
+  else
+    return IniParser::_emptyString;
+}
 
 /**
@@ -607,82 +624,4 @@
 }
 
-void IniParser::setFileComment(const std::string& fileComment)
-{
-  this->_document.setComment(fileComment);
-}
-
-/**
- * @brief adds a section to the list of Sections,
- * if no Section list is availiable, it will create it
- * @param sectionName the Name of the section to add
- * @return true on success... there is only success or segfault :)
- */
-IniParser::Section& IniParser::addSection(const std::string& sectionName)
-{
-  return this->_document.addSection(sectionName);
-}
-
-
-/**
- * @brief adds a new Entry to either the currentSection or the section called by sectionName
- * @param entryName the Name of the Entry to add
- * @param value the value to assign to this entry
- * @param sectionName if NULL then this entry will be set to the currentSection
- * otherwise to the section refered to by sectionName.
- * If both are NULL no entry will be added
- * @return The Entry, that was added.
- */
-bool IniParser::addEntry(const std::string& sectionName, const std::string& entryName, const std::string& value, const std::string& comment)
-{
-  return this->_document.addEntry(sectionName, entryName, value, comment);
-}
-
-/**
- * @brief edits the entry speciefied by entryName in sectionName/currentSection or creates it if it doesn't exist
- * @param entryName the Name of the Entry to add
- * @param value the value to assign to this entry
- * @param sectionName if NULL then this entry will be set to the currentSection
- * otherwise to the section refered to by sectionName.
- * If both are NULL no entry will be added
- * @return true if everything is ok false on error
- */
-bool IniParser::editEntry(const std::string& sectionName, const std::string& entryName, const std::string& value, bool createMissing)
-{
-  return this->_document.editEntry(sectionName, entryName, value, createMissing);
-}
-
-
-/**
- * @brief directly acesses an entry in a section
- * @param sectionName: the section where the entry is to be found
- * @param entryName: the name of the entry to find
- * @param defaultValue: what should be returned in case the entry cannot be found
- * @return The Value of the Entry.
- */
-const std::string& IniParser::getValue(const std::string& sectionName, const std::string& entryName, const std::string& defaultValue) const
-{
-  return this->_document.getValue(sectionName, entryName, defaultValue);
-}
-
-/**
- * Set the Comment of a specified Entry.
- * @param comment the Comment to set
- * @param entryName the Name of the Entry
- * @param sectionName the Name of the Section
- */
-void IniParser::setEntryComment(const std::string& sectionName, const std::string& entryName, const std::string& comment)
-{
-  this->_document.setEntryComment(sectionName, entryName, comment);
-}
-
-/**
- * @param entryName the Entry to query for
- * @param sectionName the Section to Query for
- * @returns the queried Comment.
- */
-const std::string& IniParser::getEntryComment(const std::string& sectionName, const std::string& entryName) const
-{
-  return this->_document.getEntryComment(sectionName, entryName);
-}
 
 /**
Index: trunk/src/lib/parser/ini_parser/ini_parser.h
===================================================================
--- trunk/src/lib/parser/ini_parser/ini_parser.h	(revision 9881)
+++ trunk/src/lib/parser/ini_parser/ini_parser.h	(revision 9883)
@@ -5,5 +5,4 @@
  * Can be used to find a defined [Section] in an ini file and get the VarName = Value entries
  */
-
 #ifndef _INI_PARSER_H
 #define _INI_PARSER_H
@@ -116,5 +115,6 @@
     Section& addSection(const std::string& sectionName, const std::string& comment = "");
     bool removeSection(const std::string& sectionName);
-    bool setSectionComment(const std::string& sectionName, const std::string& comment);
+    bool setSectionsComment(const std::string& sectionName, const std::string& comment);
+    const std::string& getSectionsComment(const std::string& sectionName) const;
 
     /** @returns list of all sections */
@@ -160,34 +160,46 @@
   bool writeFile(const std::string& fileName = "") const;
 
-  void setFileComment(const std::string& fileComment);
+  //! @param fileComment the comment of the Document */
+  void setFileComment(const std::string& fileComment) { this->_document.setComment(fileComment); };
   /** @returns comments for the File. */
   const std::string& getFileComment() const { return this->_document.comment(); };
 
-  /// Woring with Sections.
+  /// Working with Sections.
   Section& addSection(const std::string& sectionName);
   // iterate through sections with these Functions
-  //! see Section::getSection()
+  //! @see Section::getSection()
   Section* getSection(const std::string& sectionName) { return this->_document.getSection(sectionName); };
-  Section::const_iterator getSectionIt(const std::string& sectionName) const;
-
-  //! see Section::begin()
+  //! @see Document::getSectionIt()
+  Section::const_iterator getSectionIt(const std::string& sectionName) const { return this->_document.getSectionIt(sectionName); };
+
+  //! @see Document::begin()
   Section::iterator begin() { return this->_document.begin(); };
-  //! see Section::begin()
+  //! @see Document::begin()
   Section::const_iterator begin() const { return this->_document.begin(); };
-    //! see Section::end()
+  //! @see Document::end()
   Section::iterator end() { return this->_document.end(); };
-    //! see Section::end()
+  //! @see Document::end()
   Section::const_iterator end() const { return this->_document.end(); };
-
-  void setSectionComment(const std::string& sectionName, const std::string& comment);
-  const std::string& getSectionsComment(const std::string& sectionNane) const;
+  //! @see Document::setSectionComment()
+  void setSectionsComment(const std::string& sectionName, const std::string& comment) { this->_document.setSectionsComment(sectionName, comment); };
+  //! @see Document::getSectionsComment()
+  const std::string& getSectionsComment(const std::string& sectionName) const { return this->_document.getSectionsComment(sectionName); };
 
   /// Working on Entries. (globally)
-  bool addEntry(const std::string& sectionName, const std::string& entryName, const std::string& value, const std::string& comment);
-  const std::string& getValue(const std::string& sectionNmae, const std::string& entryName, const std::string& defaultValue = "") const;
-  bool editEntry(const std::string& sectionName, const std::string& entryName, const std::string& value, bool createMissing = true);
-
-  void setEntryComment(const std::string& sectionName, const std::string& entryName, const std::string& comment);
-  const std::string& getEntryComment(const std::string& sectionName, const std::string& entryName) const;
+  //! @see Document::addEntry()
+  bool addEntry(const std::string& sectionName, const std::string& entryName, const std::string& value, const std::string& comment)
+  { return this->_document.addEntry(sectionName, entryName, value, comment); };
+  //! @see Document::getValue()
+  const std::string& getValue(const std::string& sectionName, const std::string& entryName, const std::string& defaultValue = "") const
+  { return this->_document.getValue(sectionName, entryName, defaultValue); };
+  //! @see Document::editEntry()
+  bool editEntry(const std::string& sectionName, const std::string& entryName, const std::string& value, bool createMissing = true)
+  { return this->_document.editEntry(sectionName, entryName, value, createMissing); };
+  //! @see Document::setEntryComment()
+  void setEntryComment(const std::string& sectionName, const std::string& entryName, const std::string& comment)
+  { this->_document.setEntryComment(sectionName, entryName, comment); };
+  //! @see Document::getEntryComment()
+  const std::string& getEntryComment(const std::string& sectionName, const std::string& entryName) const
+  { return this->_document.getEntryComment(sectionName, entryName); };
 
   // maintenance.
