35#define ENTRY_SPECIFICATIONS \
38 ESPEC(MemberDeclStart) ESPEC(MemberDeclEnd) ESPEC(MemberDecl) \
39 ESPEC(MemberDefStart) ESPEC(MemberDefEnd) ESPEC(MemberDef) \
40 ESPEC(BriefDesc) ESPEC(DetailedDesc) \
41 ESPEC(AuthorSection) \
43 ESPEC(ClassIncludes) ESPEC(ClassInlineClasses) \
44 ESPEC(ClassInheritanceGraph) ESPEC(ClassNestedClasses) \
45 ESPEC(ClassCollaborationGraph) ESPEC(ClassAllMembersLink) \
46 ESPEC(ClassUsedFiles) \
48 ESPEC(ConceptDefinition) \
50 ESPEC(NamespaceNestedNamespaces) ESPEC(NamespaceNestedConstantGroups) \
51 ESPEC(NamespaceClasses) ESPEC(NamespaceConcepts) ESPEC(NamespaceInterfaces) ESPEC(NamespaceStructs) ESPEC(NamespaceExceptions) \
52 ESPEC(NamespaceInlineClasses) \
54 ESPEC(FileClasses) ESPEC(FileConcepts) ESPEC(FileInterfaces) ESPEC(FileStructs) ESPEC(FileExceptions) ESPEC(FileConstantGroups) ESPEC(FileNamespaces) \
55 ESPEC(FileIncludes) ESPEC(FileIncludeGraph) \
56 ESPEC(FileIncludedByGraph) ESPEC(FileSourceLink) \
57 ESPEC(FileInlineClasses) \
59 ESPEC(ModuleExports) ESPEC(ModuleClasses) ESPEC(ModuleConcepts) ESPEC(ModuleUsedFiles) \
61 ESPEC(GroupClasses) ESPEC(GroupConcepts) ESPEC(GroupModules) ESPEC(GroupInlineClasses) ESPEC(GroupNamespaces) \
62 ESPEC(GroupDirs) ESPEC(GroupNestedGroups) ESPEC(GroupFiles) \
63 ESPEC(GroupGraph) ESPEC(GroupPageDocs) \
65 ESPEC(DirSubDirs) ESPEC(DirFiles) ESPEC(DirGraph)
77#define ESPEC(x) case x: return #x; break;
80 default:
return "unknown";
83 virtual std::string
id()
const = 0;
94 std::string
id()
const override {
return m_id; }
122 std::string
id()
const override {
return m_id; }
140 std::string
id()
const override {
return m_id; }
157#define NAV_SPECIFICATIONS \
163 NSPEC(ModuleMembers,) \
166 NSPEC(NamespaceList,) \
167 NSPEC(NamespaceMembers,) \
172 NSPEC(ClassHierarchy,) \
173 NSPEC(ClassMembers,) \
175 NSPEC(InterfaceList,) \
176 NSPEC(InterfaceIndex,) \
177 NSPEC(InterfaceHierarchy,) \
180 NSPEC(StructIndex,) \
182 NSPEC(ExceptionList,) \
183 NSPEC(ExceptionIndex,) \
184 NSPEC(ExceptionHierarchy,) \
187 NSPEC(FileGlobals,) \
194#define NSPEC(x,y) x y,
202#define NSPEC(x,y) case x: return #x; break;
205 default:
return "unknown";
224 void insertChild(
size_t pos,std::unique_ptr<LayoutNavEntry> &&e);
225 void appendChild(std::unique_ptr<LayoutNavEntry> &&e);
240 child->m_parent =
this;
256#define PART_SPECIFICATIONS \
257 PSPEC(Undefined, = -1) \
258 PSPEC(Class,) PSPEC(Concept,) PSPEC(Namespace,) PSPEC(File,) PSPEC(Group,) PSPEC(Directory,) PSPEC(Module,) \
267#define PSPEC(x,y) x y,
277#define PSPEC(x,y) case x: return #x; break;
280 default:
return "unknown";
293 void parse(
const QCString &fileName,
const char* data =
nullptr);
Singleton providing access to the (user configurable) layout of the documentation.
void mergeNavEntries(LayoutDocManager &manager)
static std::string partToString(int k)
std::unique_ptr< Private > d
LayoutNavEntry * createChildNavEntry(LayoutNavEntry *root, LayoutNavEntry::Kind k, bool vs, const QCString &bf, const QCString &tl, const QCString &intro)
append a new node as a child to root.
static LayoutDocManager & instance()
Returns a reference to this singleton.
void mergeDocEntries(const QCString &fileName, LayoutDocManager &manager)
void parse(const QCString &fileName, const char *data=nullptr)
Parses a user provided layout.
friend class LayoutParser
void addEntry(LayoutPart p, LayoutDocEntryPtr &&e)
LayoutNavEntry * rootNavEntry() const
returns the (invisible) root of the navigation tree.
void removeInvisibleDocEntries()
const LayoutDocEntryList & docEntries(LayoutPart part) const
Returns the list of LayoutDocEntry's in representation order for a given page identified by part.
A model of a class/file/namespace member symbol.
A list of MemberDef objects as shown in documentation sections.
Wrapper class for the MemberListType type.
This is an alternative implementation of QCString.
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
#define ABSTRACT_BASE_CLASS(cls)
Macro to implement rule of 5 for an abstract base class.
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
void writeDefaultLayoutFile(const QCString &fileName)
std::unique_ptr< LayoutDocEntry > LayoutDocEntryPtr
std::vector< std::unique_ptr< LayoutNavEntry > > LayoutNavEntryList
std::vector< LayoutDocEntryPtr > LayoutDocEntryList
Base class representing a piece of a documentation page.
std::string entryToString() const
virtual Kind kind() const =0
virtual std::string id() const =0
virtual bool visible() const =0
LayoutDocEntryMemberDecl(MemberListType tp, const std::string &id, const QCString &tl, const QCString &ss, bool v)
QCString title(SrcLangExt lang) const
std::string id() const override
Kind kind() const override
QCString subtitle(SrcLangExt lang) const
bool visible() const override
std::string id() const override
Kind kind() const override
bool visible() const override
QCString title(SrcLangExt lang) const
LayoutDocEntryMemberDef(MemberListType tp, const std::string &id, const QCString &tl, bool v)
QCString title(SrcLangExt lang) const
LayoutDocEntrySection(Kind k, const std::string &id, const QCString &tl, bool v)
Kind kind() const override
bool visible() const override
LayoutDocEntrySimple(Kind k, const std::string &id, bool v)
std::string id() const override
Base class for the layout of a navigation item at the top of the HTML pages.
LayoutNavEntryList m_children
const LayoutNavEntryList & children() const
LayoutNavEntryList & children()
void updateVisibility(LayoutNavEntry *parent)
void appendChild(std::unique_ptr< LayoutNavEntry > &&e)
void insertChild(size_t pos, std::unique_ptr< LayoutNavEntry > &&e)
LayoutNavEntry * parent() const
void swap(LayoutNavEntry &other)
QCString baseFile() const
LayoutNavEntry * find(LayoutNavEntry::Kind k, const QCString &file=QCString()) const
LayoutNavEntry * m_parent
LayoutNavEntry(LayoutNavEntry *parent, Kind k, bool vs, const QCString &bf, const QCString &tl, const QCString &intro)
friend class LayoutDocManager
std::string navToString() const
This file contains a number of basic enums and types.
SrcLangExt
Language as given by extension.