Doxygen
Loading...
Searching...
No Matches
LayoutParser Class Reference
+ Collaboration diagram for LayoutParser:

Public Member Functions

void setDocumentLocator (const XMLLocator *locator)
 
void error (const std::string &fileName, int lineNr, const std::string &msg)
 
void startElement (const std::string &name, const XMLHandlers::Attributes &attrib)
 
void endElement (const std::string &name)
 
void startSimpleEntry (LayoutDocEntry::Kind k, const XMLHandlers::Attributes &attrib)
 
void startSectionEntry (LayoutDocEntry::Kind k, const XMLHandlers::Attributes &attrib, const QCString &title)
 
void startMemberDeclEntry (const XMLHandlers::Attributes &attrib, MemberListType type, const QCString &title, const QCString &subscript)
 
void startMemberDefEntry (const XMLHandlers::Attributes &attrib, MemberListType type, const QCString &title, const QCString &)
 
void startLayout (const XMLHandlers::Attributes &)
 
void startNavIndex (const XMLHandlers::Attributes &)
 
void endNavIndex ()
 
void startNavEntry (const XMLHandlers::Attributes &attrib)
 
void endNavEntry ()
 
void recurseNavEntryChildren (LayoutNavEntry &lne)
 
void startTop (const XMLHandlers::Attributes &attrib, LayoutDocManager::LayoutPart part, const QCString &scope, LayoutNavEntry::Kind nav)
 
void endTop ()
 
void startMemberDef (const XMLHandlers::Attributes &attrib)
 
void endMemberDef ()
 
void startMemberDecl (const XMLHandlers::Attributes &attrib)
 
void endMemberDecl ()
 

Static Public Member Functions

static LayoutParserinstance ()
 

Private Attributes

QCString m_scope
 
LayoutDocManager::LayoutPart m_part = LayoutDocManager::Undefined
 
LayoutNavEntrym_rootNav = nullptr
 
bool m_invalidEntry = false
 
bool m_visible = true
 
const XMLLocatorm_locator = nullptr
 

Static Private Attributes

static int m_userGroupCount =0
 

Detailed Description

Definition at line 183 of file layout.cpp.

Member Function Documentation

◆ endElement()

void LayoutParser::endElement ( const std::string & name)

Definition at line 1366 of file layout.cpp.

1367{
1368 //printf("endElement [%s]::[%s]\n",qPrint(m_scope),qPrint(name));
1369 auto it=g_elementHandlers.end();
1370
1371 if (!m_scope.isEmpty() && m_scope.right(name.length()+1)==name+"/")
1372 { // element ends current scope
1373 it = g_elementHandlers.find(m_scope.left(m_scope.length()-1).str());
1374 }
1375 else // continue with current scope
1376 {
1377 it = g_elementHandlers.find(m_scope.str()+name);
1378 }
1379 if (it!=g_elementHandlers.end())
1380 {
1381 it->second.endCb(*this);
1382 }
1383}
QCString m_scope
Definition layout.cpp:704
static const std::map< std::string, ElementCallbacks > g_elementHandlers
Definition layout.cpp:783

References anonymous_namespace{layout.cpp}::g_elementHandlers, and m_scope.

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

◆ endMemberDecl()

void LayoutParser::endMemberDecl ( )
inline

Definition at line 682 of file layout.cpp.

683 {
684 int i=m_scope.findRev("memberdecl/");
685 if (i!=-1)
686 {
687 m_scope=m_scope.left(i);
688 if (m_part!=LayoutDocManager::Undefined)
689 {
690 bool isVisible = true;
691 for (const auto &lde : LayoutDocManager::instance().docEntries(m_part))
692 {
693 if (lde->kind() == LayoutDocEntry::MemberDeclStart)
694 {
695 isVisible = static_cast<const LayoutDocEntrySimple*>(lde.get())->visible();
696 }
697 }
698 LayoutDocManager::instance().addEntry(m_part,std::make_unique<LayoutDocEntrySimple>(LayoutDocEntry::MemberDeclEnd,isVisible));
699 }
700 }
701 }
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition layout.cpp:1423
void addEntry(LayoutPart p, LayoutDocEntryPtr &&e)
Definition layout.cpp:1449
LayoutDocManager::LayoutPart m_part
Definition layout.cpp:705

References LayoutDocManager::addEntry(), LayoutDocManager::instance(), m_part, m_scope, and LayoutDocEntrySimple::visible().

