Changeset 5935 in orxonox.OLD for trunk/src/lib/util
- Timestamp:
- Dec 6, 2005, 1:38:55 AM (19 years ago)
- Location:
- trunk/src/lib/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/util/ini_parser.cc
r5934 r5935 414 414 } 415 415 416 417 /** 418 * @returns the name of the Current selected Section 419 */ 420 const 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 */ 431 const 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 */ 443 const 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 416 453 /** 417 454 * @brief output the whole tree in a nice and easy way. -
trunk/src/lib/util/ini_parser.h
r5934 r5935 63 63 bool nextVar(); 64 64 65 /** @returns the name of the Current selected Section */ 66 const char* getCurrentSection() const { return (this->currentSection!=NULL)?this->currentSection->name:NULL; }; 67 /** @returns the current entries Name, or NULL if we havn't selected a Entry */ 68 const char* getCurrentName() const { return (this->currentEntry!=NULL)?this->currentEntry->name:NULL; }; 69 /** @returns the current entries Value, or NULL if we havn't selected a Entry */ 70 const char* getCurrentValue() const { return (this->currentEntry!=NULL)?this->currentEntry->value:NULL; }; 65 const char* getCurrentSection() const; 66 const char* getCurrentName() const; 67 const char* getCurrentValue() const; 71 68 72 69 void debug() const;
Note: See TracChangeset
for help on using the changeset viewer.