Gnash  0.8.11dev
abc_function.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
3 // Free Software Foundation, Inc.
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 
19 #ifndef GNASH_ABC_FUNCTION_H
20 #define GNASH_ABC_FUNCTION_H
21 
22 #ifdef HAVE_CONFIG_H
23 #include "gnashconfig.h"
24 #endif
25 
26 #include "as_function.h"
27 #include "Method.h"
28 
29 namespace gnash {
30  class as_value;
31  class CodeStream;
32 }
33 
34 namespace gnash {
35 namespace abc {
36 
37 class Machine;
38 
40 class abc_function : public as_function
41 {
42 
43 public:
44  abc_function(Method* methodInfo, Machine* machine);
45 
46  as_value call(const fn_call& fn);
47 
49  return _methodInfo->getBody();
50  }
51 
52  std::uint32_t getMaxRegisters() const {
53  return _methodInfo->getMaxRegisters();
54  }
55 
56  bool needsActivation() const {
57  return _methodInfo->needsActivation();
58  }
59 
60 private:
61 
62  Method* _methodInfo;
63 
64  Machine* _machine;
65 
66 };
67 
68 } // namespace abc
69 } // gnash namespace
70 
71 #endif
as_value call(const fn_call &fn)
Function dispatch.
Definition: abc_function.cpp:37
CodeStream * getBody()
Definition: Method.h:136
ActionScript value type.
Definition: as_value.h:94
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
abc_function(Method *methodInfo, Machine *machine)
Definition: abc_function.cpp:27
Definition: CodeStream.h:40
bool needsActivation() const
Definition: abc_function.h:56
bool needsActivation() const
Definition: Method.h:128
The virtual machine for executing ABC (ActionScript Bytecode).
Definition: Machine.h:73
std::uint32_t getMaxRegisters()
Definition: Method.h:71
CodeStream * getCodeStream() const
Definition: abc_function.h:48
std::uint32_t getMaxRegisters() const
Definition: abc_function.h:52
ABC-defined Function.
Definition: abc_function.h:40
Definition: Method.h:53
Parameters/environment for builtin or user-defined functions callable from ActionScript.
Definition: fn_call.h:117
ActionScript Function, either builtin or SWF-defined.
Definition: as_function.h:62