xmlgenerator.h

Go to the documentation of this file.
00001 //==========================================================================
00002 //  XMLGENERATOR.H - part of
00003 //
00004 //                     OMNeT++/OMNEST
00005 //            Discrete System Simulation in C++
00006 //
00007 //==========================================================================
00008 
00009 /*--------------------------------------------------------------*
00010   Copyright (C) 2002-2005 Andras Varga
00011 
00012   This file is distributed WITHOUT ANY WARRANTY. See the file
00013   `license' for details on this and other legal matters.
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

Generated on Sat Oct 21 17:47:58 2006 for OMNeT++/OMNEST NEDXML by  doxygen 1.4.6