◆ endMemberDef()

void LayoutParser::endMemberDef ( )
inline

Definition at line 650 of file layout.cpp.

651 {
652 QCString scopeOrg = m_scope;
653 int i=m_scope.findRev("memberdef/");
654 if (i!=-1)
655 {
656 m_scope=m_scope.left(i);
657 if (m_part!=LayoutDocManager::Undefined)
658 {
659 bool isVisible = true;
660 for (const auto &lde : LayoutDocManager::instance().docEntries(m_part))
661 {
662 if (lde->kind() == LayoutDocEntry::MemberDefStart)
663 {
664 isVisible = static_cast<const LayoutDocEntrySimple*>(lde.get())->visible();
665 }
666 }
667 LayoutDocManager::instance().addEntry(m_part,std::make_unique<LayoutDocEntrySimple>(LayoutDocEntry::MemberDefEnd,isVisible));
668 }
669 }
670 }

References LayoutDocManager::addEntry(), LayoutDocManager::instance(), m_part, m_scope, and LayoutDocEntrySimple::visible().

◆ endNavEntry()

void LayoutParser::endNavEntry ( )
inline

Definition at line 601 of file layout.cpp.

602 {
603 // set the root back to the parent
604 if (m_rootNav && !m_invalidEntry) m_rootNav = m_rootNav->parent();
606 }
bool m_invalidEntry
Definition layout.cpp:707
LayoutNavEntry * m_rootNav
Definition layout.cpp:706
#define FALSE
Definition qcstring.h:34

References FALSE, m_invalidEntry, and m_rootNav.

◆ endNavIndex()

void LayoutParser::endNavIndex ( )
inline

Definition at line 271 of file layout.cpp.

272 {
273 m_scope="";
274 if (m_rootNav && !m_rootNav->find(LayoutNavEntry::MainPage))
275 {
276 // no MainPage node... add one as the first item of the root node...
277 m_rootNav->prependChild(std::make_unique<LayoutNavEntry>(m_rootNav,LayoutNavEntry::MainPage, TRUE,
278 "index",theTranslator->trMainPage(),""));
279 }
280 }
virtual QCString trMainPage()=0
Translator * theTranslator
Definition language.cpp:71
#define TRUE
Definition qcstring.h:37

References m_rootNav, m_scope, theTranslator, and TRUE.

◆ endTop()

void LayoutParser::endTop ( )
inline

Definition at line 634 of file layout.cpp.

635 {
636 m_scope="";
637 m_part = LayoutDocManager::Undefined;
638 }

References m_part, and m_scope.

◆ error()

void LayoutParser::error ( const std::string & fileName,
int lineNr,
const std::string & msg )
inline

Definition at line 197 of file layout.cpp.

198 {
199 warn(fileName.c_str(),lineNr,"%s",msg.c_str());
200 }
void msg(const char *fmt,...)
Definition message.cpp:98
#define warn(file, line, fmt,...)
Definition message.h:59

References msg(), and warn.

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

◆ instance()

static LayoutParser & LayoutParser::instance ( )
inlinestatic

Definition at line 186 of file layout.cpp.

187 {
188 static LayoutParser theInstance;
189 return theInstance;
190 }

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

◆ recurseNavEntryChildren()

void LayoutParser::recurseNavEntryChildren ( LayoutNavEntry & lne)
inline

Definition at line 608 of file layout.cpp.

609 {
610 bool vis = lne.visible();
611 for (const auto &lne1 : lne.children())
612 {
613 lne1->setVisible(vis && lne1->visible());
615 }
616 }
void recurseNavEntryChildren(LayoutNavEntry &lne)
Definition layout.cpp:608
bool visible()
Definition layout.h:203
const LayoutNavEntryList & children() const
Definition layout.h:209

References LayoutNavEntry::children(), recurseNavEntryChildren(), and LayoutNavEntry::visible().

Referenced by recurseNavEntryChildren(), and startTop().

◆ setDocumentLocator()

void LayoutParser::setDocumentLocator ( const XMLLocator * locator)
inline

Definition at line 193 of file layout.cpp.

194 {
195 m_locator = locator;
196 }
const XMLLocator * m_locator
Definition layout.cpp:710

References m_locator.

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

◆ startElement()

void LayoutParser::startElement ( const std::string & name,
const XMLHandlers::Attributes & attrib )

Definition at line 1350 of file layout.cpp.

