Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9869 in orxonox.OLD for trunk/src/lib/parser/ini_parser


Ignore:
Timestamp:
Oct 3, 2006, 12:19:30 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

Location:
trunk/src/lib/parser/ini_parser
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/parser/ini_parser/Makefile.am

    r8330 r9869  
    1 INCLUDES=-I../../util
     1INCLUDES = -I../../..
    22
    33
  • trunk/src/lib/parser/ini_parser/ini_parser.cc

    r9406 r9869  
    2929
    3030#ifdef DEBUG_LEVEL
    31  #include "../../../defs/debug.h"
     31 #include "../../../lib/util/debug.h"
    3232#else
    3333 #define PRINTF(x) printf
     
    165165      else if( (ptr = strchr( lineBegin, '=')) != NULL)
    166166      {
    167         if (currentSection == NULL)
     167        if (currentSection == this->sections.end())
    168168        {
    169169          PRINTF(2)("Not in a Section yet for %s\n", lineBegin);
     
    470470  {
    471471    std::list<IniEntry>::const_iterator entry = this->getEntryIT(entryName, sectionName);
    472     if (entry != NULL &&  (*entry).name == entryName)
     472    if (/** FIXME entry != NULL && */  (*entry).name == entryName)
    473473      return (*entry).value;
    474474    PRINTF(2)("Entry '%s' in section '%s' not found.\n", entryName.c_str(), sectionName.c_str());
     
    627627      if ((*entry).name == entryName)
    628628        break;
    629   if (entry == (*section).entries.end())
    630     return NULL;
    631   else
    632     return entry;
     629  return entry;
    633630}
    634631
     
    650647      if ((*entry).name == entryName)
    651648        break;
    652   if (entry == (*section).entries.end())
    653     return NULL;
    654   else
    655     return entry;
     649  return entry;
    656650}
    657651
  • trunk/src/lib/parser/ini_parser/ini_parser.h

    r8330 r9869  
    1111#define PARSELINELENGHT     512       //!< how many chars to read at once
    1212
    13 #include "filesys/file.h"
     13#include "lib/util/filesys/file.h"
    1414#include <list>
    1515
     
    6666    bool addVar(const std::string& entryName, const std::string& value, const std::string& sectionName = "" );
    6767    const std::string& getVar(const std::string& entryName, const std::string& sectionName, const std::string& defaultValue = "") const;
    68     bool IniParser::editVar(const std::string& entryName, const std::string& value, const std::string& sectionName = "", bool createMissing = true);
     68    bool editVar(const std::string& entryName, const std::string& value, const std::string& sectionName = "", bool createMissing = true);
    6969    void setEntryComment(const std::string& comment, const std::string& entryName, const std::string& sectionName);
    7070    const std::string& getEntryComment(const std::string& entryName, const std::string& sectionName) const;
Note: See TracChangeset for help on using the changeset viewer.