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

Public Member Functions

 LayoutParser (LayoutDocManager &manager)
 
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 std::string &id, const XMLHandlers::Attributes &attrib)
 
void startSectionEntry (LayoutDocEntry::Kind k, const std::string &id, const XMLHandlers::Attributes &attrib, const QCString &title)
 
void startMemberDeclEntry (const std::string &id, const XMLHandlers::Attributes &attrib, MemberListType type, const QCString &title, const QCString &subscript)
 
void startMemberDefEntry (const std::string &id, const XMLHandlers::Attributes &attrib, MemberListType type, const QCString &title, const QCString &)
 
void startLayout (const std::string &, const XMLHandlers::Attributes &attrib)
 
void startNavIndex (const std::string &, const XMLHandlers::Attributes &)
 
void endNavIndex (const std::string &)
 
void startNavEntry (const std::string &, const XMLHandlers::Attributes &attrib)
 
void endNavEntry (const std::string &)
 
void startTop (const std::string &, const XMLHandlers::Attributes &attrib, LayoutDocManager::LayoutPart part, const QCString &scope, LayoutNavEntry::Kind nav)
 
void endTop (const std::string &)
 
void startMemberDef (const std::string &id, const XMLHandlers::Attributes &attrib)
 
void endMemberDef (const std::string &id)
 
void startMemberDecl (const std::string &id, const XMLHandlers::Attributes &attrib)
 
void endMemberDecl (const std::string &id)
 
int majorVersion () const
 
int minorVersion () const
 

Private Attributes

QCString m_scope
 
LayoutDocManagerm_layoutDocManager
 
LayoutDocManager::LayoutPart m_part = LayoutDocManager::Undefined
 
LayoutNavEntrym_rootNav = nullptr
 
bool m_invalidEntry = false
 
bool m_visible = true
 
const XMLLocatorm_locator = nullptr
 
int m_majorVersion = 1
 
int m_minorVersion = 0
 

Static Private Attributes

static int m_userGroupCount =0
 

Detailed Description

Definition at line 194 of file layout.cpp.

Constructor & Destructor Documentation

◆ LayoutParser()

LayoutParser::LayoutParser ( LayoutDocManager & manager)
inline

Definition at line 197 of file layout.cpp.

197: m_layoutDocManager(manager) {}
LayoutDocManager & m_layoutDocManager
Definition layout.cpp:708

References m_layoutDocManager.

Member Function Documentation

◆ endElement()

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

Definition at line 1373 of file layout.cpp.

1374{
1375 //printf("endElement [%s]::[%s]\n",qPrint(m_scope),qPrint(name));
1376 auto it=g_elementHandlers.end();
1377
1378 if (!m_scope.isEmpty() && m_scope.right(name.length()+1)==name+"/")
1379 { // element ends current scope
1380 it = g_elementHandlers.find(m_scope.left(m_scope.length()-1).str());
1381 }
1382 else // continue with current scope
1383 {
1384 it = g_elementHandlers.find(m_scope.str()+name);
1385 }
1386 if (it!=g_elementHandlers.end())
1387 {
1388 it->second.endCb(*this,it->first+" end"); // added end to id to make it unique
1389 }
1390}
QCString m_scope
Definition layout.cpp:707
static const std::map< std::string, ElementCallbacks > g_elementHandlers
Definition layout.cpp:790

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

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

◆ endMemberDecl()

void LayoutParser::endMemberDecl ( const std::string & id)
inline

Definition at line 681 of file layout.cpp.

682 {
683 int i=m_scope.findRev("memberdecl/");
684 if (i!=-1)
685 {
686 m_scope=m_scope.left(i);
687 bool isVisible = true;
688 for (const auto &lde : m_layoutDocManager.docEntries(m_part))
689 {
690 if (lde->kind() == LayoutDocEntry::MemberDeclStart)
691 {
692 isVisible = static_cast<const LayoutDocEntrySimple*>(lde.get())->visible();
693 break;
694 }
695 }
696 if (m_part!=LayoutDocManager::Undefined)
697 {
698 m_layoutDocManager.addEntry(m_part,std::make_unique<LayoutDocEntrySimple>(LayoutDocEntry::MemberDeclEnd,id,isVisible));
699 }
700 }
701 }
LayoutDocManager::LayoutPart m_part
Definition layout.cpp:709