1351{
1352 //printf("startElement [%s]::[%s]\n",qPrint(m_scope),qPrint(name));
1353 auto it = g_elementHandlers.find(m_scope.str()+name);
1354 if (it!=g_elementHandlers.end())
1355 {
1356 it->second.startCb(*this,attrib);
1357 }
1358 else
1359 {
1360 std::string fileName = m_locator->fileName();
1361 warn(fileName.c_str(),m_locator->lineNr(),"Unexpected start tag '%s' found in scope='%s'!",
1362 qPrint(name),qPrint(m_scope));
1363 }
1364}
const char * qPrint(const char *s)
Definition qcstring.h:672

References anonymous_namespace{layout.cpp}::g_elementHandlers, m_locator, m_scope, qPrint(), and warn.

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

◆ startLayout()

void LayoutParser::startLayout ( const XMLHandlers::Attributes & )
inline

Definition at line 257 of file layout.cpp.

258 {
259 }

◆ startMemberDecl()

void LayoutParser::startMemberDecl ( const XMLHandlers::Attributes & attrib)
inline

Definition at line 672 of file layout.cpp.

673 {
674 m_scope+="memberdecl/";
675 if (m_part!=LayoutDocManager::Undefined)
676 {
677 bool isVisible = m_visible && elemIsVisible(attrib) && parentIsVisible(m_rootNav);
678 LayoutDocManager::instance().addEntry(m_part,std::make_unique<LayoutDocEntrySimple>(LayoutDocEntry::MemberDeclStart,isVisible));
679 }
680 }
bool m_visible
Definition layout.cpp:708
static bool elemIsVisible(const XMLHandlers::Attributes &attrib, bool defVal=TRUE)
Definition layout.cpp:81
static bool parentIsVisible(LayoutNavEntry *parent)
Definition layout.cpp:115

References LayoutDocManager::addEntry(), elemIsVisible(), LayoutDocManager::instance(), m_part, m_rootNav, m_scope, m_visible, and parentIsVisible().

◆ startMemberDeclEntry()

void LayoutParser::startMemberDeclEntry ( const XMLHandlers::Attributes & attrib,
MemberListType type,
const QCString & title,
const QCString & subscript )
inline

Definition at line 230 of file layout.cpp.

232 {
233 QCString userTitle = XMLHandlers::value(attrib,"title");
234 QCString userSubscript = XMLHandlers::value(attrib,"subtitle");
235 if (userTitle.isEmpty()) userTitle = title;
236 if (userSubscript.isEmpty()) userSubscript = subscript;
237 bool isVisible = m_visible && elemIsVisible(attrib) && parentIsVisible(m_rootNav);
238 if (m_part!=LayoutDocManager::Undefined && isVisible)
239 {
240 LayoutDocManager::instance().addEntry(m_part,std::make_unique<LayoutDocEntryMemberDecl>(type,userTitle,userSubscript));
241 }
242 }
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
static std::string value(const Attributes &attrib, const std::string &key)
Definition xml.h:44

References LayoutDocManager::addEntry(), elemIsVisible(), LayoutDocManager::instance(), QCString::isEmpty(), m_part, m_rootNav, m_visible, parentIsVisible(), and XMLHandlers::value().

◆ startMemberDef()

void LayoutParser::startMemberDef ( const XMLHandlers::Attributes & attrib)
inline

Definition at line 640 of file layout.cpp.

641 {
642 m_scope+="memberdef/";
643 if (m_part!=LayoutDocManager::Undefined)
644 {
645 bool isVisible = m_visible && elemIsVisible(attrib) && parentIsVisible(m_rootNav);
646 LayoutDocManager::instance().addEntry(m_part,std::make_unique<LayoutDocEntrySimple>(LayoutDocEntry::MemberDefStart,isVisible));
647 }
648 }

References LayoutDocManager::addEntry(), elemIsVisible(), LayoutDocManager::instance(), m_part, m_rootNav, m_scope, m_visible, and parentIsVisible().

◆ startMemberDefEntry()

void LayoutParser::startMemberDefEntry ( const XMLHandlers::Attributes & attrib,
MemberListType type,
const QCString & title,
const QCString &  )
inline

Definition at line 244 of file layout.cpp.

