Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

test_docMan.cxx File Reference

#include "xmlUtil/docMan/GDDDocMan.h"
#include "xml/docMan/DocClient.h"
#include <dom/DOM_Element.hpp>
#include <dom/DOMString.hpp>
#include "xml/Dom.h"
#include <string>
#include <iostream>

Go to the source code of this file.

Compounds

class  MiniClient

Functions

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


Function Documentation

int main int    argc,
char *    argv[]
 

Main program for the eval application.

Parameters:
arg1  is the input xml file
arg2  is specification for the output file, or "-" to output to std::cout

Definition at line 46 of file test_docMan.cxx.

References xmlUtil::GDDDocMan::getPointer(), and xmlUtil::GDDDocMan::parse().

00046                                  {
00047 
00048 
00049   std::string defFile("../xml/flight.xml");
00050   std::string* pFileName = &defFile;
00051   if (argc >= 2) pFileName = new std::string(argv[1]);
00052 
00053   // Need a client
00054   MiniClient* myClient = new MiniClient("firstClient");
00055   MiniClient* myClient2 = new MiniClient("secondClient");
00056 
00057   // First the standard DocMan
00058   std::cout << "Output from DocMan parsing " << std::endl;
00059   xml::DocMan* pMan = xml::DocMan::getPointer();
00060   pMan->regClient("constants", myClient);
00061   pMan->regClient("section", myClient);
00062   pMan->regClient("section", myClient2);
00063   pMan->regClient("source", myClient);  
00064   pMan->parse(*pFileName);
00065 
00066   // Now GDDDocMan
00067   std::cout << std::endl << "Output from GGDDocMan parsing " << std::endl;
00068   xmlUtil::GDDDocMan* pGDDMan = xmlUtil::GDDDocMan::getPointer();
00069   pGDDMan->regClient("constants", myClient);
00070   pGDDMan->regClient("section", myClient);
00071   pGDDMan->regClient("idDict", myClient);
00072   pGDDMan->parse(*pFileName);
00073     
00074   return 0;
00075 }


Generated on Wed Oct 16 14:02:48 2002 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001