addKeyToSection will add the key even if it exists.
Call setValue to change the value of an already existing key.
Going to change this behavior of addKeyToSection.
I didn't take a look on the empty lines yet but I defenetly will
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.


Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.

Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
Sylence wrote:As far as my understanding of templates goes (which is not very far) you would still have to create a get method for every single type because the compiler can't know wheather you want the returned value to be an int or a float for example.

Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
all:
$(CXX) -I../irrlicht-1.4/include/ -c *.cpp
ar r libinireader.a *.o
...
// checking rocket.ini for different parameters
IIniFileReader* ini = createIniFileReader("rocket.ini");
// if ini file doesnt excists, create a new one with standard parameters
if (!ini->load()) {
ini->drop();
ini = createIniFileReaderEmpty();
ini->setSaveFileName("rocket.ini");
// device section
ini->addSection("video");
ini->addKeyToSection("video", "AA", "0");
ini->addKeyToSection("video", "Bits", "32");
ini->save();
ini->drop();
}
...
Sections[i]->Keys.push_back(k);

ini->addKeyToSection("video", "Bits", "32");
[video]
AA=0


void CIniFileReaderStub::addKeyToSection(const c8 *section, const c8 *name, const c8 *value)
{
SKey* k = new SKey;
strncpy(k->Name,name,64);
if(value)
strncpy(k->Value,value,64);
for(u32 i=0; i<Sections.size(); ++i)
{
if( strcmp(Sections[i]->Name,section) == 0)
{
for(u32 j=0; j<Sections[i]->Keys.size(); ++j)
{
if( strcmp(Sections[i]->Keys[j]->Name,name) == 0)
{
strncpy(Sections[i]->Keys[j]->Value,value,64);
return;
}
}
Sections[i]->Keys.push_back(k);
break;
}
}
}
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
Users browsing this forum: No registered users and 1 guest