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

93{
94 return std::make_unique<ConceptDefImpl>(fileName,startLine,startColumn,name,tagRef,tagFile);
95}

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

◆ createConceptDefAlias()

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

Definition at line 149 of file conceptdef.cpp.

150{
151 return std::make_unique<ConceptDefAliasImpl>(newScope,cd);
152}

Referenced by ConceptDefMutable::setModuleDef().

◆ getConcept()

ConceptDef * getConcept ( const QCString & key)

Definition at line 786 of file conceptdef.cpp.

787{
788 if (n.isEmpty()) return nullptr;
789 return Doxygen::conceptLinkedMap->find(n);
790}
static ConceptLinkedMap * conceptLinkedMap
Definition doxygen.h:98

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

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

◆ getConceptMutable()

ConceptDefMutable * getConceptMutable ( const QCString & key)
inline

Definition at line 90 of file conceptdef.h.

91{
93}
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 792 of file conceptdef.cpp.

793{
794 ConceptDef *cd=nullptr;
795 while (d && d!=Doxygen::globalScope)
796 {
797 cd = getConcept(d->name()+"::"+name);
798 if (cd) return cd;
799 d = d->getOuterScope();
800 }
801 cd = getConcept(name);
802 return cd;
803}
virtual Definition * getOuterScope() const =0
static NamespaceDefMutable * globalScope
Definition doxygen.h:121
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 760 of file conceptdef.cpp.

761{
762 if (d && (typeid(*d)==typeid(ConceptDefImpl) || typeid(*d)==typeid(ConceptDefAliasImpl)))
763 {
764 return static_cast<const ConceptDef*>(d);
765 }
766 else
767 {
768 return nullptr;
769 }
770}

◆ toConceptDef() [2/3]

ConceptDef * toConceptDef ( Definition * d)

Definition at line 735 of file conceptdef.cpp.

736{
737 if (d && (typeid(*d)==typeid(ConceptDefImpl) || typeid(*d)==typeid(ConceptDefAliasImpl)))
738 {
739 return static_cast<ConceptDef*>(d);
740 }
741 else
742 {
743 return nullptr;
744 }
745}

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

◆ toConceptDef() [3/3]

ConceptDef * toConceptDef ( DefinitionMutable * d)

Definition at line 747 of file conceptdef.cpp.

748{
749 Definition *d = toDefinition(md);
750 if (d && typeid(*d)==typeid(ConceptDefImpl))
751 {
752 return static_cast<ConceptDef*>(d);
753 }
754 else
755 {
756 return nullptr;
757 }
758}
The common base class of all entity definitions found in the sources.
Definition definition.h:76
Definition * toDefinition(DefinitionMutable *dm)

References toDefinition().

◆ toConceptDefMutable()

ConceptDefMutable * toConceptDefMutable ( Definition * d)