chromium/third_party/pdfium/xfa/fxfa/parser/xfa_basic_data.cpp

// Copyright 2016 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com

#include "xfa/fxfa/parser/xfa_basic_data.h"

#include <iterator>
#include <utility>

#include "core/fxcrt/span.h"
#include "fxjs/xfa/cjx_boolean.h"
#include "fxjs/xfa/cjx_container.h"
#include "fxjs/xfa/cjx_datawindow.h"
#include "fxjs/xfa/cjx_delta.h"
#include "fxjs/xfa/cjx_desc.h"
#include "fxjs/xfa/cjx_draw.h"
#include "fxjs/xfa/cjx_encrypt.h"
#include "fxjs/xfa/cjx_eventpseudomodel.h"
#include "fxjs/xfa/cjx_exclgroup.h"
#include "fxjs/xfa/cjx_extras.h"
#include "fxjs/xfa/cjx_field.h"
#include "fxjs/xfa/cjx_form.h"
#include "fxjs/xfa/cjx_handler.h"
#include "fxjs/xfa/cjx_hostpseudomodel.h"
#include "fxjs/xfa/cjx_instancemanager.h"
#include "fxjs/xfa/cjx_layoutpseudomodel.h"
#include "fxjs/xfa/cjx_logpseudomodel.h"
#include "fxjs/xfa/cjx_manifest.h"
#include "fxjs/xfa/cjx_model.h"
#include "fxjs/xfa/cjx_node.h"
#include "fxjs/xfa/cjx_occur.h"
#include "fxjs/xfa/cjx_packet.h"
#include "fxjs/xfa/cjx_script.h"
#include "fxjs/xfa/cjx_signaturepseudomodel.h"
#include "fxjs/xfa/cjx_source.h"
#include "fxjs/xfa/cjx_subform.h"
#include "fxjs/xfa/cjx_textnode.h"
#include "fxjs/xfa/cjx_tree.h"
#include "fxjs/xfa/cjx_treelist.h"
#include "fxjs/xfa/cjx_wsdlconnection.h"
#include "fxjs/xfa/cjx_xfa.h"
#include "xfa/fxfa/fxfa_basic.h"

namespace {

struct PacketTableRecord {};

const PacketTableRecord kPacketTable[] =;

constexpr pdfium::span<const PacketTableRecord> kPacketSpan{};

struct ElementRecord {};

// Contains read-only data that do not require relocation.
// Parts that require relocation are in `kElementNames` below.
constexpr ElementRecord kElementRecords[] =;

constexpr pdfium::span<const ElementRecord> kElementRecordSpan{};

constexpr const char* kElementNames[] =;

constexpr const pdfium::span<const char* const> kElementNameSpan{};

static_assert;

struct AttributeRecord {};

// Contains read-only data that do not require relocation.
// Parts that require relocation are in `kAttributeNames` below.
constexpr AttributeRecord kAttributeRecords[] =;

constexpr pdfium::span<const AttributeRecord> kAttributeRecordSpan{};

constexpr const char* kAttributeNames[] =;

constexpr pdfium::span<const char* const> kAttributeNameSpan{};

static_assert;

struct AttributeValueRecord {};

// Contains read-only data that do not require relocation.
// Parts that require relocation are in `kAttributeValueNames` below.
constexpr AttributeValueRecord kAttributeValueRecords[] =;

constexpr const char* kAttributeValueNames[] =;

constexpr pdfium::span<const char* const> kAttributeValueNameSpan{};

static_assert;

struct ElementAttributeRecord {};

// Contains read-only data that do not require relocation.
// Parts that require relocation are in `kElementAttributeCallbacks` below.
constexpr ElementAttributeRecord kElementAttributeRecords[] =;

constexpr XFA_ATTRIBUTE_CALLBACK kElementAttributeCallbacks[] =;

constexpr pdfium::span<const XFA_ATTRIBUTE_CALLBACK>
    kElementAttributeCallbackSpan{};

static_assert;

}  // namespace

XFA_PACKETINFO XFA_GetPacketByIndex(XFA_PacketType ePacket) {}

std::optional<XFA_PACKETINFO> XFA_GetPacketByName(WideStringView wsName) {}

ByteStringView XFA_ElementToName(XFA_Element elem) {}

XFA_Element XFA_GetElementByName(WideStringView name) {}

ByteStringView XFA_AttributeToName(XFA_Attribute attr) {}

std::optional<XFA_ATTRIBUTEINFO> XFA_GetAttributeByName(WideStringView name) {}

ByteStringView XFA_AttributeValueToName(XFA_AttributeValue item) {}

std::optional<XFA_AttributeValue> XFA_GetAttributeValueByName(
    WideStringView name) {}

std::optional<XFA_SCRIPTATTRIBUTEINFO> XFA_GetScriptAttributeByName(
    XFA_Element element,
    WideStringView attribute_name) {}