INET Framework for OMNeT++/OMNEST
vlanTableXMLparser.h
Go to the documentation of this file.
00001 /*
00002  * vlanTableXMLparser.h
00003  *
00004  *  Created on: 16.12.2010
00005  *      Author: xkraus00
00006  */
00007 
00008 #ifndef VLANTABLEXMLPARSER_H_
00009 #define VLANTABLEXMLPARSER_H_
00010 
00011 #include <omnetpp.h>
00012 #include <string>
00013 #include "vlanTable.h"
00014 
00015 
00016 class INET_API VLANTableXMLparser {
00017 
00018 public:
00019         VLANTableXMLparser(VLANTable *);
00020         virtual ~VLANTableXMLparser();
00021 
00022         /* Main parsing function */
00023         bool parse(const char *, const char *);
00024 
00025         void parseInterfaces(cXMLElement * node);
00026         /* parse Port (portVID, etc) info */
00027         void parseVIDPort(cXMLElement * node);
00028 
00029         /* parsing VLANs section */
00030         void parseVLANs(cXMLElement * node);
00031         /* parse particular VLAN info */
00032         void parseVLAN(cXMLElement * node);
00033 
00034         /* parse XML tag written as list  e.g.  <Tagged>1,2,3,4,5,6</Tagged>  */
00035         void parseList(std::vector<int>&, const char *);
00036 
00037 
00038 private:
00039         VLANTable *table;
00040 
00041 
00042 };
00043 
00044 #endif /* VLANTABLEXMLPARSER_H_ */