Skip to main content

The layout.h File Reference

Included Headers

#include <memory> #include <vector> #include <utility> #include "types.h" #include "construct.h"

Classes Index

structLayoutDocEntry

Base class representing a piece of a documentation page. More...

structLayoutDocEntrySimple

Represents of a piece of a documentation page without configurable parts. More...

structLayoutDocEntrySection
structLayoutDocEntryMemberDecl

Represents of a member declaration list with configurable title and subtitle. More...

structLayoutDocEntryMemberDef

Represents of a member definition list with configurable title. More...

structLayoutNavEntry

Base class for the layout of a navigation item at the top of the HTML pages. More...

classLayoutDocManager

Singleton providing access to the (user configurable) layout of the documentation. More...

Typedefs Index

usingLayoutDocEntryPtr = std::unique_ptr< LayoutDocEntry >
usingLayoutDocEntryList = std::vector< LayoutDocEntryPtr >
usingLayoutNavEntryList = std::vector< std::unique_ptr< LayoutNavEntry > >

Functions Index

voidwriteDefaultLayoutFile (const QCString &fileName)
voidprintLayout ()

Macro Definitions Index

#defineENTRY_SPECIFICATIONS   ...
#defineESPEC(x)   x,
#defineESPEC(x)   case x: return #x; break;
#defineNAV_SPECIFICATIONS
#defineNSPEC(x, y)   x y,
#defineNSPEC(x, y)   case x: return #x; break;
#definePART_SPECIFICATIONS   ...
#definePSPEC(x, y)   x y,
#definePSPEC(x, y)   case x: return #x; break;

Typedefs

LayoutDocEntryList

using LayoutDocEntryList = std::vector<LayoutDocEntryPtr>

Definition at line 148 of file layout.h.

148using LayoutDocEntryList = std::vector<LayoutDocEntryPtr>;

LayoutDocEntryPtr

using LayoutDocEntryPtr = std::unique_ptr<LayoutDocEntry>

Definition at line 147 of file layout.h.

147using LayoutDocEntryPtr = std::unique_ptr<LayoutDocEntry>;

LayoutNavEntryList

using LayoutNavEntryList = std::vector< std::unique_ptr<LayoutNavEntry> >

Definition at line 152 of file layout.h.

152using LayoutNavEntryList = std::vector< std::unique_ptr<LayoutNavEntry> >;

Functions

printLayout()

void printLayout ()

Declaration at line 310 of file layout.h, definition at line 1820 of file layout.cpp.

1821{
1822 bool extraIndent = false;
1823
1824 auto &mgr = LayoutDocManager::instance();
1825 Debug::print(Debug::Layout,0,"Layout version {}.{}\n",mgr.majorVersion(),mgr.minorVersion());
1826
1827 Debug::print(Debug::Layout,0,"Part: Navigation index\n");
1828 for (const auto &e : mgr.rootNavEntry()->children())
1829 {
1830 printNavLayout(e.get(),2);
1831 }
1832
1833 for (int i = 0; i < LayoutDocManager::NrParts; i++)
1834 {
1836 for (const auto &lde : mgr.docEntries(static_cast<LayoutDocManager::LayoutPart>(i)))
1837 {
1838 if (const LayoutDocEntrySimple *ldes = dynamic_cast<const LayoutDocEntrySimple*>(lde.get()))
1839 {
1840 if (lde->kind() == LayoutDocEntry::MemberDeclEnd || lde->kind() == LayoutDocEntry::MemberDefEnd) extraIndent = false;
1841 Debug::print(Debug::Layout,0," {}kind: {}, visible={}\n",
1842 extraIndent? " " : "",lde->entryToString(), ldes->visible());
1843 if (lde->kind() == LayoutDocEntry::MemberDeclStart || lde->kind() == LayoutDocEntry::MemberDefStart) extraIndent = true;
1844 }
1845 else if (const LayoutDocEntryMemberDecl *lmdecl = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get()))
1846 {
1847 Debug::print(Debug::Layout,0," {}complex kind: {}, visible={}, type: {}\n",
1848 extraIndent? " " : "",lde->entryToString(),lmdecl->visible(),lmdecl->type.to_string());
1849 }
1850 else if (const LayoutDocEntryMemberDef *lmdef = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get()))
1851 {
1852 Debug::print(Debug::Layout,0," {}complex kind: {}, visible={}, type: {}\n",
1853 extraIndent? " " : "",lde->entryToString(),lmdef->visible(),lmdef->type.to_string());
1854 }
1855 else
1856 {
1857 // should not happen
1858 Debug::print(Debug::Layout,0," {}not handled kind: {}\n",extraIndent? " " : "",lde->entryToString());
1859 }
1860 }
1861 }
1862}