246 {
247 QCString userTitle = XMLHandlers::value(attrib,"title");
248 if (userTitle.isEmpty()) userTitle = title;
249 //printf("memberdef: %s\n",qPrint(userTitle));
250 bool isVisible = m_visible && elemIsVisible(attrib) && parentIsVisible(m_rootNav);
251 if (m_part!=LayoutDocManager::Undefined && isVisible)
252 {
253 LayoutDocManager::instance().addEntry(m_part,std::make_unique<LayoutDocEntryMemberDef>(type,userTitle));
254 }
255 }

References LayoutDocManager::addEntry(), elemIsVisible(), LayoutDocManager::instance(), QCString::isEmpty(), m_part, m_rootNav, m_visible, parentIsVisible(), and XMLHandlers::value().

◆ startNavEntry()

void LayoutParser::startNavEntry ( const XMLHandlers::Attributes & attrib)
inline

Definition at line 282 of file layout.cpp.

283 {
284 bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
285 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
286 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
287 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
288 bool hasGraphicalHierarchy = Config_getBool(HAVE_DOT) &&
289 Config_getBool(GRAPHICAL_HIERARCHY);
290 bool extractAll = Config_getBool(EXTRACT_ALL);
291 static struct NavEntryMap
292 {
293 const char *typeStr; // type attribute name in the XML file
294 LayoutNavEntry::Kind kind; // corresponding enum name
295 QCString mainName; // default title for an item if it has children
296 QCString subName; // optional name for an item if it is rendered as a child
297 QCString intro; // introduction text to be put on the index page
298 QCString baseFile; // base name of the file containing the index page
299 } mapping[] =
300 {
301 { "mainpage",
302 LayoutNavEntry::MainPage,
304 QCString(),
305 QCString(),
306 "index"
307 },
308 { "pages",
309 LayoutNavEntry::Pages,
311 QCString(),
313 "pages"
314 },
315 { "topics",
316 LayoutNavEntry::Topics,
318 QCString(),
320 "topics"
321 },
322 { "modules",
323 LayoutNavEntry::Modules,
327 "modules"
328 },
329 { "modulelist",
330 LayoutNavEntry::ModuleList,
332 QCString(),
334 "modules"
335 },
336 { "modulemembers",
337 LayoutNavEntry::ModuleMembers,
339 QCString(),
341 "modulemembers"
342 },
343 { "namespaces",
344 LayoutNavEntry::Namespaces,
345 javaOpt || vhdlOpt ? theTranslator->trPackages() : fortranOpt || sliceOpt ? theTranslator->trModules() : theTranslator->trNamespaces(),
346 javaOpt || vhdlOpt ? theTranslator->trPackageList() : fortranOpt || sliceOpt ? theTranslator->trModulesList() : theTranslator->trNamespaceList(),
347 javaOpt || vhdlOpt ? theTranslator->trPackageListDescription() : fortranOpt || sliceOpt ? theTranslator->trModulesListDescription(extractAll) : theTranslator->trNamespaceListDescription(extractAll),
348 "namespaces"
349 },
350 { "namespacelist",
351 LayoutNavEntry::NamespaceList,
352 javaOpt || vhdlOpt ? theTranslator->trPackageList() : fortranOpt || sliceOpt ? theTranslator->trModulesList() : theTranslator->trNamespaceList(),
353 QCString(),
354 javaOpt || vhdlOpt ? theTranslator->trPackageListDescription() : fortranOpt || sliceOpt ? theTranslator->trModulesListDescription(extractAll) : theTranslator->trNamespaceListDescription(extractAll),
355 "namespaces"
356 },
357 { "namespacemembers",
358 LayoutNavEntry::NamespaceMembers,
359 javaOpt || vhdlOpt ? theTranslator->trPackageMembers() : fortranOpt || sliceOpt ? theTranslator->trModulesMembers() : theTranslator->trNamespaceMembers(),
360 QCString(),
361 fortranOpt || sliceOpt ? theTranslator->trModulesMemberDescription(extractAll) : theTranslator->trNamespaceMemberDescription(extractAll),
362 "namespacemembers"
363 },
364 { "concepts",
365 LayoutNavEntry::Concepts,
366 theTranslator->trConcept(true,false),
369 "concepts"
370 },
371 { "classindex",
372 LayoutNavEntry::ClassIndex,
374 QCString(),
375 QCString(),
376 "classes"
377 },
378 { "classes",
379 LayoutNavEntry::Classes,
383 "annotated"
384 },
385 { "classlist",
386 LayoutNavEntry::ClassList,
388 QCString(),
390 "annotated"
391 },
392 { "hierarchy",
393 LayoutNavEntry::ClassHierarchy,
395 QCString(),
397 hasGraphicalHierarchy ? "inherits" : "hierarchy"
398 },
399 { "classmembers",
400 LayoutNavEntry::ClassMembers,
402 QCString(),
404 "functions"
405 },
406 { "interfaceindex",
407 LayoutNavEntry::InterfaceIndex,
409 QCString(),
410 QCString(),
411 "interfaces"
412 },
413 { "interfaces",
414 LayoutNavEntry::Interfaces,
418 "annotatedinterfaces"
419 },
420 { "interfacelist",
421 LayoutNavEntry::InterfaceList,
423 QCString(),
425 "annotatedinterfaces"
426 },
427 { "interfacehierarchy",
428 LayoutNavEntry::InterfaceHierarchy,
430 QCString(),
432 hasGraphicalHierarchy ? "interfaceinherits" : "interfacehierarchy"
433 },
434 { "structindex",
435 LayoutNavEntry::StructIndex,
437 QCString(),
438 QCString(),
439 "structs"
440 },
441 { "structs",
442 LayoutNavEntry::Structs,
446 "annotatedstructs"
447 },
448 { "structlist",
449 LayoutNavEntry::StructList,
451 QCString(),
453 "annotatedstructs"
454 },
455 { "exceptionindex",
456 LayoutNavEntry::ExceptionIndex,
458 QCString(),
459 QCString(),
460 "exceptions"
461 },
462 { "exceptions",
463 LayoutNavEntry::Exceptions,
467 "annotatedexceptions"
468 },
469 { "exceptionlist",
470 LayoutNavEntry::ExceptionList,
472 QCString(),
474 "annotatedexceptions"
475 },
476 { "exceptionhierarchy",
477 LayoutNavEntry::ExceptionHierarchy,
479 QCString(),
481 hasGraphicalHierarchy ? "exceptioninherits" : "exceptionhierarchy"
482 },
483 { "files",
484 LayoutNavEntry::Files,
488 "files"
489 },
490 { "filelist",
491 LayoutNavEntry::FileList,
493 QCString(),
495 "files"
496 },
497 { "globals",
498 LayoutNavEntry::FileGlobals,
500 QCString(),
502 "globals"
503 },
504 { "examples",
505 LayoutNavEntry::Examples,
507 QCString(),
509 "examples"
510 },
511 { "user",
512 LayoutNavEntry::User,
513 QCString(),
514 QCString(),
515 QCString(),
516 "user"
517 },
518 { "usergroup",
519 LayoutNavEntry::UserGroup,
520 QCString(),
521 QCString(),
522 QCString(),
523 "usergroup"
524 },
525 { nullptr, // end of list
526 static_cast<LayoutNavEntry::Kind>(0),
527 QCString(),
528 QCString(),
529 QCString(),
530 QCString()
531 }
532 };
533 // find type in the table
534 int i=0;
535 QCString type = XMLHandlers::value(attrib,"type");
536 while (mapping[i].typeStr)
537 {
538 if (mapping[i].typeStr==type)
539 break;
540 i++;
541 }
542 if (mapping[i].typeStr==nullptr)
543 {
544 std::string fileName = m_locator->fileName();
545 if (type.isEmpty())
546 {
547 warn(fileName.c_str(),m_locator->lineNr(),"an entry tag within a navindex has no type attribute! Check your layout file!");
548 }
549 else
550 {
551 warn(fileName.c_str(),m_locator->lineNr(),"the type '%s' is not supported for the entry tag within a navindex! Check your layout file!",qPrint(type));
552 }
554 return;
555 }
556 LayoutNavEntry::Kind kind = mapping[i].kind;
557 QCString baseFile = mapping[i].baseFile;
558 QCString title = XMLHandlers::value(attrib,"title");
559 bool isVisible = m_visible && elemIsVisible(attrib) && parentIsVisible(m_rootNav);
560 if (title.isEmpty()) // use default title
561 {
562 title = mapping[i].mainName; // use title for main row
563 if (m_rootNav!=LayoutDocManager::instance().rootNavEntry() && !mapping[i].subName.isEmpty())
564 {
565 title = mapping[i].subName; // if this is a child of another row, use the subName if available
566 // this is mainly done to get compatible naming with older versions.
567 }
568 }
569 QCString intro = XMLHandlers::value(attrib,"intro");
570 if (intro.isEmpty()) // use default intro text
571 {
572 intro = mapping[i].intro;
573 }
574 QCString url = XMLHandlers::value(attrib,"url");
575 if (mapping[i].kind==LayoutNavEntry::User && !url.isEmpty())
576 {
577 baseFile=url;
578 }
579 else if (kind==LayoutNavEntry::UserGroup)
580 {
581 if (!url.isEmpty())
582 {
583 if (url == "[none]")
584 {
585 baseFile = QCString();
586 }
587 else
588 {
589 baseFile=url;
590 }
591 }
592 else
593 {
594 baseFile+=QCString().sprintf("%d",m_userGroupCount++);
595 }
596 }
597 // create new item and make it the new root
598 m_rootNav = LayoutDocManager::instance().createChildNavEntry(m_rootNav,kind,isVisible,baseFile,title,intro);
599 }
LayoutNavEntry * createChildNavEntry(LayoutNavEntry *root, LayoutNavEntry::Kind k, bool vs, const QCString &bf, const QCString &tl, const QCString &intro)
Definition layout.cpp:1439
static int m_userGroupCount
Definition layout.cpp:709
QCString & sprintf(const char *format,...)
Definition qcstring.cpp:29
virtual QCString trCompoundListDescription()=0
virtual QCString trClassHierarchyDescription()=0
virtual QCString trTopics()=0
virtual QCString trDataTypes()=0
virtual QCString trPackageListDescription()=0
virtual QCString trExceptionHierarchy()=0
virtual QCString trClasses()=0
virtual QCString trExceptionListDescription()=0
virtual QCString trInterfaceIndex()=0
virtual QCString trModulesList()=0
virtual QCString trModules()=0
virtual QCString trFileListDescription(bool extractAll)=0
virtual QCString trConceptList()=0
virtual QCString trModulesDescription()=0
virtual QCString trConcept(bool first_capital, bool singular)=0
virtual QCString trCompoundMembersDescription(bool extractAll)=0
virtual QCString trInterfaceList()=0
virtual QCString trStructs()=0
virtual QCString trExceptionHierarchyDescription()=0
virtual QCString trModulesListDescription(bool extractAll)=0
virtual QCString trPackageMembers()=0
virtual QCString trPackages()=0
virtual QCString trSliceInterfaces()=0
virtual QCString trExceptions()=0
virtual QCString trRelatedPagesDescription()=0
virtual QCString trDesignUnitHierarchy()=0
virtual QCString trCompoundMembers()=0
virtual QCString trInterfaceHierarchyDescription()=0
virtual QCString trExamplesDescription()=0
virtual QCString trCompoundIndex()=0
virtual QCString trModulesMembers()=0
virtual QCString trModulesMemberDescription(bool extractAll)=0
virtual QCString trInterfaceHierarchy()=0
virtual QCString trExceptionList()=0
virtual QCString trRelatedPages()=0
virtual QCString trClassHierarchy()=0
virtual QCString trNamespaceList()=0
virtual QCString trCompoundListFortran()=0
virtual QCString trFileMembers()=0
virtual QCString trDesignUnitListDescription()=0
virtual QCString trNamespaceListDescription(bool extractAll)=0
virtual QCString trCompoundIndexFortran()=0
virtual QCString trStructIndex()=0
virtual QCString trTopicListDescription()=0
virtual QCString trDesignUnitList()=0
virtual QCString trFileList()=0
virtual QCString trFileMembersDescription(bool extractAll)=0
virtual QCString trNamespaceMemberDescription(bool extractAll)=0
virtual QCString trExamples()=0
virtual QCString trNamespaceMembers()=0
virtual QCString trStructList()=0
virtual QCString trStructListDescription()=0
virtual QCString trFile(bool first_capital, bool singular)=0
virtual QCString trInterfaceListDescription()=0
virtual QCString trNamespaces()=0
virtual QCString trCompoundListDescriptionFortran()=0
virtual QCString trCompoundMembersFortran()=0
virtual QCString trDesignUnitMembers()=0
virtual QCString trExceptionIndex()=0
virtual QCString trDesignUnits()=0
virtual QCString trCompoundList()=0
virtual QCString trDesignUnitIndex()=0
virtual QCString trConceptListDescription(bool extractAll)=0
virtual QCString trCompoundMembersDescriptionFortran(bool extractAll)=0
virtual QCString trPackageList()=0
#define Config_getBool(name)
Definition config.h:33
Kind
Definition layout.h:177

