1. Andreas Tscharner
  2. lrc


lrc / src / compiler / RIFParser.hxx

//      RIFParser.hxx
//      Copyright 2011 Andreas Tscharner <andy@vis.ethz.ch>
//      This program is free software; you can redistribute it and/or modify
//      it under the terms of the GNU Lesser General Public License as
//      published by the Free Software Foundation; either version 3 of the
//      License, or (at your option) any later version.
//      This program is distributed in the hope that it will be useful,
//      but WITHOUT ANY WARRANTY; without even the implied warranty of
//      GNU General Public License for more details.
//      You should have received a copy of the GNU Lesser General Public
//      License along with this program; if not, write to the Free Software
//      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
//      MA 02110-1301, USA.

/*! \file RIFParser.hxx
 * This file contains the declaration of the RIFParser class, a class to
 * parse the RIF input file for \c lrc
 * \author Andreas Tscharner
 * \date 2011-09-26

#ifndef __RIFPARSER_HXX__
#define __RIFPARSER_HXX__

// Include files
#include "InFileParser.hxx"

/*! \class RIFParser
 *  \brief Class to parse a .rif (XML) file
 * This class is used to parse a .rif file. The .rif file is actually a XML
 * file
class RIFParser : public InFileParser
		/*! \brief Constructor
		 * This is the only constructor of the class and it expects a
		 * filename as parameter
		 * \param[in] p_filename Filename of .rif file
		 * \exception lrcFileNotFoundException Exception that is thrown if
		 * the given .rif file could not be found
		RIFParser(char *) throw (lrcFileNotFoundException);

		/*! \brief Parses the file
		 * This method parses the .rif file, creates a ResourceData class
		 * for each entry and adds them to the internal structure
		 * \remarks If the method returns ERROR_PARSE, get_internal_error
		 *          will provide more information
		 * \retval NO_ERROR File successfully parsed
		 * \retval ERROR_FILE_OPEN An error occurred while trying to open
		 *                         the file
		 * \retval ERROR_PARSE An error occurred while trying to parse the
		 *                     file
		int parse(void);

#endif /* __RIFPARSER_HXX__ */