readconf.cpp File Reference

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

Include dependency graph for readconf.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])


Detailed Description

Date:
2008-05-26
Author:
grymse@alhem.net

Definition in file readconf.cpp.


Function Documentation

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 }


Generated on Sun Oct 11 10:57:20 2009 for Xml Schema class generator by  doxygen 1.5.5