data: fixes for clearing on refresh
* reduce aggregation count when clearing * added TokenLocation to method override edge * added TokenLocations to template related edges
This commit is contained in:
@@ -134,3 +134,10 @@ std::vector<SearchMatch> SearchIndex::runFuzzySearchAndGetMatches(const std::str
|
||||
}
|
||||
|
||||
const std::string SearchIndex::DELIMITER = "::";
|
||||
|
||||
std::ostream& operator<<(std::ostream& ostream, const SearchIndex& index)
|
||||
{
|
||||
ostream << "SearchIndex:\n";
|
||||
ostream << &index.m_root;
|
||||
return ostream;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,10 @@ public:
|
||||
private:
|
||||
SearchNode m_root;
|
||||
Dictionary m_dictionary;
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& ostream, const SearchIndex& index);
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream& ostream, const SearchIndex& index);
|
||||
|
||||
#endif // SEARCH_INDEX_H
|
||||
|
||||
@@ -407,3 +407,22 @@ std::deque<const SearchNode*> SearchNode::getNodesToParent(const SearchNode* par
|
||||
|
||||
return nodes;
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& ostream, const SearchNode* node)
|
||||
{
|
||||
ostream << node->m_name;
|
||||
|
||||
for (Id tokenId : node->m_tokenIds)
|
||||
{
|
||||
ostream << ' ' << tokenId;
|
||||
}
|
||||
|
||||
ostream << '\n';
|
||||
|
||||
for (const std::shared_ptr<SearchNode> n : node->m_nodes)
|
||||
{
|
||||
ostream << n.get();
|
||||
}
|
||||
|
||||
return ostream;
|
||||
}
|
||||
|
||||
@@ -77,6 +77,10 @@ private:
|
||||
|
||||
const std::string& m_name;
|
||||
const Id m_nameId;
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& ostream, const SearchNode* node);
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream& ostream, const SearchNode* node);
|
||||
|
||||
#endif // SEARCH_NODE_H
|
||||
|
||||
Reference in New Issue
Block a user