# nedsaxhandler.h

Go to the documentation of this file.

    00001 //==========================================================================
    00002 //  NEDSAXHANDLER.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 #ifndef __NEDSAXHANDLER_H
    00017 #define __NEDSAXHANDLER_H
    00018
    00019
    00020 #include "nedelement.h"
    00021 #include "saxparser.h"
    00022
    00023
    00042 class NEDSAXHandler : public SAXHandler
    00043 {
    00044     NEDElement *root;
    00045     NEDElement *current;
    00046     const char *sourcefilename;
    00047
    00048   public:
    00052     NEDSAXHandler(const char *filename);
    00053
    00057     virtual ~NEDSAXHandler();
    00058
    00062     virtual NEDElement *getTree();
    00063
    00066     virtual void startElement(const char *name, const char **atts);
    00067     virtual void endElement(const char *name);
    00068     virtual void characterData(const char *s, int len);
    00069     virtual void processingInstruction(const char *target, const char *data);
    00070     virtual void comment(const char *data);
    00071     virtual void startCdataSection();
    00072     virtual void endCdataSection();
    00074 };
    00075
    00076 #endif
    00077