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:
QXmlDefaultHandler QXmlContentHandler QXmlErrorHandler QXmlDTDHandler QXmlEntityResolver QXmlLexicalHandler QXmlDeclHandler

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 ()
 
- Public Member Functions inherited from QXmlDefaultHandler
 QXmlDefaultHandler ()
 
virtual ~QXmlDefaultHandler ()
 
void setDocumentLocator (QXmlLocator *locator)
 
bool endDocument ()
 
bool startPrefixMapping (const QString &prefix, const QString &uri)
 
bool endPrefixMapping (const QString &prefix)
 
bool characters (const QString &ch)
 
bool ignorableWhitespace (const QString &ch)
 
bool processingInstruction (const QString &target, const QString &data)
 
bool skippedEntity (const QString &name)
 
bool warning (const QXmlParseException &exception)
 
bool error (const QXmlParseException &exception)
 
bool fatalError (const QXmlParseException &exception)
 
bool notationDecl (const QString &name, const QString &publicId, const QString &systemId)
 
bool unparsedEntityDecl (const QString &name, const QString &publicId, const QString &systemId, const QString &notationName)
 
bool resolveEntity (const QString &publicId, const QString &systemId, QXmlInputSource *&ret)
 
bool startDTD (const QString &name, const QString &publicId, const QString &systemId)
 
bool endDTD ()
 
bool startCDATA ()
 
bool endCDATA ()
 
bool comment (const QString &ch)
 
bool attributeDecl (const QString &eName, const QString &aName, const QString &type, const QString &valueDefault, const QString &value)
 
bool internalEntityDecl (const QString &name, const QString &value)
 
bool externalEntityDecl (const QString &name, const QString &publicId, const QString &systemId)
 
QString errorString ()
 
- Public Member Functions inherited from QXmlContentHandler
virtual ~QXmlContentHandler ()
 
- Public Member Functions inherited from QXmlErrorHandler
virtual ~QXmlErrorHandler ()
 
- Public Member Functions inherited from QXmlDTDHandler
virtual ~QXmlDTDHandler ()
 
- Public Member Functions inherited from QXmlEntityResolver
virtual ~QXmlEntityResolver ()
 
- Public Member Functions inherited from QXmlLexicalHandler
virtual ~QXmlLexicalHandler ()
 
- Public Member Functions inherited from QXmlDeclHandler
virtual ~QXmlDeclHandler ()
 

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.

1271 : m_sHandler(163), m_eHandler(17), m_invalidEntry(FALSE) { }
QDict< StartElementHandler > m_sHandler
Definition: layout.cpp:1274
QDict< EndElementHandler > m_eHandler
Definition: layout.cpp:1275
const bool FALSE
Definition: qglobal.h:370
bool m_invalidEntry
Definition: layout.cpp:1279
LayoutParser::~LayoutParser ( )
inlineprivate

Definition at line 1272 of file layout.cpp.

1272 { delete m_rootNav; }
LayoutNavEntry * m_rootNav
Definition: layout.cpp:1278

Member Function Documentation

void LayoutParser::endClass ( )
inline

Definition at line 1124 of file layout.cpp.

1125  {
1126  m_scope="";
1127  m_part = -1;
1128  }
QCString m_scope
Definition: layout.cpp:1276
void LayoutParser::endDirectory ( )
inline

Definition at line 1176 of file layout.cpp.

1177  {
1178  m_scope="";
1179  m_part = -1;
1180  }
QCString m_scope
Definition: layout.cpp:1276
bool LayoutParser::endElement ( const QString namespaceURI,
const QString localName,
const QString qName 
)
inlinevirtual

Does nothing.

Reimplemented from QXmlDefaultHandler.

Definition at line 1247 of file layout.cpp.

1248  {
1249  //printf("endElement [%s]::[%s]\n",m_scope.data(),name.data());
1250  EndElementHandler *handler;
1251  if (!m_scope.isEmpty() && m_scope.right(name.length()+1)==name.utf8()+"/")
1252  { // element ends current scope
1253  handler = m_eHandler[m_scope.left(m_scope.length()-1)];
1254  }
1255  else // continue with current scope
1256  {
1257  handler = m_eHandler[m_scope+name.utf8()];
1258  }
1259  if (handler)
1260  {
1261  (*handler)();
1262  }
1263  return TRUE;
1264  }
static QCString name
Definition: declinfo.cpp:673
bool isEmpty() const
Definition: qcstring.h:189
uint length() const
Definition: qcstring.h:195
QDict< EndElementHandler > m_eHandler
Definition: layout.cpp:1275
QCString left(uint len) const
Definition: qcstring.cpp:213
QCString right(uint len) const
Definition: qcstring.cpp:231
QCString m_scope
Definition: layout.cpp:1276
static msg_handler handler
Definition: qglobal.cpp:234
const bool TRUE
Definition: qglobal.h:371
void LayoutParser::endFile ( )
inline

Definition at line 1150 of file layout.cpp.

1151  {
1152  m_scope="";
1153  m_part = -1;
1154  }
QCString m_scope
Definition: layout.cpp:1276
void LayoutParser::endGroup ( )
inline

Definition at line 1163 of file layout.cpp.

1164  {
1165  m_scope="";
1166  m_part = -1;
1167  }
QCString m_scope
Definition: layout.cpp:1276
void LayoutParser::endLayout ( )
inline

Definition at line 872 of file layout.cpp.

873  {
874  }
void LayoutParser::endMemberDecl ( )
inline

Definition at line 1216 of file layout.cpp.

1217  {
1218  int i=m_scope.findRev("memberdecl/");
1219  if (i!=-1)
1220  {
1221  m_scope=m_scope.left(i);
1222  if (m_part!=-1)
1223  {
1226  }
1227  }
1228  }
Represents of a piece of a documentation page without configurable parts.
Definition: layout.h:70
static LayoutDocManager & instance()
Definition: layout.cpp:1359
QCString left(uint len) const
Definition: qcstring.cpp:213
void addEntry(LayoutPart p, LayoutDocEntry *e)
Definition: layout.cpp:1375
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
QCString m_scope
Definition: layout.cpp:1276
void LayoutParser::endMemberDef ( )
inline

Definition at line 1192 of file layout.cpp.

1193  {
1194  int i=m_scope.findRev("memberdef/");
1195  if (i!=-1)
1196  {
1197  m_scope=m_scope.left(i);
1198  if (m_part!=-1)
1199  {
1202  }
1203  }
1204  }
Represents of a piece of a documentation page without configurable parts.
Definition: layout.h:70
static LayoutDocManager & instance()
Definition: layout.cpp:1359
QCString left(uint len) const
Definition: qcstring.cpp:213
void addEntry(LayoutPart p, LayoutDocEntry *e)
Definition: layout.cpp:1375
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
QCString m_scope
Definition: layout.cpp:1276
void LayoutParser::endNamespace ( )
inline

