00001 // function.h 00002 // 00003 // Copyright (C) 2002, Chris Laurel <claurel@shatters.net> 00004 // 00005 // This program is free software; you can redistribute it and/or 00006 // modify it under the terms of the GNU General Public License 00007 // as published by the Free Software Foundation; either version 2 00008 // of the License, or (at your option) any later version. 00009 00010 #ifndef CELSCRIPT_FUNCTION_H_ 00011 #define CELSCRIPT_FUNCTION_H_ 00012 00013 #include <celscript/celx.h> 00014 #include <vector> 00015 #include <string> 00016 #include <celscript/value.h> 00017 00018 namespace celx 00019 { 00020 00021 class Statement; 00022 class ExecutionContext; 00023 00024 class Function 00025 { 00026 public: 00027 Function(std::vector<std::string>*, Statement*); 00028 Function(const Function&); 00029 ~Function(); 00030 00031 Value call(ExecutionContext&); 00032 00033 private: 00034 std::vector<std::string>* arguments; 00035 Statement* body; 00036 }; 00037 00038 } // namespace celx 00039 00040 #endif // CELSCRIPT_FUNCTION_H_
1.4.1