00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __XMLGENERATOR_H
00018 #define __XMLGENERATOR_H
00019
00020
00021 #include <iostream>
00022 #include "nedelements.h"
00023
00024 using std::ostream;
00025
00031 void generateXML(ostream& out, NEDElement *tree, bool srcloc, int indentsize = 4);
00032
00038 class NEDXMLGenerator
00039 {
00040 protected:
00041 bool printsrcloc;
00042 int indentsize;
00043 virtual void printAttrValue(ostream& out, const char *s);
00044 virtual void doGenerate(ostream& out, NEDElement *node, int level);
00045
00046 public:
00050 NEDXMLGenerator();
00051
00055 virtual ~NEDXMLGenerator();
00056
00064 virtual void setSourceLocationAttributes(bool srcloc);
00065
00069 virtual void setIndentSize(int indentsize);
00070
00078 virtual void generate(ostream& out, NEDElement *tree);
00079 };
00080
00081 #endif