Doxygen
Loading...
Searching...
No Matches
conceptdef.cpp File Reference
#include "conceptdef.h"
#include "definitionimpl.h"
#include "util.h"
#include "config.h"
#include "doxygen.h"
#include "language.h"
#include "outputlist.h"
#include "searchindex.h"
#include "message.h"
#include "parserintf.h"
#include "layout.h"
#include "namespacedef.h"
Include dependency graph for conceptdef.cpp:

Go to the source code of this file.

Classes

class  ConceptDefImpl
class  ConceptDefAliasImpl

Functions

std::unique_ptr< ConceptDefcreateConceptDef (const QCString &fileName, int startLine, int startColumn, const QCString &name, const QCString &tagRef, const QCString &tagFile)
std::unique_ptr< ConceptDefcreateConceptDefAlias (const Definition *newScope, const ConceptDef *cd)
static QCString templateSpec (const ArgumentList &al)
ConceptDeftoConceptDef (Definition *d)
ConceptDeftoConceptDef (DefinitionMutable *md)
const ConceptDeftoConceptDef (const Definition *d)
ConceptDefMutabletoConceptDefMutable (Definition *d)
ConceptDefgetConcept (const QCString &n)
ConceptDefgetResolvedConcept (const Definition *d, const QCString &name)

Function Documentation

◆ createConceptDef()

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

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 & n)

Definition at line 808 of file conceptdef.cpp.

809{
810 if (n.isEmpty()) return nullptr;
811 return Doxygen::conceptLinkedMap->find(n);
812}
static ConceptLinkedMap * conceptLinkedMap
Definition doxygen.h:98
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:163

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

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

◆ getResolvedConcept()

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

Definition at line 814 of file conceptdef.cpp.

815{
816 ConceptDef *cd=nullptr;
817 while (d && d!=Doxygen::globalScope)
818 {
819 cd = getConcept(d->name()+"::"+name);
820 if (cd) return cd;
821 d = d->getOuterScope();
822 }
823 cd = getConcept(name);
824 return cd;
825}
virtual Definition * getOuterScope() const =0
virtual const QCString & name() 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().

◆ templateSpec()

QCString templateSpec ( const ArgumentList & al)
static

Definition at line 402 of file conceptdef.cpp.

403{
404 TextStream t;
405 t << "template<";
406 bool first=true;
407 for (const auto &a : al)
408 {
409 if (!first) t << ", ";
410 t << a.type;
411 if (!a.name.isEmpty())
412 {
413 t << " " << a.name;
414 }
415 if (a.defval.length()!=0)
416 {
417 t << " " << a.defval;
418 }
419 first=false;
420 }
421 t << ">";
422 return t.str();
423}
Text streaming class that buffers data.
Definition textstream.h:36
std::string str() const
Return the contents of the buffer as a std::string object.
Definition textstream.h:229

References TextStream::str().

Referenced by ConceptDefImpl::setInitializer().

◆ toConceptDef() [1/3]

const ConceptDef * toConceptDef ( const Definition * d)

Definition at line 782 of file conceptdef.cpp.

783{
784 if (d && (typeid(*d)==typeid(ConceptDefImpl) || typeid(*d)==typeid(ConceptDefAliasImpl)))
785 {
786 return static_cast<const ConceptDef*>(d);
787 }
788 else
789 {
790 return nullptr;
791 }
792}

◆ toConceptDef() [2/3]

ConceptDef * toConceptDef ( Definition * d)

Definition at line 757 of file conceptdef.cpp.

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

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

◆ toConceptDef() [3/3]

ConceptDef * toConceptDef ( DefinitionMutable * md)

Definition at line 769 of file conceptdef.cpp.

770{
771 Definition *d = toDefinition(md);
772 if (d && typeid(*d)==typeid(ConceptDefImpl))
773 {
774 return static_cast<ConceptDef*>(d);
775 }
776 else
777 {
778 return nullptr;
779 }
780}
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)