00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __XMLGENERATOR_H
00016 #define __XMLGENERATOR_H
00017
00018
00019 #include <iostream>
00020 #include "nedelements.h"
00021
00022 using std::ostream;
00023
00029 void generateXML(ostream& out, NEDElement *tree, bool srcloc, int indentsize = 4);
00030
00036 class NEDXMLGenerator
00037 {
00038 protected:
00039 bool printsrcloc;
00040 int indentsize;
00041 virtual void printAttrValue(ostream& out, const char *s);
00042 virtual void doGenerate(ostream& out, NEDElement *node, int level);
00043
00044 public:
00048 NEDXMLGenerator();
00049
00053 virtual ~NEDXMLGenerator();
00054
00062 virtual void setSourceLocationAttributes(bool srcloc);
00063
00067 virtual void setIndentSize(int indentsize);
00068
00076 virtual void generate(ostream& out, NEDElement *tree);
00077 };
00078
00079 #endif