References m_layoutDocManager, m_part, m_scope, and LayoutDocEntrySimple::visible().

◆ endMemberDef()

void LayoutParser::endMemberDef ( const std::string & id)
inline

Definition at line 648 of file layout.cpp.

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

References m_layoutDocManager, m_part, m_scope, and LayoutDocEntrySimple::visible().

◆ endNavEntry()

void LayoutParser::endNavEntry ( const std::string & )
inline

Definition at line 616 of file layout.cpp.

617 {
618 // set the root back to the parent
619 if (m_rootNav && !m_invalidEntry) m_rootNav = m_rootNav->parent();
621 }
bool m_invalidEntry
Definition layout.cpp:711
LayoutNavEntry * m_rootNav
Definition layout.cpp:710
#define FALSE
Definition qcstring.h:34

References FALSE, m_invalidEntry, and m_rootNav.

◆ endNavIndex()

void LayoutParser::endNavIndex ( const std::string & )
inline

Definition at line 286 of file layout.cpp.

287 {
288 m_scope="";
289 if (m_rootNav && !m_rootNav->find(LayoutNavEntry::MainPage))
290 {
291 // no MainPage node... add one as the first item of the root node...
292 m_rootNav->insertChild(0,std::make_unique<LayoutNavEntry>(m_rootNav,LayoutNavEntry::MainPage, TRUE,
293 "index",theTranslator->trMainPage(),""));
294 }
295 }
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 ( const std::string & )
inline

Definition at line 632 of file layout.cpp.

633 {
634 m_scope="";
635 m_part = LayoutDocManager::Undefined;
636 }

References m_part, and m_scope.

◆ error()

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

Definition at line 204 of file layout.cpp.

205 {
206 warn_layout(fileName.c_str(),lineNr,"{}",msg.c_str());
207 }
#define msg(fmt,...)
Definition message.h:94
#define warn_layout(file, line, fmt,...)
Definition message.h:117

References msg, and warn_layout.

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

◆ majorVersion()

int LayoutParser::majorVersion ( ) const
inline

Definition at line 703 of file layout.cpp.

703{ return m_majorVersion; }
int m_majorVersion
Definition layout.cpp:715

References m_majorVersion.

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

◆ minorVersion()

int LayoutParser::minorVersion ( ) const
inline

Definition at line 704 of file layout.cpp.

704{ return m_minorVersion; }
int m_minorVersion
Definition layout.cpp:716

References m_minorVersion.

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

◆ setDocumentLocator()

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

Definition at line 200 of file layout.cpp.

201 {
202 m_locator = locator;
203 }
const XMLLocator * m_locator
Definition layout.cpp:714

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 1357 of file layout.cpp.

1358{
1359 //printf("startElement [%s]::[%s]\n",qPrint(m_scope),qPrint(name));
1360 auto it = g_elementHandlers.find(m_scope.str()+name);
1361 if (it!=g_elementHandlers.end())
1362 {
1363 it->second.startCb(*this,it->first,attrib);
1364 }
1365 else
1366 {
1367 std::string fileName = m_locator->fileName();
1368 warn_layout(fileName.c_str(),m_locator->lineNr(),"Unexpected start tag '{}' found in scope='{}'!",
1369 name,m_scope);
1370 }
1371}

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

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

◆ startLayout()

void LayoutParser::startLayout ( const std::string & ,
const XMLHandlers::Attributes & attrib )
inline

Definition at line 266 of file layout.cpp.

