script_scanner.hpp

Go to the documentation of this file.
00001 /* $Id: script_scanner.hpp 17570 2009-09-19 09:51:14Z rubidium $ */
00002 
00003 /*
00004  * This file is part of OpenTTD.
00005  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
00006  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00007  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
00008  */
00009 
00012 #ifndef SCRIPT_SCANNER_HPP
00013 #define SCRIPT_SCANNER_HPP
00014 
00015 #include "../fileio_type.h"
00016 
00017 class ScriptScanner {
00018 public:
00019   ScriptScanner();
00020   ~ScriptScanner();
00021 
00025   class Squirrel *GetEngine() { return this->engine; }
00026 
00030   const char *GetMainScript() { return this->main_script; }
00031 
00037   void ScanScriptDir(const char *info_file_name, Subdirectory search_dir);
00038 
00039 private:
00043   void ScanDir(const char *dirname, const char *info_file_name);
00044 
00045 protected:
00046   class Squirrel *engine;
00047   char main_script[1024];
00048 };
00049 
00050 #endif /* SCRIPT_SCANNER_HPP */

Generated on Sun Jan 9 16:02:01 2011 for OpenTTD by  doxygen 1.6.1