Index: trunk/src/lib/parser/ini_parser/ini_parser.cc
===================================================================
--- trunk/src/lib/parser/ini_parser/ini_parser.cc	(revision 5944)
+++ trunk/src/lib/parser/ini_parser/ini_parser.cc	(revision 5945)
@@ -43,5 +43,5 @@
 {
   this->fileName = NULL;
-
+  this->comment = NULL;
 
   if (fileName != NULL)
@@ -117,4 +117,6 @@
 {
   FILE*    stream;           //< The stream we use to read the file.
+  int      lineCount = 0;    //< The Count of lines.
+
 
   if (this->fileName != NULL)
@@ -142,4 +144,6 @@
     while( fgets (lineBuffer, PARSELINELENGHT, stream))
     {
+//      if (lineCount == 0)
+
       lineBegin = lineBuffer;
       // remove newline char, and \0-terminate
@@ -183,4 +187,6 @@
 
         this->addVar(lineBegin, valueBegin);
+
+        lineCount++;
       }
     }
@@ -203,5 +209,5 @@
 {
   FILE*    stream;           //!< The stream we use to read the file.
-  if( fileName == NULL)
+  if( fileName == NULL && (fileName = this->fileName) == NULL )
     return false;
 
@@ -224,4 +230,9 @@
   }
   fclose(stream);
+}
+
+void IniParser::setFileComment(const char* fileComment)
+{
+
 }
 
@@ -267,4 +278,16 @@
 
 
+void IniParser::setSectionComment(const char* comment, const char* sectionName)
+{
+
+}
+
+
+const char* IniParser::getSectionComment(const char* sectionName) const
+{
+
+}
+
+
 /**
  * @brief moves to the first section
@@ -296,35 +319,4 @@
   else
     return NULL;
-}
-
-
-/**
- * @brief moves to the first Variable of the current Section
- */
-void IniParser::firstVar()
-{
-  if (!this->sections.empty() &&
-      this->currentSection != this->sections.end())
-    this->currentEntry = (*this->currentSection).entries.begin();
-}
-
-
-/**
- * @brief gets the next VarName = VarValue pair from the parsing stream
- * @return true on success, false otherwise (in the latter case name and value will be NULL)
- */
-bool IniParser::nextVar()
-{
-  if ( this->sections.empty()
-       || this->currentSection == this->sections.end()
-       || this->currentEntry == (*this->currentSection).entries.end())
-    return false;
-
-  this->currentEntry++;
-
-  if (this->currentEntry == (*this->currentSection).entries.end())
-    return false;
-  else
-    return true;
 }
 
@@ -351,4 +343,5 @@
   else
     section = this->currentSection;
+
   if (section == this->sections.end())
     return false;
@@ -367,7 +360,7 @@
     strcpy((*section).entries.back().value, value);
     PRINTF(5)("Added Entry %s with Value '%s' to Section %s\n",
-	      (*section).entries.back().name,
-	      (*section).entries.back().value,
-	      (*section).name);
+              (*section).entries.back().name,
+              (*section).entries.back().value,
+              (*section).name);
     return true;
   }
@@ -387,30 +380,18 @@
 const char* IniParser::getVar(const char* entryName, const char* sectionName, const char* defaultValue) const
 {
-  if (fileName != NULL)
-  {
-    std::list<IniSection>::const_iterator section;
-    if (sectionName != NULL)
-      {
-	for (section = this->sections.begin(); section != this->sections.end(); section++)
-	  {
-	    if (!strcmp((*section).name, sectionName))
-	      {
-		break;
-	      }
-	  }
-      }
-    else
-      section = this->currentSection;
-
-   if (section == this->sections.end())
-     {
-       PRINTF(2)("Section %s that should be containing %s not found.\n", sectionName, entryName);
-       return (defaultValue);
-     }
+  if (this->fileName != NULL)
+  {
+    std::list<IniSection>::const_iterator section = this->getSectionIT(sectionName);
+
+  if (section == this->sections.end())
+    {
+      PRINTF(2)("Section %s that should be containing %s not found.\n", sectionName, entryName);
+      return (defaultValue);
+    }
 
     std::list<IniEntry>::const_iterator entry;
     for (entry = (*section).entries.begin(); entry != (*section).entries.end(); entry++)
       if (!strcmp((*entry).name, entryName))
-	return (*entry).value;
+        return (*entry).value;
     PRINTF(2)("Entry '%s' in section '%s' not found.\n", entryName, sectionName);
 
@@ -422,4 +403,50 @@
 
 }
+
+
+const char* IniParser::setEntryComment(const char* comment, const char* entryName, const char* sectionName)
+{
+
+
+}
+
+
+const char* IniParser::getEntryComment(const char* entryName, const char* sectionName) const
+{
+
+
+}
+
+
+/**
+ * @brief moves to the first Variable of the current Section
+ */
+void IniParser::firstVar()
+{
+  if (!this->sections.empty() &&
+       this->currentSection != this->sections.end())
+    this->currentEntry = (*this->currentSection).entries.begin();
+}
+
+
+/**
+ * @brief gets the next VarName = VarValue pair from the parsing stream
+ * @return true on success, false otherwise (in the latter case name and value will be NULL)
+ */
+bool IniParser::nextVar()
+{
+  if ( this->sections.empty()
+       || this->currentSection == this->sections.end()
+       || this->currentEntry == (*this->currentSection).entries.end())
+    return false;
+
+  this->currentEntry++;
+
+  if (this->currentEntry == (*this->currentSection).entries.end())
+    return false;
+  else
+    return true;
+}
+
 
 
@@ -464,4 +491,33 @@
 
 
+std::list<IniParser::IniSection>::const_iterator IniParser::getSectionIT(const char* sectionName) const
+{
+  std::list<IniSection>::const_iterator section;
+  if (sectionName != NULL)
+  {
+    for (section = this->sections.begin(); section != this->sections.end(); section++)
+    {
+      if (!strcmp((*section).name, sectionName))
+      {
+        break;
+      }
+    }
+  }
+  else
+    section = this->currentSection;
+
+  return section;
+}
+
+
+std::list<IniParser::IniEntry>::const_iterator IniParser::getEntryIT(const char* entryName, const char* sectionName) const
+{
+  if (entryName == NULL)
+    return this->currentEntry;
+
+}
+
+
+
 /**
  * @brief output the whole tree in a nice and easy way.
