Script.h

Go to the documentation of this file.
00001 
00008 /* Copyright, 2004 Werewolf
00009  *
00010  * This file is part of Werewolf.
00011  * Werewolf is free software; you can redistribute it and/or modify
00012  * it under the terms of the GNU General Public License as published by
00013  * the Free Software Foundation; either version 2, or (at your option)
00014  * any later version.
00015 
00016  * Werewolf is distributed in the hope that it will be useful, but
00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00019  * General Public License for more details.
00020 
00021  * You should have received a copy of the GNU General Public License
00022  * along with Werewolf; see the file COPYING. If not, write to the
00023  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
00024  * MA 02111-1307, USA.
00025  */
00026 #ifndef __SCRIPT_H__
00027 #define __SCRIPT_H__
00028 
00029 //
00030 // Standard Includes
00031 //
00032 #include <string>
00033 
00034 //
00035 // System Includes
00036 //
00037 
00038 //
00039 // NeL Includes
00040 //
00041 
00042 //
00043 // Werewolf Includes
00044 //
00045 #include "ScriptFunction.h"
00046 #include "ScriptLoader.h"
00047 
00048 //
00049 // Namespaces
00050 //
00051 
00052 namespace WWSCRIPT {
00053 
00054 class Script {
00055 public:
00056     Script(TScriptLoader script);
00057 
00058     ~Script();
00059 
00060     const void recompileScript() const;
00061 
00062     typedef CHashMap<const char*, ScriptFunction*, strltpred_hash_compare> functionMap;
00063     // typedef std::pair<const char*, ScriptFunction*> functionPair;
00064 
00065     const std::string& getName() const;
00066     const ScriptFunction* getFunction(const char* name) const;
00067     functionMap::const_iterator begin() const;
00068     functionMap::const_iterator end() const;
00069     
00070 
00071 private:
00072     std::string m_name;
00073     std::string m_scriptfile;
00074     std::string m_xmlfile;
00075     std::string m_section;
00076     functionMap m_functions;
00077 };
00078 
00079 }; // END NAMESPACE WWSCRIPT
00080 
00081 #endif // __SCRIPT_H__

Generated on Mon Jan 11 12:03:39 2010 for Werewolf by  doxygen 1.6.1