#include <libaddressinput/address_input_helper.h>
#include <libaddressinput/address_data.h>
#include <libaddressinput/address_field.h>
#include <libaddressinput/address_metadata.h>
#include <libaddressinput/preload_supplier.h>
#include <cassert>
#include <cstddef>
#include <string>
#include <vector>
#include <re2/re2.h>
#include "language.h"
#include "lookup_key.h"
#include "region_data_constants.h"
#include "rule.h"
#include "util/re2ptr.h"
#include "util/size.h"
namespace i18n {
namespace addressinput {
struct Node { … };
namespace {
const char kLookupKeySeparator = …;
const size_t kHierarchyDepth = …;
std::string GetBestName(const Language& language, const Rule& rule) { … }
void FillAddressFromMatchedRules(
const std::vector<Node>* hierarchy,
AddressData* address) { … }
}
AddressInputHelper::AddressInputHelper(PreloadSupplier* supplier)
: … { … }
AddressInputHelper::~AddressInputHelper() = default;
void AddressInputHelper::FillAddress(AddressData* address) const { … }
void AddressInputHelper::CheckChildrenForPostCodeMatches(
const AddressData& address,
const LookupKey& lookup_key,
const Node* parent,
std::vector<Node>* hierarchy) const { … }
}
}