New cpp folder structure

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk
2025-07-17 22:35:52 +03:00
committed by Konstantin Pastbin
parent c9cbb64f12
commit 76ffc99abd
2390 changed files with 345 additions and 339 deletions

View File

@@ -0,0 +1,43 @@
#pragma once
#include "search/cbv.hpp"
#include "search/model.hpp"
#include "search/token_range.hpp"
#include "base/string_utils.hpp"
#include <cstdint>
#include <string>
#include <vector>
namespace search
{
// This structure represents a part of search query interpretation -
// when to a substring of tokens [m_startToken, m_endToken) is matched
// with a set of m_features of the same m_type.
struct FeaturesLayer
{
FeaturesLayer();
void Clear();
// Non-owning ptr to a sorted vector of features.
std::vector<uint32_t> const * m_sortedFeatures = nullptr;
// Fetch vector of Features, described by this layer (used for CITY, SUBURB).
std::function<CBV ()> m_getFeatures;
strings::UniString m_subQuery;
TokenRange m_tokenRange;
Model::Type m_type;
// Meaningful only when m_type equals to BUILDING.
// When true, m_sortedFeatures contains only features retrieved from
// search index by m_subQuery, and it's necessary for Geocoder to
// perform additional work to retrieve features matching by house number.
bool m_hasDelayedFeatures;
bool m_lastTokenIsPrefix;
};
std::string DebugPrint(FeaturesLayer const & layer);
} // namespace search