|
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- |
|
2 * vim: set ts=8 sts=4 et sw=4 tw=99: |
|
3 * This Source Code Form is subject to the terms of the Mozilla Public |
|
4 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
6 |
|
7 // This file imports some common JS:: names into the js namespace so we can |
|
8 // make unqualified references to them. |
|
9 |
|
10 #ifndef NamespaceImports_h |
|
11 #define NamespaceImports_h |
|
12 |
|
13 // These includes are needed these for some typedefs (e.g. HandleValue) and |
|
14 // functions (e.g. NullValue())... |
|
15 #include "js/CallNonGenericMethod.h" |
|
16 #include "js/TypeDecls.h" |
|
17 #include "js/Value.h" |
|
18 |
|
19 // ... but we do forward declarations of the structs and classes not pulled in |
|
20 // by the headers included above. |
|
21 namespace JS { |
|
22 |
|
23 class Latin1CharsZ; |
|
24 class ConstTwoByteChars; |
|
25 class TwoByteChars; |
|
26 |
|
27 class AutoFunctionVector; |
|
28 class AutoIdVector; |
|
29 class AutoObjectVector; |
|
30 class AutoScriptVector; |
|
31 class AutoValueVector; |
|
32 |
|
33 class AutoIdArray; |
|
34 |
|
35 class AutoGCRooter; |
|
36 template <typename T> class AutoVectorRooter; |
|
37 template<typename K, typename V> class AutoHashMapRooter; |
|
38 template<typename T> class AutoHashSetRooter; |
|
39 |
|
40 class SourceBufferHolder; |
|
41 |
|
42 class HandleValueArray; |
|
43 |
|
44 } |
|
45 |
|
46 // Do the importing. |
|
47 namespace js { |
|
48 |
|
49 using JS::Value; |
|
50 using JS::BooleanValue; |
|
51 using JS::DoubleValue; |
|
52 using JS::Float32Value; |
|
53 using JS::Int32Value; |
|
54 using JS::IsPoisonedValue; |
|
55 using JS::MagicValue; |
|
56 using JS::NullValue; |
|
57 using JS::NumberValue; |
|
58 using JS::ObjectOrNullValue; |
|
59 using JS::ObjectValue; |
|
60 using JS::PrivateUint32Value; |
|
61 using JS::PrivateValue; |
|
62 using JS::StringValue; |
|
63 using JS::UndefinedValue; |
|
64 |
|
65 using JS::IsPoisonedPtr; |
|
66 |
|
67 using JS::Latin1CharsZ; |
|
68 using JS::ConstTwoByteChars; |
|
69 using JS::TwoByteChars; |
|
70 |
|
71 using JS::AutoFunctionVector; |
|
72 using JS::AutoIdVector; |
|
73 using JS::AutoObjectVector; |
|
74 using JS::AutoScriptVector; |
|
75 using JS::AutoValueVector; |
|
76 |
|
77 using JS::AutoIdArray; |
|
78 |
|
79 using JS::AutoGCRooter; |
|
80 using JS::AutoHashMapRooter; |
|
81 using JS::AutoHashSetRooter; |
|
82 using JS::AutoVectorRooter; |
|
83 |
|
84 using JS::CallArgs; |
|
85 using JS::CallNonGenericMethod; |
|
86 using JS::CallReceiver; |
|
87 using JS::CompileOptions; |
|
88 using JS::IsAcceptableThis; |
|
89 using JS::NativeImpl; |
|
90 using JS::OwningCompileOptions; |
|
91 using JS::ReadOnlyCompileOptions; |
|
92 using JS::SourceBufferHolder; |
|
93 |
|
94 using JS::Rooted; |
|
95 using JS::RootedFunction; |
|
96 using JS::RootedId; |
|
97 using JS::RootedObject; |
|
98 using JS::RootedScript; |
|
99 using JS::RootedString; |
|
100 using JS::RootedValue; |
|
101 |
|
102 using JS::PersistentRooted; |
|
103 using JS::PersistentRootedFunction; |
|
104 using JS::PersistentRootedId; |
|
105 using JS::PersistentRootedObject; |
|
106 using JS::PersistentRootedScript; |
|
107 using JS::PersistentRootedString; |
|
108 using JS::PersistentRootedValue; |
|
109 |
|
110 using JS::Handle; |
|
111 using JS::HandleFunction; |
|
112 using JS::HandleId; |
|
113 using JS::HandleObject; |
|
114 using JS::HandleScript; |
|
115 using JS::HandleString; |
|
116 using JS::HandleValue; |
|
117 |
|
118 using JS::MutableHandle; |
|
119 using JS::MutableHandleFunction; |
|
120 using JS::MutableHandleId; |
|
121 using JS::MutableHandleObject; |
|
122 using JS::MutableHandleScript; |
|
123 using JS::MutableHandleString; |
|
124 using JS::MutableHandleValue; |
|
125 |
|
126 using JS::NullHandleValue; |
|
127 using JS::UndefinedHandleValue; |
|
128 |
|
129 using JS::HandleValueArray; |
|
130 |
|
131 using JS::Zone; |
|
132 |
|
133 } /* namespace js */ |
|
134 |
|
135 #endif /* NamespaceImports_h */ |