My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
LayoutParser Class Reference
Inheritance diagram for LayoutParser:

Classes

class  EndElementHandler
 
class  StartElementHandler
 
class  StartElementHandlerKind
 
class  StartElementHandlerMember
 
class  StartElementHandlerNavEntry
 
class  StartElementHandlerSection
 

Public Member Functions

void init ()
 
void startSimpleEntry (LayoutDocEntry::Kind k, const QXmlAttributes &attrib)
 
void startSectionEntry (LayoutDocEntry::Kind k, const QXmlAttributes &attrib, const QCString &title)
 
void startMemberDeclEntry (const QXmlAttributes &attrib, MemberListType type, const QCString &title, const QCString &subscript)
 
void startMemberDefEntry (const QXmlAttributes &attrib, MemberListType type, const QCString &title, const QCString &)
 
void startLayout (const QXmlAttributes &)
 
void endLayout ()
 
void startNavIndex (const QXmlAttributes &)
 
void endNavIndex ()
 
void startNavEntry (const QXmlAttributes &attrib)
 
void endNavEntry ()
 
void startClass (const QXmlAttributes &)
 
void endClass ()
 
void startNamespace (const QXmlAttributes &)
 
void endNamespace ()
 
void startFile (const QXmlAttributes &)
 
void endFile ()
 
void startGroup (const QXmlAttributes &)
 
void endGroup ()
 
void startDirectory (const QXmlAttributes &)
 
void endDirectory ()
 
void startMemberDef (const QXmlAttributes &)
 
void endMemberDef ()
 
void startMemberDecl (const QXmlAttributes &)
 
void endMemberDecl ()
 
bool startElement (const QString &, const QString &, const QString &name, const QXmlAttributes &attrib)
 
bool endElement (const QString &, const QString &, const QString &name)
 
bool startDocument ()
 

Static Public Member Functions

static LayoutParserinstance ()
 

Private Member Functions

 LayoutParser ()
 
 ~LayoutParser ()
 

Private Attributes

QDict< StartElementHandlerm_sHandler
 
QDict< EndElementHandlerm_eHandler
 
QCString m_scope
 
int m_part
 
LayoutNavEntrym_rootNav
 
bool m_invalidEntry
 

Static Private Attributes

static int m_userGroupCount =0
 

Detailed Description

Definition at line 132 of file layout.cpp.

Constructor & Destructor Documentation

LayoutParser::LayoutParser ( )
inlineprivate

Definition at line 1271 of file layout.cpp.

Referenced by instance().

: m_sHandler(163), m_eHandler(17), m_invalidEntry(FALSE) { }
LayoutParser::~LayoutParser ( )
inlineprivate

Definition at line 1272 of file layout.cpp.

References m_rootNav.

{ delete m_rootNav; }

Member Function Documentation

void LayoutParser::endClass ( )
inline

Definition at line 1124 of file layout.cpp.

References m_part, and m_scope.

Referenced by init().

{
m_scope="";
m_part = -1;
}
void LayoutParser::endDirectory ( )
inline

Definition at line 1176 of file layout.cpp.

References m_part, and m_scope.

Referenced by init().

{
m_scope="";
m_part = -1;
}
bool LayoutParser::endElement ( const QString &  ,
const QString &  ,
const QString &  name 
)
inline

Definition at line 1247 of file layout.cpp.

References m_eHandler, and m_scope.

{
//printf("endElement [%s]::[%s]\n",m_scope.data(),name.data());
EndElementHandler *handler;
if (!m_scope.isEmpty() && m_scope.right(name.length()+1)==name.utf8()+"/")
{ // element ends current scope
handler = m_eHandler[m_scope.left(m_scope.length()-1)];
}
else // continue with current scope
{
handler = m_eHandler[m_scope+name.utf8()];
}
if (handler)
{
(*handler)();
}
return TRUE;
}
void LayoutParser::endFile ( )
inline

Definition at line 1150 of file layout.cpp.

References m_part, and m_scope.

Referenced by init().

{
m_scope="";
m_part = -1;
}
void LayoutParser::endGroup ( )
inline

Definition at line 1163 of file layout.cpp.

References m_part, and m_scope.

Referenced by init().

{
m_scope="";
m_part = -1;
}
void LayoutParser::endLayout ( )
inline

Definition at line 872 of file layout.cpp.

Referenced by init().

{
}
void LayoutParser::endMemberDecl ( )
inline
void LayoutParser::endMemberDef ( )
inline
void LayoutParser::endNamespace ( )
inline

Definition at line 1137 of file layout.cpp.

References m_part, and m_scope.

Referenced by init().

{
m_scope="";
m_part = -1;
}
void LayoutParser::endNavEntry ( )
inline

Definition at line 1110 of file layout.cpp.

References m_invalidEntry, m_rootNav, and LayoutNavEntry::parent().

Referenced by init().

