Doxygen
Loading...
Searching...
No Matches
ModuleManager Class Reference

#include <src/moduledef.h>

Classes

struct  Private
 

Public Member Functions

void createModuleDef (const QCString &fileName, int line, int column, bool exported, const QCString &moduleName, const QCString &partitionName=QCString())
 
void clear ()
 
void addHeader (const QCString &moduleFile, int line, const QCString &headerName, bool isSystem)
 
void addImport (const QCString &moduleFile, int line, const QCString &importName, bool isExported, const QCString &partitionName=QCString())
 
void addClassToModule (const Entry *root, ClassDef *cd)
 
void addConceptToModule (const Entry *root, ConceptDef *cd)
 
void addMemberToModule (const Entry *root, MemberDef *md)
 
void addDocs (const Entry *root)
 
void addTagInfo (const QCString &moduleFile, const QCString &tagName, const QCString &clangId)
 
void addListReferences ()
 
void addMembersToMemberGroup ()
 
void distributeMemberGroupDocumentation ()
 
void findSectionsInDocumentation ()
 
void sortMemberLists ()
 
void resolvePartitions ()
 
void resolveImports ()
 
void collectExportedSymbols ()
 
void countMembers ()
 
void writeDocumentation (OutputList &ol)
 
int numDocumentedModules () const
 
const ModuleLinkedMapmodules () const
 
ModuleDefgetPrimaryInterface (const QCString &moduleName) const
 

Static Public Member Functions

static ModuleManagerinstance ()
 

Private Member Functions

 ModuleManager ()
 
 ~ModuleManager ()=default
 
void resolvePartitionsRecursively (ModuleDef *intfMod, ModuleDef *mod)
 
void collectExportedSymbolsRecursively (ModuleDef *intfMod, ModuleDef *mod)
 

Private Attributes

std::unique_ptr< Privatep
 

Detailed Description

Definition at line 109 of file moduledef.h.

Constructor & Destructor Documentation

◆ ModuleManager()

ModuleManager::ModuleManager ( )
private

Definition at line 1183 of file moduledef.cpp.

1183 : p(std::make_unique<Private>())
1184{
1185}
std::unique_ptr< Private > p
Definition moduledef.h:145

References p.

Referenced by instance(), and ~ModuleManager().

◆ ~ModuleManager()

ModuleManager::~ModuleManager ( )
privatedefault

References ModuleManager().

Member Function Documentation

◆ addClassToModule()

void ModuleManager::addClassToModule ( const Entry * root,
ClassDef * cd )

Definition at line 1253 of file moduledef.cpp.

1254{
1255 std::lock_guard lock(p->mutex);
1256 auto mod = p->moduleFileMap.find(root->fileName);
1257 if (mod)
1258 {
1259 toModuleDefImpl(mod)->addClassToModule(root,cd);
1260 auto cdm = toClassDefMutable(cd);
1261 if (cdm) cdm->setModuleDef(mod);
1262 }
1263}
QCString fileName
file this entry was extracted from
Definition entry.h:223
void addClassToModule(const Entry *root, ClassDef *cd)
ClassDefMutable * toClassDefMutable(Definition *d)
static ModuleDefImpl * toModuleDefImpl(ModuleDef *m)

References ModuleDefImpl::addClassToModule(), Entry::fileName, p, toClassDefMutable(), and toModuleDefImpl().

Referenced by addClassToContext().

◆ addConceptToModule()

void ModuleManager::addConceptToModule ( const Entry * root,
ConceptDef * cd )

Definition at line 1265 of file moduledef.cpp.

1266{
1267 std::lock_guard lock(p->mutex);
1268 auto mod = p->moduleFileMap.find(root->fileName);
1269 if (mod)
1270 {
1271 toModuleDefImpl(mod)->addConceptToModule(root,cd);
1272 auto cdm = toConceptDefMutable(cd);
1273 if (cdm) cdm->setModuleDef(mod);
1274 }
1275}
void addConceptToModule(const Entry *root, ConceptDef *cd)
ConceptDefMutable * toConceptDefMutable(Definition *d)

References ModuleDefImpl::addConceptToModule(), Entry::fileName, p, toConceptDefMutable(), and toModuleDefImpl().

Referenced by addConceptToContext().

◆ addDocs()

void ModuleManager::addDocs ( const Entry * root)

Definition at line 1483 of file moduledef.cpp.

1484{
1485 AUTO_TRACE("file={} module={}",root->fileName,root->name);
1486 if (root->doc.isEmpty() && root->brief.isEmpty()) return;
1487 if (root->name.find(':')!=-1)
1488 {
1489 warn(root->fileName,root->startLine,"Ignoring documentation for module partition %s. Please place documentation at the primary module name",
1490 qPrint(root->name));
1491 }
1492 else
1493 {
1494 auto it = p->moduleNameMap.find(root->name.str());
1495 if (it != p->moduleNameMap.end())
1496 {
1497 ModuleDef *mod = getPrimaryInterface(root->name);
1498 if (mod)
1499 {
1500 mod->setDocumentation(root->doc,root->docFile,root->docLine);
1501 mod->setBriefDescription(root->brief,root->briefFile,root->briefLine);
1502 mod->setId(root->id);
1503 mod->setHidden(root->hidden);
1504 mod->setBodySegment(root->startLine,root->bodyLine,root->endBodyLine);
1505 mod->setRefItems(root->sli);
1506 //mod->addSectionsToDefinition(root->anchors);
1507 addModuleToGroups(root,mod);
1508 }
1509 else
1510 {
1511 warn(root->fileName,root->startLine,"Found documentation for module %s but it has no primary interface unit.",qPrint(root->name));
1512 }
1513 }
1514 else
1515 {
1516 warn(root->fileName,root->startLine,"Found documentation for unknown module %s.",qPrint(root->name));
1517 }
1518 }
1519}
virtual void setBodySegment(int defLine, int bls, int ble)=0
virtual void setHidden(bool b)=0
virtual void setDocumentation(const QCString &d, const QCString &docFile, int docLine, bool stripWhiteSpace=TRUE)=0
virtual void setId(const QCString &name)=0
virtual void setBriefDescription(const QCString &b, const QCString &briefFile, int briefLine)=0
virtual void setRefItems(const RefItemVector &sli)=0
int docLine
line number at which the documentation was found
Definition entry.h:201
int endBodyLine
line number where the definition ends
Definition entry.h:218
QCString id
libclang id
Definition entry.h:231
int startLine
start line of entry in the source
Definition entry.h:224
QCString name
member name
Definition entry.h:174
QCString briefFile
file in which the brief desc. was found
Definition entry.h:205
int bodyLine
line number of the body in the source
Definition entry.h:216
QCString doc
documentation block (partly parsed)
Definition entry.h:200
RefItemVector sli
special lists (test/todo/bug/deprecated/..) this entry is in
Definition entry.h:226
QCString docFile
file in which the documentation was found
Definition entry.h:202
bool hidden
does this represent an entity that is hidden from the output
Definition entry.h:228
QCString brief
brief description (doc block)
Definition entry.h:203
int briefLine
line number at which the brief desc. was found
Definition entry.h:204
ModuleDef * getPrimaryInterface(const QCString &moduleName) const
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
const std::string & str() const
Definition qcstring.h:526
#define AUTO_TRACE(...)
Definition docnode.cpp:46
void addModuleToGroups(const Entry *root, ModuleDef *mod)
#define warn(file, line, fmt,...)
Definition message.h:59
const char * qPrint(const char *s)
Definition qcstring.h:661

References addModuleToGroups(), AUTO_TRACE, Entry::bodyLine, Entry::brief, Entry::briefFile, Entry::briefLine, Entry::doc, Entry::docFile, Entry::docLine, Entry::endBodyLine, Entry::fileName, QCString::find(), getPrimaryInterface(), Entry::hidden, Entry::id, QCString::isEmpty(), Entry::name, p, qPrint(), DefinitionMutable::setBodySegment(), DefinitionMutable::setBriefDescription(), DefinitionMutable::setDocumentation(), DefinitionMutable::setHidden(), DefinitionMutable::setId(), DefinitionMutable::setRefItems(), Entry::sli, Entry::startLine, QCString::str(), and warn.

