home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2009 February / maximum-cd-2009-02.iso / DiscContents / SMC_1.6_win32.exe / src / core / file_parser.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-07-01  |  1.4 KB  |  50 lines

  1. /***************************************************************************
  2.  * file_parser.h  -  header for the corresponding cpp file
  3.  *
  4.  * Copyright (C) 2005 - 2008 Florian Richter
  5.  ***************************************************************************/
  6. /*
  7.    This program is free software; you can redistribute it and/or modify
  8.    it under the terms of the GNU General Public License as published by
  9.    the Free Software Foundation; either version 3 of the License, or
  10.    (at your option) any later version.
  11.    
  12.    You should have received a copy of the GNU General Public License
  13.    along with this program.  If not, see <http://www.gnu.org/licenses/>.
  14. */
  15.  
  16. #ifndef SMC_FILE_PARSER_H
  17. #define SMC_FILE_PARSER_H
  18.  
  19. #include "../core/globals.h"
  20.  
  21. /* *** *** *** *** *** *** *** *** cFile_parser *** *** *** *** *** *** *** *** *** */
  22.  
  23. // Base class for parsing text files
  24. class cFile_parser
  25. {
  26. public:
  27.     cFile_parser( void );
  28.     virtual ~cFile_parser( void );
  29.  
  30.     // Function: Parse
  31.     // Parses the given file
  32.     bool Parse( string &filename );
  33.  
  34.     // Function: Parse_Line
  35.     // Parses a line of a description file into string parts
  36.     bool Parse_Line( string command, int line );
  37.  
  38.     // Function: HandleMessage
  39.     // Handles the File Line
  40.     virtual bool HandleMessage( string *parts, unsigned int count, unsigned int line );
  41.  
  42.     // data filename
  43.     string data_file;
  44.     // data error count
  45.     unsigned int error_count;
  46. };
  47.  
  48. #endif
  49.  
  50.