{
// set the root back to the parent
}
void LayoutParser::endNavIndex ( )
inline

Definition at line 883 of file layout.cpp.

References LayoutNavEntry::find(), m_rootNav, m_scope, LayoutNavEntry::MainPage, theTranslator, and Translator::trMainPage().

Referenced by init().

{
m_scope="";
{
// no MainPage node... add one as the first item of the root node...
/*Config_getBool(GENERATE_TREEVIEW) ? "main" :*/ "index",
}
}
void LayoutParser::init ( )
inline

Definition at line 258 of file layout.cpp.

References LayoutDocEntry::AuthorSection, LayoutDocEntry::BriefDesc, LayoutDocEntry::ClassAllMembersLink, LayoutDocEntry::ClassCollaborationGraph, LayoutDocEntry::ClassIncludes, LayoutDocEntry::ClassInheritanceGraph, LayoutDocEntry::ClassInlineClasses, LayoutDocEntry::ClassNestedClasses, LayoutDocEntry::ClassUsedFiles, COMPILE_FOR_1_OPTION, COMPILE_FOR_2_OPTIONS, COMPILE_FOR_3_OPTIONS, COMPILE_FOR_4_OPTIONS, LayoutDocEntry::DetailedDesc, LayoutDocEntry::DirFiles, LayoutDocEntry::DirGraph, LayoutDocEntry::DirSubDirs, endClass(), endDirectory(), endFile(), endGroup(), endLayout(), endMemberDecl(), endMemberDef(), endNamespace(), endNavEntry(), endNavIndex(), VhdlDocGen::ENTITY, LayoutDocEntry::FileClasses, LayoutDocEntry::FileConstantGroups, LayoutDocEntry::FileIncludedByGraph, LayoutDocEntry::FileIncludeGraph, LayoutDocEntry::FileIncludes, LayoutDocEntry::FileInlineClasses, LayoutDocEntry::FileNamespaces, LayoutDocEntry::FileSourceLink, LayoutDocEntry::GroupClasses, LayoutDocEntry::GroupDirs, LayoutDocEntry::GroupFiles, LayoutDocEntry::GroupGraph, LayoutDocEntry::GroupInlineClasses, LayoutDocEntry::GroupNamespaces, LayoutDocEntry::GroupNestedGroups, LayoutDocEntry::GroupPageDocs, m_eHandler, m_part, m_rootNav, m_sHandler, LayoutDocEntry::MemberGroups, MemberListType_constructors, MemberListType_decDefineMembers, MemberListType_decEnumMembers, MemberListType_decEnumValMembers, MemberListType_decEventMembers, MemberListType_decFriendMembers, MemberListType_decFuncMembers, MemberListType_decPriSlotMembers, MemberListType_decPropMembers, MemberListType_decProSlotMembers, MemberListType_decPubSlotMembers, MemberListType_decSignalMembers, MemberListType_decTypedefMembers, MemberListType_decVarMembers, MemberListType_docDefineMembers, MemberListType_docEnumMembers, MemberListType_docEnumValMembers, MemberListType_docEventMembers, MemberListType_docFriendMembers, MemberListType_docFuncMembers, MemberListType_docPriSlotMembers, MemberListType_docPropMembers, MemberListType_docProSlotMembers, MemberListType_docPubSlotMembers, MemberListType_docSignalMembers, MemberListType_docTypedefMembers, MemberListType_docVarMembers, MemberListType_enumMembers, MemberListType_eventMembers, MemberListType_events, MemberListType_friends, MemberListType_functionMembers, MemberListType_interfaceMembers, MemberListType_interfaces, MemberListType_pacAttribs, MemberListType_pacMethods, MemberListType_pacStaticAttribs, MemberListType_pacStaticMethods, MemberListType_pacTypes, MemberListType_priAttribs, MemberListType_priMethods, MemberListType_priSlots, MemberListType_priStaticAttribs, MemberListType_priStaticMethods, MemberListType_priTypes, MemberListType_proAttribs, MemberListType_proMethods, MemberListType_properties, MemberListType_propertyMembers, MemberListType_proSlots, MemberListType_proStaticAttribs, MemberListType_proStaticMethods, MemberListType_proTypes, MemberListType_pubAttribs, MemberListType_pubMethods, MemberListType_pubSlots, MemberListType_pubStaticAttribs, MemberListType_pubStaticMethods, MemberListType_pubTypes, MemberListType_related, MemberListType_relatedMembers, MemberListType_serviceMembers, MemberListType_services, MemberListType_signals, MemberListType_typedefMembers, MemberListType_variableMembers, LayoutDocEntry::NamespaceClasses, LayoutDocEntry::NamespaceInlineClasses, LayoutDocEntry::NamespaceNestedConstantGroups, LayoutDocEntry::NamespaceNestedNamespaces, SrcLangExt_Fortran, SrcLangExt_IDL, SrcLangExt_Java, SrcLangExt_ObjC, SrcLangExt_VHDL, startClass(), startDirectory(), startFile(), startGroup(), startLayout(), startMemberDecl(), startMemberDeclEntry(), startMemberDef(), startMemberDefEntry(), startNamespace(), startNavEntry(), startNavIndex(), startSectionEntry(), startSimpleEntry(), theTranslator, Translator::trClassDocumentation(), Translator::trClassMethods(), Translator::trCompounds(), Translator::trConstantGroups(), Translator::trConstructorDocumentation(), Translator::trDataTypes(), Translator::trDefineDocumentation(), Translator::trDefines(), Translator::trDetailedDescription(), Translator::trDirectories(), Translator::trEnumerations(), Translator::trEnumerationTypeDocumentation(), Translator::trEnumerationValueDocumentation(), Translator::trEnumerationValues(), Translator::trEventDocumentation(), Translator::trEvents(), Translator::trFile(), Translator::trFriends(), VhdlDocGen::trFunctionAndProc(), Translator::trFunctionDocumentation(), Translator::trFunctions(), Translator::trInstanceMethods(), Translator::trInterfaces(), Translator::trMemberDataDocumentation(), Translator::trMemberEnumerationDocumentation(), Translator::trMemberFunctionDocumentation(), Translator::trMemberFunctionDocumentationFortran(), Translator::trMemberTypedefDocumentation(), Translator::trMethodDocumentation(), Translator::trModules(), Translator::trNamespaces(), Translator::trPackageAttribs(), Translator::trPackageMembers(), Translator::trPackages(), Translator::trPackageTypes(), Translator::trPrivateAttribs(), Translator::trPrivateMembers(), Translator::trPrivateSlots(), Translator::trPrivateTypes(), Translator::trProperties(), Translator::trPropertyDocumentation(), Translator::trProtectedAttribs(), Translator::trProtectedMembers(), Translator::trProtectedSlots(), Translator::trProtectedTypes(), Translator::trPublicAttribs(), Translator::trPublicMembers(), Translator::trPublicSlots(), Translator::trPublicTypes(), Translator::trRelatedFunctionDocumentation(), Translator::trRelatedFunctions(), Translator::trRelatedSubscript(), Translator::trServices(), Translator::trSignals(), Translator::trStaticPackageAttribs(), Translator::trStaticPackageMembers(), Translator::trStaticPrivateAttribs(), Translator::trStaticPrivateMembers(), Translator::trStaticProtectedAttribs(), Translator::trStaticProtectedMembers(), Translator::trStaticPublicAttribs(), Translator::trStaticPublicMembers(), Translator::trSubprogramDocumentation(), Translator::trSubprograms(), Translator::trTypedefDocumentation(), Translator::trTypedefs(), Translator::trTypeDocumentation(), Translator::trVariableDocumentation(), Translator::trVariables(), and VhdlDocGen::trVhdlType().