References LayoutDocManager::instance, Debug::Layout, LayoutDocManager::partToString, Debug::print and printNavLayout.

Referenced by LayoutDocManager::LayoutParser and parseInput.

writeDefaultLayoutFile()

void writeDefaultLayoutFile (const QCString & fileName)

Declaration at line 309 of file layout.h, definition at line 1732 of file layout.cpp.

1732void writeDefaultLayoutFile(const QCString &fileName)
1733{
1734 std::ofstream f;
1735 if (openOutputFile(fileName,f))
1736 {
1737 TextStream t(&f);
1738 QCString layout_default = ResourceMgr::instance().getAsString("layout_default.xml");
1739 t << substitute(layout_default,"$doxygenversion",getDoxygenVersion());
1740 }
1741 else
1742 {
1743 err("Failed to open file {} for writing!\n",fileName);
1744 return;
1745 }
1746 f.close();
1747}

References err, ResourceMgr::getAsString, ResourceMgr::instance, openOutputFile and substitute.

Referenced by LayoutDocManager::LayoutParser and readConfiguration.

Macro Definitions

ENTRY_SPECIFICATIONS

#define ENTRY_SPECIFICATIONS   ...
Value
/* Generic items for all pages */ \ ESPEC(MemberGroups) \ ESPEC(MemberDeclStart) ESPEC(MemberDeclEnd) ESPEC(MemberDecl) \ ESPEC(MemberDefStart) ESPEC(MemberDefEnd) ESPEC(MemberDef) \ ESPEC(BriefDesc) ESPEC(DetailedDesc) \ ESPEC(AuthorSection) \ /* Class specific items */ \ ESPEC(ClassIncludes) ESPEC(ClassInlineClasses) \ ESPEC(ClassInheritanceGraph) ESPEC(ClassNestedClasses) \ ESPEC(ClassCollaborationGraph) ESPEC(ClassAllMembersLink) \ ESPEC(ClassUsedFiles) \ /* Concept specific items */ \ ESPEC(ConceptDefinition) \ /* Namespace specific items */ \ ESPEC(NamespaceNestedNamespaces) ESPEC(NamespaceNestedConstantGroups) \ ESPEC(NamespaceClasses) ESPEC(NamespaceConcepts) ESPEC(NamespaceInterfaces) ESPEC(NamespaceStructs) ESPEC(NamespaceExceptions) \ ESPEC(NamespaceInlineClasses) \ /* File specific items */ \ ESPEC(FileClasses) ESPEC(FileConcepts) ESPEC(FileInterfaces) ESPEC(FileStructs) ESPEC(FileExceptions) ESPEC(FileConstantGroups) ESPEC(FileNamespaces) \ ESPEC(FileIncludes) ESPEC(FileIncludeGraph) \ ESPEC(FileIncludedByGraph) ESPEC(FileSourceLink) \ ESPEC(FileInlineClasses) \ /* C++20 Modules */ \ ESPEC(ModuleExports) ESPEC(ModuleClasses) ESPEC(ModuleConcepts) ESPEC(ModuleUsedFiles) \ /* Group specific items */ \ ESPEC(GroupClasses) ESPEC(GroupConcepts) ESPEC(GroupModules) ESPEC(GroupInlineClasses) ESPEC(GroupNamespaces) \ ESPEC(GroupDirs) ESPEC(GroupNestedGroups) ESPEC(GroupFiles) \ ESPEC(GroupGraph) ESPEC(GroupPageDocs) \ /* Directory specific items */ \ ESPEC(DirSubDirs) ESPEC(DirFiles) ESPEC(DirGraph)

Definition at line 35 of file layout.h.

