45 const QCString &anchor,
50 virtual
void addIndexItem(const Definition *context,const MemberDef *md,
51 const QCString §ionAnchor,const QCString &title) = 0;
64 using IndexPtr = std::unique_ptr<IndexIntf>;
66 template<
class... Ts,
class... As>
67 void foreach(
void (IndexIntf::*methodPtr)(Ts...),As&&... args)
69 for (const auto &intf : m_indices)
71 (intf.get()->*methodPtr)(std::forward<As>(args)...);
75 template<
class... Ts,
class... As>
78 std::lock_guard<std::mutex> lock(m_mutex);
79 for (
const auto &intf : m_indices)
81 (intf.get()->*methodPtr)(std::forward<As>(args)...);
88 { m_enabled =
FALSE; }
99 template<
class T,
class... As>
101 { m_indices.push_back(std::make_unique<T>(std::forward<As>(args)...)); }
116 const QCString &file,
const QCString &anchor,
bool separateIndex=
FALSE,
bool addToNavIndex=
FALSE,
117 const Definition *def=
nullptr)
120 void addIndexItem(
const Definition *context,
const MemberDef *md,
const QCString §ionAnchor=QCString(),
const QCString &title=QCString())
133 bool m_enabled =
true;
135 std::vector<IndexPtr> m_indices;
The common base class of all entity definitions found in the sources.
Abstract interface for index generators.
virtual void addContentsItem(bool isDir, const QCString &name, const QCString &ref, const QCString &file, const QCString &anchor, bool separateIndex, bool addToNavIndex, const Definition *def)=0
virtual void initialize()=0
virtual void addImageFile(const QCString &)=0
virtual void decContentsDepth()=0
virtual void addIndexItem(const Definition *context, const MemberDef *md, const QCString §ionAnchor, const QCString &title)=0
virtual void finalize()=0
virtual void incContentsDepth()=0
virtual void addIndexFile(const QCString &name)=0
virtual void addStyleSheetFile(const QCString &)=0
void addStyleSheetFile(const QCString &name)
void addIndex(As &&... args)
Add an index generator to the list, using a syntax similar to std::make_unique<T>()
void addIndexFile(const QCString &name)
void enable()
enable the indices
void addImageFile(const QCString &name)
bool isEnabled() const
returns true iff the indices are enabled
void foreach_locked(void(IndexIntf::*methodPtr)(Ts...), As &&... args)
void addContentsItem(bool isDir, const QCString &name, const QCString &ref, const QCString &file, const QCString &anchor, bool separateIndex=FALSE, bool addToNavIndex=FALSE, const Definition *def=nullptr)
void disable()
disable the indices
void addIndexItem(const Definition *context, const MemberDef *md, const QCString §ionAnchor=QCString(), const QCString &title=QCString())
A model of a class/file/namespace member symbol.
Class representing a list of output generators that are written to in parallel.
#define ABSTRACT_BASE_CLASS(cls)
Macro to implement rule of 5 for an abstract base class.