Doxygen
Loading...
Searching...
No Matches
layout.h File Reference

#include <src/layout.h>

Include dependency graph for layout.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  LayoutDocEntry
 Base class representing a piece of a documentation page. More...
struct  LayoutDocEntrySimple
 Represents of a piece of a documentation page without configurable parts. More...
struct  LayoutDocEntrySection
struct  LayoutDocEntryMemberDecl
 Represents of a member declaration list with configurable title and subtitle. More...
struct  LayoutDocEntryMemberDef
 Represents of a member definition list with configurable title. More...
struct  LayoutNavEntry
 Base class for the layout of a navigation item at the top of the HTML pages. More...
class  LayoutDocManager
 Singleton providing access to the (user configurable) layout of the documentation. More...

Macros

#define ENTRY_SPECIFICATIONS
#define ESPEC(x)
#define ESPEC(x)
#define NAV_SPECIFICATIONS
#define NSPEC(x, y)
#define NSPEC(x, y)
#define PART_SPECIFICATIONS
#define PSPEC(x, y)
#define PSPEC(x, y)

Typedefs

using LayoutDocEntryPtr = std::unique_ptr<LayoutDocEntry>
using LayoutDocEntryList = std::vector<LayoutDocEntryPtr>
using LayoutNavEntryList = std::vector< std::unique_ptr<LayoutNavEntry> >

Functions

void writeDefaultLayoutFile (const DString &fileName)
void printLayout ()

Macro Definition Documentation

◆ ENTRY_SPECIFICATIONS

#define ENTRY_SPECIFICATIONS
Value:
\
ESPEC(MemberGroups) \
ESPEC(MemberDeclStart) ESPEC(MemberDeclEnd) ESPEC(MemberDecl) \
ESPEC(MemberDefStart) ESPEC(MemberDefEnd) ESPEC(MemberDef) \
ESPEC(BriefDesc) ESPEC(DetailedDesc) \
ESPEC(AuthorSection) \
\
ESPEC(ClassIncludes) ESPEC(ClassInlineClasses) \
ESPEC(ClassInheritanceGraph) ESPEC(ClassNestedClasses) \
ESPEC(ClassCollaborationGraph) ESPEC(ClassAllMembersLink) \
ESPEC(ClassUsedFiles) \
\
ESPEC(ConceptDefinition) \
\
ESPEC(NamespaceNestedNamespaces) ESPEC(NamespaceNestedConstantGroups) \
ESPEC(NamespaceClasses) ESPEC(NamespaceConcepts) ESPEC(NamespaceInterfaces) ESPEC(NamespaceStructs) ESPEC(NamespaceExceptions) \
ESPEC(NamespaceInlineClasses) \
\
ESPEC(FileClasses) ESPEC(FileConcepts) ESPEC(FileInterfaces) ESPEC(FileStructs) ESPEC(FileExceptions) ESPEC(FileConstantGroups) ESPEC(FileNamespaces) \
ESPEC(FileIncludes) ESPEC(FileIncludeGraph) \
ESPEC(FileIncludedByGraph) ESPEC(FileSourceLink) \
ESPEC(FileInlineClasses) \
\
ESPEC(ModuleExports) ESPEC(ModuleClasses) ESPEC(ModuleConcepts) ESPEC(ModuleUsedFiles) \
\
ESPEC(GroupClasses) ESPEC(GroupConcepts) ESPEC(GroupModules) ESPEC(GroupInlineClasses) ESPEC(GroupNamespaces) \
ESPEC(GroupDirs) ESPEC(GroupNestedGroups) ESPEC(GroupFiles) \
ESPEC(GroupGraph) ESPEC(GroupPageDocs) \
\
ESPEC(DirSubDirs) ESPEC(DirFiles) ESPEC(DirGraph)
A model of a class/file/namespace member symbol.
Definition memberdef.h:45
#define ESPEC(x)
Definition layout.h:67

Definition at line 34 of file layout.h.

◆ ESPEC [1/2]

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

Definition at line 67 of file layout.h.

◆ ESPEC [2/2]

#define ESPEC ( x)
Value:
x,

Definition at line 67 of file layout.h.

◆ NAV_SPECIFICATIONS

#define NAV_SPECIFICATIONS

Definition at line 156 of file layout.h.

◆ NSPEC [1/2]

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

Definition at line 193 of file layout.h.

◆ NSPEC [2/2]

#define NSPEC ( x,
y )
Value:
x y,

Definition at line 193 of file layout.h.

◆ 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,)
#define PSPEC(x, y)
Definition layout.h:265

Definition at line 254 of file layout.h.

◆ PSPEC [1/2]

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

Definition at line 265 of file layout.h.

◆ PSPEC [2/2]

