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

#include <src/namespacedef.h>

+ Inheritance diagram for NamespaceLinkedRefMap:
+ Collaboration diagram for NamespaceLinkedRefMap:

Public Member Functions

void writeDeclaration (OutputList &ol, const QCString &title, bool isConstantGroup=false, bool localName=FALSE)
 
bool declVisible (bool isContantGroup) const
 
- Public Member Functions inherited from LinkedRefMap< const NamespaceDef >
const const NamespaceDeffind (const std::string &key) const
 find an object given the key.
 
const const NamespaceDeffind (const QCString &key) const
 find an object given the key.
 
const const NamespaceDeffind (const char *key) const
 find an object given the key.
 
const NamespaceDeffind (const char *key)
 non-const wrapper for find() const
 
const NamespaceDeffind (const QCString &key)
 
const NamespaceDeffind (const std::string &key)
 non-const wrapper for find() const
 
bool add (const char *k, const NamespaceDef *obj)
 Adds an object reference to the ordered vector if it was not added already.
 
bool add (const QCString &k, const NamespaceDef *obj)
 
bool prepend (const char *k, const NamespaceDef *obj)
 Prepends an object reference to the ordered vector if it was not added already.
 
bool prepend (const QCString &key, const NamespaceDef *obj)
 
bool del (const QCString &key)
 Removes an object from the container and deletes it.
 
Ptroperator[] (size_t pos)
 
const Ptroperator[] (size_t pos) const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
bool empty () const
 
size_t size () const
 
void clear ()
 

Additional Inherited Members

- Public Types inherited from LinkedRefMap< const NamespaceDef >
using Ptr
 
using Vec
 
using iterator
 
using const_iterator
 
using reverse_iterator
 
using const_reverse_iterator
 

Detailed Description

Definition at line 45 of file namespacedef.h.

Member Function Documentation

◆ declVisible()

bool NamespaceLinkedRefMap::declVisible ( bool isContantGroup) const

Definition at line 1345 of file namespacedef.cpp.

1346{
1347 bool found=false;
1348 for (const auto &nd : *this)
1349 {
1350 if (nd->isLinkable() && nd->hasDocumentation())
1351 {
1352 SrcLangExt lang = nd->getLanguage();
1353 if (SrcLangExt::IDL==lang)
1354 {
1355 if (isConstantGroup == nd->isConstantGroup())
1356 {
1357 found=true;
1358 break;
1359 }
1360 }
1361 else if (!isConstantGroup) // ensure we only get extra section in IDL
1362 {
1363 if (nd->isConstantGroup())
1364 {
1365 err("Internal inconsistency: constant group but not IDL?\n");
1366 }
1367 found=true;
1368 break;
1369 }
1370 }
1371 }
1372 return found;
1373}
#define err(fmt,...)
Definition message.h:84
SrcLangExt
Language as given by extension.
Definition types.h:42
bool found
Definition util.cpp:984

References err, found, and IDL.

Referenced by writeDeclaration().

◆ writeDeclaration()

void NamespaceLinkedRefMap::writeDeclaration ( OutputList & ol,
const QCString & title,
bool isConstantGroup = false,
bool localName = FALSE )

Definition at line 1375 of file namespacedef.cpp.

1377{
1378
1379
1380 if (empty()) return; // no namespaces in the list
1381
1382 if (Config_getBool(OPTIMIZE_OUTPUT_VHDL)) return;
1383
1384 if (!declVisible(isConstantGroup)) return;
1385
1386 // write list of namespaces
1387 ol.startMemberHeader(isConstantGroup ? "constantgroups" : "namespaces");
1388 //bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
1389 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
1390 ol.parseText(title);
1391 ol.endMemberHeader();
1392 ol.startMemberList();
1393 for (const auto &nd : *this)
1394 {
1395 if (nd->isLinkable() && nd->hasDocumentation())
1396 {
1397 SrcLangExt lang = nd->getLanguage();
1398 if (lang==SrcLangExt::IDL && (isConstantGroup != nd->isConstantGroup()))
1399 continue; // will be output in another pass, see layout_default.xml
1402 QCString ct = nd->compoundTypeString();
1403 ol.docify(ct);
1404 ol.docify(" ");
1405 ol.insertMemberAlign();
1406 QCString name;
1407 if (localName)
1408 {
1409 name = nd->localName();
1410 }
1411 else
1412 {
1413 name = nd->displayName();
1414 }
1415 ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),QCString(),name);
1417 if (!nd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
1418 {
1419 ol.startMemberDescription(nd->getOutputFileBase());
1420 ol.generateDoc(nd->briefFile(),nd->briefLine(),nd,nullptr,nd->briefDescription(),FALSE,FALSE,
1421 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
1423 }
1424 ol.endMemberDeclaration(QCString(),QCString());
1425 }
1426 }
1427 ol.endMemberList();
1428}
bool declVisible(bool isContantGroup) const
void startMemberDeclaration()
Definition outputlist.h:570
void endMemberDescription()
Definition outputlist.h:568
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
Definition outputlist.h:440
void startMemberDescription(const QCString &anchor, const QCString &inheritId=QCString(), bool typ=false)
Definition outputlist.h:566
void docify(const QCString &s)
Definition outputlist.h:438
void startMemberList()
Definition outputlist.h:482
void endMemberItem(OutputGenerator::MemberItemType type)
Definition outputlist.h:496
void endMemberList()
Definition outputlist.h:484
void generateDoc(const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
void insertMemberAlign(bool templ=FALSE)
Definition outputlist.h:518
void endMemberDeclaration(const QCString &anchor, const QCString &inheritId)
Definition outputlist.h:572
void endMemberHeader()
Definition outputlist.h:472
void startMemberItem(const QCString &anchor, OutputGenerator::MemberItemType type, const QCString &id=QCString())
Definition outputlist.h:494
void parseText(const QCString &textStr)
void startMemberHeader(const QCString &anchor, int typ=2)
Definition outputlist.h:470
#define Config_getBool(name)
Definition config.h:33
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34

References Config_getBool, declVisible(), OutputList::docify(), LinkedRefMap< const NamespaceDef >::empty(), OutputList::endMemberDeclaration(), OutputList::endMemberDescription(), OutputList::endMemberHeader(), OutputList::endMemberItem(), OutputList::endMemberList(), FALSE, OutputList::generateDoc(), IDL, OutputList::insertMemberAlign(), OutputGenerator::Normal, OutputList::parseText(), OutputList::startMemberDeclaration(), OutputList::startMemberDescription(), OutputList::startMemberHeader(), OutputList::startMemberItem(), OutputList::startMemberList(), TRUE, and OutputList::writeObjectLink().


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