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);
81 (intf.get()->*methodPtr)(std::forward<As>(args)...);
99 template<
class T,
class... As>
101 {
m_indices.push_back(std::make_unique<T>(std::forward<As>(args)...)); }
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
A list of index interfaces.
void addStyleSheetFile(const QCString &name)
std::unique_ptr< IndexIntf > IndexPtr
std::vector< IndexPtr > m_indices
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.
This is an alternative implementation of QCString.
#define ABSTRACT_BASE_CLASS(cls)
Macro to implement rule of 5 for an abstract base class.