Main Page Namespace List Class Hierarchy Alphabetical List Data Structures File List Namespace Members Data Fields Globals

# ExCXMLParser.h

Go to the documentation of this file.

    00001 /*
    00002  * ExNihilo 3D Engine
    00003  *
    00004  *  This program is free software; you can redistribute it and/or modify
    00005  *  it under the terms of the GNU General Public License as published by
    00006  *  the Free Software Foundation; either version 2 of the License, or
    00007  *  (at your option) any later version.
    00008  *
    00009  *  This program is distributed in the hope that it will be useful,
    00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00012  *  GNU Library General Public License for more details.
    00013  *
    00014  *  You should have received a copy of the GNU General Public License
    00015  *  along with this program; if not, write to the Free Software
    00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    00017  *
    00018  * Please read AUTHORS file !!!
    00019  *
    00020  * $Id: ExCXMLParser.h,v 1.1 2002/08/01 19:37:49 binny Exp $
    00021  *
    00022  */
    00023
    00024 #ifndef __EXCXMLPARSER_H
    00025 #define __EXCXMLPARSER_H
    00026
    00027 #include "ExCFile.h"
    00028 #include <iostream>
    00029 #include <string>
    00030 #include <vector>
    00031
    00032 #ifdef XML_TEST
    00033
    00034 class ExCXMLAction {
    00035         private:
    00036                 int action;
    00037                 string command;
    00038                 string sub;
    00039                 int args;
    00040                 vector<int> iarg;
    00041                 vector<string> sarg;
    00042         public:
    00043                 ExCXMLAction ();
    00044                 ~ExCXMLAction ();
    00045
    00046                 void setAction (int);
    00047                 void setCommand (string);
    00048                 void setSub (string);
    00049                 void setArgs (int);
    00050                 void add (string);
    00051                 void add (int);
    00052
    00053                 bool isInt (void);
    00054                 bool isString (void);
    00055
    00056                 int getAction (void);
    00057                 string getCommand (void);
    00058                 string getSub (void);
    00059                 int getArgs (void);
    00060                 vector<int> getInt (void);
    00061                 vector<string> getString (void);
    00062                 void reset (void);
    00063 };
    00064
    00065 class ExCXMLFileParse {
    00066         private:
    00067                 vector<ExCXMLAction> _action;
    00068                 string type;
    00069         public:
    00070                 ExCXMLFileParse ();
    00071                 ~ExCXMLFileParse ();
    00072
    00073                 void add (ExCXMLAction);
    00074                 void setType (string);
    00075                 string getType (void);
    00076                 vector<ExCXMLAction> getParsing (void);
    00077 };
    00078
    00079 class ExCXMLParser {
    00080         private:
    00081                 ExCXMLFileParse action_parsing;
    00082         public:
    00083                 ExCXMLParser ();
    00084                 ~ExCXMLParser ();
    00085
    00086                 ExCXMLFileParse parse (ExCFileReader*);
    00087 };
    00088
    00089 #endif // __EXCXMLPARSER_H
    00090
    00091 #endif // XML_TEST