js/src/NamespaceImports.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/NamespaceImports.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,135 @@
     1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     1.5 + * vim: set ts=8 sts=4 et sw=4 tw=99:
     1.6 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +// This file imports some common JS:: names into the js namespace so we can
    1.11 +// make unqualified references to them.
    1.12 +
    1.13 +#ifndef NamespaceImports_h
    1.14 +#define NamespaceImports_h
    1.15 +
    1.16 +// These includes are needed these for some typedefs (e.g. HandleValue) and
    1.17 +// functions (e.g. NullValue())...
    1.18 +#include "js/CallNonGenericMethod.h"
    1.19 +#include "js/TypeDecls.h"
    1.20 +#include "js/Value.h"
    1.21 +
    1.22 +// ... but we do forward declarations of the structs and classes not pulled in
    1.23 +// by the headers included above.
    1.24 +namespace JS {
    1.25 +
    1.26 +class Latin1CharsZ;
    1.27 +class ConstTwoByteChars;
    1.28 +class TwoByteChars;
    1.29 +
    1.30 +class AutoFunctionVector;
    1.31 +class AutoIdVector;
    1.32 +class AutoObjectVector;
    1.33 +class AutoScriptVector;
    1.34 +class AutoValueVector;
    1.35 +
    1.36 +class AutoIdArray;
    1.37 +
    1.38 +class AutoGCRooter;
    1.39 +template <typename T> class AutoVectorRooter;
    1.40 +template<typename K, typename V> class AutoHashMapRooter;
    1.41 +template<typename T> class AutoHashSetRooter;
    1.42 +
    1.43 +class SourceBufferHolder;
    1.44 +
    1.45 +class HandleValueArray;
    1.46 +
    1.47 +}
    1.48 +
    1.49 +// Do the importing.
    1.50 +namespace js {
    1.51 +
    1.52 +using JS::Value;
    1.53 +using JS::BooleanValue;
    1.54 +using JS::DoubleValue;
    1.55 +using JS::Float32Value;
    1.56 +using JS::Int32Value;
    1.57 +using JS::IsPoisonedValue;
    1.58 +using JS::MagicValue;
    1.59 +using JS::NullValue;
    1.60 +using JS::NumberValue;
    1.61 +using JS::ObjectOrNullValue;
    1.62 +using JS::ObjectValue;
    1.63 +using JS::PrivateUint32Value;
    1.64 +using JS::PrivateValue;
    1.65 +using JS::StringValue;
    1.66 +using JS::UndefinedValue;
    1.67 +
    1.68 +using JS::IsPoisonedPtr;
    1.69 +
    1.70 +using JS::Latin1CharsZ;
    1.71 +using JS::ConstTwoByteChars;
    1.72 +using JS::TwoByteChars;
    1.73 +
    1.74 +using JS::AutoFunctionVector;
    1.75 +using JS::AutoIdVector;
    1.76 +using JS::AutoObjectVector;
    1.77 +using JS::AutoScriptVector;
    1.78 +using JS::AutoValueVector;
    1.79 +
    1.80 +using JS::AutoIdArray;
    1.81 +
    1.82 +using JS::AutoGCRooter;
    1.83 +using JS::AutoHashMapRooter;
    1.84 +using JS::AutoHashSetRooter;
    1.85 +using JS::AutoVectorRooter;
    1.86 +
    1.87 +using JS::CallArgs;
    1.88 +using JS::CallNonGenericMethod;
    1.89 +using JS::CallReceiver;
    1.90 +using JS::CompileOptions;
    1.91 +using JS::IsAcceptableThis;
    1.92 +using JS::NativeImpl;
    1.93 +using JS::OwningCompileOptions;
    1.94 +using JS::ReadOnlyCompileOptions;
    1.95 +using JS::SourceBufferHolder;
    1.96 +
    1.97 +using JS::Rooted;
    1.98 +using JS::RootedFunction;
    1.99 +using JS::RootedId;
   1.100 +using JS::RootedObject;
   1.101 +using JS::RootedScript;
   1.102 +using JS::RootedString;
   1.103 +using JS::RootedValue;
   1.104 +
   1.105 +using JS::PersistentRooted;
   1.106 +using JS::PersistentRootedFunction;
   1.107 +using JS::PersistentRootedId;
   1.108 +using JS::PersistentRootedObject;
   1.109 +using JS::PersistentRootedScript;
   1.110 +using JS::PersistentRootedString;
   1.111 +using JS::PersistentRootedValue;
   1.112 +
   1.113 +using JS::Handle;
   1.114 +using JS::HandleFunction;
   1.115 +using JS::HandleId;
   1.116 +using JS::HandleObject;
   1.117 +using JS::HandleScript;
   1.118 +using JS::HandleString;
   1.119 +using JS::HandleValue;
   1.120 +
   1.121 +using JS::MutableHandle;
   1.122 +using JS::MutableHandleFunction;
   1.123 +using JS::MutableHandleId;
   1.124 +using JS::MutableHandleObject;
   1.125 +using JS::MutableHandleScript;
   1.126 +using JS::MutableHandleString;
   1.127 +using JS::MutableHandleValue;
   1.128 +
   1.129 +using JS::NullHandleValue;
   1.130 +using JS::UndefinedHandleValue;
   1.131 +
   1.132 +using JS::HandleValueArray;
   1.133 +
   1.134 +using JS::Zone;
   1.135 +
   1.136 +} /* namespace js */
   1.137 +
   1.138 +#endif /* NamespaceImports_h */

mercurial