35#define ENTRY_SPECIFICATIONS \
36 /* Generic items for all pages */ \
37 ESPEC(MemberGroups) \
38 ESPEC(MemberDeclStart) ESPEC(MemberDeclEnd) ESPEC(MemberDecl) \
39 ESPEC(MemberDefStart) ESPEC(MemberDefEnd) ESPEC(MemberDef) \
40 ESPEC(BriefDesc) ESPEC(DetailedDesc) \
41 ESPEC(AuthorSection) \
42 /* Class specific items */ \
43 ESPEC(ClassIncludes) ESPEC(ClassInlineClasses) \
44 ESPEC(ClassInheritanceGraph) ESPEC(ClassNestedClasses) \
45 ESPEC(ClassCollaborationGraph) ESPEC(ClassAllMembersLink) \
46 ESPEC(ClassUsedFiles) \
47 /* Concept specific items */ \
48 ESPEC(ConceptDefinition) \
49 /* Namespace specific items */ \
50 ESPEC(NamespaceNestedNamespaces) ESPEC(NamespaceNestedConstantGroups) \
51 ESPEC(NamespaceClasses) ESPEC(NamespaceConcepts) ESPEC(NamespaceInterfaces) ESPEC(NamespaceStructs) ESPEC(NamespaceExceptions) \
52 ESPEC(NamespaceInlineClasses) \
53 /* File specific items */ \
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) \
58 /* C++20 Modules */ \
59 ESPEC(ModuleExports) ESPEC(ModuleClasses) ESPEC(ModuleConcepts) ESPEC(ModuleUsedFiles) \
60 /* Group specific items */ \
61 ESPEC(GroupClasses) ESPEC(GroupConcepts) ESPEC(GroupModules) ESPEC(GroupInlineClasses) ESPEC(GroupNamespaces) \
62 ESPEC(GroupDirs) ESPEC(GroupNestedGroups) ESPEC(GroupFiles) \
63 ESPEC(GroupGraph) ESPEC(GroupPageDocs) \
64 /* Directory specific items */ \
65 ESPEC(DirSubDirs) ESPEC(DirFiles) ESPEC(DirGraph)

ESPEC

#define ESPEC(x)   x,

Definition at line 68 of file layout.h.

68#define ESPEC(x) x,

ESPEC

#define ESPEC(x)   case x: return #x; break;

Definition at line 77 of file layout.h.

68#define ESPEC(x) x,

NAV_SPECIFICATIONS

#define NAV_SPECIFICATIONS

Definition at line 157 of file layout.h.

157#define NAV_SPECIFICATIONS \
158 NSPEC(None, = -1) \
159 NSPEC(MainPage,) \
160 NSPEC(Pages,) \
161 NSPEC(Modules,) \
162 NSPEC(ModuleList,) \
163 NSPEC(ModuleMembers,) \
164 NSPEC(Topics,) \
165 NSPEC(Namespaces,) \
166 NSPEC(NamespaceList,) \
167 NSPEC(NamespaceMembers,) \
168 NSPEC(Concepts,) \
169 NSPEC(Classes,) \
170 NSPEC(ClassList,) \
171 NSPEC(ClassIndex,) \
172 NSPEC(ClassHierarchy,) \
173 NSPEC(ClassMembers,) \
174 NSPEC(Interfaces,) \
175 NSPEC(InterfaceList,) \
176 NSPEC(InterfaceIndex,) \
177 NSPEC(InterfaceHierarchy,) \
178 NSPEC(Structs,) \
179 NSPEC(StructList,) \
180 NSPEC(StructIndex,) \
181 NSPEC(Exceptions,) \
182 NSPEC(ExceptionList,) \
183 NSPEC(ExceptionIndex,) \
184 NSPEC(ExceptionHierarchy,) \
185 NSPEC(Files,) \
186 NSPEC(FileList,) \
187 NSPEC(FileGlobals,) \
188 NSPEC(Examples,) \
189 NSPEC(User,) \
190 NSPEC(UserGroup,)

NSPEC

#define NSPEC(x, y)   x y,

Definition at line 194 of file layout.h.

194#define NSPEC(x,y) x y,

NSPEC

#define NSPEC(x, y)   case x: return #x; break;

Definition at line 202 of file layout.h.

194#define NSPEC(x,y) x y,

PART_SPECIFICATIONS

#define PART_SPECIFICATIONS   ...
Value
PSPEC(Undefined, = -1) \ PSPEC(Class,) PSPEC(Concept,) PSPEC(Namespace,) PSPEC(File,) PSPEC(Group,) PSPEC(Directory,) PSPEC(Module,) \ PSPEC(NrParts,)

Definition at line 256 of file layout.h.

256#define PART_SPECIFICATIONS \
257 PSPEC(Undefined, = -1) \
258 PSPEC(Class,) PSPEC(Concept,) PSPEC(Namespace,) PSPEC(File,) PSPEC(Group,) PSPEC(Directory,) PSPEC(Module,) \
259 PSPEC(NrParts,)

PSPEC

#define PSPEC(x, y)   x y,

Definition at line 267 of file layout.h.

267#define PSPEC(x,y) x y,

PSPEC

#define PSPEC(x, y)   case x: return #x; break;

Definition at line 277 of file layout.h.

267#define PSPEC(x,y) x y,

Generated via doxygen2docusaurus by Doxygen 1.14.0.