#include <Sockets/XmlDocument.h>#include <Sockets/XmlNode.h>#include <Sockets/Exception.h>#include "Iconf.h"#include <iostream>

Go to the source code of this file.
| Functions | |
| int | main (int argc, char *argv[]) | 
Definition in file readconf.cpp.
| int main | ( | int | argc, | |
| char * | argv[] | |||
| ) | 
Definition at line 28 of file readconf.cpp.
00029 { 00030 try 00031 { 00032 Xml::XmlDocument doc("conf.xml"); 00033 Xml::XmlNode n(doc); 00034 AJP13::net_alhem_1_0_server::Configuration_t conf(n); 00035 printf("%s\n", conf.GetRootDir().c_str()); 00036 printf("%s\n", conf.GetHosts().GetDefaultHost().ToString("defaultHost").c_str()); 00037 std::list<AJP13::net_alhem_1_0_server::Hosts::Host_t>& ref = conf.GetHosts().GetHost(); 00038 for (std::list<AJP13::net_alhem_1_0_server::Hosts::Host_t>::const_iterator it = ref.begin(); it != ref.end(); it++) 00039 { 00040 printf(" %s\n", (*it).GetName().c_str()); 00041 printf("%s\n\n", (*it).ToString("host").c_str()); 00042 } 00043 } 00044 catch (const Exception& e) 00045 { 00046 std::cout << e.ToString() << std::endl; 00047 } 00048 }
 1.5.5
 1.5.5