libeblearntools
|
#include <configuration.h>
Public Member Functions | |
textlist () | |
constructor. | |
textlist (const textlist &txt) | |
deep copy constructor. | |
virtual | ~textlist () |
destructor. | |
void | update (const string &varname, const string &value) |
void | print (ostream &out) |
write entire text to out (using new variables if updated). |
a class containing the original text of the configuration file in a list form. once variables have been updated, they can be inserted back to this list to recreate the original file with the new values.
void ebl::textlist::update | ( | const string & | varname, |
const string & | value | ||
) |
replace original line with variable assignment to value, everywhere that is indicated by a second element equal to varname. if variable is not found, push it at the end of the list.