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 95 of file conceptdef.cpp.

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

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

◆ createConceptDefAlias()

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

Definition at line 156 of file conceptdef.cpp.

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

Referenced by ConceptDefMutable::addCodePart().

◆ getConcept()

ConceptDef * getConcept ( const QCString & key)

Definition at line 864 of file conceptdef.cpp.

865{
866 if (n.isEmpty()) return nullptr;
867 return Doxygen::conceptLinkedMap->find(n);
868}
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 105 of file conceptdef.h.

106{
107 return toConceptDefMutable(getConcept(key));
108}
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 870 of file conceptdef.cpp.

871{
872 ConceptDef *cd=nullptr;
873 while (d && d!=Doxygen::globalScope)
874 {
875 cd = getConcept(d->name()+"::"+name);
876 if (cd) return cd;
877 d = d->getOuterScope();
878 }
879 cd = getConcept(name);
880 return cd;
881}
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 838 of file conceptdef.cpp.

839{
840 if (d && (typeid(*d)==typeid(ConceptDefImpl) || typeid(*d)==typeid(ConceptDefAliasImpl)))
841 {
842 return static_cast<const ConceptDef*>(d);
843 }
844 else
845 {
846 return nullptr;
847 }
848}

◆ toConceptDef() [2/3]

ConceptDef * toConceptDef ( Definition * d)

Definition at line 813 of file conceptdef.cpp.

814{
815 if (d && (typeid(*d)==typeid(ConceptDefImpl) || typeid(*d)==typeid(ConceptDefAliasImpl)))
816 {
817 return static_cast<ConceptDef*>(d);
818 }
819 else
820 {
821 return nullptr;
822 }
823}

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

◆ toConceptDef() [3/3]

ConceptDef * toConceptDef ( DefinitionMutable * d)

Definition at line 825 of file conceptdef.cpp.

826{
827 Definition *d = toDefinition(md);
828 if (d && typeid(*d)==typeid(ConceptDefImpl))
829 {
830 return static_cast<ConceptDef*>(d);
831 }
832 else
833 {
834 return nullptr;
835 }
836}
The common base class of all entity definitions found in the sources.
Definition definition.h:76
Definition * toDefinition(DefinitionMutable *dm)

References toDefinition().

◆ toConceptDefMutable()