267 {
268 // extract and store version number
269 QCString version = XMLHandlers::value(attrib,"version");
270 static const reg::Ex re(R"((\d+)\.(\d+))");
271 reg::Match match;
272 if (reg::match(version.view(),match,re))
273 {
274 m_majorVersion = atoi(match[1].str().c_str());
275 m_minorVersion = atoi(match[2].str().c_str());
276 //printf("layout version %d.%d\n",m_versionMajor,m_versionMinor);
277 }
278 }
static std::string value(const Attributes &attrib, const std::string &key)
Definition xml.h:44
static void version(const bool extended)
bool match(std::string_view str, Match &match, const Ex &re)
Matches a given string str for a match against regular expression re.
Definition regex.cpp:759

References m_majorVersion, m_minorVersion, reg::match(), XMLHandlers::value(), and version().

◆ startMemberDecl()

void LayoutParser::startMemberDecl ( const std::string & id,
const XMLHandlers::Attributes & attrib )
inline

Definition at line 671 of file layout.cpp.

672 {
673 m_scope+="memberdecl/";
674 bool isVisible = m_visible && elemIsVisible(attrib);
675 if (m_part!=LayoutDocManager::Undefined)
676 {
677 m_layoutDocManager.addEntry(m_part,std::make_unique<LayoutDocEntrySimple>(LayoutDocEntry::MemberDeclStart,id,isVisible));
678 }
679 }
bool m_visible
Definition layout.cpp:712
static bool elemIsVisible(const XMLHandlers::Attributes &attrib, bool defVal=TRUE)
Definition layout.cpp:79

References elemIsVisible(), m_layoutDocManager, m_part, m_scope, and m_visible.

◆ startMemberDeclEntry()

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

Definition at line 239 of file layout.cpp.

241 {
242 QCString userTitle = XMLHandlers::value(attrib,"title");
243 QCString userSubscript = XMLHandlers::value(attrib,"subtitle");
244 if (userTitle.isEmpty()) userTitle = title;
245 if (userSubscript.isEmpty()) userSubscript = subscript;
246 bool isVisible = m_visible && elemIsVisible(attrib);
247 if (m_part!=LayoutDocManager::Undefined)
248 {
249 m_layoutDocManager.addEntry(m_part,std::make_unique<LayoutDocEntryMemberDecl>(type,id,userTitle,userSubscript,isVisible));
250 }
251 }
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150

References elemIsVisible(), QCString::isEmpty(), m_layoutDocManager, m_part, m_visible, and XMLHandlers::value().

◆ startMemberDef()

void LayoutParser::startMemberDef ( const std::string & id,
const XMLHandlers::Attributes & attrib )
inline

Definition at line 638 of file layout.cpp.

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

References elemIsVisible(), m_layoutDocManager, m_part, m_scope, and m_visible.

◆ startMemberDefEntry()

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

Definition at line 253 of file layout.cpp.

255 {
256 QCString userTitle = XMLHandlers::value(attrib,"title");
257 if (userTitle.isEmpty()) userTitle = title;
258 //printf("memberdef: %s\n",qPrint(userTitle));
259 bool isVisible = m_visible && elemIsVisible(attrib);
260 if (m_part!=LayoutDocManager::Undefined)
261 {
262 m_layoutDocManager.addEntry(m_part,std::make_unique<LayoutDocEntryMemberDef>(type,id,userTitle,isVisible));
263 }
264 }

References elemIsVisible(), QCString::isEmpty(), m_layoutDocManager, m_part, m_visible, and XMLHandlers::value().

◆ startNavEntry()

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

Definition at line 297 of file layout.cpp.

