Gnash  0.8.11dev
String_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 String object.
20 
21 #ifndef GNASH_STRING_H
22 #define GNASH_STRING_H
23 
24 #include <string>
25 #include "Relay.h"
26 
27 namespace gnash {
28 
29 class as_object;
30 struct ObjectURI;
31 class Global_as;
32 
33 class String_as : public Relay
34 {
35 
36 public:
37 
38  explicit String_as(std::string s);
39 
40  const std::string& value() {
41  return _string;
42  }
43 
44 private:
45  std::string _string;
46 };
47 
49 void string_class_init(as_object& global, const ObjectURI& uri);
50 
51 void registerStringNative(as_object& global);
52 
53 }
54 
55 #endif // GNASH_STRING_H
uri
Definition: test.py:12
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
The base class for all ActionScript objects.
Definition: as_object.h:161
A URI for describing as_objects.
Definition: ObjectURI.h:44
Definition: String_as.h:33
This is the base class for type-specific object data.
Definition: Relay.h:49
const std::string & value()
Definition: String_as.h:40
Definition: GnashKey.h:165
void string_class_init(as_object &where, const ObjectURI &uri)
Initialize the global String class.
Definition: String_as.cpp:107
String_as(std::string s)
Definition: String_as.cpp:76
void registerStringNative(as_object &global)
Definition: String_as.cpp:83