ActionExec.h

Go to the documentation of this file.
00001 // 
00002 //   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
00003 // 
00004 // This program is free software; you can redistribute it and/or modify
00005 // it under the terms of the GNU General Public License as published by
00006 // the Free Software Foundation; either version 2 of the License, or
00007 // (at your option) any later version.
00008 // 
00009 // This program is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU General Public License for more details.
00013 // You should have received a copy of the GNU General Public License
00014 // along with this program; if not, write to the Free Software
00015 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00016 
00017 //
00018 
00019 #ifndef GNASH_ACTIONEXEC_H
00020 #define GNASH_ACTIONEXEC_H
00021 
00022 #ifdef HAVE_CONFIG_H
00023 #include "config.h"
00024 #endif
00025 
00026 #include "with_stack_entry.h"
00027 
00028 #include <vector>
00029 
00030 // Forward declarations
00031 namespace gnash {
00032         class action_buffer;
00033         class as_environment;
00034         class as_value;
00035 }
00036 
00037 namespace gnash {
00038 
00040 class ActionExec {
00041 
00043         std::vector<with_stack_entry> with_stack;
00044 
00046         //
00049         size_t _with_stack_limit;
00050 
00051         bool _function2_var;
00052 
00053 public:
00054 
00056         //
00059         const action_buffer& code;
00060 
00062         //
00065         size_t pc;
00066 
00068         //
00071         size_t stop_pc;
00072 
00074         size_t next_pc;
00075 
00077         as_environment& env;
00078 
00080         as_value* retval;
00081 
00083         ActionExec(const action_buffer& abuf, as_environment& newEnv);
00084 
00086         //
00110         ActionExec(const action_buffer& abuf, as_environment& newEnv,
00111                 size_t nStartPC, size_t nExecBytes, as_value* nRetval,  
00112                 const std::vector<with_stack_entry>& initial_with_stack,
00113                 bool nIsFunction2);
00114 
00116         bool isFunction2() { return _function2_var; }
00117 
00119         // 
00122         const std::vector<with_stack_entry>& getWithStack() const
00123         {
00124                 return with_stack;
00125         }
00126 
00128         //
00132         size_t getWithStackLimit() const 
00133         {
00134                 return _with_stack_limit;
00135         }
00136 
00138         //
00143         bool pushWithEntry(const with_stack_entry& entry);
00144 
00146         //
00149         void skip_actions(size_t offset);
00150 
00152         void operator() ();
00153                 
00154 };
00155 
00156 } // namespace gnash
00157 
00158 #endif // GNASH_ACTIONEXEC_H
00159 
00160 // Local Variables:
00161 // mode: C++
00162 // indent-tabs-mode: t
00163 // End:

Generated on Thu Nov 23 22:31:30 2006 for Gnash by  doxygen 1.4.6