Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2141 in orxonox.OLD for orxonox/branches/chris/src/ini_parser.cc


Ignore:
Timestamp:
Jul 14, 2004, 3:31:42 PM (20 years ago)
Author:
chris
Message:

orxonox/branches/chris: added lots and lots of doxygen tags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/chris/src/ini_parser.cc

    r2066 r2141  
    1919using namespace std;
    2020
     21/**
     22        \brief constructs an IniParser using a file
     23        \param filename: the path and name of the file to parse
     24*/
    2125IniParser::IniParser (char* filename)
    2226{
     
    2630}
    2731
     32/**
     33        \brief removes the IniParser from memory
     34*/
    2835IniParser::~IniParser ()
    2936{
     
    3138}
    3239
     40/**
     41        \brief opens another file to parse
     42        \param filename: path and name of the new file to parse
     43        \return zero on success or -1 if an error occured;
     44*/
    3345int IniParser::open_file( char* filename)
    3446{
     
    4456}
    4557
     58/**
     59        \brief set the parsing cursor to the specified section
     60        \param section: the name of the section to set the cursor to
     61        \return zero on success or -1 if the section could not be found
     62*/
    4663int IniParser::get_section( char* section)
    4764{
     
    7794}
    7895
     96/**
     97        \brief gets the next VarName=VarValue pair from the parsing stream
     98        \param name: a pointer to a buffer to store the name of the entry
     99        \param value: a pointer to a buffer to store the value of the entry
     100        \return zero if the buffers have been filled with data or -1 if there are no entries left in the current section
     101*/
    79102int IniParser::next_var( char* name, char* value)
    80103{
     
    111134}
    112135
     136/**
     137        \brief directly acesses an entry in a section
     138        \param name: the name of the entry to find
     139        \param section: the section where the entry is to be found
     140        \param defvalue: what should be returned in case the entry cannot be found
     141        \return a pointer to a buffer conatining the value of the specified entry. This buffer will contain the data specified in defvalue in case the entry wasn't found
     142
     143        The returned pointer points to an internal buffer, so do not free it on your own. Do not give a NULL pointer to defvalue, this will certainly
     144        lead to unwanted behaviour.
     145*/
    113146char* IniParser::get_var( char* name, char* section, char* defvalue = "")
    114147{
Note: See TracChangeset for help on using the changeset viewer.