References Config_getBool, LayoutDocManager::createChildNavEntry(), elemIsVisible(), FALSE, LayoutDocManager::instance(), QCString::isEmpty(), m_invalidEntry, m_locator, m_rootNav, m_userGroupCount, m_visible, parentIsVisible(), qPrint(), QCString::sprintf(), theTranslator, TRUE, XMLHandlers::value(), and warn.

◆ startNavIndex()

void LayoutParser::startNavIndex ( const XMLHandlers::Attributes & )
inline

Definition at line 261 of file layout.cpp.

262 {
263 m_scope="navindex/";
265 if (m_rootNav)
266 {
267 m_rootNav->clear();
268 }
269 }
LayoutNavEntry * rootNavEntry() const
returns the (invisible) root of the navigation tree.
Definition layout.cpp:1434

References LayoutDocManager::instance(), m_rootNav, m_scope, and LayoutDocManager::rootNavEntry().

◆ startSectionEntry()

void LayoutParser::startSectionEntry ( LayoutDocEntry::Kind k,
const XMLHandlers::Attributes & attrib,
const QCString & title )
inline

Definition at line 215 of file layout.cpp.

217 {
218 bool isVisible = m_visible && elemIsVisible(attrib) && parentIsVisible(m_rootNav);
219 QCString userTitle = XMLHandlers::value(attrib,"title");
220 //printf("startSectionEntry: title='%s' userTitle='%s'\n",
221 // qPrint(title),qPrint(userTitle));
222 if (userTitle.isEmpty()) userTitle = title;
223 if (m_part!=LayoutDocManager::Undefined && isVisible)
224 {
225 LayoutDocManager::instance().addEntry(m_part,std::make_unique<LayoutDocEntrySection>(k,userTitle,isVisible));
226 }
227 }

References LayoutDocManager::addEntry(), elemIsVisible(), LayoutDocManager::instance(), QCString::isEmpty(), m_part, m_rootNav, m_visible, parentIsVisible(), and XMLHandlers::value().

◆ startSimpleEntry()

void LayoutParser::startSimpleEntry ( LayoutDocEntry::Kind k,
const XMLHandlers::Attributes & attrib )
inline

Definition at line 204 of file layout.cpp.

205 {
206 bool isVisible = m_visible && elemIsVisible(attrib) && parentIsVisible(m_rootNav);
207 if (m_part!=LayoutDocManager::Undefined && isVisible)
208 {
209 LayoutDocManager::instance().addEntry(m_part,std::make_unique<LayoutDocEntrySimple>(k,isVisible));
210 }
211 }

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

◆ startTop()

void LayoutParser::startTop ( const XMLHandlers::Attributes & attrib,
LayoutDocManager::LayoutPart part,
const QCString & scope,
LayoutNavEntry::Kind nav )
inline

Definition at line 618 of file layout.cpp.

620 {
622 m_scope = scope;
623 m_part = part;
624 m_visible = elemIsVisible(attrib);
625 auto *lne = LayoutDocManager::instance().rootNavEntry()->find(nav);
626 if (lne)
627 {
628 m_visible = m_visible && lne->visible();
629 lne->setVisible(m_visible);
631 }
632 }
void clear(LayoutPart p)
Definition layout.cpp:1454
LayoutNavEntry * find(LayoutNavEntry::Kind k, const QCString &file=QCString()) const
Definition layout.cpp:122

References LayoutDocManager::clear(), elemIsVisible(), LayoutNavEntry::find(), LayoutDocManager::instance(), m_part, m_scope, m_visible, recurseNavEntryChildren(), and LayoutDocManager::rootNavEntry().

Member Data Documentation

◆ m_invalidEntry

bool LayoutParser::m_invalidEntry = false
private

Definition at line 707 of file layout.cpp.

Referenced by endNavEntry(), and startNavEntry().

◆ m_locator

const XMLLocator* LayoutParser::m_locator = nullptr
private

Definition at line 710 of file layout.cpp.

Referenced by setDocumentLocator(), startElement(), and startNavEntry().

◆ m_part

◆ m_rootNav

◆ m_scope

◆ m_userGroupCount

int LayoutParser::m_userGroupCount =0
staticprivate

Definition at line 709 of file layout.cpp.

Referenced by startNavEntry().

◆ m_visible

bool LayoutParser::m_visible = true
private

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