Main Page Modules Class Hierarchy Compound List File List Compound Members

# xmlgenerator.h

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