298 {
299 bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
300 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
301 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
302 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
303 bool hasGraphicalHierarchy = Config_getBool(HAVE_DOT) &&
304 Config_getBool(GRAPHICAL_HIERARCHY);
305 bool extractAll = Config_getBool(EXTRACT_ALL);
306 static struct NavEntryMap
307 {
308 const char *typeStr; // type attribute name in the XML file
309 LayoutNavEntry::Kind kind; // corresponding enum name
310 QCString mainName; // default title for an item if it has children
311 QCString subName; // optional name for an item if it is rendered as a child
312 QCString intro; // introduction text to be put on the index page
313 QCString baseFile; // base name of the file containing the index page
314 } mapping[] =
315 {
316 { "mainpage",
317 LayoutNavEntry::MainPage,
319 QCString(),
320 QCString(),
321 "index"
322 },
323 { "pages",
324 LayoutNavEntry::Pages,
326 QCString(),
328 "pages"
329 },
330 { "topics",
331 LayoutNavEntry::Topics,
333 QCString(),
335 "topics"
336 },
337 { "modules",
338 LayoutNavEntry::Modules,
342 "modules"
343 },
344 { "modulelist",
345 LayoutNavEntry::ModuleList,
347 QCString(),
349 "modules"
350 },
351 { "modulemembers",
352 LayoutNavEntry::ModuleMembers,
354 QCString(),
356 "modulemembers"
357 },
358 { "namespaces",
359 LayoutNavEntry::Namespaces,
360 javaOpt || vhdlOpt ? theTranslator->trPackages() : fortranOpt || sliceOpt ? theTranslator->trModules() : theTranslator->trNamespaces(),
361 javaOpt || vhdlOpt ? theTranslator->trPackageList() : fortranOpt || sliceOpt ? theTranslator->trModulesList() : theTranslator->trNamespaceList(),
362 javaOpt || vhdlOpt ? theTranslator->trPackageListDescription() : fortranOpt || sliceOpt ? theTranslator->trModulesListDescription(extractAll) : theTranslator->trNamespaceListDescription(extractAll),
363 "namespaces"
364 },
365 { "namespacelist",
366 LayoutNavEntry::NamespaceList,
367 javaOpt || vhdlOpt ? theTranslator->trPackageList() : fortranOpt || sliceOpt ? theTranslator->trModulesList() : theTranslator->trNamespaceList(),
368 QCString(),
369 javaOpt || vhdlOpt ? theTranslator->trPackageListDescription() : fortranOpt || sliceOpt ? theTranslator->trModulesListDescription(extractAll) : theTranslator->trNamespaceListDescription(extractAll),
370 "namespaces"
371 },
372 { "namespacemembers",
373 LayoutNavEntry::NamespaceMembers,
374 javaOpt || vhdlOpt ? theTranslator->trPackageMembers() : fortranOpt || sliceOpt ? theTranslator->trModulesMembers() : theTranslator->trNamespaceMembers(),
375 QCString(),
376 fortranOpt || sliceOpt ? theTranslator->trModulesMemberDescription(extractAll) : theTranslator->trNamespaceMemberDescription(extractAll),
377 "namespacemembers"
378 },
379 { "concepts",
380 LayoutNavEntry::Concepts,
381 theTranslator->trConcept(true,false),
384 "concepts"
385 },
386 { "classindex",
387 LayoutNavEntry::ClassIndex,
389 QCString(),
390 QCString(),
391 "classes"
392 },
393 { "classes",
394 LayoutNavEntry::Classes,
398 "annotated"
399 },
400 { "classlist",
401 LayoutNavEntry::ClassList,
403 QCString(),
405 "annotated"
406 },
407 { "hierarchy",
408 LayoutNavEntry::ClassHierarchy,
410 QCString(),
412 hasGraphicalHierarchy ? "inherits" : "hierarchy"
413 },
414 { "classmembers",
415 LayoutNavEntry::ClassMembers,
417 QCString(),
419 "functions"
420 },
421 { "interfaceindex",
422 LayoutNavEntry::InterfaceIndex,
424 QCString(),
425 QCString(),
426 "interfaces"
427 },
428 { "interfaces",
429 LayoutNavEntry::Interfaces,
433 "annotatedinterfaces"
434 },
435 { "interfacelist",
436 LayoutNavEntry::InterfaceList,
438 QCString(),
440 "annotatedinterfaces"
441 },
442 { "interfacehierarchy",
443 LayoutNavEntry::InterfaceHierarchy,
445 QCString(),
447 hasGraphicalHierarchy ? "interfaceinherits" : "interfacehierarchy"
448 },
449 { "structindex",
450 LayoutNavEntry::StructIndex,
452 QCString(),
453 QCString(),
454 "structs"
455 },
456 { "structs",
457 LayoutNavEntry::Structs,
461 "annotatedstructs"
462 },
463 { "structlist",
464 LayoutNavEntry::StructList,
466 QCString(),
468 "annotatedstructs"
469 },
470 { "exceptionindex",
471 LayoutNavEntry::ExceptionIndex,
473 QCString(),
474 QCString(),
475 "exceptions"
476 },
477 { "exceptions",
478 LayoutNavEntry::Exceptions,
482 "annotatedexceptions"
483 },
484 { "exceptionlist",
485 LayoutNavEntry::ExceptionList,
487 QCString(),
489 "annotatedexceptions"
490 },
491 { "exceptionhierarchy",
492 LayoutNavEntry::ExceptionHierarchy,
494 QCString(),
496 hasGraphicalHierarchy ? "exceptioninherits" : "exceptionhierarchy"
497 },
498 { "files",
499 LayoutNavEntry::Files,
503 "files"
504 },
505 { "filelist",
506 LayoutNavEntry::FileList,
508 QCString(),
510 "files"
511 },
512 { "globals",
513 LayoutNavEntry::FileGlobals,
515 QCString(),
517 "globals"
518 },
519 { "examples",
520 LayoutNavEntry::Examples,
522 QCString(),
524 "examples"
525 },
526 { "user",
527 LayoutNavEntry::User,
528 QCString(),
529 QCString(),
530 QCString(),
531 "user"
532 },
533 { "usergroup",
534 LayoutNavEntry::UserGroup,
535 QCString(),
536 QCString(),
537 QCString(),
538 "usergroup"
539 },
540 { nullptr, // end of list
541 static_cast<LayoutNavEntry::Kind>(0),
542 QCString(),
543 QCString(),
544 QCString(),
545 QCString()
546 }
547 };
548 // find type in the table
549 int i=0;
550 QCString type = XMLHandlers::value(attrib,"type");
551 while (mapping[i].typeStr)
552 {
553 if (mapping[i].typeStr==type)
554 break;
555 i++;
556 }
557 if (mapping[i].typeStr==nullptr)
558 {
559 std::string fileName = m_locator->fileName();
560 if (type.isEmpty())
561 {
562 warn_layout(fileName.c_str(),m_locator->lineNr(),"an entry tag within a navindex has no type attribute! Check your layout file!");
563 }
564 else
565 {
566 warn_layout(fileName.c_str(),m_locator->lineNr(),"the type '{}' is not supported for the entry tag within a navindex! Check your layout file!",type);
567 }
569 return;
570 }
571 LayoutNavEntry::Kind kind = mapping[i].kind;
572 QCString baseFile = mapping[i].baseFile;
573 QCString title = XMLHandlers::value(attrib,"title");
574 bool isVisible = m_visible && elemIsVisible(attrib);
575 if (title.isEmpty()) // use default title
576 {
577 title = mapping[i].mainName; // use title for main row
578 if (m_rootNav!=m_layoutDocManager.rootNavEntry() && !mapping[i].subName.isEmpty())
579 {
580 title = mapping[i].subName; // if this is a child of another row, use the subName if available
581 // this is mainly done to get compatible naming with older versions.
582 }
583 }
584 QCString intro = XMLHandlers::value(attrib,"intro");
585 if (intro.isEmpty()) // use default intro text
586 {
587 intro = mapping[i].intro;
588 }
589 QCString url = XMLHandlers::value(attrib,"url");
590 if (mapping[i].kind==LayoutNavEntry::User && !url.isEmpty())
591 {
592 baseFile=url;
593 }
594 else if (kind==LayoutNavEntry::UserGroup)
595 {
596 if (!url.isEmpty())
597 {
598 if (url == "[none]")
599 {
600 baseFile = QCString();
601 }
602 else
603 {
604 baseFile=url;
605 }
606 }
607 else
608 {
609 baseFile+=QCString().sprintf("%d",m_userGroupCount++);
610 }
611 }
612 // create new item and make it the new root
613 m_rootNav = m_layoutDocManager.createChildNavEntry(m_rootNav,kind,isVisible,baseFile,title,intro);
614 }
static int m_userGroupCount
Definition layout.cpp:713
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:193

