Doxygen
Loading...
Searching...
No Matches
conceptdef.h File Reference
#include <memory>
#include "definition.h"
#include "filedef.h"
Include dependency graph for conceptdef.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ConceptDef
struct  ConceptDef::Part
class  ConceptDefMutable
class  ConceptLinkedMap
class  ConceptLinkedRefMap

Functions

std::unique_ptr< ConceptDefcreateConceptDef (const QCString &fileName, int startLine, int startColumn, const QCString &name, const QCString &tagRef=QCString(), const QCString &tagFile=QCString())
std::unique_ptr< ConceptDefcreateConceptDefAlias (const Definition *newScope, const ConceptDef *cd)
ConceptDeftoConceptDef (Definition *d)
ConceptDeftoConceptDef (DefinitionMutable *d)
const ConceptDeftoConceptDef (const Definition *d)
ConceptDefMutabletoConceptDefMutable (Definition *d)
ConceptDefgetConcept (const QCString &key)
ConceptDefMutablegetConceptMutable (const QCString &key)
ConceptDefgetResolvedConcept (const Definition *scope, const QCString &name)

Function Documentation

◆ createConceptDef()

std::unique_ptr< ConceptDef > createConceptDef ( const QCString & fileName,
int startLine,
int startColumn,
const QCString & name,
const QCString & tagRef = QCString(),
const QCString & tagFile = QCString() )

Definition at line 96 of file conceptdef.cpp.

99{
100 return std::make_unique<ConceptDefImpl>(fileName,startLine,startColumn,name,tagRef,tagFile);
101}

Referenced by ConceptDefMutable::addCodePart(), and addConceptToContext().

◆ createConceptDefAlias()

std::unique_ptr< ConceptDef > createConceptDefAlias ( const Definition * newScope,
const ConceptDef * cd )

Definition at line 157 of file conceptdef.cpp.

158{
159 return std::make_unique<ConceptDefAliasImpl>(newScope,cd);
160}

Referenced by ConceptDefMutable::addCodePart().

◆ getConcept()

ConceptDef * getConcept ( const QCString & key)

Definition at line 871 of file conceptdef.cpp.

872{
873 if (n.isEmpty()) return nullptr;
874 return Doxygen::conceptLinkedMap->find(n);
875}
static ConceptLinkedMap * conceptLinkedMap
Definition doxygen.h:97

References Doxygen::conceptLinkedMap, and QCString::isEmpty().

Referenced by getConceptMutable(), getResolvedConcept(), linkifyText(), and resolveLink().

◆ getConceptMutable()

ConceptDefMutable * getConceptMutable ( const QCString & key)
inline

Definition at line 106 of file conceptdef.h.

107{
108 return toConceptDefMutable(getConcept(key));
109}
ConceptDefMutable * toConceptDefMutable(Definition *d)
ConceptDef * getConcept(const QCString &key)

References getConcept(), and toConceptDefMutable().

Referenced by addConceptToContext().

◆ getResolvedConcept()

ConceptDef * getResolvedConcept ( const Definition * scope,
const QCString & name )

Definition at line 877 of file conceptdef.cpp.

878{
879 ConceptDef *cd=nullptr;
880 while (d && d!=Doxygen::globalScope)
881 {
882 cd = getConcept(d->name()+"::"+name);
883 if (cd) return cd;
884 d = d->getOuterScope();
885 }
886 cd = getConcept(name);
887 return cd;
888}
virtual Definition * getOuterScope() const =0
static NamespaceDefMutable * globalScope
Definition doxygen.h:120
ConceptDef * getConcept(const QCString &n)

References getConcept(), Definition::getOuterScope(), Doxygen::globalScope, and Definition::name().

Referenced by generateClassOrGlobalLink().

◆ toConceptDef() [1/3]

const ConceptDef * toConceptDef ( const Definition * d)

Definition at line 845 of file conceptdef.cpp.

846{
847 if (d && (typeid(*d)==typeid(ConceptDefImpl) || typeid(*d)==typeid(ConceptDefAliasImpl)))
848 {
849 return static_cast<const ConceptDef*>(d);
850 }
851 else
852 {
853 return nullptr;
854 }
855}

◆ toConceptDef() [2/3]

ConceptDef * toConceptDef ( Definition * d)

Definition at line 820 of file conceptdef.cpp.

821{
822 if (d && (typeid(*d)==typeid(ConceptDefImpl) || typeid(*d)==typeid(ConceptDefAliasImpl)))
823 {
824 return static_cast<ConceptDef*>(d);
825 }
826 else
827 {
828 return nullptr;
829 }
830}

Referenced by NamespaceDefImpl::addInnerCompound(), findModuleDef(), ConceptDefAliasImpl::getCdAlias(), and getDefs().

◆ toConceptDef() [3/3]

ConceptDef * toConceptDef ( DefinitionMutable * d)

Definition at line 832 of file conceptdef.cpp.

833{
834 Definition *d = toDefinition(md);
835 if (d && typeid(*d)==typeid(ConceptDefImpl))
836 {
837 return static_cast<ConceptDef*>(d);
838 }
839 else
840 {
841 return nullptr;
842 }
843}
The common base class of all entity definitions found in the sources.
Definition definition.h:77
Definition * toDefinition(DefinitionMutable *dm)

References toDefinition().

◆ toConceptDefMutable()