Definition at line 1137 of file layout.cpp.

1138  {
1139  m_scope="";
1140  m_part = -1;
1141  }
QCString m_scope
Definition: layout.cpp:1276
void LayoutParser::endNavEntry ( )
inline

Definition at line 1110 of file layout.cpp.

1111  {
1112  // set the root back to the parent
1115  }
const bool FALSE
Definition: qglobal.h:370
LayoutNavEntry * m_rootNav
Definition: layout.cpp:1278
LayoutNavEntry * parent() const
Definition: layout.h:147
bool m_invalidEntry
Definition: layout.cpp:1279
void LayoutParser::endNavIndex ( )
inline

Definition at line 883 of file layout.cpp.

884  {
885  m_scope="";
887  {
888  // no MainPage node... add one as the first item of the root node...
890  /*Config_getBool("GENERATE_TREEVIEW") ? "main" :*/ "index",
892  }
893  }
LayoutNavEntry * find(LayoutNavEntry::Kind k, const char *file=0) const
Definition: layout.cpp:76
Base class for the layout of a navigation item at the top of the HTML pages.
Definition: layout.h:118
virtual QCString trMainPage()=0
LayoutNavEntry * m_rootNav
Definition: layout.cpp:1278
QCString m_scope
Definition: layout.cpp:1276
Translator * theTranslator
Definition: language.cpp:157
const bool TRUE
Definition: qglobal.h:371
void LayoutParser::init ( )
inline

Definition at line 258 of file layout.cpp.