Referenced by LayoutDocManager::LayoutDocManager().

{
m_sHandler.setAutoDelete(TRUE);
m_eHandler.setAutoDelete(TRUE);
m_part = -1; // invalid
m_rootNav = 0;
//bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
//bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
//bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
// start & end handlers
m_sHandler.insert("doxygenlayout",
new StartElementHandler(this,&LayoutParser::startLayout));
m_eHandler.insert("doxygenlayout",
new EndElementHandler(this,&LayoutParser::endLayout));
// class layout handlers
m_sHandler.insert("navindex",
new StartElementHandler(this,&LayoutParser::startNavIndex));
m_sHandler.insert("navindex/tab",
new StartElementHandler(this,&LayoutParser::startNavEntry));
m_eHandler.insert("navindex/tab",
new EndElementHandler(this,&LayoutParser::endNavEntry));
m_eHandler.insert("navindex",
new EndElementHandler(this,&LayoutParser::endNavIndex));
// class layout handlers
m_sHandler.insert("class",
new StartElementHandler(this,&LayoutParser::startClass));
m_sHandler.insert("class/briefdescription",
new StartElementHandlerKind(this,LayoutDocEntry::BriefDesc,&LayoutParser::startSimpleEntry));
m_sHandler.insert("class/detaileddescription",
new StartElementHandlerSection(this,LayoutDocEntry::DetailedDesc,&LayoutParser::startSectionEntry,
m_sHandler.insert("class/authorsection",
m_sHandler.insert("class/includes",
m_sHandler.insert("class/inheritancegraph",
m_sHandler.insert("class/collaborationgraph",
m_sHandler.insert("class/allmemberslink",
m_sHandler.insert("class/usedfiles",
m_sHandler.insert("class/memberdecl",
new StartElementHandler(this,&LayoutParser::startMemberDecl));
m_sHandler.insert("class/memberdecl/membergroups",
new StartElementHandlerKind(this,LayoutDocEntry::MemberGroups,&LayoutParser::startSimpleEntry));
m_sHandler.insert("class/memberdecl/nestedclasses",
)));
m_sHandler.insert("class/memberdecl/services",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/interfaces",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/publictypes",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/publicslots",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/signals",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/publicmethods",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
)));
m_sHandler.insert("class/memberdecl/publicstaticmethods",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
)));
m_sHandler.insert("class/memberdecl/publicattributes",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/publicstaticattributes",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/protectedtypes",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/protectedslots",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/protectedmethods",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/protectedstaticmethods",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/protectedattributes",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/protectedstaticattributes",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/packagetypes",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/packagemethods",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/packagestaticmethods",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/packageattributes",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/packagestaticattributes",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/properties",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/events",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/privatetypes",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/privateslots",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/privatemethods",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/privatestaticmethods",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/privateattributes",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/privatestaticattributes",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/friends",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("class/memberdecl/related",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_eHandler.insert("class/memberdecl",
new EndElementHandler(this,&LayoutParser::endMemberDecl));
m_sHandler.insert("class/memberdef",
new StartElementHandler(this,&LayoutParser::startMemberDef));
m_sHandler.insert("class/memberdef/inlineclasses",
)));
m_sHandler.insert("class/memberdef/typedefs",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("class/memberdef/enums",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("class/memberdef/services",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("class/memberdef/interfaces",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("class/memberdef/constructors",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("class/memberdef/functions",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
)));
m_sHandler.insert("class/memberdef/related",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("class/memberdef/variables",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("class/memberdef/properties",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("class/memberdef/events",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_eHandler.insert("class/memberdef",
new EndElementHandler(this,&LayoutParser::endMemberDef));
m_eHandler.insert("class",
new EndElementHandler(this,&LayoutParser::endClass));
// namespace layout handlers
m_sHandler.insert("namespace",
new StartElementHandler(this,&LayoutParser::startNamespace));
m_sHandler.insert("namespace/briefdescription",
new StartElementHandlerKind(this,LayoutDocEntry::BriefDesc,&LayoutParser::startSimpleEntry));
m_sHandler.insert("namespace/detaileddescription",
new StartElementHandlerSection(this,LayoutDocEntry::DetailedDesc,&LayoutParser::startSectionEntry,
m_sHandler.insert("namespace/authorsection",
m_sHandler.insert("namespace/memberdecl",
new StartElementHandler(this,&LayoutParser::startMemberDecl));
m_sHandler.insert("namespace/memberdecl/nestednamespaces",
)));
m_sHandler.insert("namespace/memberdecl/constantgroups",
m_sHandler.insert("namespace/memberdecl/classes",
)));
m_sHandler.insert("namespace/memberdecl/membergroups",
new StartElementHandlerKind(this,LayoutDocEntry::MemberGroups,&LayoutParser::startSimpleEntry));
m_sHandler.insert("namespace/memberdecl/typedefs",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("namespace/memberdecl/enums",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("namespace/memberdecl/functions",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
)));
m_sHandler.insert("namespace/memberdecl/variables",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_eHandler.insert("namespace/memberdecl",
new EndElementHandler(this,&LayoutParser::endMemberDecl));
m_sHandler.insert("namespace/memberdef",
new StartElementHandler(this,&LayoutParser::startMemberDef));
m_sHandler.insert("namespace/memberdef/inlineclasses",
)));
m_sHandler.insert("namespace/memberdef/typedefs",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("namespace/memberdef/enums",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("namespace/memberdef/functions",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
)));
m_sHandler.insert("namespace/memberdef/variables",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_eHandler.insert("namespace/memberdef",
new EndElementHandler(this,&LayoutParser::endMemberDef));
m_eHandler.insert("namespace",
new EndElementHandler(this,&LayoutParser::endNamespace));
// file layout handlers
m_sHandler.insert("file",
new StartElementHandler(this,&LayoutParser::startFile));
m_sHandler.insert("file/briefdescription",
new StartElementHandlerKind(this,LayoutDocEntry::BriefDesc,&LayoutParser::startSimpleEntry));
m_sHandler.insert("file/detaileddescription",
new StartElementHandlerSection(this,LayoutDocEntry::DetailedDesc,&LayoutParser::startSectionEntry,
m_sHandler.insert("file/authorsection",
m_sHandler.insert("file/includes",
new StartElementHandlerKind(this,LayoutDocEntry::FileIncludes,&LayoutParser::startSimpleEntry));
m_sHandler.insert("file/includegraph",
m_sHandler.insert("file/includedbygraph",
m_sHandler.insert("file/sourcelink",
m_sHandler.insert("file/memberdecl/membergroups",
new StartElementHandlerKind(this,LayoutDocEntry::MemberGroups,&LayoutParser::startSimpleEntry));
m_sHandler.insert("file/memberdecl",
new StartElementHandler(this,&LayoutParser::startMemberDecl));
m_sHandler.insert("file/memberdecl/classes",
new StartElementHandlerSection(this,LayoutDocEntry::FileClasses,&LayoutParser::startSectionEntry,
)));
m_sHandler.insert("file/memberdecl/namespaces",
)));
m_sHandler.insert("file/memberdecl/constantgroups",
m_sHandler.insert("file/memberdecl/defines",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("file/memberdecl/typedefs",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("file/memberdecl/enums",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("file/memberdecl/functions",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
)));
m_sHandler.insert("file/memberdecl/variables",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_eHandler.insert("file/memberdecl",
new EndElementHandler(this,&LayoutParser::endMemberDecl));
m_sHandler.insert("file/memberdef",
new StartElementHandler(this,&LayoutParser::startMemberDef));
m_sHandler.insert("file/memberdef/inlineclasses",
)));
m_sHandler.insert("file/memberdef/defines",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("file/memberdef/typedefs",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("file/memberdef/enums",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("file/memberdef/functions",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
)));
m_sHandler.insert("file/memberdef/variables",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_eHandler.insert("file/memberdef",
new EndElementHandler(this,&LayoutParser::endMemberDef));
m_eHandler.insert("file",
new EndElementHandler(this,&LayoutParser::endFile));
// group layout handlers
m_sHandler.insert("group",
new StartElementHandler(this,&LayoutParser::startGroup));
m_sHandler.insert("group/briefdescription",
new StartElementHandlerKind(this,LayoutDocEntry::BriefDesc,&LayoutParser::startSimpleEntry));
m_sHandler.insert("group/detaileddescription",
new StartElementHandlerSection(this,LayoutDocEntry::DetailedDesc,&LayoutParser::startSectionEntry,
m_sHandler.insert("group/authorsection",
m_sHandler.insert("group/groupgraph",
new StartElementHandlerKind(this,LayoutDocEntry::GroupGraph,&LayoutParser::startSimpleEntry));
m_sHandler.insert("group/memberdecl/membergroups",
new StartElementHandlerKind(this,LayoutDocEntry::MemberGroups,&LayoutParser::startSimpleEntry));
m_sHandler.insert("group/memberdecl",
new StartElementHandler(this,&LayoutParser::startMemberDecl));
m_sHandler.insert("group/memberdecl/classes",
new StartElementHandlerSection(this,LayoutDocEntry::GroupClasses,&LayoutParser::startSectionEntry,
)));
m_sHandler.insert("group/memberdecl/namespaces",
)));
m_sHandler.insert("group/memberdecl/dirs",
new StartElementHandlerSection(this,LayoutDocEntry::GroupDirs,&LayoutParser::startSectionEntry,
));
m_sHandler.insert("group/memberdecl/nestedgroups",
));
m_sHandler.insert("group/memberdecl/files",
new StartElementHandlerSection(this,LayoutDocEntry::GroupFiles,&LayoutParser::startSectionEntry,
theTranslator->trFile(TRUE,FALSE)
));
m_sHandler.insert("group/memberdecl/defines",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("group/memberdecl/typedefs",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("group/memberdecl/enums",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("group/memberdecl/enumvalues",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("group/memberdecl/functions",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
)));
m_sHandler.insert("group/memberdecl/variables",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("group/memberdecl/signals",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("group/memberdecl/publicslots",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("group/memberdecl/protectedslots",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("group/memberdecl/privateslots",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("group/memberdecl/events",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("group/memberdecl/properties",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_sHandler.insert("group/memberdecl/friends",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
m_eHandler.insert("group/memberdecl",
new EndElementHandler(this,&LayoutParser::endMemberDecl));
m_sHandler.insert("group/memberdef",
new StartElementHandler(this,&LayoutParser::startMemberDef));
m_sHandler.insert("group/memberdef/pagedocs",
m_sHandler.insert("group/memberdef/inlineclasses",
)));
m_sHandler.insert("group/memberdef/defines",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("group/memberdef/typedefs",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("group/memberdef/enums",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("group/memberdef/enumvalues",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("group/memberdef/functions",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
)));
m_sHandler.insert("group/memberdef/variables",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("group/memberdef/signals",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("group/memberdef/publicslots",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("group/memberdef/protectedslots",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("group/memberdef/privateslots",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("group/memberdef/events",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("group/memberdef/properties",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_sHandler.insert("group/memberdef/friends",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
m_eHandler.insert("group/memberdef",
new EndElementHandler(this,&LayoutParser::endMemberDef));
m_eHandler.insert("group",
new EndElementHandler(this,&LayoutParser::endGroup));
// directory layout handlers
m_sHandler.insert("directory",
new StartElementHandler(this,&LayoutParser::startDirectory));
m_sHandler.insert("directory/briefdescription",
new StartElementHandlerKind(this,LayoutDocEntry::BriefDesc,&LayoutParser::startSimpleEntry));
m_sHandler.insert("directory/detaileddescription",
new StartElementHandlerSection(this,LayoutDocEntry::DetailedDesc,&LayoutParser::startSectionEntry,
m_sHandler.insert("directory/directorygraph",
new StartElementHandlerKind(this,LayoutDocEntry::DirGraph,&LayoutParser::startSimpleEntry));
m_sHandler.insert("directory/memberdecl",
new StartElementHandler(this,&LayoutParser::startMemberDecl));
m_sHandler.insert("directory/memberdecl/dirs",
new StartElementHandlerKind(this,LayoutDocEntry::DirSubDirs,&LayoutParser::startSimpleEntry));
m_sHandler.insert("directory/memberdecl/files",
new StartElementHandlerKind(this,LayoutDocEntry::DirFiles,&LayoutParser::startSimpleEntry));
m_eHandler.insert("directory/memberdecl",
new EndElementHandler(this,&LayoutParser::endMemberDecl));
m_eHandler.insert("directory",
new EndElementHandler(this,&LayoutParser::endDirectory));
}
static LayoutParser& LayoutParser::instance ( )
inlinestatic

Definition at line 253 of file layout.cpp.

References LayoutParser().

Referenced by LayoutDocManager::init(), LayoutDocManager::LayoutDocManager(), and LayoutDocManager::parse().

{
static LayoutParser *theInstance = new LayoutParser;
return *theInstance;
}
void LayoutParser::startClass ( const QXmlAttributes &  )
inline
void LayoutParser::startDirectory ( const QXmlAttributes &  )
inline
bool LayoutParser::startDocument ( )
inline

Definition at line 1265 of file layout.cpp.

{
return TRUE;
}
bool LayoutParser::startElement ( const QString &  ,
const QString &  ,
const QString &  name,
const QXmlAttributes &  attrib 
)
inline

Definition at line 1231 of file layout.cpp.

References err(), m_scope, and m_sHandler.

{
//printf("startElement [%s]::[%s]\n",m_scope.data(),name.data());
StartElementHandler *handler = m_sHandler[m_scope+name.utf8()];
if (handler)
{
(*handler)(attrib);
}
else
{
err("Unexpected start tag `%s' found in scope='%s'!\n",
name.data(),m_scope.data());
}
return TRUE;
}
void LayoutParser::startFile ( const QXmlAttributes &  )
inline
void LayoutParser::startGroup ( const QXmlAttributes &  )
inline
void LayoutParser::startLayout ( const QXmlAttributes &  )
inline

Definition at line 868 of file layout.cpp.

Referenced by init().

{
}
void LayoutParser::startMemberDecl ( const QXmlAttributes &  )
inline
void LayoutParser::startMemberDeclEntry ( const QXmlAttributes &  attrib,
MemberListType  type,
const QCString &  title,
const QCString &  subscript 
)
inline

Definition at line 838 of file layout.cpp.

References LayoutDocManager::addEntry(), LayoutDocManager::instance(), and m_part.

Referenced by init().

{
//QCString visible = convertToQCString(attrib.value("visible"));
//bool isVisible = visible.isEmpty() || (visible!="no" && visible!="0");
QCString userTitle = attrib.value("title").utf8();
QCString userSubscript = attrib.value("subtitle").utf8();
if (userTitle.isEmpty()) userTitle = title;
if (userSubscript.isEmpty()) userSubscript = subscript;
//printf("memberdecl: %s\n",userTitle.data());
if (m_part!=-1 /*&& isVisible*/)
{
new LayoutDocEntryMemberDecl(type,userTitle,userSubscript));
}
}
void LayoutParser::startMemberDef ( const QXmlAttributes &  )
inline
void LayoutParser::startMemberDefEntry ( const QXmlAttributes &  attrib,
MemberListType  type,
const QCString &  title,
const QCString &   
)
inline

Definition at line 855 of file layout.cpp.

References LayoutDocManager::addEntry(), LayoutDocManager::instance(), and m_part.

Referenced by init().

{
QCString userTitle = attrib.value("title").utf8();
if (userTitle.isEmpty()) userTitle = title;
//printf("memberdef: %s\n",userTitle.data());
if (m_part!=-1 /*&& isVisible*/)
{
new LayoutDocEntryMemberDef(type,userTitle));
}
}
void LayoutParser::startNamespace ( const QXmlAttributes &  )
inline
void LayoutParser::startNavEntry ( const QXmlAttributes &  attrib)
inline

Definition at line 895 of file layout.cpp.

References LayoutNavEntry::Classes, LayoutNavEntry::ClassHierarchy, LayoutNavEntry::ClassIndex, LayoutNavEntry::ClassList, LayoutNavEntry::ClassMembers, Config_getBool, elemIsVisible(), err(), LayoutNavEntry::Examples, LayoutNavEntry::FileGlobals, LayoutNavEntry::FileList, LayoutNavEntry::Files, LayoutDocManager::instance(), m_invalidEntry, m_rootNav, m_userGroupCount, LayoutNavEntry::MainPage, LayoutNavEntry::Modules, LayoutNavEntry::NamespaceList, LayoutNavEntry::NamespaceMembers, LayoutNavEntry::Namespaces, LayoutNavEntry::Pages, LayoutDocManager::rootNavEntry(), theTranslator, Translator::trClasses(), Translator::trClassHierarchy(), Translator::trClassHierarchyDescription(), Translator::trCompoundIndex(), Translator::trCompoundList(), Translator::trCompoundListDescription(), Translator::trCompoundListDescriptionFortran(), Translator::trCompoundListFortran(), Translator::trCompoundMembers(), Translator::trCompoundMembersDescription(), Translator::trCompoundMembersDescriptionFortran(), Translator::trCompoundMembersFortran(), Translator::trDataTypes(), VhdlDocGen::trDesignUnitHierarchy(), VhdlDocGen::trDesignUnitList(), VhdlDocGen::trDesignUnitListDescription(), VhdlDocGen::trDesignUnitMembers(), VhdlDocGen::trDesignUnits(), Translator::trExamples(), Translator::trExamplesDescription(), Translator::trFile(), Translator::trFileList(), Translator::trFileListDescription(), Translator::trFileMembers(), Translator::trFileMembersDescription(), Translator::trMainPage(), Translator::trModules(), Translator::trModulesDescription(), Translator::trModulesList(), Translator::trModulesListDescription(), Translator::trModulesMemberDescription(), Translator::trModulesMembers(), Translator::trNamespaceList(), Translator::trNamespaceListDescription(), Translator::trNamespaceMemberDescription(), Translator::trNamespaceMembers(), Translator::trNamespaces(), Translator::trPackageListDescription(), Translator::trPackageMembers(), Translator::trPackages(), Translator::trRelatedPages(), Translator::trRelatedPagesDescription(), LayoutNavEntry::User, and LayoutNavEntry::UserGroup.

Referenced by init().

{
static bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
static bool hasGraphicalHierarchy = Config_getBool(HAVE_DOT) &&
Config_getBool(GRAPHICAL_HIERARCHY);
static bool extractAll = Config_getBool(EXTRACT_ALL);
static struct NavEntryMap
{
const char *typeStr; // type attribute name in the XML file
LayoutNavEntry::Kind kind; // corresponding enum name
QCString mainName; // default title for an item if it has children
QCString subName; // optional name for an item if it is rendered as a child
QCString intro; // introduction text to be put on the index page
QCString baseFile; // base name of the file containing the index page
} mapping[] =
{
{ "mainpage",
QCString(),
QCString(),
"index"
},
{ "pages",
QCString(),
"pages"
},
{ "modules",
QCString(),
"modules"
},
{ "namespaces",
javaOpt || vhdlOpt ? theTranslator->trPackages() : fortranOpt ? theTranslator->trModules() : theTranslator->trNamespaces(),
javaOpt || vhdlOpt ? theTranslator->trPackages() : fortranOpt ? theTranslator->trModulesList() : theTranslator->trNamespaceList(),
"namespaces"
},
{ "namespacelist",
javaOpt || vhdlOpt ? theTranslator->trPackages() : fortranOpt ? theTranslator->trModulesList() : theTranslator->trNamespaceList(),
QCString(),
"namespaces"
},
{ "namespacemembers",
QCString(),
"namespacemembers"
},
{ "classindex",
fortranOpt ? theTranslator->trDataTypes() : vhdlOpt ? VhdlDocGen::trDesignUnits() : theTranslator->trCompoundIndex(),
QCString(),
QCString(),
"classes"
},
{ "classes",
fortranOpt ? theTranslator->trCompoundListFortran() : vhdlOpt ? VhdlDocGen::trDesignUnitList() : theTranslator->trClasses(),
theTranslator->trCompoundList(),
fortranOpt ? theTranslator->trCompoundListDescriptionFortran() : vhdlOpt ? VhdlDocGen::trDesignUnitListDescription() : theTranslator->trCompoundListDescription(),
"annotated"
},
{ "classlist",
fortranOpt ? theTranslator->trCompoundListFortran() : vhdlOpt ? VhdlDocGen::trDesignUnitList() : theTranslator->trCompoundList(),
QCString(),
fortranOpt ? theTranslator->trCompoundListDescriptionFortran() : vhdlOpt ? VhdlDocGen::trDesignUnitListDescription() : theTranslator->trCompoundListDescription(),
"annotated"
},
{ "hierarchy",
vhdlOpt ? VhdlDocGen::trDesignUnitHierarchy() : theTranslator->trClassHierarchy(),
QCString(),
theTranslator->trClassHierarchyDescription(),
hasGraphicalHierarchy ? "inherits" : "hierarchy"
},
{ "classmembers",
fortranOpt ? theTranslator->trCompoundMembersFortran() : vhdlOpt ? VhdlDocGen::trDesignUnitMembers() : theTranslator->trCompoundMembers(),
QCString(),
fortranOpt ? theTranslator->trCompoundMembersDescriptionFortran(extractAll) : theTranslator->trCompoundMembersDescription(extractAll),
"functions"
},
{ "files",
theTranslator->trFile(TRUE,FALSE),
"files"
},
{ "filelist",
QCString(),
"files"
},
{ "globals",
QCString(),
"globals"
},
//{ "dirs",
// LayoutNavEntry::Dirs,
// theTranslator->trDirectories(),
// QCString(),
// theTranslator->trDirDescription(),
// "dirs"
//},
{ "examples",
QCString(),
"examples"
},
{ "user",
QCString(),
QCString(),
QCString(),
"user"
},
{ "usergroup",
QCString(),
QCString(),
QCString(),
"usergroup"
},
{ 0, // end of list
QCString(),
QCString(),
QCString(),
QCString()
}
};
// find type in the table
int i=0;
QString type = attrib.value("type");
while (mapping[i].typeStr)
{
if (mapping[i].typeStr==type)
{
kind = mapping[i].kind;
break;
}
i++;
}
if (mapping[i].typeStr==0)
{
if (type.isEmpty())
{
err("an entry tag within a navindex has no type attribute! Check your layout file!\n");
}
else
{
err("the type '%s' is not supported for the entry tag within a navindex! Check your layout file!\n",type.data());
}
m_invalidEntry=TRUE;
return;
}
QCString baseFile = mapping[i].baseFile;
QCString title = attrib.value("title").utf8();
bool isVisible = elemIsVisible(attrib);
if (title.isEmpty()) // use default title
{
title = mapping[i].mainName; // use title for main row
if (m_rootNav!=LayoutDocManager::instance().rootNavEntry() && !mapping[i].subName.isEmpty())
{
title = mapping[i].subName; // if this is a child of another row, use the subName if available
// this is mainly done to get compatible naming with older versions.
}
}
QCString intro = attrib.value("intro").utf8();
if (intro.isEmpty()) // use default intro text
{
intro = mapping[i].intro;
}
QCString url = attrib.value("url").utf8();
if (mapping[i].kind==LayoutNavEntry::User && !url.isEmpty())
{
baseFile=url;
}
else if (kind==LayoutNavEntry::UserGroup)
{
if (!url.isEmpty())
{
baseFile=url;
}
else
{
baseFile+=QCString().sprintf("%d",m_userGroupCount++);
}
}
// create new item and make it the new root
m_rootNav = new LayoutNavEntry(m_rootNav,kind,isVisible,baseFile,title,intro);
}
void LayoutParser::startNavIndex ( const QXmlAttributes &  )
inline
void LayoutParser::startSectionEntry ( LayoutDocEntry::Kind  k,
const QXmlAttributes &  attrib,
const QCString &  title 
)
inline

Definition at line 822 of file layout.cpp.

References LayoutDocManager::addEntry(), elemIsVisible(), LayoutDocManager::instance(), and m_part.

Referenced by init().

{
bool isVisible = elemIsVisible(attrib);
QCString userTitle = attrib.value("title").utf8();
//printf("startSectionEntry: title='%s' userTitle='%s'\n",
// title.data(),userTitle.data());
if (userTitle.isEmpty()) userTitle = title;
if (m_part!=-1 && isVisible)
{
new LayoutDocEntrySection(k,userTitle));
}
}
void LayoutParser::startSimpleEntry ( LayoutDocEntry::Kind  k,
const QXmlAttributes &  attrib 
)
inline

Definition at line 812 of file layout.cpp.

References LayoutDocManager::addEntry(), elemIsVisible(), LayoutDocManager::instance(), and m_part.

Referenced by init().

{
bool isVisible = elemIsVisible(attrib);
if (m_part!=-1 && isVisible)
{
}
}

Member Data Documentation

QDict<EndElementHandler> LayoutParser::m_eHandler
private

Definition at line 1275 of file layout.cpp.

Referenced by endElement(), and init().

bool LayoutParser::m_invalidEntry
private

Definition at line 1279 of file layout.cpp.

Referenced by endNavEntry(), and startNavEntry().

int LayoutParser::m_part
private
LayoutNavEntry* LayoutParser::m_rootNav
private

Definition at line 1278 of file layout.cpp.

Referenced by endNavEntry(), endNavIndex(), init(), startNavEntry(), startNavIndex(), and ~LayoutParser().

QCString LayoutParser::m_scope
private
QDict<StartElementHandler> LayoutParser::m_sHandler
private

Definition at line 1274 of file layout.cpp.

Referenced by init(), and startElement().

int LayoutParser::m_userGroupCount =0
staticprivate

Definition at line 1280 of file layout.cpp.

Referenced by startNavEntry().


The documentation for this class was generated from the following file: