@@ -5388,14 +5388,9 @@ class ModuleContext::Private : public DefinitionContext<ModuleContext::Private>
5388
5388
if (!cache.examples )
5389
5389
{
5390
5390
TemplateList *exampleList = TemplateList::alloc ();
5391
- if ( m_groupDef->getExamples ())
5391
+ for ( const auto &ex : m_groupDef->getExamples ())
5392
5392
{
5393
- PageSDict::Iterator eli (*m_groupDef->getExamples ());
5394
- const PageDef *ex;
5395
- for (eli.toFirst ();(ex=eli.current ());++eli)
5396
- {
5397
- exampleList->append (PageContext::alloc (ex,FALSE ,TRUE ));
5398
- }
5393
+ exampleList->append (PageContext::alloc (ex,FALSE ,TRUE ));
5399
5394
}
5400
5395
cache.examples .reset (exampleList);
5401
5396
}
@@ -5407,14 +5402,9 @@ class ModuleContext::Private : public DefinitionContext<ModuleContext::Private>
5407
5402
if (!cache.pages )
5408
5403
{
5409
5404
TemplateList *pageList = TemplateList::alloc ();
5410
- if ( m_groupDef->getExamples ())
5405
+ for ( const auto &ex : m_groupDef->getPages ())
5411
5406
{
5412
- PageSDict::Iterator eli (*m_groupDef->getPages ());
5413
- const PageDef *ex;
5414
- for (eli.toFirst ();(ex=eli.current ());++eli)
5415
- {
5416
- pageList->append (PageContext::alloc (ex,FALSE ,TRUE ));
5417
- }
5407
+ pageList->append (PageContext::alloc (ex,FALSE ,TRUE ));
5418
5408
}
5419
5409
cache.pages .reset (pageList);
5420
5410
}
@@ -6397,9 +6387,9 @@ class NestingNodeContext::Private
6397
6387
void addPages (ClassDefSet &visitedClasses)
6398
6388
{
6399
6389
const PageDef *pd = toPageDef (m_def);
6400
- if (pd && pd->getSubPages ())
6390
+ if (pd && ! pd->getSubPages (). empty ())
6401
6391
{
6402
- m_children->addPages (* pd->getSubPages (),FALSE ,visitedClasses);
6392
+ m_children->addPages (pd->getSubPages (),FALSE ,visitedClasses);
6403
6393
}
6404
6394
}
6405
6395
void addModules (ClassDefSet &visitedClasses)
@@ -6577,19 +6567,28 @@ class NestingContext::Private : public GenericNodeListContext
6577
6567
m_index++;
6578
6568
}
6579
6569
}
6580
- void addPages (const PageSDict &pages ,bool rootOnly,ClassDefSet &visitedClasses)
6570
+ void addPage (const PageDef *pd ,bool rootOnly,ClassDefSet &visitedClasses)
6581
6571
{
6582
- SDict<PageDef>::Iterator pli (pages);
6583
- const PageDef *pd;
6584
- for (pli. toFirst ();(pd=pli. current ());++pli )
6572
+ if (!rootOnly ||
6573
+ pd-> getOuterScope ()== 0 ||
6574
+ pd-> getOuterScope ()-> definitionType ()!=Definition::TypePage )
6585
6575
{
6586
- if (!rootOnly ||
6587
- pd->getOuterScope ()==0 ||
6588
- pd->getOuterScope ()->definitionType ()!=Definition::TypePage)
6589
- {
6590
- append (NestingNodeContext::alloc (m_parent,pd,m_index,m_level,FALSE ,FALSE ,FALSE ,visitedClasses));
6591
- m_index++;
6592
- }
6576
+ append (NestingNodeContext::alloc (m_parent,pd,m_index,m_level,FALSE ,FALSE ,FALSE ,visitedClasses));
6577
+ m_index++;
6578
+ }
6579
+ }
6580
+ void addPages (const PageLinkedMap &pages,bool rootOnly,ClassDefSet &visitedClasses)
6581
+ {
6582
+ for (const auto &pd : pages)
6583
+ {
6584
+ addPage (pd.get (),rootOnly,visitedClasses);
6585
+ }
6586
+ }
6587
+ void addPages (const PageLinkedRefMap &pages,bool rootOnly,ClassDefSet &visitedClasses)
6588
+ {
6589
+ for (const auto &pd : pages)
6590
+ {
6591
+ addPage (pd,rootOnly,visitedClasses);
6593
6592
}
6594
6593
}
6595
6594
void addModules (const GroupSDict &groups,ClassDefSet &visitedClasses)
@@ -6751,7 +6750,12 @@ void NestingContext::addFiles(const FileList &files,ClassDefSet &visitedClasses)
6751
6750
p->addFiles (files,visitedClasses);
6752
6751
}
6753
6752
6754
- void NestingContext::addPages (const PageSDict &pages,bool rootOnly,ClassDefSet &visitedClasses)
6753
+ void NestingContext::addPages (const PageLinkedMap &pages,bool rootOnly,ClassDefSet &visitedClasses)
6754
+ {
6755
+ p->addPages (pages,rootOnly,visitedClasses);
6756
+ }
6757
+
6758
+ void NestingContext::addPages (const PageLinkedRefMap &pages,bool rootOnly,ClassDefSet &visitedClasses)
6755
6759
{
6756
6760
p->addPages (pages,rootOnly,visitedClasses);
6757
6761
}
@@ -7331,15 +7335,12 @@ TemplateVariant FileTreeContext::get(const char *name) const
7331
7335
class PageTreeContext ::Private
7332
7336
{
7333
7337
public:
7334
- Private (const PageSDict * pages)
7338
+ Private (const PageLinkedMap & pages)
7335
7339
{
7336
7340
m_pageTree.reset (NestingContext::alloc (0 ,0 ));
7337
7341
ClassDefSet visitedClasses;
7338
7342
// Add pages
7339
- if (pages)
7340
- {
7341
- m_pageTree->addPages (*pages,TRUE ,visitedClasses);
7342
- }
7343
+ m_pageTree->addPages (pages,TRUE ,visitedClasses);
7343
7344
7344
7345
// %% PageNodeList tree:
7345
7346
static bool init=FALSE ;
@@ -7420,7 +7421,7 @@ class PageTreeContext::Private
7420
7421
7421
7422
PropertyMapper<PageTreeContext::Private> PageTreeContext::Private::s_inst;
7422
7423
7423
- PageTreeContext::PageTreeContext (const PageSDict * pages) : RefCountedContext(" PageTreeContext" )
7424
+ PageTreeContext::PageTreeContext (const PageLinkedMap & pages) : RefCountedContext(" PageTreeContext" )
7424
7425
{
7425
7426
p = new Private (pages);
7426
7427
}
@@ -7441,24 +7442,22 @@ TemplateVariant PageTreeContext::get(const char *name) const
7441
7442
class PageListContext ::Private : public GenericNodeListContext
7442
7443
{
7443
7444
public:
7444
- void addPages (const PageSDict &pages)
7445
+ void addPages (const PageLinkedMap &pages)
7445
7446
{
7446
- PageSDict::Iterator pdi (pages);
7447
- const PageDef *pd=0 ;
7448
- for (pdi.toFirst ();(pd=pdi.current ());++pdi)
7447
+ for (const auto &pd : pages)
7449
7448
{
7450
7449
if (!pd->getGroupDef () && !pd->isReference ())
7451
7450
{
7452
- append (PageContext::alloc (pd,FALSE ,FALSE ));
7451
+ append (PageContext::alloc (pd. get () ,FALSE ,FALSE ));
7453
7452
}
7454
7453
}
7455
7454
}
7456
7455
};
7457
7456
7458
- PageListContext::PageListContext (const PageSDict * pages) : RefCountedContext(" PageListContext" )
7457
+ PageListContext::PageListContext (const PageLinkedMap & pages) : RefCountedContext(" PageListContext" )
7459
7458
{
7460
7459
p = new Private;
7461
- if (pages) p->addPages (* pages);
7460
+ p->addPages (pages);
7462
7461
}
7463
7462
7464
7463
PageListContext::~PageListContext ()
@@ -7490,16 +7489,11 @@ class ExampleListContext::Private : public GenericNodeListContext
7490
7489
public:
7491
7490
Private ()
7492
7491
{
7493
- if ( Doxygen::exampleSDict )
7492
+ for ( const auto &pd : * Doxygen::exampleLinkedMap )
7494
7493
{
7495
- PageSDict::Iterator pdi (*Doxygen::exampleSDict);
7496
- const PageDef *pd=0 ;
7497
- for (pdi.toFirst ();(pd=pdi.current ());++pdi)
7494
+ if (!pd->getGroupDef () && !pd->isReference ())
7498
7495
{
7499
- if (!pd->getGroupDef () && !pd->isReference ())
7500
- {
7501
- append (PageContext::alloc (pd,FALSE ,TRUE ));
7502
- }
7496
+ append (PageContext::alloc (pd.get (),FALSE ,TRUE ));
7503
7497
}
7504
7498
}
7505
7499
}
@@ -7796,10 +7790,7 @@ class ExampleTreeContext::Private
7796
7790
m_exampleTree.reset (NestingContext::alloc (0 ,0 ));
7797
7791
ClassDefSet visitedClasses;
7798
7792
// Add pages
7799
- if (Doxygen::exampleSDict)
7800
- {
7801
- m_exampleTree->addPages (*Doxygen::exampleSDict,TRUE ,visitedClasses);
7802
- }
7793
+ m_exampleTree->addPages (*Doxygen::exampleLinkedMap,TRUE ,visitedClasses);
7803
7794
7804
7795
static bool init=FALSE ;
7805
7796
if (!init)
@@ -10141,8 +10132,8 @@ void generateOutputViaTemplate()
10141
10132
SharedPtr<DirListContext> dirList (DirListContext::alloc ());
10142
10133
SharedPtr<FileListContext> fileList (FileListContext::alloc ());
10143
10134
SharedPtr<FileTreeContext> fileTree (FileTreeContext::alloc ());
10144
- SharedPtr<PageTreeContext> pageTree (PageTreeContext::alloc (Doxygen::pageSDict ));
10145
- SharedPtr<PageListContext> pageList (PageListContext::alloc (Doxygen::pageSDict ));
10135
+ SharedPtr<PageTreeContext> pageTree (PageTreeContext::alloc (* Doxygen::pageLinkedMap ));
10136
+ SharedPtr<PageListContext> pageList (PageListContext::alloc (* Doxygen::pageLinkedMap ));
10146
10137
SharedPtr<ExampleTreeContext> exampleTree (ExampleTreeContext::alloc ());
10147
10138
SharedPtr<ExampleListContext> exampleList (ExampleListContext::alloc ());
10148
10139
SharedPtr<ModuleTreeContext> moduleTree (ModuleTreeContext::alloc ());
@@ -10191,15 +10182,15 @@ void generateOutputViaTemplate()
10191
10182
// %% Page mainPage
10192
10183
if (Doxygen::mainPage)
10193
10184
{
10194
- SharedPtr<PageContext> mainPage (PageContext::alloc (Doxygen::mainPage,TRUE ,FALSE ));
10185
+ SharedPtr<PageContext> mainPage (PageContext::alloc (Doxygen::mainPage. get () ,TRUE ,FALSE ));
10195
10186
ctx->set (" mainPage" ,mainPage.get ());
10196
10187
}
10197
10188
else
10198
10189
{
10199
10190
// TODO: for LaTeX output index should be main... => solve in template
10200
- Doxygen::mainPage = createPageDef (" [generated]" ,1 ," index" ," " ,theTranslator->trMainPage ());
10191
+ Doxygen::mainPage. reset ( createPageDef (" [generated]" ,1 ," index" ," " ,theTranslator->trMainPage () ));
10201
10192
Doxygen::mainPage->setFileName (" index" );
10202
- SharedPtr<PageContext> mainPage (PageContext::alloc (Doxygen::mainPage,TRUE ,FALSE ));
10193
+ SharedPtr<PageContext> mainPage (PageContext::alloc (Doxygen::mainPage. get () ,TRUE ,FALSE ));
10203
10194
ctx->set (" mainPage" ,mainPage.get ());
10204
10195
}
10205
10196
// %% GlobalsIndex globalsIndex:
0 commit comments