Gnash  0.8.11dev
Number_as.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 // Implementation for ActionScript Number object.
20 
21 #ifndef GNASH_NUMBER_H
22 #define GNASH_NUMBER_H
23 
24 
25 
26 namespace gnash {
27 
28 class as_object;
29 struct ObjectURI;
30 class Global_as;
31 
33 void number_class_init(as_object& global, const ObjectURI& uri);
34 
35 void registerNumberNative(as_object& global);
36 
37 }
38 
39 #endif // GNASH_NUMBER_H
gnash::toNumber
double toNumber(const as_value &v, const VM &vm)
Convert an as_value to a double.
Definition: VM.cpp:451
gnash::toInt
std::int32_t toInt(const as_value &v, const VM &vm)
AS2-compatible conversion to 32bit integer.
Definition: VM.cpp:463
gnash::as_object
The base class for all ActionScript objects.
Definition: as_object.h:162
gnash::doubleToString
std::string doubleToString(double val, int radix)
Convert numeric value to string value, following ECMA-262 specification.
Definition: as_value.cpp:832
as_object.h
_
#define _(String)
Definition: log.h:44
gnash::registerNumberNative
void registerNumberNative(as_object &global)
Definition: Number_as.cpp:168
gnash::as_object::init_member
void init_member(const std::string &name, const as_value &val, int flags=DefaultFlags)
Initialize a member value by string.
Definition: as_object.cpp:669
gnash::VM
The AVM1 virtual machine.
Definition: VM.h:72
gnash::number_class_init
void number_class_init(as_object &where, const ObjectURI &uri)
Initialize the global Number class.
Definition: Number_as.cpp:149
gnash
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
as_value.h
NativeFunction.h
Global_as.h
gnash::getGlobal
Global_as & getGlobal(const as_environment &env)
Definition: as_environment.cpp:651
gnash::NSV::PROP_CONSTRUCTOR
@ PROP_CONSTRUCTOR
Definition: namedStrings.h:68
gnash::getVM
VM & getVM(const as_environment &env)
Definition: as_environment.h:222
gnash::createObject
as_object * createObject(const Global_as &gl)
Definition: Global_as.cpp:303
gnash::as_object::DefaultFlags
static const int DefaultFlags
The most common flags for built-in properties.
Definition: as_object.h:192
IF_VERBOSE_ASCODING_ERRORS
#define IF_VERBOSE_ASCODING_ERRORS(x)
Definition: log.h:397
gnash::VM::registerNative
void registerNative(as_c_function_ptr fun, unsigned int x, unsigned int y)
Definition: VM.cpp:268
gnash::VM::getNative
NativeFunction * getNative(unsigned int x, unsigned int y) const
Return a native function or null.
Definition: VM.cpp:276
VM.h
Number_as.h
gnash::log_aserror
void log_aserror(StringType msg, Args... args)
Definition: log.h:331
log.h
fn_call.h
namedStrings.h
gnash::Global_as
The Global object ultimately contains all objects in an ActionScript run.
Definition: Global_as.h:50
test.uri
uri
Definition: test.py:12
gnash::key::o
@ o
Definition: GnashKey.h:161
gnash::PropFlags::readOnly
@ readOnly
Protect from assigning a value.
Definition: PropFlags.h:42
gnash::NSV::PROP_PROTOTYPE
@ PROP_PROTOTYPE
Definition: namedStrings.h:87
gnash::ObjectURI
A URI for describing as_objects.
Definition: ObjectURI.h:45
gnash::key::e
@ e
Definition: GnashKey.h:151