Skip to main content

The SearchIndexIntf Class Reference

Abstract proxy interface for non-javascript based search indices. More...

Declaration

class SearchIndexIntf { ... }

Included Headers

#include <src/searchindex.h>

Public Member Typedefs Index

usingSearchIndexVariant = std::variant< std::monostate, SearchIndex, SearchIndexExternal >

Enumerations Index

enumKind { ... }

Public Constructors Index

SearchIndexIntf ()

Public Member Functions Index

boolenabled () const
voidsetCurrentDoc (const Definition *ctx, const QCString &anchor, bool isSourceFile)
voidaddWord (const QCString &word, bool hiPriority)
voidwrite (const QCString &file)
voidsetKind (Kind k)
Kindkind () const

Private Member Attributes Index

Kindm_kind
SearchIndexVariantm_variant

Description

Abstract proxy interface for non-javascript based search indices.

It forwards calls to either SearchIndex or SearchIndexExternal depending on the Kind passed during construction.

Definition at line 140 of file searchindex.h.

Public Member Typedefs

SearchIndexVariant

using SearchIndexIntf::SearchIndexVariant = std::variant<std::monostate,SearchIndex,SearchIndexExternal>

Definition at line 143 of file searchindex.h.

143 using SearchIndexVariant = std::variant<std::monostate,SearchIndex,SearchIndexExternal>;

Enumerations

Kind

enum SearchIndexIntf::Kind
Enumeration values
Disabled
Internal
External

Definition at line 144 of file searchindex.h.

Public Constructors

SearchIndexIntf()

SearchIndexIntf::SearchIndexIntf ()
inline

Definition at line 145 of file searchindex.h.

References Disabled and m_kind.

Public Member Functions

addWord()

void SearchIndexIntf::addWord (const QCString & word, bool hiPriority)
inline

Definition at line 159 of file searchindex.h.

159 void addWord(const QCString &word,bool hiPriority)
160 {
161 if (std::holds_alternative<SearchIndex>(m_variant))
162 {
163 std::get<SearchIndex>(m_variant).addWord(word,hiPriority);
164 }
165 else if (std::holds_alternative<SearchIndexExternal>(m_variant))
166 {
167 std::get<SearchIndexExternal>(m_variant).addWord(word,hiPriority);
168 }
169 }

Reference m_variant.

enabled()

bool SearchIndexIntf::enabled ()
inline

Definition at line 146 of file searchindex.h.

146 bool enabled() const { return m_kind!=Disabled; }

References Disabled and m_kind.

kind()

Kind SearchIndexIntf::kind ()
inline

Definition at line 190 of file searchindex.h.

190 Kind kind() const { return m_kind; }

Reference m_kind.

setCurrentDoc()

void SearchIndexIntf::setCurrentDoc (const Definition * ctx, const QCString & anchor, bool isSourceFile)
inline

Definition at line 148 of file searchindex.h.

148 void setCurrentDoc(const Definition *ctx,const QCString &anchor,bool isSourceFile)
149 {
150 if (std::holds_alternative<SearchIndex>(m_variant))
151 {
152 std::get<SearchIndex>(m_variant).setCurrentDoc(ctx,anchor,isSourceFile);
153 }
154 else if (std::holds_alternative<SearchIndexExternal>(m_variant))
155 {
156 std::get<SearchIndexExternal>(m_variant).setCurrentDoc(ctx,anchor,isSourceFile);
157 }
158 }

Reference m_variant.

setKind()

void SearchIndexIntf::setKind (Kind k)
inline

Definition at line 181 of file searchindex.h.

181 void setKind(Kind k) {
182 m_kind=k;
183 switch (m_kind)
184 {
185 case Disabled: m_variant = std::monostate(); break;
186 case Internal: m_variant = SearchIndex(); break;
187 case External: m_variant = SearchIndexExternal(); break;
188 }
189 }

References Disabled, External, Internal, m_kind and m_variant.

write()

void SearchIndexIntf::write (const QCString & file)
inline

Definition at line 170 of file searchindex.h.

170 void write(const QCString &file)
171 {
172 if (std::holds_alternative<SearchIndex>(m_variant))
173 {
174 std::get<SearchIndex>(m_variant).write(file);
175 }
176 else if (std::holds_alternative<SearchIndexExternal>(m_variant))
177 {
178 std::get<SearchIndexExternal>(m_variant).write(file);
179 }
180 }

Reference m_variant.

Private Member Attributes

m_kind

Kind SearchIndexIntf::m_kind

Definition at line 192 of file searchindex.h.

Referenced by enabled, kind, SearchIndexIntf and setKind.

m_variant

SearchIndexVariant SearchIndexIntf::m_variant

Definition at line 193 of file searchindex.h.

Referenced by addWord, setCurrentDoc, setKind and write.


The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus by Doxygen 1.14.0.