MCPcopy Create free account
hub / github.com/comaps/comaps / EnableIndexingOfBookmarkGroup

Method EnableIndexingOfBookmarkGroup

libs/search/bookmarks/processor.cpp:88–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88void Processor::EnableIndexingOfBookmarkGroup(GroupId const & groupId, bool enable)
89{
90 bool const wasIndexable = m_indexableGroups.count(groupId) > 0;
91 if (enable)
92 m_indexableGroups.insert(groupId);
93 else
94 m_indexableGroups.erase(groupId);
95 bool const nowIndexable = m_indexableGroups.count(groupId) > 0;
96
97 if (wasIndexable == nowIndexable)
98 return;
99
100 for (auto const & id : m_bookmarksInGroup[groupId])
101 if (nowIndexable)
102 AddToIndex(id);
103 else
104 EraseFromIndex(id);
105}
106
107void Processor::Add(Id const & id, Doc const & doc)
108{

Callers 1

UNIT_CLASS_TESTFunction · 0.45

Calls 4

AddToIndexFunction · 0.85
countMethod · 0.45
insertMethod · 0.45
eraseMethod · 0.45

Tested by 1

UNIT_CLASS_TESTFunction · 0.36