References Config_getBool, elemIsVisible(), FALSE, QCString::isEmpty(), m_invalidEntry, m_layoutDocManager, m_locator, m_rootNav, m_userGroupCount, m_visible, QCString::sprintf(), theTranslator, TRUE, XMLHandlers::value(), and warn_layout.

◆ startNavIndex()

void LayoutParser::startNavIndex ( const std::string & ,
const XMLHandlers::Attributes &  )
inline

Definition at line 280 of file layout.cpp.

281 {
282 m_scope="navindex/";
283 m_rootNav = m_layoutDocManager.rootNavEntry();
284 }

References m_layoutDocManager, m_rootNav, and m_scope.

◆ startSectionEntry()

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

Definition at line 224 of file layout.cpp.

226 {
227 bool isVisible = m_visible && elemIsVisible(attrib);
228 QCString userTitle = XMLHandlers::value(attrib,"title");
229 //printf("startSectionEntry: title='%s' userTitle='%s'\n",
230 // qPrint(title),qPrint(userTitle));
231 if (userTitle.isEmpty()) userTitle = title;
232 if (m_part!=LayoutDocManager::Undefined)
233 {
234 m_layoutDocManager.addEntry(m_part,std::make_unique<LayoutDocEntrySection>(k,id,userTitle,isVisible));
235 }
236 }