259  {
260  m_sHandler.setAutoDelete(TRUE);
261  m_eHandler.setAutoDelete(TRUE);
262  m_part = -1; // invalid
263  m_rootNav = 0;
264 
265  //bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
266  //bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
267  //bool javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
268 
269  // start & end handlers
270  m_sHandler.insert("doxygenlayout",
271  new StartElementHandler(this,&LayoutParser::startLayout));
272  m_eHandler.insert("doxygenlayout",
273  new EndElementHandler(this,&LayoutParser::endLayout));
274 
275  // class layout handlers
276  m_sHandler.insert("navindex",
277  new StartElementHandler(this,&LayoutParser::startNavIndex));
278  m_sHandler.insert("navindex/tab",
279  new StartElementHandler(this,&LayoutParser::startNavEntry));
280  m_eHandler.insert("navindex/tab",
281  new EndElementHandler(this,&LayoutParser::endNavEntry));
282  m_eHandler.insert("navindex",
283  new EndElementHandler(this,&LayoutParser::endNavIndex));
284 
285  // class layout handlers
286  m_sHandler.insert("class",
287  new StartElementHandler(this,&LayoutParser::startClass));
288  m_sHandler.insert("class/briefdescription",
289  new StartElementHandlerKind(this,LayoutDocEntry::BriefDesc,&LayoutParser::startSimpleEntry));
290  m_sHandler.insert("class/detaileddescription",
291  new StartElementHandlerSection(this,LayoutDocEntry::DetailedDesc,&LayoutParser::startSectionEntry,
293  m_sHandler.insert("class/authorsection",
294  new StartElementHandlerKind(this,LayoutDocEntry::AuthorSection,&LayoutParser::startSimpleEntry));
295  m_sHandler.insert("class/includes",
296  new StartElementHandlerKind(this,LayoutDocEntry::ClassIncludes,&LayoutParser::startSimpleEntry));
297  m_sHandler.insert("class/inheritancegraph",
298  new StartElementHandlerKind(this,LayoutDocEntry::ClassInheritanceGraph,&LayoutParser::startSimpleEntry));
299  m_sHandler.insert("class/collaborationgraph",
301  m_sHandler.insert("class/allmemberslink",
302  new StartElementHandlerKind(this,LayoutDocEntry::ClassAllMembersLink,&LayoutParser::startSimpleEntry));
303  m_sHandler.insert("class/usedfiles",
304  new StartElementHandlerKind(this,LayoutDocEntry::ClassUsedFiles,&LayoutParser::startSimpleEntry));
305  m_sHandler.insert("class/memberdecl",
306  new StartElementHandler(this,&LayoutParser::startMemberDecl));
307  m_sHandler.insert("class/memberdecl/membergroups",
308  new StartElementHandlerKind(this,LayoutDocEntry::MemberGroups,&LayoutParser::startSimpleEntry));
309  m_sHandler.insert("class/memberdecl/nestedclasses",
310  new StartElementHandlerSection(this,LayoutDocEntry::ClassNestedClasses,&LayoutParser::startSectionEntry,
315  )));
316  m_sHandler.insert("class/memberdecl/services",
317  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
319  m_sHandler.insert("class/memberdecl/interfaces",
320  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
322  m_sHandler.insert("class/memberdecl/publictypes",
323  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
325  m_sHandler.insert("class/memberdecl/publicslots",
326  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
328  m_sHandler.insert("class/memberdecl/signals",
329  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
331  m_sHandler.insert("class/memberdecl/publicmethods",
332  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
337  )));
338  m_sHandler.insert("class/memberdecl/publicstaticmethods",
339  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
344  )));
345  m_sHandler.insert("class/memberdecl/publicattributes",
346  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
348  m_sHandler.insert("class/memberdecl/publicstaticattributes",
349  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
351  m_sHandler.insert("class/memberdecl/protectedtypes",
352  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
354  m_sHandler.insert("class/memberdecl/protectedslots",
355  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
357  m_sHandler.insert("class/memberdecl/protectedmethods",
358  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
360  m_sHandler.insert("class/memberdecl/protectedstaticmethods",
361  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
363  m_sHandler.insert("class/memberdecl/protectedattributes",
364  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
366  m_sHandler.insert("class/memberdecl/protectedstaticattributes",
367  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
369  m_sHandler.insert("class/memberdecl/packagetypes",
370  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
372  m_sHandler.insert("class/memberdecl/packagemethods",
373  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
375  m_sHandler.insert("class/memberdecl/packagestaticmethods",
376  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
378  m_sHandler.insert("class/memberdecl/packageattributes",
379  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
381  m_sHandler.insert("class/memberdecl/packagestaticattributes",
382  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
384  m_sHandler.insert("class/memberdecl/properties",
385  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
387  m_sHandler.insert("class/memberdecl/events",
388  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
390  m_sHandler.insert("class/memberdecl/privatetypes",
391  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
393  m_sHandler.insert("class/memberdecl/privateslots",
394  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
396  m_sHandler.insert("class/memberdecl/privatemethods",
397  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
399  m_sHandler.insert("class/memberdecl/privatestaticmethods",
400  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
402  m_sHandler.insert("class/memberdecl/privateattributes",
403  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
405  m_sHandler.insert("class/memberdecl/privatestaticattributes",
406  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
408  m_sHandler.insert("class/memberdecl/friends",
409  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
411  m_sHandler.insert("class/memberdecl/related",
412  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
415  m_eHandler.insert("class/memberdecl",
416  new EndElementHandler(this,&LayoutParser::endMemberDecl));
417  m_sHandler.insert("class/memberdef",
418  new StartElementHandler(this,&LayoutParser::startMemberDef));
419  m_sHandler.insert("class/memberdef/inlineclasses",
420  new StartElementHandlerSection(this,LayoutDocEntry::ClassInlineClasses,&LayoutParser::startSectionEntry,
424  )));
425  m_sHandler.insert("class/memberdef/typedefs",
426  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
428  m_sHandler.insert("class/memberdef/enums",
429  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
431  m_sHandler.insert("class/memberdef/services",
432  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
434  m_sHandler.insert("class/memberdef/interfaces",
435  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
437  m_sHandler.insert("class/memberdef/constructors",
438  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
440  m_sHandler.insert("class/memberdef/functions",
441  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
447  )));
448  m_sHandler.insert("class/memberdef/related",
449  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
451  m_sHandler.insert("class/memberdef/variables",
452  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
454  m_sHandler.insert("class/memberdef/properties",
455  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
457  m_sHandler.insert("class/memberdef/events",
458  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
460  m_eHandler.insert("class/memberdef",
461  new EndElementHandler(this,&LayoutParser::endMemberDef));
462  m_eHandler.insert("class",
463  new EndElementHandler(this,&LayoutParser::endClass));
464 
465 
466  // namespace layout handlers
467  m_sHandler.insert("namespace",
468  new StartElementHandler(this,&LayoutParser::startNamespace));
469  m_sHandler.insert("namespace/briefdescription",
470  new StartElementHandlerKind(this,LayoutDocEntry::BriefDesc,&LayoutParser::startSimpleEntry));
471  m_sHandler.insert("namespace/detaileddescription",
472  new StartElementHandlerSection(this,LayoutDocEntry::DetailedDesc,&LayoutParser::startSectionEntry,
474  m_sHandler.insert("namespace/authorsection",
475  new StartElementHandlerKind(this,LayoutDocEntry::AuthorSection,&LayoutParser::startSimpleEntry));
476  m_sHandler.insert("namespace/memberdecl",
477  new StartElementHandler(this,&LayoutParser::startMemberDecl));
478  m_sHandler.insert("namespace/memberdecl/nestednamespaces",
486  )));
487  m_sHandler.insert("namespace/memberdecl/constantgroups",
490  m_sHandler.insert("namespace/memberdecl/classes",
491  new StartElementHandlerSection(this,LayoutDocEntry::NamespaceClasses,&LayoutParser::startSectionEntry,
496  )));
497  m_sHandler.insert("namespace/memberdecl/membergroups",
498  new StartElementHandlerKind(this,LayoutDocEntry::MemberGroups,&LayoutParser::startSimpleEntry));
499  m_sHandler.insert("namespace/memberdecl/typedefs",
500  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
502  m_sHandler.insert("namespace/memberdecl/enums",
503  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
505  m_sHandler.insert("namespace/memberdecl/functions",
506  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
512  )));
513  m_sHandler.insert("namespace/memberdecl/variables",
514  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
516  m_eHandler.insert("namespace/memberdecl",
517  new EndElementHandler(this,&LayoutParser::endMemberDecl));
518  m_sHandler.insert("namespace/memberdef",
519  new StartElementHandler(this,&LayoutParser::startMemberDef));
520  m_sHandler.insert("namespace/memberdef/inlineclasses",
521  new StartElementHandlerSection(this,LayoutDocEntry::NamespaceInlineClasses,&LayoutParser::startSectionEntry,
525  )));
526  m_sHandler.insert("namespace/memberdef/typedefs",
527  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
529  m_sHandler.insert("namespace/memberdef/enums",
530  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
532  m_sHandler.insert("namespace/memberdef/functions",
533  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
538  )));
539  m_sHandler.insert("namespace/memberdef/variables",
540  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
542  m_eHandler.insert("namespace/memberdef",
543  new EndElementHandler(this,&LayoutParser::endMemberDef));
544  m_eHandler.insert("namespace",
545  new EndElementHandler(this,&LayoutParser::endNamespace));
546 
547  // file layout handlers
548  m_sHandler.insert("file",
549  new StartElementHandler(this,&LayoutParser::startFile));
550  m_sHandler.insert("file/briefdescription",
551  new StartElementHandlerKind(this,LayoutDocEntry::BriefDesc,&LayoutParser::startSimpleEntry));
552  m_sHandler.insert("file/detaileddescription",
553  new StartElementHandlerSection(this,LayoutDocEntry::DetailedDesc,&LayoutParser::startSectionEntry,
555  m_sHandler.insert("file/authorsection",
556  new StartElementHandlerKind(this,LayoutDocEntry::AuthorSection,&LayoutParser::startSimpleEntry));
557  m_sHandler.insert("file/includes",
558  new StartElementHandlerKind(this,LayoutDocEntry::FileIncludes,&LayoutParser::startSimpleEntry));
559  m_sHandler.insert("file/includegraph",
560  new StartElementHandlerKind(this,LayoutDocEntry::FileIncludeGraph,&LayoutParser::startSimpleEntry));
561  m_sHandler.insert("file/includedbygraph",
562  new StartElementHandlerKind(this,LayoutDocEntry::FileIncludedByGraph,&LayoutParser::startSimpleEntry));
563  m_sHandler.insert("file/sourcelink",
564  new StartElementHandlerKind(this,LayoutDocEntry::FileSourceLink,&LayoutParser::startSimpleEntry));
565  m_sHandler.insert("file/memberdecl/membergroups",
566  new StartElementHandlerKind(this,LayoutDocEntry::MemberGroups,&LayoutParser::startSimpleEntry));
567  m_sHandler.insert("file/memberdecl",
568  new StartElementHandler(this,&LayoutParser::startMemberDecl));
569  m_sHandler.insert("file/memberdecl/classes",
570  new StartElementHandlerSection(this,LayoutDocEntry::FileClasses,&LayoutParser::startSectionEntry,
575  )));
576  m_sHandler.insert("file/memberdecl/namespaces",
577  new StartElementHandlerSection(this,LayoutDocEntry::FileNamespaces,&LayoutParser::startSectionEntry,
583  )));
584  m_sHandler.insert("file/memberdecl/constantgroups",
585  new StartElementHandlerSection(this,LayoutDocEntry::FileConstantGroups,&LayoutParser::startSectionEntry,
587  m_sHandler.insert("file/memberdecl/defines",
588  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
590  m_sHandler.insert("file/memberdecl/typedefs",
591  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
593  m_sHandler.insert("file/memberdecl/enums",
594  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
596  m_sHandler.insert("file/memberdecl/functions",
597  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
603  )));
604  m_sHandler.insert("file/memberdecl/variables",
605  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
607 
608  m_eHandler.insert("file/memberdecl",
609  new EndElementHandler(this,&LayoutParser::endMemberDecl));
610  m_sHandler.insert("file/memberdef",
611  new StartElementHandler(this,&LayoutParser::startMemberDef));
612  m_sHandler.insert("file/memberdef/inlineclasses",
613  new StartElementHandlerSection(this,LayoutDocEntry::FileInlineClasses,&LayoutParser::startSectionEntry,
617  )));
618  m_sHandler.insert("file/memberdef/defines",
619  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
621  m_sHandler.insert("file/memberdef/typedefs",
622  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
624  m_sHandler.insert("file/memberdef/enums",
625  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
628  m_sHandler.insert("file/memberdef/functions",
629  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
634  )));
635  m_sHandler.insert("file/memberdef/variables",
636  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
638  m_eHandler.insert("file/memberdef",
639  new EndElementHandler(this,&LayoutParser::endMemberDef));
640  m_eHandler.insert("file",
641  new EndElementHandler(this,&LayoutParser::endFile));
642 
643  // group layout handlers
644  m_sHandler.insert("group",
645  new StartElementHandler(this,&LayoutParser::startGroup));
646  m_sHandler.insert("group/briefdescription",
647  new StartElementHandlerKind(this,LayoutDocEntry::BriefDesc,&LayoutParser::startSimpleEntry));
648  m_sHandler.insert("group/detaileddescription",
649  new StartElementHandlerSection(this,LayoutDocEntry::DetailedDesc,&LayoutParser::startSectionEntry,
651  m_sHandler.insert("group/authorsection",
652  new StartElementHandlerKind(this,LayoutDocEntry::AuthorSection,&LayoutParser::startSimpleEntry));
653  m_sHandler.insert("group/groupgraph",
654  new StartElementHandlerKind(this,LayoutDocEntry::GroupGraph,&LayoutParser::startSimpleEntry));
655  m_sHandler.insert("group/memberdecl/membergroups",
656  new StartElementHandlerKind(this,LayoutDocEntry::MemberGroups,&LayoutParser::startSimpleEntry));
657  m_sHandler.insert("group/memberdecl",
658  new StartElementHandler(this,&LayoutParser::startMemberDecl));
659  m_sHandler.insert("group/memberdecl/classes",
660  new StartElementHandlerSection(this,LayoutDocEntry::GroupClasses,&LayoutParser::startSectionEntry,
665  )));
666  m_sHandler.insert("group/memberdecl/namespaces",
667  new StartElementHandlerSection(this,LayoutDocEntry::GroupNamespaces,&LayoutParser::startSectionEntry,
672  )));
673  m_sHandler.insert("group/memberdecl/dirs",
674  new StartElementHandlerSection(this,LayoutDocEntry::GroupDirs,&LayoutParser::startSectionEntry,
676  ));
677  m_sHandler.insert("group/memberdecl/nestedgroups",
678  new StartElementHandlerSection(this,LayoutDocEntry::GroupNestedGroups,&LayoutParser::startSectionEntry,
680  ));
681  m_sHandler.insert("group/memberdecl/files",
682  new StartElementHandlerSection(this,LayoutDocEntry::GroupFiles,&LayoutParser::startSectionEntry,
684  ));
685 
686  m_sHandler.insert("group/memberdecl/defines",
687  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
689  m_sHandler.insert("group/memberdecl/typedefs",
690  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
692  m_sHandler.insert("group/memberdecl/enums",
693  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
695  m_sHandler.insert("group/memberdecl/enumvalues",
696  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
698  m_sHandler.insert("group/memberdecl/functions",
699  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
705  )));
706  m_sHandler.insert("group/memberdecl/variables",
707  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
709  m_sHandler.insert("group/memberdecl/signals",
710  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
712  m_sHandler.insert("group/memberdecl/publicslots",
713  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
715  m_sHandler.insert("group/memberdecl/protectedslots",
716  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
718  m_sHandler.insert("group/memberdecl/privateslots",
719  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
721  m_sHandler.insert("group/memberdecl/events",
722  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
724  m_sHandler.insert("group/memberdecl/properties",
725  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
727  m_sHandler.insert("group/memberdecl/friends",
728  new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
730  m_eHandler.insert("group/memberdecl",
731  new EndElementHandler(this,&LayoutParser::endMemberDecl));
732  m_sHandler.insert("group/memberdef",
733  new StartElementHandler(this,&LayoutParser::startMemberDef));
734  m_sHandler.insert("group/memberdef/pagedocs",
735  new StartElementHandlerKind(this,LayoutDocEntry::GroupPageDocs,&LayoutParser::startSimpleEntry));
736  m_sHandler.insert("group/memberdef/inlineclasses",
737  new StartElementHandlerSection(this,LayoutDocEntry::GroupInlineClasses,&LayoutParser::startSectionEntry,
741  )));
742  m_sHandler.insert("group/memberdef/defines",
743  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
745  m_sHandler.insert("group/memberdef/typedefs",
746  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
748  m_sHandler.insert("group/memberdef/enums",
749  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
751  m_sHandler.insert("group/memberdef/enumvalues",
752  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
754  m_sHandler.insert("group/memberdef/functions",
755  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
760  )));
761  m_sHandler.insert("group/memberdef/variables",
762  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
764  m_sHandler.insert("group/memberdef/signals",
765  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
767  m_sHandler.insert("group/memberdef/publicslots",
768  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
770  m_sHandler.insert("group/memberdef/protectedslots",
771  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
773  m_sHandler.insert("group/memberdef/privateslots",
774  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
776  m_sHandler.insert("group/memberdef/events",
777  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
779  m_sHandler.insert("group/memberdef/properties",
780  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
782  m_sHandler.insert("group/memberdef/friends",
783  new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
785  m_eHandler.insert("group/memberdef",
786  new EndElementHandler(this,&LayoutParser::endMemberDef));
787  m_eHandler.insert("group",
788  new EndElementHandler(this,&LayoutParser::endGroup));
789 
790  // directory layout handlers
791  m_sHandler.insert("directory",
792  new StartElementHandler(this,&LayoutParser::startDirectory));
793  m_sHandler.insert("directory/briefdescription",
794  new StartElementHandlerKind(this,LayoutDocEntry::BriefDesc,&LayoutParser::startSimpleEntry));
795  m_sHandler.insert("directory/detaileddescription",
796  new StartElementHandlerSection(this,LayoutDocEntry::DetailedDesc,&LayoutParser::startSectionEntry,
798  m_sHandler.insert("directory/directorygraph",
799  new StartElementHandlerKind(this,LayoutDocEntry::DirGraph,&LayoutParser::startSimpleEntry));
800  m_sHandler.insert("directory/memberdecl",
801  new StartElementHandler(this,&LayoutParser::startMemberDecl));
802  m_sHandler.insert("directory/memberdecl/dirs",
803  new StartElementHandlerKind(this,LayoutDocEntry::DirSubDirs,&LayoutParser::startSimpleEntry));
804  m_sHandler.insert("directory/memberdecl/files",
805  new StartElementHandlerKind(this,LayoutDocEntry::DirFiles,&LayoutParser::startSimpleEntry));
806  m_eHandler.insert("directory/memberdecl",
807  new EndElementHandler(this,&LayoutParser::endMemberDecl));
808  m_eHandler.insert("directory",
809  new EndElementHandler(this,&LayoutParser::endDirectory));
810  }
virtual QCString trSubprograms()=0
virtual QCString trPublicMembers()=0
virtual QCString trTypedefs()=0
virtual QCString trPackageTypes()=0
virtual QCString trEnumerationTypeDocumentation()=0
QDict< StartElementHandler > m_sHandler
Definition: layout.cpp:1274
virtual QCString trStaticProtectedMembers()=0
void endNamespace()
Definition: layout.cpp:1137
virtual QCString trFile(bool first_capital, bool singular)=0
void endClass()
Definition: layout.cpp:1124
virtual QCString trCompounds()=0
static QCString trVhdlType(uint64 type, bool sing=true)
virtual QCString trStaticPrivateMembers()=0
virtual QCString trEnumerationValues()=0
virtual QCString trStaticPackageAttribs()=0
void startSectionEntry(LayoutDocEntry::Kind k, const QXmlAttributes &attrib, const QCString &title)
Definition: layout.cpp:822
QDict< EndElementHandler > m_eHandler
Definition: layout.cpp:1275
void startFile(const QXmlAttributes &)
Definition: layout.cpp:1143
static QCString trFunctionAndProc()
virtual QCString trInstanceMethods()=0
virtual QCString trFriends()=0
void startNavEntry(const QXmlAttributes &attrib)
Definition: layout.cpp:895
void startNavIndex(const QXmlAttributes &)
Definition: layout.cpp:876
#define COMPILE_FOR_4_OPTIONS(def, langId1, text1, langId2, text2, langId3, text3, langId4, text4)
Definition: layout.cpp:50
virtual QCString trClassMethods()=0
virtual QCString trRelatedFunctions()=0
const bool FALSE
Definition: qglobal.h:370
virtual QCString trMemberFunctionDocumentation()=0
void startMemberDefEntry(const QXmlAttributes &attrib, MemberListType type, const QCString &title, const QCString &)
Definition: layout.cpp:855
virtual QCString trDetailedDescription()=0
virtual QCString trPrivateTypes()=0
virtual QCString trProtectedMembers()=0
virtual QCString trMemberTypedefDocumentation()=0
virtual QCString trMemberEnumerationDocumentation()=0
virtual QCString trDirectories()=0
virtual QCString trPublicTypes()=0
virtual QCString trMemberDataDocumentation()=0
#define COMPILE_FOR_1_OPTION(def, langId1, text1)
Definition: layout.cpp:41
virtual QCString trDataTypes()=0
void startMemberDef(const QXmlAttributes &)
Definition: layout.cpp:1182
void endGroup()
Definition: layout.cpp:1163
void startSimpleEntry(LayoutDocEntry::Kind k, const QXmlAttributes &attrib)
Definition: layout.cpp:812
virtual QCString trStaticPublicMembers()=0
virtual QCString trMethodDocumentation()=0
virtual QCString trProtectedSlots()=0
virtual QCString trMemberFunctionDocumentationFortran()=0
void startClass(const QXmlAttributes &)
Definition: layout.cpp:1117
void startMemberDeclEntry(const QXmlAttributes &attrib, MemberListType type, const QCString &title, const QCString &subscript)
Definition: layout.cpp:838
void startDirectory(const QXmlAttributes &)
Definition: layout.cpp:1169
virtual QCString trVariables()=0
virtual QCString trStaticPrivateAttribs()=0
virtual QCString trInterfaces()=0
virtual QCString trSignals()=0
virtual QCString trPublicSlots()=0
virtual QCString trClassDocumentation()=0
void endNavIndex()
Definition: layout.cpp:883
virtual QCString trFunctions()=0
LayoutNavEntry * m_rootNav
Definition: layout.cpp:1278
virtual QCString trPrivateSlots()=0
void endMemberDecl()
Definition: layout.cpp:1216
virtual QCString trProtectedTypes()=0
void endDirectory()
Definition: layout.cpp:1176
virtual QCString trPackageAttribs()=0
virtual QCString trEnumerations()=0
virtual QCString trPackageMembers()=0
void startMemberDecl(const QXmlAttributes &)
Definition: layout.cpp:1206
virtual QCString trPackages()=0
virtual QCString trEvents()=0
void startGroup(const QXmlAttributes &)
Definition: layout.cpp:1156
void endFile()
Definition: layout.cpp:1150
virtual QCString trPrivateAttribs()=0
virtual QCString trServices()=0
#define COMPILE_FOR_3_OPTIONS(def, langId1, text1, langId2, text2, langId3, text3)
Definition: layout.cpp:47
void endMemberDef()
Definition: layout.cpp:1192
void startLayout(const QXmlAttributes &)
Definition: layout.cpp:868
virtual QCString trEnumerationValueDocumentation()=0
virtual QCString trConstantGroups()=0
virtual QCString trStaticPackageMembers()=0
void endLayout()
Definition: layout.cpp:872
virtual QCString trPropertyDocumentation()=0
virtual QCString trTypedefDocumentation()=0
virtual QCString trModules()=0
virtual QCString trNamespaces()=0
virtual QCString trEventDocumentation()=0
virtual QCString trProtectedAttribs()=0
virtual QCString trStaticProtectedAttribs()=0
Translator * theTranslator
Definition: language.cpp:157
#define COMPILE_FOR_2_OPTIONS(def, langId1, text1, langId2, text2)
Definition: layout.cpp:44
virtual QCString trRelatedFunctionDocumentation()=0
void endNavEntry()
Definition: layout.cpp:1110
virtual QCString trProperties()=0
virtual QCString trSubprogramDocumentation()=0
virtual QCString trStaticPublicAttribs()=0
virtual QCString trPublicAttribs()=0
virtual QCString trConstructorDocumentation()=0
virtual QCString trVariableDocumentation()=0
const bool TRUE
Definition: qglobal.h:371
virtual QCString trTypeDocumentation()=0
virtual QCString trDefineDocumentation()=0
virtual QCString trFunctionDocumentation()=0
virtual QCString trPrivateMembers()=0
virtual QCString trDefines()=0
virtual QCString trRelatedSubscript()=0
void startNamespace(const QXmlAttributes &)
Definition: layout.cpp:1130
static LayoutParser& LayoutParser::instance ( )
inlinestatic

Definition at line 253 of file layout.cpp.

254  {
255  static LayoutParser *theInstance = new LayoutParser;
256  return *theInstance;
257  }
void LayoutParser::startClass ( const QXmlAttributes )
inline

Definition at line 1117 of file layout.cpp.

1118  {
1120  m_scope="class/";
1122  }
void clear(LayoutPart p)
Definition: layout.cpp:1380
static LayoutDocManager & instance()
Definition: layout.cpp:1359
QCString m_scope
Definition: layout.cpp:1276
void LayoutParser::startDirectory ( const QXmlAttributes )
inline

Definition at line 1169 of file layout.cpp.

1170  {
1172  m_scope="directory/";
1174  }
void clear(LayoutPart p)
Definition: layout.cpp:1380
static LayoutDocManager & instance()
Definition: layout.cpp:1359
QCString m_scope
Definition: layout.cpp:1276
bool LayoutParser::startDocument ( )
inlinevirtual

Does nothing.

Reimplemented from QXmlDefaultHandler.

Definition at line 1265 of file layout.cpp.

1266  {
1267  return TRUE;
1268  }
const bool TRUE
Definition: qglobal.h:371
bool LayoutParser::startElement ( const QString namespaceURI,
const QString localName,
const QString qName,
const QXmlAttributes atts 
)
inlinevirtual

Does nothing.

Reimplemented from QXmlDefaultHandler.

Definition at line 1231 of file layout.cpp.

1233  {
1234  //printf("startElement [%s]::[%s]\n",m_scope.data(),name.data());
1235  StartElementHandler *handler = m_sHandler[m_scope+name.utf8()];
1236  if (handler)
1237  {
1238  (*handler)(attrib);
1239  }
1240  else
1241  {
1242  err("Unexpected start tag `%s' found in scope='%s'!\n",
1243  name.data(),m_scope.data());
1244  }
1245  return TRUE;
1246  }
static QCString name
Definition: declinfo.cpp:673
QDict< StartElementHandler > m_sHandler
Definition: layout.cpp:1274
const char * data() const
Definition: qcstring.h:207
void err(const char *fmt,...)
Definition: message.cpp:226
QCString m_scope
Definition: layout.cpp:1276
static msg_handler handler
Definition: qglobal.cpp:234
const bool TRUE
Definition: qglobal.h:371
void LayoutParser::startFile ( const QXmlAttributes )
inline

Definition at line 1143 of file layout.cpp.

1144  {
1146  m_scope="file/";
1148  }
void clear(LayoutPart p)
Definition: layout.cpp:1380
static LayoutDocManager & instance()
Definition: layout.cpp:1359
QCString m_scope
Definition: layout.cpp:1276
void LayoutParser::startGroup ( const QXmlAttributes )
inline

Definition at line 1156 of file layout.cpp.

1157  {
1159  m_scope="group/";
1161  }
void clear(LayoutPart p)
Definition: layout.cpp:1380
static LayoutDocManager & instance()
Definition: layout.cpp:1359
QCString m_scope
Definition: layout.cpp:1276
void LayoutParser::startLayout ( const QXmlAttributes )
inline

Definition at line 868 of file layout.cpp.

869  {
870  }
void LayoutParser::startMemberDecl ( const QXmlAttributes )
inline

Definition at line 1206 of file layout.cpp.

1207  {
1208  m_scope+="memberdecl/";
1209  if (m_part!=-1)
1210  {
1213  }
1214  }
Represents of a piece of a documentation page without configurable parts.
Definition: layout.h:70
static LayoutDocManager & instance()
Definition: layout.cpp:1359
void addEntry(LayoutPart p, LayoutDocEntry *e)
Definition: layout.cpp:1375
QCString m_scope
Definition: layout.cpp:1276
void LayoutParser::startMemberDeclEntry ( const QXmlAttributes attrib,
MemberListType  type,
const QCString title,
const QCString subscript 
)
inline

Definition at line 838 of file layout.cpp.

840  {
841  //QCString visible = convertToQCString(attrib.value("visible"));
842  //bool isVisible = visible.isEmpty() || (visible!="no" && visible!="0");
843  QCString userTitle = attrib.value("title").utf8();
844  QCString userSubscript = attrib.value("subtitle").utf8();
845  if (userTitle.isEmpty()) userTitle = title;
846  if (userSubscript.isEmpty()) userSubscript = subscript;
847  //printf("memberdecl: %s\n",userTitle.data());
848  if (m_part!=-1 /*&& isVisible*/)
849  {
851  new LayoutDocEntryMemberDecl(type,userTitle,userSubscript));
852  }
853  }
bool isEmpty() const
Definition: qcstring.h:189
static LayoutDocManager & instance()
Definition: layout.cpp:1359
void addEntry(LayoutPart p, LayoutDocEntry *e)
Definition: layout.cpp:1375
QString value(int index) const
Definition: qxml.cpp:664
Represents of a member declaration list with configurable title and subtitle.
Definition: layout.h:89
QCString utf8() const
Definition: qstring.cpp:14507
void LayoutParser::startMemberDef ( const QXmlAttributes )
inline

Definition at line 1182 of file layout.cpp.

1183  {
1184  m_scope+="memberdef/";
1185  if (m_part!=-1)
1186  {
1189  }
1190  }
Represents of a piece of a documentation page without configurable parts.
Definition: layout.h:70
static LayoutDocManager & instance()
Definition: layout.cpp:1359
void addEntry(LayoutPart p, LayoutDocEntry *e)
Definition: layout.cpp:1375
QCString m_scope
Definition: layout.cpp:1276
void LayoutParser::startMemberDefEntry ( const QXmlAttributes attrib,
MemberListType  type,
const QCString title,
const QCString  
)
inline

Definition at line 855 of file layout.cpp.

857  {
858  QCString userTitle = attrib.value("title").utf8();
859  if (userTitle.isEmpty()) userTitle = title;
860  //printf("memberdef: %s\n",userTitle.data());
861  if (m_part!=-1 /*&& isVisible*/)
862  {
864  new LayoutDocEntryMemberDef(type,userTitle));
865  }
866  }
bool isEmpty() const
Definition: qcstring.h:189
static LayoutDocManager & instance()
Definition: layout.cpp:1359
void addEntry(LayoutPart p, LayoutDocEntry *e)
Definition: layout.cpp:1375
QString value(int index) const
Definition: qxml.cpp:664
Represents of a member definition list with configurable title.
Definition: layout.h:105
QCString utf8() const
Definition: qstring.cpp:14507
void LayoutParser::startNamespace ( const QXmlAttributes )
inline

Definition at line 1130 of file layout.cpp.

1131  {
1133  m_scope="namespace/";
1135  }
void clear(LayoutPart p)
Definition: layout.cpp:1380
static LayoutDocManager & instance()
Definition: layout.cpp:1359
QCString m_scope
Definition: layout.cpp:1276
void LayoutParser::startNavEntry ( const QXmlAttributes attrib)
inline

Definition at line 895 of file layout.cpp.

896  {
897  static bool javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
898  static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
899  static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
900  static bool hasGraphicalHierarchy = Config_getBool("HAVE_DOT") &&
901  Config_getBool("GRAPHICAL_HIERARCHY");
902  static bool extractAll = Config_getBool("EXTRACT_ALL");
903  static struct NavEntryMap
904  {
905  const char *typeStr; // type attribute name in the XML file
906  LayoutNavEntry::Kind kind; // corresponding enum name
907  QCString mainName; // default title for an item if it has children
908  QCString subName; // optional name for an item if it is rendered as a child
909  QCString intro; // introduction text to be put on the index page
910  QCString baseFile; // base name of the file containing the index page
911  } mapping[] =
912  {
913  { "mainpage",
916  QCString(),
917  QCString(),
918  "index"
919  },
920  { "pages",
923  QCString(),
925  "pages"
926  },
927  { "modules",
930  QCString(),
932  "modules"
933  },
934  { "namespaces",
936  javaOpt || vhdlOpt ? theTranslator->trPackages() : fortranOpt ? theTranslator->trModules() : theTranslator->trNamespaces(),
937  javaOpt || vhdlOpt ? theTranslator->trPackages() : fortranOpt ? theTranslator->trModulesList() : theTranslator->trNamespaceList(),
938  javaOpt || vhdlOpt ? theTranslator->trPackageListDescription() : fortranOpt ? theTranslator->trModulesListDescription(extractAll) : theTranslator->trNamespaceListDescription(extractAll),
939  "namespaces"
940  },
941  { "namespacelist",
943  javaOpt || vhdlOpt ? theTranslator->trPackages() : fortranOpt ? theTranslator->trModulesList() : theTranslator->trNamespaceList(),
944  QCString(),
945  javaOpt || vhdlOpt ? theTranslator->trPackageListDescription() : fortranOpt ? theTranslator->trModulesListDescription(extractAll) : theTranslator->trNamespaceListDescription(extractAll),
946  "namespaces"
947  },
948  { "namespacemembers",
950  javaOpt || vhdlOpt ? theTranslator->trPackageMembers() : fortranOpt ? theTranslator->trModulesMembers() : theTranslator->trNamespaceMembers(),
951  QCString(),
953  "namespacemembers"
954  },
955  { "classindex",
957  fortranOpt ? theTranslator->trDataTypes() : vhdlOpt ? VhdlDocGen::trDesignUnits() : theTranslator->trCompoundIndex(),
958  QCString(),
959  QCString(),
960  "classes"
961  },
962  { "classes",
964  fortranOpt ? theTranslator->trCompoundListFortran() : vhdlOpt ? VhdlDocGen::trDesignUnitList() : theTranslator->trClasses(),
965  theTranslator->trCompoundList(),
966  fortranOpt ? theTranslator->trCompoundListDescriptionFortran() : vhdlOpt ? VhdlDocGen::trDesignUnitListDescription() : theTranslator->trCompoundListDescription(),
967  "annotated"
968  },
969  { "classlist",
971  fortranOpt ? theTranslator->trCompoundListFortran() : vhdlOpt ? VhdlDocGen::trDesignUnitList() : theTranslator->trCompoundList(),
972  QCString(),
973  fortranOpt ? theTranslator->trCompoundListDescriptionFortran() : vhdlOpt ? VhdlDocGen::trDesignUnitListDescription() : theTranslator->trCompoundListDescription(),
974  "annotated"
975  },
976  { "hierarchy",
978  vhdlOpt ? VhdlDocGen::trDesignUnitHierarchy() : theTranslator->trClassHierarchy(),
979  QCString(),
980  theTranslator->trClassHierarchyDescription(),
981  hasGraphicalHierarchy ? "inherits" : "hierarchy"
982  },
983  { "classmembers",
985  fortranOpt ? theTranslator->trCompoundMembersFortran() : vhdlOpt ? VhdlDocGen::trDesignUnitMembers() : theTranslator->trCompoundMembers(),
986  QCString(),
987  fortranOpt ? theTranslator->trCompoundMembersDescriptionFortran(extractAll) : theTranslator->trCompoundMembersDescription(extractAll),
988  "functions"
989  },
990  { "files",
995  "files"
996  },
997  { "filelist",
1000  QCString(),
1001  theTranslator->trFileListDescription(extractAll),
1002  "files"
1003  },
1004  { "globals",
1007  QCString(),
1009  "globals"
1010  },
1011  //{ "dirs",
1012  // LayoutNavEntry::Dirs,
1013  // theTranslator->trDirectories(),
1014  // QCString(),
1015  // theTranslator->trDirDescription(),
1016  // "dirs"
1017  //},
1018  { "examples",
1021  QCString(),
1023  "examples"
1024  },
1025  { "user",
1027  QCString(),
1028  QCString(),
1029  QCString(),
1030  "user"
1031  },
1032  { "usergroup",
1034  QCString(),
1035  QCString(),
1036  QCString(),
1037  "usergroup"
1038  },
1039  { 0, // end of list
1041  QCString(),
1042  QCString(),
1043  QCString(),
1044  QCString()
1045  }
1046  };
1047  LayoutNavEntry::Kind kind;
1048  // find type in the table
1049  int i=0;
1050  QString type = attrib.value("type");
1051  while (mapping[i].typeStr)
1052  {
1053  if (mapping[i].typeStr==type)
1054  {
1055  kind = mapping[i].kind;
1056  break;
1057  }
1058  i++;
1059  }
1060  if (mapping[i].typeStr==0)
1061  {
1062  if (type.isEmpty())
1063  {
1064  err("an entry tag within a navindex has no type attribute! Check your layout file!\n");
1065  }
1066  else
1067  {
1068  err("the type '%s' is not supported for the entry tag within a navindex! Check your layout file!\n",type.data());
1069  }
1070  m_invalidEntry=TRUE;
1071  return;
1072  }
1073  QCString baseFile = mapping[i].baseFile;
1074  QCString title = attrib.value("title").utf8();
1075  bool isVisible = elemIsVisible(attrib);
1076  if (title.isEmpty()) // use default title
1077  {
1078  title = mapping[i].mainName; // use title for main row
1079  if (m_rootNav!=LayoutDocManager::instance().rootNavEntry() && !mapping[i].subName.isEmpty())
1080  {
1081  title = mapping[i].subName; // if this is a child of another row, use the subName if available
1082  // this is mainly done to get compatible naming with older versions.
1083  }
1084  }
1085  QCString intro = attrib.value("intro").utf8();
1086  if (intro.isEmpty()) // use default intro text
1087  {
1088  intro = mapping[i].intro;
1089  }
1090  QCString url = attrib.value("url").utf8();
1091  if (mapping[i].kind==LayoutNavEntry::User && !url.isEmpty())
1092  {
1093  baseFile=url;
1094  }
1095  else if (kind==LayoutNavEntry::UserGroup)
1096  {
1097  if (!url.isEmpty())
1098  {
1099  baseFile=url;
1100  }
1101  else
1102  {
1103  baseFile+=QCString().sprintf("%d",m_userGroupCount++);
1104  }
1105  }
1106  // create new item and make it the new root
1107  m_rootNav = new LayoutNavEntry(m_rootNav,kind,isVisible,baseFile,title,intro);
1108  }
virtual QCString trExamples()=0
virtual QCString trPackageListDescription()=0
bool isEmpty() const
Definition: qstring.h:682
virtual QCString trFile(bool first_capital, bool singular)=0
virtual QCString trModulesDescription()=0
virtual QCString trCompoundListFortran()=0
bool isEmpty() const
Definition: qcstring.h:189
static QCString trDesignUnitList()
const bool FALSE
Definition: qglobal.h:370
static LayoutDocManager & instance()
Definition: layout.cpp:1359
static QCString trDesignUnits()
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
virtual QCString trRelatedPagesDescription()=0
virtual QCString trFileMembers()=0
static bool elemIsVisible(const QXmlAttributes &attrib, bool defVal=TRUE)
Definition: layout.cpp:53
QString value(int index) const
Definition: qxml.cpp:664
Base class for the layout of a navigation item at the top of the HTML pages.
Definition: layout.h:118
virtual QCString trFileListDescription(bool extractAll)=0
static QCString trDesignUnitHierarchy()
virtual QCString trDataTypes()=0
const char * data() const
Definition: qstring.h:542
virtual QCString trMainPage()=0
virtual QCString trFileMembersDescription(bool extractAll)=0
static QCString trDesignUnitMembers()
#define Config_getBool(val)
Definition: config.cpp:664
virtual QCString trExamplesDescription()=0
virtual QCString trModulesMembers()=0
void err(const char *fmt,...)
Definition: message.cpp:226
virtual QCString trNamespaceMembers()=0
virtual QCString trModulesListDescription(bool extractAll)=0
virtual QCString trPackageMembers()=0
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:27
virtual QCString trPackages()=0
LayoutNavEntry * rootNavEntry() const
Definition: layout.cpp:1370
virtual QCString trRelatedPages()=0
virtual QCString trNamespaceMemberDescription(bool extractAll)=0
virtual QCString trModulesMemberDescription(bool extractAll)=0
virtual QCString trModules()=0
virtual QCString trNamespaces()=0
Translator * theTranslator
Definition: language.cpp:157
virtual QCString trModulesList()=0
virtual QCString trCompoundMembersFortran()=0
QCString utf8() const
Definition: qstring.cpp:14507
virtual QCString trFileList()=0
virtual QCString trNamespaceListDescription(bool extractAll)=0
const bool TRUE
Definition: qglobal.h:371
virtual QCString trNamespaceList()=0
void LayoutParser::startNavIndex ( const QXmlAttributes )
inline

Definition at line 876 of file layout.cpp.

877  {
878  m_scope="navindex/";
880  if (m_rootNav) m_rootNav->clear();
881  }
static LayoutDocManager & instance()
Definition: layout.cpp:1359
LayoutNavEntry * m_rootNav
Definition: layout.cpp:1278
LayoutNavEntry * rootNavEntry() const
Definition: layout.cpp:1370
void clear()
Definition: layout.h:154
QCString m_scope
Definition: layout.cpp:1276
void LayoutParser::startSectionEntry ( LayoutDocEntry::Kind  k,
const QXmlAttributes attrib,
const QCString title 
)
inline

Definition at line 822 of file layout.cpp.

824  {
825  bool isVisible = elemIsVisible(attrib);
826  QCString userTitle = attrib.value("title").utf8();
827  //printf("startSectionEntry: title='%s' userTitle='%s'\n",
828  // title.data(),userTitle.data());
829  if (userTitle.isEmpty()) userTitle = title;
830  if (m_part!=-1 && isVisible)
831  {
833  new LayoutDocEntrySection(k,userTitle));
834  }
835  }
bool isEmpty() const
Definition: qcstring.h:189
static LayoutDocManager & instance()
Definition: layout.cpp:1359
static bool elemIsVisible(const QXmlAttributes &attrib, bool defVal=TRUE)
Definition: layout.cpp:53
void addEntry(LayoutPart p, LayoutDocEntry *e)
Definition: layout.cpp:1375
QString value(int index) const
Definition: qxml.cpp:664
QCString utf8() const
Definition: qstring.cpp:14507
void LayoutParser::startSimpleEntry ( LayoutDocEntry::Kind  k,
const QXmlAttributes attrib 
)
inline

Definition at line 812 of file layout.cpp.

813  {
814  bool isVisible = elemIsVisible(attrib);
815  if (m_part!=-1 && isVisible)
816  {
818  new LayoutDocEntrySimple(k));
819  }
820  }
Represents of a piece of a documentation page without configurable parts.
Definition: layout.h:70
static LayoutDocManager & instance()
Definition: layout.cpp:1359
static bool elemIsVisible(const QXmlAttributes &attrib, bool defVal=TRUE)
Definition: layout.cpp:53
void addEntry(LayoutPart p, LayoutDocEntry *e)
Definition: layout.cpp:1375

Member Data Documentation

QDict<EndElementHandler> LayoutParser::m_eHandler
private

Definition at line 1275 of file layout.cpp.

bool LayoutParser::m_invalidEntry
private

Definition at line 1279 of file layout.cpp.

int LayoutParser::m_part
private

Definition at line 1277 of file layout.cpp.

LayoutNavEntry* LayoutParser::m_rootNav
private

Definition at line 1278 of file layout.cpp.

QCString LayoutParser::m_scope
private

Definition at line 1276 of file layout.cpp.

QDict<StartElementHandler> LayoutParser::m_sHandler
private

Definition at line 1274 of file layout.cpp.

int LayoutParser::m_userGroupCount =0
staticprivate

Definition at line 1280 of file layout.cpp.


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