Referenced by findModuleDocumentation().

◆ addHeader()

void ModuleManager::addHeader ( const QCString & moduleFile,
int line,
const QCString & headerName,
bool isSystem )

Definition at line 1218 of file moduledef.cpp.

1219{
1220 AUTO_TRACE("{}:{} headerName={} isSystem={}",moduleFile,line,headerName,isSystem);
1221 std::lock_guard lock(p->mutex);
1222 auto mod = p->moduleFileMap.find(moduleFile);
1223 if (mod)
1224 {
1225 toModuleDefImpl(mod)->addHeader(line,headerName,isSystem);
1226 }
1227 else
1228 {
1229 AUTO_TRACE_ADD("imported header '{}' found in file '{}' that is not a module",headerName,moduleFile);
1230 }
1231 p->headers.emplace_back(moduleFile,headerName,isSystem);
1232}
void addHeader(int line, const QCString &headerName, bool isSystem)
#define AUTO_TRACE_ADD(...)
Definition docnode.cpp:47

References ModuleDefImpl::addHeader(), AUTO_TRACE, AUTO_TRACE_ADD, p, and toModuleDefImpl().

◆ addImport()

void ModuleManager::addImport ( const QCString & moduleFile,
int line,
const QCString & importName,
bool isExported,
const QCString & partitionName = QCString() )

Definition at line 1234 of file moduledef.cpp.

1236{
1237 AUTO_TRACE("{}:{} importName={},isExported={},partitionName={}",
1238 moduleFile,line,importName,isExported,partitionName);
1239 std::lock_guard lock(p->mutex);
1240 auto mod = p->moduleFileMap.find(moduleFile);
1241 if (mod) // import inside a module
1242 {
1243 AUTO_TRACE_ADD("in module");
1244 toModuleDefImpl(mod)->addImport(line,importName.isEmpty()?mod->name():importName,partitionName,isExported);
1245 }
1246 else // import outside of a module
1247 {
1248 AUTO_TRACE_ADD("outside module");
1249 p->externalImports.emplace(moduleFile.str(),ImportInfo(nullptr,importName,line,partitionName));
1250 }
1251}
void addImport(int line, const QCString &moduleName, const QCString &partitionName, bool isExported)

References ModuleDefImpl::addImport(), AUTO_TRACE, AUTO_TRACE_ADD, QCString::isEmpty(), p, QCString::str(), and toModuleDefImpl().

◆ addListReferences()

void ModuleManager::addListReferences ( )

Definition at line 1537 of file moduledef.cpp.

1538{
1539 for (auto &mod : p->moduleFileMap) // foreach module
1540 {
1541 if (mod->isPrimaryInterface()) toModuleDefImpl(mod)->addListReferences();
1542 }
1543}
void addListReferences()

References ModuleDefImpl::addListReferences(), p, and toModuleDefImpl().

Referenced by addListReferences().

◆ addMembersToMemberGroup()

void ModuleManager::addMembersToMemberGroup ( )

Definition at line 1545 of file moduledef.cpp.

1546{
1547 for (auto &mod : p->moduleFileMap) // foreach module
1548 {
1549 if (mod->isPrimaryInterface()) toModuleDefImpl(mod)->addMembersToMemberGroup();
1550 }
1551}
void addMembersToMemberGroup()

References ModuleDefImpl::addMembersToMemberGroup(), p, and toModuleDefImpl().

Referenced by addMembersToMemberGroup().

◆ addMemberToModule()

void ModuleManager::addMemberToModule ( const Entry * root,
MemberDef * md )

Definition at line 1277 of file moduledef.cpp.

1278{
1279 std::lock_guard lock(p->mutex);
1280 auto mod = p->moduleFileMap.find(root->fileName);
1281 if (mod && root->exported)
1282 {
1283 toModuleDefImpl(mod)->addMemberToModule(root,md);
1284 auto mdm = toMemberDefMutable(md);
1285 if (mdm) mdm->setModuleDef(mod);
1286 }
1287}
bool exported
is the symbol exported from a C++20 module
Definition entry.h:189
void addMemberToModule(const Entry *root, MemberDef *md)
MemberDefMutable * toMemberDefMutable(Definition *d)

References ModuleDefImpl::addMemberToModule(), Entry::exported, Entry::fileName, p, toMemberDefMutable(), and toModuleDefImpl().

Referenced by addDefineDoc(), addEnumDocs(), addMemberDocs(), addVariableToClass(), addVariableToFile(), findEnums(), and findMember().

◆ addTagInfo()

void ModuleManager::addTagInfo ( const QCString & moduleFile,
const QCString & tagName,
const QCString & clangId )

Definition at line 1289 of file moduledef.cpp.

1290{
1291 std::lock_guard lock(p->mutex);
1292 auto mod = p->moduleFileMap.find(fileName);
1293 if (mod)
1294 {
1295 ModuleDefImpl *modi = toModuleDefImpl(mod);
1296 modi->setReference(tagFile);
1297 modi->setId(clangId);
1298 }
1299}
void setId(const QCString &name) override
void setReference(const QCString &r) override

References p, DefinitionMixin< Base >::setId(), DefinitionMixin< Base >::setReference(), and toModuleDefImpl().

◆ clear()

void ModuleManager::clear ( )

Definition at line 1209 of file moduledef.cpp.

1210{
1211 std::lock_guard lock(p->mutex);
1212 p->headers.clear();
1213 p->externalImports.clear();
1214 p->moduleNameMap.clear();
1215 p->moduleFileMap.clear();
1216}

References p.

Referenced by cleanUpDoxygen().

◆ collectExportedSymbols()

void ModuleManager::collectExportedSymbols ( )

Definition at line 1418 of file moduledef.cpp.

1419{
1420 AUTO_TRACE();
1421 for (auto &mod : p->moduleFileMap) // foreach module
1422 {
1423 if (mod->isPrimaryInterface()) // that is a primary interface
1424 {
1425 for (auto &[partitionName,partitionMod] : mod->partitions())
1426 {
1427 collectExportedSymbolsRecursively(mod.get(),partitionMod);
1428 }
1429
1430 // collect all files that contribute to this module (e.g. implementation/partition modules)
1431 auto it = p->moduleNameMap.find(mod->name().str());
1432 if (it != p->moduleNameMap.end())
1433 {
1434 for (auto contributingMod : it->second)
1435 {
1436 AUTO_TRACE_ADD(" adding contributing module {} to interface module {} type={} partition={} isPrimaryIntf={}",
1437 contributingMod->qualifiedName(),
1438 mod->name(),
1439 contributingMod->moduleType()==ModuleDef::Type::Interface ? "Interface" : "Implementation",
1440 contributingMod->partitionName(),
1441 contributingMod->isPrimaryInterface());
1443 }
1444 }
1445 }
1446 }
1447}
void addContributingModule(ModuleDefImpl *mod)
void collectExportedSymbolsRecursively(ModuleDef *intfMod, ModuleDef *mod)

References ModuleDefImpl::addContributingModule(), AUTO_TRACE, AUTO_TRACE_ADD, collectExportedSymbolsRecursively(), ModuleDef::Interface, p, and toModuleDefImpl().

◆ collectExportedSymbolsRecursively()

void ModuleManager::collectExportedSymbolsRecursively ( ModuleDef * intfMod,
ModuleDef * mod )
private

Definition at line 1410 of file moduledef.cpp.

1411{
1412 AUTO_TRACE("{}: collecting symbols for partition {}",intfMod->qualifiedName(),partitionMod->qualifiedName());
1413 auto intfModImpl = toModuleDefImpl(intfMod);
1414 auto partitionModImpl = toModuleDefImpl(partitionMod);
1415 intfModImpl->mergeSymbolsFrom(partitionModImpl);
1416}
virtual QCString qualifiedName() const =0

References AUTO_TRACE, Definition::qualifiedName(), and toModuleDefImpl().

Referenced by collectExportedSymbols().

◆ countMembers()

void ModuleManager::countMembers ( )

Definition at line 1449 of file moduledef.cpp.

1450{
1451 for (auto &mod : p->moduleFileMap) // foreach module
1452 {
1454 }
1455}
void countMembers()

References ModuleDefImpl::countMembers(), p, and toModuleDefImpl().

◆ createModuleDef()

void ModuleManager::createModuleDef ( const QCString & fileName,
int line,
int column,
bool exported,
const QCString & moduleName,
const QCString & partitionName = QCString() )

Definition at line 1187 of file moduledef.cpp.

1189{
1190 AUTO_TRACE("{}:{}: Found module name='{}' partition='{}' exported='{}'",
1191 fileName,line,moduleName,partitionName,exported);
1192 std::lock_guard lock(p->mutex);
1194 std::unique_ptr<ModuleDef> modDef = std::make_unique<ModuleDefImpl>(fileName,line,column,moduleName,mt,partitionName);
1195 auto mod = p->moduleFileMap.add(fileName,std::move(modDef));
1196 auto it = p->moduleNameMap.find(moduleName.str());
1197 if (it == p->moduleNameMap.end())
1198 {
1199 ModuleList ml;
1200 ml.push_back(mod);
1201 p->moduleNameMap.emplace(moduleName.str(),ml);
1202 }
1203 else
1204 {
1205 it->second.push_back(mod);
1206 }
1207}

References AUTO_TRACE, ModuleDef::Implementation, ModuleDef::Interface, p, and QCString::str().

◆ distributeMemberGroupDocumentation()

void ModuleManager::distributeMemberGroupDocumentation ( )

Definition at line 1553 of file moduledef.cpp.

1554{
1555 for (auto &mod : p->moduleFileMap) // foreach module
1556 {
1557 if (mod->isPrimaryInterface()) toModuleDefImpl(mod)->distributeMemberGroupDocumentation();
1558 }
1559}
void distributeMemberGroupDocumentation()

References ModuleDefImpl::distributeMemberGroupDocumentation(), p, and toModuleDefImpl().

Referenced by distributeMemberGroupDocumentation().

◆ findSectionsInDocumentation()

void ModuleManager::findSectionsInDocumentation ( )

Definition at line 1561 of file moduledef.cpp.

1562{
1563 for (auto &mod : p->moduleFileMap) // foreach module
1564 {
1565 if (mod->isPrimaryInterface()) toModuleDefImpl(mod)->findSectionsInDocumentation();
1566 }
1567}
void findSectionsInDocumentation()

References ModuleDefImpl::findSectionsInDocumentation(), p, and toModuleDefImpl().

Referenced by findSectionsInDocumentation().

◆ getPrimaryInterface()

ModuleDef * ModuleManager::getPrimaryInterface ( const QCString & moduleName) const

Definition at line 1521 of file moduledef.cpp.

1522{
1523 auto it = p->moduleNameMap.find(moduleName.str());
1524 if (it != p->moduleNameMap.end())
1525 {
1526 for (auto &mod : it->second)
1527 {
1528 if (mod->isPrimaryInterface())
1529 {
1530 return mod;
1531 }
1532 }
1533 }
1534 return nullptr;
1535}

References p, and QCString::str().

Referenced by addDocs(), resolveImports(), ModuleDefImpl::writeExports(), writeExports(), and FileDefImpl::writeIncludeFiles().

◆ instance()

◆ modules()

const ModuleLinkedMap & ModuleManager::modules ( ) const

Definition at line 1478 of file moduledef.cpp.

1479{
1480 return p->moduleFileMap;
1481}

References p.

◆ numDocumentedModules()

int ModuleManager::numDocumentedModules ( ) const

Definition at line 1468 of file moduledef.cpp.

1469{
1470 int count=0;
1471 for (auto &mod : p->moduleFileMap) // foreach module
1472 {
1473 if (mod->isPrimaryInterface()) count++;
1474 }
1475 return count;
1476}

References p.

Referenced by Index::countDataStructures().

◆ resolveImports()

void ModuleManager::resolveImports ( )

Definition at line 1367 of file moduledef.cpp.

1368{
1369 AUTO_TRACE();
1370 for (auto &mod : p->moduleFileMap)
1371 {
1372 FileDef *fd = mod->getFileDef();
1373 if (fd)
1374 {
1375 for (const auto &[fileName,importInfo] : mod->getImports())
1376 {
1377 ModuleDef *importedModule = getPrimaryInterface(importInfo.importName);
1378 const FileDef *importedFd = importedModule ? importedModule->getFileDef() : nullptr;
1379 AUTO_TRACE_ADD("module: addIncludeDependency {}->{}:{} fd={}",
1380 mod->qualifiedName(), importInfo.qualifiedName(), importInfo.line, fd?fd->absFilePath():"");
1381 fd->addIncludeDependency(importedFd,importInfo.qualifiedName(),IncludeKind::ImportModule);
1382 }
1383 }
1384 }
1385 for (const auto &[fileName,importInfo] : p->externalImports)
1386 {
1387 bool ambig = false;
1388 FileDef *fd = findFileDef(Doxygen::inputNameLinkedMap,QCString(fileName),ambig);
1389 if (fd)
1390 {
1391 ModuleDef *mod = getPrimaryInterface(importInfo.importName);
1392 FileDef *importedFd = mod ? mod->getFileDef() : nullptr;
1393 fd->addIncludeDependency(importedFd,importInfo.importName,IncludeKind::ImportModule);
1394 }
1395 }
1396 for (const auto &headerInfo : p->headers)
1397 {
1398 bool ambig = false;
1399 FileDef *fd = findFileDef(Doxygen::inputNameLinkedMap,headerInfo.fileName,ambig);
1400 if (fd)
1401 {
1402 QCString resolvedHeader = determineAbsoluteIncludeName(headerInfo.fileName,headerInfo.headerName);
1403 FileDef *importFd = findFileDef(Doxygen::inputNameLinkedMap,resolvedHeader,ambig);
1404 fd->addIncludeDependency(importFd, headerInfo.headerName,
1405 headerInfo.isSystem ? IncludeKind::ImportSystem : IncludeKind::ImportLocal);
1406 }
1407 }
1408}
static FileNameLinkedMap * inputNameLinkedMap
Definition doxygen.h:105
virtual QCString absFilePath() const =0
virtual void addIncludeDependency(const FileDef *fd, const QCString &incName, IncludeKind kind)=0
virtual FileDef * getFileDef() const =0
@ ImportLocal
Definition filedef.h:54
@ ImportModule
Definition filedef.h:55
@ ImportSystem
Definition filedef.h:53
QCString determineAbsoluteIncludeName(const QCString &curFile, const QCString &incFileName)
Definition util.cpp:3954
FileDef * findFileDef(const FileNameLinkedMap *fnMap, const QCString &n, bool &ambig)
Definition util.cpp:3262

References FileDef::absFilePath(), FileDef::addIncludeDependency(), AUTO_TRACE, AUTO_TRACE_ADD, determineAbsoluteIncludeName(), findFileDef(), ModuleDef::getFileDef(), getPrimaryInterface(), ImportLocal, ImportModule, ImportSystem, Doxygen::inputNameLinkedMap, p, and Definition::qualifiedName().

◆ resolvePartitions()

void ModuleManager::resolvePartitions ( )

Definition at line 1337 of file moduledef.cpp.

1338{
1339 AUTO_TRACE();
1340 for (auto &mod : p->moduleFileMap) // foreach module
1341 {
1342 if (mod->moduleType()==ModuleDef::Type::Interface && mod->partitionName().isEmpty())
1343 { // that is a primary interface
1344 resolvePartitionsRecursively(mod.get(),mod.get());
1345 }
1346
1347 // copy exported imports to m_exportedModules
1348 for (const auto &[fileName,importInfo] : mod->getImports())
1349 {
1350 if (importInfo.exported && mod->name()!=importInfo.importName)
1351 {
1352 toModuleDefImpl(mod)->addExportedModule(importInfo.importName,importInfo);
1353 }
1354 }
1355
1356 // also link the ModuleDef and FileDef together
1357 bool ambig = false;
1358 FileDef *fd = findFileDef(Doxygen::inputNameLinkedMap,mod->getDefFileName(),ambig);
1359 if (fd)
1360 {
1361 fd->setModuleDef(mod.get());
1362 toModuleDefImpl(mod)->setFileDef(fd);
1363 }
1364 }
1365}
virtual void setModuleDef(ModuleDef *mod)=0
void addExportedModule(const QCString &moduleName, const ImportInfo &info)
void setFileDef(FileDef *fd)
void resolvePartitionsRecursively(ModuleDef *intfMod, ModuleDef *mod)

References ModuleDefImpl::addExportedModule(), AUTO_TRACE, findFileDef(), Doxygen::inputNameLinkedMap, ModuleDef::Interface, p, resolvePartitionsRecursively(), ModuleDefImpl::setFileDef(), FileDef::setModuleDef(), and toModuleDefImpl().

◆ resolvePartitionsRecursively()

void ModuleManager::resolvePartitionsRecursively ( ModuleDef * intfMod,
ModuleDef * mod )
private

Definition at line 1301 of file moduledef.cpp.

1302{
1303 AUTO_TRACE();
1304 for (auto &[partitionFileName,importInfo] : mod->getImports()) // foreach import
1305 {
1306 AUTO_TRACE_ADD("partitionFileName={} importName={} partitionName={}",
1307 partitionFileName,importInfo.importName,importInfo.partitionName);
1308 if (importInfo.importName==intfMod->name() && !importInfo.partitionName.isEmpty() &&
1309 importInfo.exported) // that is an exported partition of this module
1310 {
1311 auto it = p->moduleNameMap.find(importInfo.importName.str());
1312 if (it != p->moduleNameMap.end())
1313 {
1314 for (auto importedMod : it->second)
1315 {
1316 if (importedMod->qualifiedName()==importInfo.importName+":"+importInfo.partitionName)
1317 {
1318 AUTO_TRACE_ADD("Interface module {} exports partition {}:{}",
1319 mod->name(),importedMod->name(),importedMod->partitionName());
1320 toModuleDefImpl(intfMod)->addPartition(toModuleDefImpl(importedMod));
1321 toModuleDefImpl(importedMod)->setPrimaryInterface(intfMod);
1322 for (const auto &[partitionFileName_,partitionImportInfo] : importedMod->getImports())
1323 {
1324 if (partitionImportInfo.exported && intfMod->name()!=partitionImportInfo.importName)
1325 {
1326 toModuleDefImpl(intfMod)->addExportedModule(partitionImportInfo.importName,partitionImportInfo);
1327 }
1328 }
1329 resolvePartitionsRecursively(intfMod,importedMod);
1330 }
1331 }
1332 }
1333 }
1334 }
1335}
virtual const QCString & name() const =0
virtual const ImportInfoMap & getImports() const =0
void addPartition(ModuleDefImpl *mod)
void setPrimaryInterface(const ModuleDef *mod)

References ModuleDefImpl::addExportedModule(), ModuleDefImpl::addPartition(), AUTO_TRACE, AUTO_TRACE_ADD, ModuleDef::getImports(), QCString::isEmpty(), Definition::name(), p, resolvePartitionsRecursively(), ModuleDefImpl::setPrimaryInterface(), and toModuleDefImpl().

Referenced by resolvePartitions(), and resolvePartitionsRecursively().

◆ sortMemberLists()

void ModuleManager::sortMemberLists ( )

Definition at line 1569 of file moduledef.cpp.

1570{
1571 for (auto &mod : p->moduleFileMap) // foreach module
1572 {
1573 if (mod->isPrimaryInterface()) toModuleDefImpl(mod)->sortMemberLists();
1574 }
1575}
void sortMemberLists()

References p, ModuleDefImpl::sortMemberLists(), and toModuleDefImpl().

Referenced by sortMemberLists().

◆ writeDocumentation()

void ModuleManager::writeDocumentation ( OutputList & ol)

Definition at line 1457 of file moduledef.cpp.

1458{
1459 for (auto &mod : p->moduleFileMap) // foreach module
1460 {
1461 if (mod->isPrimaryInterface())
1462 {
1463 mod->writeDocumentation(ol);
1464 }
1465 }
1466}

References p.

Referenced by generateOutput().

Member Data Documentation

◆ p


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