#include <map>#include <string>Include dependency graph for config.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Typedefs | |
| typedef std::map< std::string, std::string > | config_m |
Functions | |
| void | parse_config (int argc, char *argv[], const std::string &filename) |
| void | write_config () |
Variables | |
| config_m | config |
|
|
File ......... config.h Published .... 2004-04-18 Author ....... grymse@alhem.net |
|
||||||||||||||||
|
Definition at line 81 of file config.cpp. References config, read_config(), and write_config(). Referenced by main().
00082 {
00083 read_config( filename );
00084 for (int i = 1; i < argc; i++)
00085 if (argv[i][0] == '-' && i < argc - 1)
00086 {
00087 config[argv[i] + 1] = argv[i + 1];
00088 i++;
00089 }
00090 write_config(); // filename );
00091 }
|
|
|
Definition at line 64 of file config.cpp. References config, and config_filename. Referenced by parse_config(), and MyHandler::reg_host().
00065 {
00066 FILE *fil = fopen(config_filename.c_str(),"wt");
00067 if (fil)
00068 {
00069 for (config_m::iterator it = config.begin(); it != config.end(); it++)
00070 {
00071 std::string key = (*it).first;
00072 std::string value = (*it).second;
00073 if (key[0] != '.')
00074 fprintf(fil,"%s %s\n",key.c_str(),value.c_str());
00075 }
00076 fclose(fil);
00077 }
00078 }
|
|
|
Definition at line 31 of file config.h. Referenced by main(), MyTcpSocket::OnLine(), parse_config(), read_config(), MyHandler::reg_host(), and write_config(). |
1.3.6