#define PSPEC ( x,
y )
Value:
x y,

Definition at line 265 of file layout.h.

Typedef Documentation

◆ LayoutDocEntryList

using LayoutDocEntryList = std::vector<LayoutDocEntryPtr>

Definition at line 147 of file layout.h.

◆ LayoutDocEntryPtr

using LayoutDocEntryPtr = std::unique_ptr<LayoutDocEntry>

Definition at line 146 of file layout.h.

◆ LayoutNavEntryList

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

Definition at line 151 of file layout.h.

Function Documentation

◆ printLayout()

void printLayout ( )

Definition at line 1823 of file layout.cpp.

1824{
1825 bool extraIndent = false;
1826
1827 auto &mgr = LayoutDocManager::instance();
1828 Debug::print(Debug::Layout,0,"Layout version {}.{}\n",mgr.majorVersion(),mgr.minorVersion());
1829
1830 Debug::print(Debug::Layout,0,"Part: Navigation index\n");
1831 for (const auto &e : mgr.rootNavEntry()->children())
1832 {
1833 printNavLayout(e.get(),2);
1834 }
1835
1836 for (int i = 0; i < LayoutDocManager::NrParts; i++)
1837 {
1839 for (const auto &lde : mgr.docEntries(static_cast<LayoutDocManager::LayoutPart>(i)))
1840 {
1841 if (const LayoutDocEntrySimple *ldes = dynamic_cast<const LayoutDocEntrySimple*>(lde.get()))
1842 {
1843 if (lde->kind() == LayoutDocEntry::MemberDeclEnd || lde->kind() == LayoutDocEntry::MemberDefEnd) extraIndent = false;
1844 Debug::print(Debug::Layout,0," {}kind: {}, visible={}\n",
1845 extraIndent? " " : "",lde->entryToString(), ldes->visible());
1846 if (lde->kind() == LayoutDocEntry::MemberDeclStart || lde->kind() == LayoutDocEntry::MemberDefStart) extraIndent = true;
1847 }
1848 else if (const LayoutDocEntryMemberDecl *lmdecl = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get()))
1849 {
1850 Debug::print(Debug::Layout,0," {}complex kind: {}, visible={}, type: {}\n",
1851 extraIndent? " " : "",lde->entryToString(),lmdecl->visible(),lmdecl->type.to_string());
1852 }
1853 else if (const LayoutDocEntryMemberDef *lmdef = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get()))
1854 {
1855 Debug::print(Debug::Layout,0," {}complex kind: {}, visible={}, type: {}\n",
1856 extraIndent? " " : "",lde->entryToString(),lmdef->visible(),lmdef->type.to_string());
1857 }
1858 else
1859 {
1860 // should not happen
1861 Debug::print(Debug::Layout,0," {}not handled kind: {}\n",extraIndent? " " : "",lde->entryToString());
1862 }
1863 }
1864 }
1865}
@ Layout
Definition debug.h:51
static void print(DebugMask mask, int prio, fmt::format_string< Args... > fmt, Args &&... args)
Definition debug.h:78
static std::string partToString(int k)
Definition layout.h:271
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition layout.cpp:1438
static void printNavLayout(LayoutNavEntry *root, int indent)
Definition layout.cpp:1808
Represents of a member declaration list with configurable title and subtitle.
Definition layout.h:111
Represents of a member definition list with configurable title.
Definition layout.h:131
Represents of a piece of a documentation page without configurable parts.
Definition layout.h:88

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

Referenced by LayoutDocManager::LayoutParser, and parseInput().

◆ writeDefaultLayoutFile()

void writeDefaultLayoutFile ( const DString & fileName)

Definition at line 1735 of file layout.cpp.

1736{
1737 std::ofstream f;
1738 if (openOutputFile(fileName,f))
1739 {
1740 TextStream t(&f);
1741 DString layout_default = ResourceMgr::instance().getAsString("layout_default.xml");
1742 t << substitute(layout_default,"$doxygenversion",getDoxygenVersion());
1743 }
1744 else
1745 {
1746 err("Failed to open file {} for writing!\n",fileName);
1747 return;
1748 }
1749 f.close();
1750}
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition dstring.h:84
static ResourceMgr & instance()
Returns the one and only instance of this class.
DString getAsString(const DString &name) const
Gets the resource data as a C string.
Text streaming class that buffers data.
Definition textstream.h:36
DString substitute(const DString &s, const DString &src, const DString &dst)
substitute all occurrences of src in s by dst
Definition dstring.cpp:485
#define err(fmt,...)
Definition message.h:127
bool openOutputFile(const DString &outFile, std::ofstream &f)
Definition util.cpp:4971

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

Referenced by LayoutDocManager::LayoutParser, and readConfiguration().