34#define ENTRY_SPECIFICATIONS \
37 ESPEC(MemberDeclStart) ESPEC(MemberDeclEnd) ESPEC(MemberDecl) \
38 ESPEC(MemberDefStart) ESPEC(MemberDefEnd) ESPEC(MemberDef) \
39 ESPEC(BriefDesc) ESPEC(DetailedDesc) \
40 ESPEC(AuthorSection) ESPEC(Includes) \
42 ESPEC(ClassInlineClasses) \
43 ESPEC(ClassInheritanceGraph) ESPEC(ClassNestedClasses) \
44 ESPEC(ClassCollaborationGraph) ESPEC(ClassAllMembersLink) \
45 ESPEC(ClassUsedFiles) \
47 ESPEC(ConceptDefinition) \
49 ESPEC(NamespaceNestedNamespaces) ESPEC(NamespaceNestedConstantGroups) \
50 ESPEC(NamespaceClasses) ESPEC(NamespaceConcepts) ESPEC(NamespaceInterfaces) ESPEC(NamespaceStructs) \
51 ESPEC(NamespaceRecords) ESPEC(NamespaceExceptions) ESPEC(NamespaceInlineClasses) \
53 ESPEC(FileClasses) ESPEC(FileConcepts) ESPEC(FileInterfaces) ESPEC(FileStructs) ESPEC(FileRecords) \
54 ESPEC(FileExceptions) ESPEC(FileConstantGroups) ESPEC(FileNamespaces) \
55 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,) \
183 NSPEC(RecordIndex,) \
185 NSPEC(ExceptionList,) \
186 NSPEC(ExceptionIndex,) \
187 NSPEC(ExceptionHierarchy,) \
190 NSPEC(FileGlobals,) \
197#define NSPEC(x,y) x y,
205#define NSPEC(x,y) case x: return #x; break;
208 default:
return "unknown";
227 void insertChild(
size_t pos,std::unique_ptr<LayoutNavEntry> &&e);
228 void appendChild(std::unique_ptr<LayoutNavEntry> &&e);
243 child->m_parent =
this;
259#define PART_SPECIFICATIONS \
260 PSPEC(Undefined, = -1) \
261 PSPEC(Class,) PSPEC(Concept,) PSPEC(Namespace,) PSPEC(File,) PSPEC(Group,) PSPEC(Directory,) PSPEC(Module,) \
270#define PSPEC(x,y) x y,
280#define PSPEC(x,y) case x: return #x; break;
283 default:
return "unknown";
296 void parse(
const DString &fileName,
const char* data =
nullptr);
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
const std::string & str() const
Singleton providing access to the (user configurable) layout of the documentation.
void mergeNavEntries(LayoutDocManager &manager)
static std::string partToString(int k)
void parse(const DString &fileName, const char *data=nullptr)
Parses a user provided layout.
std::unique_ptr< Private > d
LayoutNavEntry * createChildNavEntry(LayoutNavEntry *root, LayoutNavEntry::Kind k, bool vs, const DString &bf, const DString &tl, const DString &intro)
append a new node as a child to root.
static LayoutDocManager & instance()
Returns a reference to this singleton.
friend class LayoutParser
void mergeDocEntries(const DString &fileName, LayoutDocManager &manager)
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.
Wrapper class for the MemberListType type.
#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.
std::unique_ptr< LayoutDocEntry > LayoutDocEntryPtr
std::vector< std::unique_ptr< LayoutNavEntry > > LayoutNavEntryList
void writeDefaultLayoutFile(const DString &fileName)
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
DString subtitle(SrcLangExt lang) const
std::string id() const override
LayoutDocEntryMemberDecl(MemberListType tp, const std::string &id, const DString &tl, const DString &ss, bool v)
DString title(SrcLangExt lang) const
Kind kind() const override
bool visible() const override
std::string id() const override
Kind kind() const override
DString title(SrcLangExt lang) const
bool visible() const override
LayoutDocEntryMemberDef(MemberListType tp, const std::string &id, const DString &tl, bool v)
DString title(SrcLangExt lang) const
LayoutDocEntrySection(Kind k, const std::string &id, const DString &tl, bool v)
Represents of a piece of a documentation page without configurable parts.
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()
LayoutNavEntry * find(LayoutNavEntry::Kind k, const DString &file=DString()) const
DString titleAsHtml() const
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)
LayoutNavEntry(LayoutNavEntry *parent, Kind k, bool vs, const DString &bf, const DString &tl, const DString &intro)
LayoutNavEntry * m_parent
friend class LayoutDocManager
std::string navToString() const
This file contains a number of basic enums and types.