Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5935 in orxonox.OLD for trunk/src/lib/util/ini_parser.cc


Ignore:
Timestamp:
Dec 6, 2005, 1:38:55 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: ini-parser works again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/util/ini_parser.cc

    r5934 r5935  
    414414}
    415415
     416
     417/**
     418 * @returns the name of the Current selected Section
     419 */
     420const char* IniParser::getCurrentSection() const
     421{
     422 return (this->currentSection!=NULL) ?
     423   this->currentSection->name :
     424   NULL;
     425 }
     426
     427
     428/**
     429 * @returns the current entries Name, or NULL if we havn't selected a Entry
     430 */
     431const char* IniParser::getCurrentName() const
     432{
     433 if (!this->sections.empty() &&
     434     this->currentEntry != (*this->currentSection).entries.end())
     435   return (*this->currentEntry).name;
     436 else
     437   return NULL;
     438}
     439
     440/**
     441 * @returns the current entries Value, or NULL if we havn't selected a Entry
     442 */
     443const char* IniParser::getCurrentValue() const
     444{
     445  if (!this->sections.empty()
     446      && this->currentEntry != (*this->currentSection).entries.end())
     447    return (*this->currentEntry).value;
     448  else
     449    return NULL;
     450}
     451
     452
    416453/**
    417454 * @brief output the whole tree in a nice and easy way.
Note: See TracChangeset for help on using the changeset viewer.