#include <libaddressinput/region_data_builder.h>
#include <libaddressinput/address_data.h>
#include <libaddressinput/preload_supplier.h>
#include <libaddressinput/region_data.h>
#include <cassert>
#include <cstddef>
#include <string>
#include <vector>
#include "language.h"
#include "lookup_key.h"
#include "region_data_constants.h"
#include "rule.h"
#include "util/size.h"
namespace i18n {
namespace addressinput {
namespace {
const size_t kLookupKeysMaxDepth = …;
void BuildRegionTreeRecursively(
const std::map<std::string, const Rule*>& rules,
std::map<std::string, const Rule*>::const_iterator hint,
const LookupKey& parent_key,
RegionData* parent_region,
const std::vector<std::string>& keys,
bool prefer_latin_name,
size_t region_max_depth) { … }
RegionData* BuildRegion(const std::map<std::string, const Rule*>& rules,
const std::string& region_code,
const Language& language) { … }
}
RegionDataBuilder::RegionDataBuilder(PreloadSupplier* supplier)
: … { … }
RegionDataBuilder::~RegionDataBuilder() { … }
const RegionData& RegionDataBuilder::Build(
const std::string& region_code,
const std::string& ui_language_tag,
std::string* best_region_tree_language_tag) { … }
}
}