References elemIsVisible(), QCString::isEmpty(), m_layoutDocManager, m_part, m_visible, and XMLHandlers::value().

◆ startSimpleEntry()

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

Definition at line 211 of file layout.cpp.

212 {
213 bool isVisible = m_visible && elemIsVisible(attrib);
214 if (m_part!=LayoutDocManager::Undefined)
215 {
216 auto elem = std::make_unique<LayoutDocEntrySimple>(k,id,isVisible);
217 //printf("startSimpleEntry(%s) isVisible=%d visible=%d\n",qPrint(elem->entryToString()),isVisible,elem->visible());
218 m_layoutDocManager.addEntry(m_part,std::move(elem));
219 }
220 }

References elemIsVisible(), m_layoutDocManager, m_part, and m_visible.

◆ startTop()

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

Definition at line 623 of file layout.cpp.

625 {
626 //printf("startTop(scope=%s)\n",qPrint(scope));
627 m_scope = scope;
628 m_part = part;
629 m_visible = elemIsVisible(attrib);
630 }

References elemIsVisible(), m_part, m_scope, and m_visible.

Member Data Documentation

◆ m_invalidEntry

bool LayoutParser::m_invalidEntry = false
private

Definition at line 711 of file layout.cpp.

Referenced by endNavEntry(), and startNavEntry().

◆ m_layoutDocManager

◆ m_locator

const XMLLocator* LayoutParser::m_locator = nullptr
private

Definition at line 714 of file layout.cpp.

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

◆ m_majorVersion

int LayoutParser::m_majorVersion = 1
private

Definition at line 715 of file layout.cpp.

Referenced by majorVersion(), and startLayout().

◆ m_minorVersion

int LayoutParser::m_minorVersion = 0
private

Definition at line 716 of file layout.cpp.

Referenced by minorVersion(), and startLayout().

◆ m_part

◆ m_rootNav

LayoutNavEntry* LayoutParser::m_rootNav = nullptr
private

Definition at line 710 of file layout.cpp.

Referenced by endNavEntry(), endNavIndex(), startNavEntry(), and startNavIndex().

◆ m_scope

◆ m_userGroupCount

int LayoutParser::m_userGroupCount =0
staticprivate

Definition at line 713 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: