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

#include <src/classlist.h>

+ Inheritance diagram for ClassLinkedRefMap:
+ Collaboration diagram for ClassLinkedRefMap:

Public Member Functions

bool declVisible (const ClassDef::CompoundType *filter=nullptr) const
 
void writeDeclaration (OutputList &ol, const ClassDef::CompoundType *filter, const QCString &header, bool localNames) const
 
void writeDocumentation (OutputList &ol, const Definition *container=nullptr) const
 
- Public Member Functions inherited from LinkedRefMap< ClassDef >
const ClassDeffind (const std::string &key) const
 find an object given the key.
 
const ClassDeffind (const QCString &key) const
 find an object given the key.
 
const ClassDeffind (const char *key) const
 find an object given the key.
 
ClassDeffind (const char *key)
 non-const wrapper for find() const
 
ClassDeffind (const QCString &key)
 
ClassDeffind (const std::string &key)
 non-const wrapper for find() const
 
bool add (const char *k, ClassDef *obj)
 Adds an object reference to the ordered vector if it was not added already.
 
bool add (const QCString &k, ClassDef *obj)
 
bool prepend (const char *k, ClassDef *obj)
 Prepends an object reference to the ordered vector if it was not added already.
 
bool prepend (const QCString &key, ClassDef *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< ClassDef >
using Ptr
 
using Vec
 
using iterator
 
using const_iterator
 
using reverse_iterator
 
using const_reverse_iterator
 

Detailed Description

Definition at line 30 of file classlist.h.

Member Function Documentation

◆ declVisible()

bool ClassLinkedRefMap::declVisible ( const ClassDef::CompoundType * filter = nullptr) const

Definition at line 29 of file classlist.cpp.

30{
31 bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
32 bool extractLocalClasses = Config_getBool(EXTRACT_LOCAL_CLASSES);
33 for (const auto &cd : *this)
34 {
35 if (!cd->isAnonymous() &&
36 (filter==nullptr || *filter==cd->compoundType())
37 )
38 {
39 bool isLink = cd->isLinkable();
40 if (isLink ||
41 (!hideUndocClasses &&
42 (!cd->isLocal() || extractLocalClasses)
43 )
44 )
45 {
46 return true;
47 }
48 }
49 }
50 return false;
51}
#define Config_getBool(name)
Definition config.h:33

References Config_getBool.

◆ writeDeclaration()

void ClassLinkedRefMap::writeDeclaration ( OutputList & ol,
const ClassDef::CompoundType * filter,
const QCString & header,
bool localNames ) const

Definition at line 53 of file classlist.cpp.

55{
56 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
57 bool found=FALSE;
58 for (const auto &cd : *this)
59 {
60 //printf(" ClassLinkedRefMap::writeDeclaration for %s\n",cd->name().data());
61 if (!cd->isAnonymous() &&
62 !cd->isExtension() &&
63 (cd->protection()!=Protection::Private || extractPrivate) &&
64 (filter==nullptr || *filter==cd->compoundType())
65 )
66 {
67 //printf("writeDeclarationLink()\n");
68 cd->writeDeclarationLink(ol,found,header,localNames);
69 }
70 }
71 if (found) ol.endMemberList();
72}
void endMemberList()
Definition outputlist.h:484
#define FALSE
Definition qcstring.h:34
@ Private
Definition types.h:26
bool found
Definition util.cpp:984

References Config_getBool, OutputList::endMemberList(), FALSE, found, and Private.

Referenced by FileDefImpl::writeClassDeclarations(), and NamespaceDefImpl::writeClassDeclarations().

◆ writeDocumentation()

void ClassLinkedRefMap::writeDocumentation ( OutputList & ol,
const Definition * container = nullptr ) const

Definition at line 74 of file classlist.cpp.

75{
76 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
77
78 bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
79 bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
80 if (!inlineGroupedClasses && !inlineSimpleClasses) return;
81
82 bool found=FALSE;
83
84 for (const auto &cd : *this)
85 {
86 //printf("%s:writeDocumentation() %p linkable=%d embedded=%d container=%p partOfGroups=%zu\n",
87 // cd->name().data(),cd->getOuterScope(),cd->isLinkableInProject(),cd->isEmbeddedInOuterScope(),
88 // container,cd->partOfGroups()->size());
89
90 if (!cd->isAnonymous() &&
91 cd->isLinkableInProject() &&
92 cd->isEmbeddedInOuterScope() &&
93 !cd->isAlias() &&
94 (container==nullptr || cd->partOfGroups().empty()) // if container==nullptr -> show as part of the group docs, otherwise only show if not part of a group
95 )
96 {
97 //printf(" showing class %s\n",cd->name().data());
98 if (!found)
99 {
100 ol.writeRuler();
101 ol.startGroupHeader();
104 ol.endGroupHeader();
105 found=TRUE;
106 }
107 cd->writeInlineDocumentation(ol);
108 }
109 }
110}
void startGroupHeader(int extraLevels=0)
Definition outputlist.h:454
void writeRuler()
Definition outputlist.h:522
void endGroupHeader(int extraLevels=0)
Definition outputlist.h:456
void parseText(const QCString &textStr)
virtual QCString trClassDocumentation()=0
virtual QCString trTypeDocumentation()=0
Translator * theTranslator
Definition language.cpp:71
#define TRUE
Definition qcstring.h:37

References Config_getBool, OutputList::endGroupHeader(), FALSE, found, OutputList::parseText(), Definition::partOfGroups(), OutputList::startGroupHeader(), theTranslator, TRUE, and OutputList::writeRuler().


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