Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM FileMode.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_FILEMODEBINDING_H_
#define DOM_FILEMODEBINDING_H_
#include "js/CallAndConstruct.h"
#include "js/RootingAPI.h"
#include "js/TypeDecls.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/EnumTypeTraits.h"
#include "mozilla/Span.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"
namespace mozilla {
namespace dom {
struct NativePropertyHooks;
class ProtoAndIfaceCache;
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace dom {
enum class FileMode : uint8_t {
Readonly,
Readwrite,
};
namespace binding_detail {
template <> struct EnumStrings<FileMode> {
static const nsLiteralCString Values[2];
};
} // namespace binding_detail
bool
ToJSValue(JSContext* aCx, FileMode aArgument, JS::MutableHandle<JS::Value> aValue);
} // namespace dom
template <>
struct MaxContiguousEnumValue<dom::FileMode>
{
static constexpr dom::FileMode value = dom::FileMode::Readwrite;
static_assert(static_cast<uint8_t>(dom::FileMode::Readonly) == 0,
"We rely on this in ContiguousEnumValues");
static_assert(mozilla::ArrayLength(dom::binding_detail::EnumStrings<dom::FileMode>::Values) - 1 == UnderlyingValue(value),
"Mismatch between enum strings and enum count");
};
} // namespace mozilla
#endif // DOM_FILEMODEBINDING_H_