"Fossies" - the Fresh Open Source Software Archive

Member "gnash-0.8.10/libcore/abc/abc_function.h" (19 Jan 2012, 1649 Bytes) of package /linux/www/old/gnash-0.8.10.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code 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 
   39 /// ABC-defined Function 
   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 
   48     CodeStream* getCodeStream() const {
   49         return _methodInfo->getBody();
   50     }
   51 
   52     boost::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