浏览该文件的文档.
65 return compileOptions(def,langId1,value1,langId2,value2,langId3,value3)+
75 return compileOptions(def,langId1,value1,langId2,value2,langId3,value3,langId4,value4)+
83 if (visible.
isEmpty())
return defVal;
84 if (visible.
at(0)==
'$' && visible.
length()>1)
87 const ConfigValues::Info *opt = ConfigValues::instance().get(
id);
88 if (opt && opt->type==ConfigValues::Info::Bool)
90 return ConfigValues::instance().*(opt->value.b);
92 else if (opt && opt->type==ConfigValues::Info::String)
94 return ConfigValues::instance().*(opt->value.s) !=
"NO";
98 err(
"found unsupported value %s for visible attribute in layout file\n",
102 return visible!=
"no" && visible!=
"0";
116 if (result)
return result;
117 if (entry->kind()==
kind && (file==
QCString() || entry->baseFile()==file))
177 void error(
const std::string &fileName,
int lineNr,
const std::string &
msg)
179 ::warn(fileName.c_str(),lineNr,
"%s",
msg.c_str());
187 if (
m_part!=-1 && isVisible)
203 if (userTitle.
isEmpty()) userTitle = title;
204 if (
m_part!=-1 && isVisible)
219 if (userTitle.
isEmpty()) userTitle = title;
220 if (userSubscript.
isEmpty()) userSubscript = subscript;
233 if (userTitle.
isEmpty()) userTitle = title;
274 static struct NavEntryMap
319 {
"namespacemembers",
359 hasGraphicalHierarchy ?
"inherits" :
"hierarchy"
380 "annotatedinterfaces"
387 "annotatedinterfaces"
389 {
"interfacehierarchy",
394 hasGraphicalHierarchy ?
"interfaceinherits" :
"interfacehierarchy"
429 "annotatedexceptions"
436 "annotatedexceptions"
438 {
"exceptionhierarchy",
443 hasGraphicalHierarchy ?
"exceptioninherits" :
"exceptionhierarchy"
506 while (mapping[i].typeStr)
508 if (mapping[i].typeStr==type)
510 kind = mapping[i].kind;
515 if (mapping[i].typeStr==0)
520 ::warn(fileName.c_str(),
m_locator->
lineNr(),
"an entry tag within a navindex has no type attribute! Check your layout file!\n");
524 ::warn(fileName.c_str(),
m_locator->
lineNr(),
"the type '%s' is not supported for the entry tag within a navindex! Check your layout file!\n",
qPrint(type));
529 QCString baseFile = mapping[i].baseFile;
534 title = mapping[i].mainName;
537 title = mapping[i].subName;
544 intro = mapping[i].intro;
1508 it->second.startCb(*
this,attrib);
1533 it->second.endCb(*
this);
1546 std::array<LayoutDocEntryList,LayoutDocManager::NrParts>
docEntries;
1561 handlers.
endElement = [&layoutParser](
const std::string &name) { layoutParser.
endElement(name); };
1562 handlers.
error = [&layoutParser](
const std::string &fileName,
int lineNr,
const std::string &
msg) { layoutParser.
error(fileName,lineNr,
msg); };
1577 return *theInstance;
1582 return d->docEntries[(int)part];
1592 d->docEntries[(int)p].push_back(std::unique_ptr<LayoutDocEntry>(e));
1597 d->docEntries[(int)p].
clear();
1605 handlers.
endElement = [&layoutParser](
const std::string &name) { layoutParser.
endElement(name); };
1606 handlers.
error = [&layoutParser](
const std::string &fn,
int lineNr,
const std::string &
msg) { layoutParser.
error(fn,lineNr,
msg); };
1621 t <<
substitute(layout_default,
"$doxygenversion",getDoxygenVersion());
1625 err(
"Failed to open file %s for writing!\n",
qPrint(fileName));
1640 int i,s=0,e=input.
find(
'|');
1641 if (e==-1)
return input;
1646 e=input.
find(
'|',s);
1647 i=input.
find(
'=',s);
1652 if (e==-1) e=input.
length();
1653 return input.
mid(i+1,e-i-1);
1656 return input.
left(e1);
virtual QCString trDataMembers()=0
void startNavEntry(const XMLHandlers::Attributes &attrib)
virtual QCString trConstants()=0
const XMLLocator * m_locator
virtual QCString trClassMethods()=0
virtual QCString trDetailedDescription()=0
@ MemberListType_typedefMembers
virtual QCString trInstanceMethods()=0
@ MemberListType_decEnumValMembers
static ResourceMgr & instance()
Returns the one and only instance of this class
virtual QCString trMethodDocumentation()=0
Base class for the layout of a navigation item at the top of the HTML pages.
Represents of a member declaration list with configurable title and subtitle.
@ NamespaceNestedNamespaces
std::function< StartElementType > startElement
handler invoked when an opening tag has been found
virtual QCString trClassHierarchyDescription()=0
virtual QCString trCompoundMembers()=0
virtual QCString trModulesDescription()=0
virtual QCString trSubprograms()=0
@ MemberListType_docDictionaryMembers
@ MemberListType_priStaticMethods
bool resolveLink(const QCString &scName, const QCString &lr, bool, const Definition **resContext, QCString &resAnchor)
@ MemberListType_decEventMembers
@ MemberListType_priStaticAttribs
LayoutNavEntry * rootNavEntry() const
returns the (invisible) root of the navigation tree.
QCString extractLanguageSpecificTitle(const QCString &input, SrcLangExt lang)
std::unordered_map< std::string, std::string > Attributes
void startFile(const XMLHandlers::Attributes &)
@ MemberListType_functionMembers
virtual QCString trFileMembersDescription(bool extractAll)=0
@ MemberListType_docProSlotMembers
QCString getAsString(const QCString &name) const
Gets the resource data as a C string
The common base class of all entity definitions found in the sources.
virtual QCString trFunctionAndProc()=0
@ MemberListType_docEnumMembers
@ MemberListType_pacStaticAttribs
@ MemberListType_services
virtual QCString trFileList()=0
@ MemberListType_constructors
virtual bool isLinkable() const =0
virtual QCString trClassDocumentation()=0
@ MemberListType_decProSlotMembers
virtual QCString trDictionaryDocumentation()=0
void startElement(const std::string &name, const XMLHandlers::Attributes &attrib)
uint length() const
Returns the length of the string, not counting the 0-terminator.
void startMemberDef(const XMLHandlers::Attributes &)
virtual std::string fileName() const =0
std::unique_ptr< Private > d
virtual QCString trSequences()=0
int findRev(char c, int index=-1, bool cs=TRUE) const
virtual QCString trStaticPublicMembers()=0
@ MemberListType_priAttribs
virtual QCString trExceptions()=0
bool isEmpty() const
Returns TRUE iff the string is empty
LayoutNavEntry * find(LayoutNavEntry::Kind k, const QCString &file=QCString()) const
void startMemberDecl(const XMLHandlers::Attributes &)
virtual QCString trCompoundListDescriptionFortran()=0
virtual QCString trModules()=0
virtual QCString trPackageAttribs()=0
virtual QCString trCompounds()=0
virtual QCString trPublicMembers()=0
virtual QCString trPrivateAttribs()=0
virtual QCString trSequenceDocumentation()=0
QCString title(SrcLangExt lang) const
LayoutNavEntry * m_rootNav
std::vector< std::unique_ptr< LayoutDocEntry > > LayoutDocEntryList
virtual QCString trMemberFunctionDocumentation()=0
@ MemberListType_pubTypes
virtual QCString trConstantGroups()=0
SrcLangExt
Language as given by extension
@ MemberListType_priSlots
virtual QCString trTypeDocumentation()=0
virtual QCString trOperations()=0
@ MemberListType_docSequenceMembers
virtual QCString trProtectedTypes()=0
virtual QCString trPackageListDescription()=0
virtual QCString trExceptionHierarchyDescription()=0
virtual QCString trStaticPublicAttribs()=0
virtual QCString trPrivateTypes()=0
virtual QCString trNamespaceMemberDescription(bool extractAll)=0
LayoutNavEntryList m_children
virtual QCString trRelatedPages()=0
@ MemberListType_docDefineMembers
void startNavIndex(const XMLHandlers::Attributes &)
virtual QCString trEnumerationValues()=0
@ MemberListType_decDictionaryMembers
virtual QCString trEvents()=0
virtual QCString trEnumerations()=0
static bool elemIsVisible(const XMLHandlers::Attributes &attrib, bool defVal=TRUE)
void startNamespace(const XMLHandlers::Attributes &)
void err(const char *fmt,...)
virtual QCString trInterfaceHierarchy()=0
char & at(size_t i)
Returns a reference to the character at index i.
Text streaming class that buffers data.
virtual QCString trDirectories()=0
int find(char c, int index=0, bool cs=TRUE) const
void startDirectory(const XMLHandlers::Attributes &)
virtual QCString trRelatedPagesDescription()=0
@ MemberListType_proAttribs
virtual QCString trPrivateSlots()=0
@ MemberListType_pubMethods
std::function< void(LayoutParser &)> EndCallback
const LayoutDocEntryList & docEntries(LayoutPart part) const
Returns the list of LayoutDocEntry's in representation order for a given page identified by part.
virtual QCString trConcept(bool first_capital, bool singular)=0
virtual QCString trStaticPackageMembers()=0
void warn(const QCString &file, int line, const char *fmt,...)
virtual QCString trPackageTypes()=0
virtual QCString trFunctionDocumentation()=0
static bool isFlagSet(DebugMask mask)
@ MemberListType_interfaces
@ NamespaceNestedConstantGroups
virtual QCString trDesignUnitMembers()=0
@ MemberListType_decFriendMembers
@ MemberListType_decSequenceMembers
virtual QCString trServices()=0
virtual int lineNr() const =0
virtual QCString trExceptionList()=0
@ ClassCollaborationGraph
QCString title(SrcLangExt lang) const
std::function< ErrorType > error
handler invoked when the parser encounters an error
virtual QCString trCompoundMembersFortran()=0
virtual QCString trConceptDefinition()=0
virtual QCString trNamespaces()=0
Singleton providing access to the (user configurable) layout of the documentation
static int m_userGroupCount
std::function< EndElementType > endElement
handler invoked when a closing tag has been found
@ MemberListType_docFriendMembers
Represents of a member definition list with configurable title.
virtual QCString trSubprogramDocumentation()=0
QCString addHtmlExtensionIfMissing(const QCString &fName)
void parse(const char *fileName, const char *inputString, bool debugEnabled)
Represents of a piece of a documentation page without configurable parts
@ MemberListType_decPropMembers
static const std::map< std::string, ElementCallbacks > g_elementHandlers
virtual QCString trExceptionHierarchy()=0
@ MemberListType_pubSlots
void startGroup(const XMLHandlers::Attributes &)
@ MemberListType_decVarMembers
void startLayout(const XMLHandlers::Attributes &)
virtual QCString trPackageMembers()=0
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
@ MemberListType_proStaticMethods
QCString left(size_t len) const
virtual QCString trVariables()=0
virtual QCString trStructListDescription()=0
virtual QCString trMemberEnumerationDocumentation()=0
virtual QCString trMemberFunctionDocumentationFortran()=0
virtual QCString trExamplesDescription()=0
@ MemberListType_decPriSlotMembers
static LayoutParser & instance()
virtual QCString trClassHierarchy()=0
void startMemberDefEntry(const XMLHandlers::Attributes &attrib, MemberListType type, const QCString &title, const QCString &)
virtual QCString trDataMemberDocumentation()=0
virtual QCString trFriends()=0
virtual QCString trPublicAttribs()=0
Translator * theTranslator
virtual QCString trInterfaceList()=0
@ MemberListType_decPubSlotMembers
virtual QCString trFileListDescription(bool extractAll)=0
virtual QCString trVariableDocumentation()=0
void writeDefaultLayoutFile(const QCString &fileName)
@ MemberListType_docSignalMembers
virtual QCString trInterfaceHierarchyDescription()=0
virtual QCString trConstructorDocumentation()=0
virtual QCString trEventDocumentation()=0
virtual QCString trVhdlType(uint64 type, bool single)=0
@ MemberListType_docFuncMembers
virtual QCString trMainPage()=0
void startClass(const XMLHandlers::Attributes &)
QCString fileToString(const QCString &name, bool filter, bool isSourceCode)
QCString compileOptions(const QCString &def)
Base class representing a piece of a documentation page
virtual QCString trPrivateMembers()=0
virtual QCString getOutputFileBase() const =0
@ MemberListType_variableMembers
int toInt(bool *ok=0, int base=10) const
@ MemberListType_pacAttribs
virtual QCString trConceptList()=0
virtual QCString trModulesMembers()=0
virtual QCString trStaticPrivateAttribs()=0
virtual QCString trModulesListDescription(bool extractAll)=0
@ MemberListType_enumMembers
virtual QCString trTypedefs()=0
@ MemberListType_decEnumMembers
virtual QCString trDesignUnitList()=0
virtual QCString trDataTypes()=0
@ MemberListType_pacTypes
@ MemberListType_priTypes
virtual QCString trConceptListDescription(bool extractAll)=0
virtual QCString trMemberTypedefDocumentation()=0
@ MemberListType_pubStaticAttribs
virtual QCString trInterfaces()=0
virtual QCString trDesignUnitListDescription()=0
@ MemberListType_decDefineMembers
void startSimpleEntry(LayoutDocEntry::Kind k, const XMLHandlers::Attributes &attrib)
void addEntry(LayoutPart p, LayoutDocEntry *e)
void error(const std::string &fileName, int lineNr, const std::string &msg)
virtual QCString trExceptionListDescription()=0
virtual QCString trSliceInterfaces()=0
virtual QCString trConstantDocumentation()=0
QCString & setNum(short n)
virtual QCString trStaticPackageAttribs()=0
virtual QCString trCompoundListDescription()=0
@ MemberListType_proMethods
@ MemberListType_decFuncMembers
@ MemberListType_proTypes
virtual QCString trProperties()=0
QCString subtitle(SrcLangExt lang) const
@ MemberListType_docPubSlotMembers
std::array< LayoutDocEntryList, LayoutDocManager::NrParts > docEntries
virtual QCString trEnumerationTypeDocumentation()=0
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
@ MemberListType_pacMethods
@ MemberListType_interfaceMembers
virtual QCString trExceptionIndex()=0
@ MemberListType_proStaticAttribs
virtual QCString trEnumerationValueDocumentation()=0
virtual QCString trCompoundMembersDescriptionFortran(bool extractAll)=0
Event handlers that can installed by the client and called while parsing a XML document.
virtual QCString trModulesMemberDescription(bool extractAll)=0
virtual QCString trModulesList()=0
virtual QCString trDesignUnitHierarchy()=0
#define Config_getBool(name)
virtual QCString trTypedefDocumentation()=0
virtual QCString trDefines()=0
virtual QCString trSignals()=0
virtual QCString trFile(bool first_capital, bool singular)=0
virtual QCString trDefineDocumentation()=0
@ MemberListType_serviceMembers
@ MemberListType_priMethods
void msg(const char *fmt,...)
void setDocumentLocator(const XMLLocator *locator)
@ MemberListType_docVarMembers
static LayoutDocManager & instance()
Returns a reference to this singleton.
virtual QCString trNamespaceList()=0
virtual QCString trCompoundList()=0
@ MemberListType_proSlots
@ MemberListType_decTypedefMembers
virtual QCString trProtectedSlots()=0
virtual QCString trProtectedMembers()=0
virtual QCString trDesignUnits()=0
const char * qPrint(const char *s)
void startConcept(const XMLHandlers::Attributes &)
virtual QCString trNamespaceListDescription(bool extractAll)=0
#define Config_getString(name)
static ElementCallbacks::StartCallback startCb(void(LayoutParser::*fn)(const XMLHandlers::Attributes &))
virtual QCString trMemberDataDocumentation()=0
virtual QCString trPublicSlots()=0
@ MemberListType_decSignalMembers
virtual QCString trOperationDocumentation()=0
@ MemberListType_docPriSlotMembers
@ MemberListType_pubAttribs
virtual QCString trCompoundMembersDescription(bool extractAll)=0
virtual QCString trStructIndex()=0
virtual QCString trClasses()=0
void endElement(const std::string &name)
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string
virtual QCString trStaticProtectedMembers()=0
virtual QCString trStaticPrivateMembers()=0
@ MemberListType_docEnumValMembers
virtual QCString trNamespaceMembers()=0
virtual QCString trFunctions()=0
virtual QCString trDictionaries()=0
virtual QCString trPackages()=0
void startMemberDeclEntry(const XMLHandlers::Attributes &attrib, MemberListType type, const QCString &title, const QCString &subscript)
virtual QCString trCompoundListFortran()=0
virtual QCString trStructList()=0
@ MemberListType_eventMembers
virtual QCString trRelatedSubscript()=0
@ MemberListType_pacStaticMethods
virtual QCString trRelatedFunctionDocumentation()=0
virtual QCString trStructs()=0
@ MemberListType_properties
virtual QCString trInterfaceListDescription()=0
static ElementCallbacks::EndCallback endCb(void(LayoutParser::*fn)())
virtual QCString trInterfaceIndex()=0
virtual QCString trExamples()=0
virtual QCString trStaticProtectedAttribs()=0
void parse(const QCString &fileName)
Parses a user provided layout
A bunch of utility functions.
@ MemberListType_relatedMembers
QCString baseFile() const
virtual QCString trProtectedAttribs()=0
@ MemberListType_pubStaticMethods
virtual QCString trFileMembers()=0
virtual QCString trRelatedFunctions()=0
virtual QCString trPublicTypes()=0
void startSectionEntry(LayoutDocEntry::Kind k, const XMLHandlers::Attributes &attrib, const QCString &title)
@ MemberListType_docEventMembers
QCString right(size_t len) const
virtual QCString trCompoundIndex()=0
@ MemberListType_docTypedefMembers
@ MemberListType_docPropMembers
virtual QCString trPropertyDocumentation()=0
bool openOutputFile(const QCString &outFile, std::ofstream &f)
std::function< void(LayoutParser &, const XMLHandlers::Attributes &)> StartCallback
QCString & sprintf(const char *format,...)
@ MemberListType_propertyMembers
QCString title(SrcLangExt lang) const
static std::string value(const Attributes &attrib, const std::string &key)
LayoutNavEntry * parent() const
This is an alternative implementation of QCString.