Doxygen
Loading...
Searching...
No Matches
ConceptDefImpl Class Reference
+ Inheritance diagram for ConceptDefImpl:
+ Collaboration diagram for ConceptDefImpl:

Public Member Functions

 ConceptDefImpl (const QCString &fileName, int startLine, int startColumn, const QCString &name, const QCString &tagRef=QCString(), const QCString &tagFile=QCString())
 
 ~ConceptDefImpl () override
 
DefType definitionType () const override
 
CodeSymbolType codeSymbolType () const override
 
QCString getOutputFileBase () const override
 
bool hasDetailedDescription () const override
 
QCString displayName (bool includeScope=true) const override
 
const IncludeInfoincludeInfo () const override
 
ArgumentList getTemplateParameterList () const override
 
QCString anchor () const override
 
bool isLinkableInProject () const override
 
bool isLinkable () const override
 
QCString initializer () const override
 
void writeDeclarationLink (OutputList &ol, bool &found, const QCString &header, bool localNames) const override
 
const NamespaceDefgetNamespaceDef () const override
 
const FileDefgetFileDef () const override
 
const ModuleDefgetModuleDef () const override
 
QCString title () const override
 
int groupId () const override
 
void setIncludeFile (FileDef *fd, const QCString &incName, bool local, bool force) override
 
void setTemplateArguments (const ArgumentList &al) override
 
void setNamespace (NamespaceDef *nd) override
 
void setFileDef (FileDef *fd) override
 
void setModuleDef (ModuleDef *mod) override
 
void writeTagFile (TextStream &) override
 
void writeDocumentation (OutputList &) override
 
void setInitializer (const QCString &init) override
 
void findSectionsInDocumentation () override
 
void setGroupId (int id) override
 
void writeBriefDescription (OutputList &) const
 
void writeAuthorSection (OutputList &ol) const
 
void writeIncludeFiles (OutputList &ol) const
 
void writeDetailedDescription (OutputList &ol, const QCString &title) const
 
void writeDefinition (OutputList &ol, const QCString &title) const
 
void addConceptAttributes (OutputList &ol) const
 
- Public Member Functions inherited from DefinitionMixin< ConceptDefMutable >
 DefinitionMixin (const QCString &defFileName, int defLine, int defColumn, const QCString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=TRUE)
 
 DefinitionMixin (const DefinitionMixin &other)
 
 DefinitionMixin (DefinitionMixin &&)=delete
 
DefinitionMixinoperator= (const DefinitionMixin &other)
 
DefinitionMixinoperator= (DefinitionMixin &&)=delete
 
 ~DefinitionMixin () override=default
 
bool isAlias () const override
 
const QCStringname () const override
 
bool isAnonymous () const override
 
const QCStringlocalName () const override
 
QCString qualifiedName () const override
 
QCString symbolName () const override
 
QCString getSourceFileBase () const override
 
QCString getSourceAnchor () const override
 
QCString documentation () const override
 
int docLine () const override
 
QCString docFile () const override
 
QCString briefDescription (bool abbreviate=FALSE) const override
 
QCString briefDescriptionAsTooltip () const override
 
int briefLine () const override
 
QCString inbodyDocumentation () const override
 
QCString inbodyFile () const override
 
int inbodyLine () const override
 
QCString briefFile () const override
 
QCString getDefFileName () const override
 
QCString getDefFileExtension () const override
 
int getDefLine () const override
 
int getDefColumn () const override
 
bool hasDocumentation () const override
 
bool hasUserDocumentation () const override
 
bool isVisibleInProject () const override
 
bool isVisible () const override
 
bool isHidden () const override
 
bool isArtificial () const override
 
bool isExported () const override
 
QCString getReference () const override
 
bool isReference () const override
 
QCString externalReference (const QCString &relPath) const override
 
int getStartDefLine () const override
 
int getStartBodyLine () const override
 
int getEndBodyLine () const override
 
const FileDefgetBodyDef () const override
 
SrcLangExt getLanguage () const override
 
const GroupListpartOfGroups () const override
 
bool isLinkableViaGroup () const override
 
const RefItemVectorxrefListItems () const override
 
const DefinitionfindInnerCompound (const QCString &name) const override
 
DefinitiongetOuterScope () const override
 
const MemberVectorgetReferencesMembers () const override
 
const MemberVectorgetReferencedByMembers () const override
 
bool hasSections () const override
 
bool hasSources () const override
 
bool hasBriefDescription () const override
 
QCString id () const override
 
const SectionRefsgetSectionRefs () const override
 
void setName (const QCString &name) override
 
void setId (const QCString &name) override
 
void setDefFile (const QCString &df, int defLine, int defColumn) override
 
void setDocumentation (const QCString &doc, const QCString &docFile, int docLine, bool stripWhiteSpace=TRUE) override
 
void setBriefDescription (const QCString &brief, const QCString &briefFile, int briefLine) override
 
void setInbodyDocumentation (const QCString &doc, const QCString &docFile, int docLine) override
 
void setReference (const QCString &r) override
 
void addSectionsToDefinition (const std::vector< const SectionInfo * > &anchorList) override
 
void setBodySegment (int defLine, int bls, int ble) override
 
void setBodyDef (const FileDef *fd) override
 
void addSourceReferencedBy (MemberDef *md, const QCString &sourceRefName) override
 
void addSourceReferences (MemberDef *md, const QCString &sourceRefName) override
 
void setRefItems (const RefItemVector &sli) override
 
void mergeRefItems (Definition *def) override
 
void mergeReferences (const Definition *other) override
 
void mergeReferencedBy (const Definition *other) override
 
void addInnerCompound (Definition *def) override
 
void setOuterScope (Definition *def) override
 
void setHidden (bool b) override
 
void setArtificial (bool b) override
 
void setExported (bool b) override
 
void setLanguage (SrcLangExt lang) override
 
void writeSourceDef (OutputList &ol) const override
 
void writeInlineCode (OutputList &ol, const QCString &scopeName) const override
 
bool hasSourceRefs () const override
 
bool hasSourceReffedBy () const override
 
void writeSourceRefs (OutputList &ol, const QCString &scopeName) const override
 
void writeSourceReffedBy (OutputList &ol, const QCString &scopeName) const override
 
void makePartOfGroup (GroupDef *gd) override
 
void writeNavigationPath (OutputList &ol) const override
 
QCString navigationPathAsString () const override
 
void writeQuickMemberLinks (OutputList &ol, const MemberDef *md) const override
 
void writeSummaryLinks (OutputList &ol) const override
 
QCString pathFragment () const override
 
void writeDocAnchorsToTagFile (TextStream &fs) const override
 
void setLocalName (const QCString &name) override
 
void writeToc (OutputList &ol, const LocalToc &lt) const override
 
void computeTooltip () override
 
void _setSymbolName (const QCString &name) override
 
QCString _symbolName () const override
 
- Public Member Functions inherited from ConceptDefMutable
- Public Member Functions inherited from DefinitionMutable
- Public Member Functions inherited from ConceptDef
- Public Member Functions inherited from Definition

Private Attributes

QCString m_fileName
 
std::unique_ptr< IncludeInfom_incInfo
 
NamespaceDefm_nspace = nullptr
 
FileDefm_fileDef = nullptr
 
ModuleDefm_moduleDef = nullptr
 
ArgumentList m_tArgList
 
QCString m_initializer
 
int m_groupId = -1
 

Additional Inherited Members

- Public Types inherited from Definition
enum  DefType {
  TypeClass = 0 , TypeFile = 1 , TypeNamespace = 2 , TypeModule = 3 ,
  TypeMember = 4 , TypeGroup = 5 , TypePackage = 6 , TypePage = 7 ,
  TypeDir = 8 , TypeConcept = 9
}
 

Detailed Description

Definition at line 31 of file conceptdef.cpp.

Constructor & Destructor Documentation

◆ ConceptDefImpl()

ConceptDefImpl::ConceptDefImpl ( const QCString & fileName,
int startLine,
int startColumn,
const QCString & name,
const QCString & tagRef = QCString(),
const QCString & tagFile = QCString() )

Definition at line 156 of file conceptdef.cpp.

157 : DefinitionMixin(fileName,startLine,startColumn,name)
158{
159 if (!tagFile.isEmpty())
160 {
161 if (!tagRef.isEmpty())
162 {
163 m_fileName = stripExtension(tagFile);
164 }
165 else
166 {
168 }
169 }
170 else
171 {
172 m_fileName = convertNameToFile(QCString("concept")+name);
173 }
174 setReference(tagRef);
175}
QCString m_fileName
virtual const QCString & name() const =0
void setReference(const QCString &r) override
DefinitionMixin(const QCString &defFileName, int defLine, int defColumn, const QCString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=TRUE)
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
QCString stripExtension(const QCString &fName)
Definition util.cpp:5265
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3858

References DefinitionMixin< ConceptDefMutable >::DefinitionMixin(), QCString::isEmpty(), and DefinitionMixin< ConceptDefMutable >::name().

◆ ~ConceptDefImpl()

ConceptDefImpl::~ConceptDefImpl ( )
override

Definition at line 177 of file conceptdef.cpp.

178{
179}

Member Function Documentation

◆ addConceptAttributes()

void ConceptDefImpl::addConceptAttributes ( OutputList & ol) const

Definition at line 500 of file conceptdef.cpp.

501{
502 if (isExported())
503 {
506 ol.startLabels();
507 ol.writeLabel("export",false);
508 ol.endLabels();
510 }
511}
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()
void endLabels()
Definition outputlist.h:741
void writeLabel(const QCString &l, bool isLast)
Definition outputlist.h:739
void startLabels()
Definition outputlist.h:737

References OutputList::disableAllBut(), OutputList::endLabels(), Html, DefinitionMixin< ConceptDefMutable >::isExported(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startLabels(), and OutputList::writeLabel().

Referenced by writeDocumentation().

◆ anchor()

QCString ConceptDefImpl::anchor ( ) const
overridevirtual

Returns the anchor within a page where this item can be found

Implements Definition.

Definition at line 200 of file conceptdef.cpp.

201{
202 return "";
203}

Referenced by writeDeclarationLink().

◆ codeSymbolType()

CodeSymbolType ConceptDefImpl::codeSymbolType ( ) const
inlineoverridevirtual

Used for syntax highlighting symbol class

Implements Definition.

Definition at line 41 of file conceptdef.cpp.

References Concept.

◆ definitionType()

Definition::DefType ConceptDefImpl::definitionType ( ) const
overridevirtual

Use this for dynamic inspection of the type of the derived class

Implements Definition.

Definition at line 181 of file conceptdef.cpp.

182{
183 return TypeConcept;
184}

References Definition::TypeConcept.

◆ displayName()

QCString ConceptDefImpl::displayName ( bool includeScope = true) const
overridevirtual

Returns the name of the definition as it appears in the output

Implements Definition.

Definition at line 205 of file conceptdef.cpp.

206{
207 return includeScope ? name() : localName();
208}
virtual const QCString & localName() const =0
const QCString & name() const override

References DefinitionMixin< ConceptDefMutable >::localName(), and DefinitionMixin< ConceptDefMutable >::name().

Referenced by title(), writeDeclarationLink(), and writeDocumentation().

◆ findSectionsInDocumentation()

void ConceptDefImpl::findSectionsInDocumentation ( )
overridevirtual

◆ getFileDef()

const FileDef * ConceptDefImpl::getFileDef ( ) const
overridevirtual

Implements ConceptDef.

Definition at line 276 of file conceptdef.cpp.

277{
278 return m_fileDef;
279}
FileDef * m_fileDef

References m_fileDef.

◆ getModuleDef()

const ModuleDef * ConceptDefImpl::getModuleDef ( ) const
overridevirtual

Implements ConceptDef.

Definition at line 281 of file conceptdef.cpp.

282{
283 return m_moduleDef;
284}
ModuleDef * m_moduleDef

References m_moduleDef.

◆ getNamespaceDef()

const NamespaceDef * ConceptDefImpl::getNamespaceDef ( ) const
overridevirtual

Implements ConceptDef.

Definition at line 261 of file conceptdef.cpp.

262{
263 return m_nspace;
264}
NamespaceDef * m_nspace

References m_nspace.

◆ getOutputFileBase()

QCString ConceptDefImpl::getOutputFileBase ( ) const
overridevirtual

Returns the base file name (without extension) of this definition. as it is referenced to/written to disk.

Implements Definition.

Definition at line 186 of file conceptdef.cpp.

187{
188 return m_fileName;
189}

References m_fileName.

Referenced by writeBriefDescription(), writeDeclarationLink(), writeDocumentation(), and writeTagFile().

◆ getTemplateParameterList()

ArgumentList ConceptDefImpl::getTemplateParameterList ( ) const
overridevirtual

Implements ConceptDef.

Definition at line 215 of file conceptdef.cpp.

216{
217 return m_tArgList;
218}
ArgumentList m_tArgList

References m_tArgList.

◆ groupId()

int ConceptDefImpl::groupId ( ) const
overridevirtual

Implements ConceptDef.

Definition at line 291 of file conceptdef.cpp.

292{
293 return m_groupId;
294}

References m_groupId.

◆ hasDetailedDescription()

bool ConceptDefImpl::hasDetailedDescription ( ) const
overridevirtual

Implements ConceptDef.

Definition at line 191 of file conceptdef.cpp.

192{
193 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
194 bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
195 return ((!briefDescription().isEmpty() && repeatBrief) ||
196 !documentation().isEmpty() ||
197 (sourceBrowser && getStartBodyLine()!=-1 && getBodyDef()));
198}
const FileDef * getBodyDef() const override
#define Config_getBool(name)
Definition config.h:33

References DefinitionMixin< ConceptDefMutable >::briefDescription(), Config_getBool, DefinitionMixin< ConceptDefMutable >::documentation(), DefinitionMixin< ConceptDefMutable >::getBodyDef(), and DefinitionMixin< ConceptDefMutable >::getStartBodyLine().

Referenced by writeBriefDescription(), and writeDetailedDescription().

◆ includeInfo()

const IncludeInfo * ConceptDefImpl::includeInfo ( ) const
overridevirtual

Implements ConceptDef.

Definition at line 210 of file conceptdef.cpp.

211{
212 return m_incInfo.get();
213}
std::unique_ptr< IncludeInfo > m_incInfo

References m_incInfo.

◆ initializer()

QCString ConceptDefImpl::initializer ( ) const
overridevirtual

Implements ConceptDef.

Definition at line 417 of file conceptdef.cpp.

418{
419 return m_initializer;
420}
QCString m_initializer

References m_initializer.

◆ isLinkable()

bool ConceptDefImpl::isLinkable ( ) const
overridevirtual

Returns TRUE iff it is possible to link to this item. This can be a link to another project imported via a tag file.

Implements Definition.

Definition at line 228 of file conceptdef.cpp.

229{
230 return isLinkableInProject() || isReference();
231}
bool isLinkableInProject() const override

References isLinkableInProject(), and DefinitionMixin< ConceptDefMutable >::isReference().

Referenced by writeDeclarationLink().

◆ isLinkableInProject()

bool ConceptDefImpl::isLinkableInProject ( ) const
overridevirtual

Returns TRUE iff it is possible to link to this item within this project.

Implements Definition.

Definition at line 220 of file conceptdef.cpp.

221{
222 bool hideUndoc = Config_getBool(HIDE_UNDOC_CLASSES);
223 return (hasDocumentation() || !hideUndoc) && /* documented */
224 !isHidden() && /* not hidden */
225 !isReference(); /* not an external reference */
226}

References Config_getBool, DefinitionMixin< ConceptDefMutable >::hasDocumentation(), DefinitionMixin< ConceptDefMutable >::isHidden(), and DefinitionMixin< ConceptDefMutable >::isReference().

Referenced by isLinkable().

◆ setFileDef()

void ConceptDefImpl::setFileDef ( FileDef * fd)
overridevirtual

Implements ConceptDefMutable.

Definition at line 266 of file conceptdef.cpp.

267{
268 m_fileDef=fd;
269}

References m_fileDef.

◆ setGroupId()

void ConceptDefImpl::setGroupId ( int id)
overridevirtual

Implements ConceptDefMutable.

Definition at line 296 of file conceptdef.cpp.

297{
298 m_groupId = id;
299}
virtual QCString id() const =0

References DefinitionMixin< ConceptDefMutable >::id(), and m_groupId.

◆ setIncludeFile()

void ConceptDefImpl::setIncludeFile ( FileDef * fd,
const QCString & incName,
bool local,
bool force )
overridevirtual

Implements ConceptDefMutable.

Definition at line 233 of file conceptdef.cpp.

234{
235 if (!m_incInfo) m_incInfo = std::make_unique<IncludeInfo>();
236 if ((!incName.isEmpty() && m_incInfo->includeName.isEmpty()) ||
237 (fd!=nullptr && m_incInfo->fileDef==nullptr)
238 )
239 {
240 m_incInfo->fileDef = fd;
241 m_incInfo->includeName = incName;
243 }
244 if (force && !incName.isEmpty())
245 {
246 m_incInfo->includeName = incName;
248 }
249}
@ IncludeLocal
Definition filedef.h:50
@ IncludeSystem
Definition filedef.h:49

References IncludeLocal, IncludeSystem, QCString::isEmpty(), and m_incInfo.

◆ setInitializer()

void ConceptDefImpl::setInitializer ( const QCString & init)
overridevirtual

Implements ConceptDefMutable.

Definition at line 412 of file conceptdef.cpp.

413{
414 m_initializer = templateSpec(m_tArgList)+"\nconcept "+name()+" = "+init;
415}
static QCString templateSpec(const ArgumentList &al)
void init()

References m_initializer, m_tArgList, DefinitionMixin< ConceptDefMutable >::name(), and templateSpec().

◆ setModuleDef()

void ConceptDefImpl::setModuleDef ( ModuleDef * mod)
overridevirtual

Implements ConceptDefMutable.

Definition at line 271 of file conceptdef.cpp.

272{
273 m_moduleDef=mod;
274}

References m_moduleDef.

◆ setNamespace()

void ConceptDefImpl::setNamespace ( NamespaceDef * nd)
overridevirtual

Implements ConceptDefMutable.

Definition at line 256 of file conceptdef.cpp.

257{
258 m_nspace = nd;
259}

References m_nspace.

◆ setTemplateArguments()

void ConceptDefImpl::setTemplateArguments ( const ArgumentList & al)
overridevirtual

Implements ConceptDefMutable.

Definition at line 251 of file conceptdef.cpp.

252{
253 m_tArgList = al;
254}

References m_tArgList.

◆ title()

QCString ConceptDefImpl::title ( ) const
overridevirtual

Implements ConceptDef.

Definition at line 286 of file conceptdef.cpp.

287{
289}
QCString displayName(bool includeScope=true) const override
virtual QCString trConceptReference(const QCString &conceptName)=0
Translator * theTranslator
Definition language.cpp:71

References displayName(), and theTranslator.

Referenced by writeDefinition(), and writeDetailedDescription().

◆ writeAuthorSection()

void ConceptDefImpl::writeAuthorSection ( OutputList & ol) const

Definition at line 488 of file conceptdef.cpp.

489{
490 // write Author section (Man only)
493 ol.startGroupHeader();
495 ol.endGroupHeader();
498}
void startGroupHeader(int extraLevels=0)
Definition outputlist.h:454
void endGroupHeader(int extraLevels=0)
Definition outputlist.h:456
void parseText(const QCString &textStr)
virtual QCString trGeneratedAutomatically(const QCString &s)=0
virtual QCString trAuthor(bool first_capital, bool singular)=0
#define Config_getString(name)
Definition config.h:32
#define TRUE
Definition qcstring.h:37

References Config_getString, OutputList::disableAllBut(), OutputList::endGroupHeader(), Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startGroupHeader(), theTranslator, and TRUE.

Referenced by writeDocumentation().

◆ writeBriefDescription()

void ConceptDefImpl::writeBriefDescription ( OutputList & ol) const

Definition at line 317 of file conceptdef.cpp.

318{
320 {
321 auto parser { createDocParser() };
322 auto ast { validatingParseDoc(
323 *parser.get(),briefFile(),briefLine(),this,nullptr,
325 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
326 if (!ast->isEmpty())
327 {
328 ol.startParagraph();
331 ol.writeString(" - ");
333 ol.writeDoc(ast.get(),this,nullptr);
336 ol.writeString(" \n");
338
340 {
342 ol.startTextLink(getOutputFileBase(),"details");
344 ol.endTextLink();
345 }
347 ol.endParagraph();
348 }
349 }
350 ol.writeSynopsis();
351}
QCString getOutputFileBase() const override
bool hasDetailedDescription() const override
virtual QCString briefFile() const =0
bool hasBriefDescription() const override
void writeString(const QCString &text)
Definition outputlist.h:412
void disable(OutputType o)
void enable(OutputType o)
void writeDoc(const IDocNodeAST *ast, const Definition *ctx, const MemberDef *md)
Definition outputlist.h:384
void startParagraph(const QCString &classDef=QCString())
Definition outputlist.h:408
void endParagraph()
Definition outputlist.h:410
void endTextLink()
Definition outputlist.h:445
void writeSynopsis()
Definition outputlist.h:593
void startTextLink(const QCString &file, const QCString &anchor)
Definition outputlist.h:443
virtual QCString trMore()=0
IDocParserPtr createDocParser()
factory function to create a parser
Definition docparser.cpp:54
IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
#define FALSE
Definition qcstring.h:34

References DefinitionMixin< ConceptDefMutable >::briefDescription(), DefinitionMixin< ConceptDefMutable >::briefFile(), DefinitionMixin< ConceptDefMutable >::briefLine(), Config_getBool, createDocParser(), OutputList::disable(), OutputList::disableAllBut(), OutputList::enable(), OutputList::endParagraph(), OutputList::endTextLink(), FALSE, getOutputFileBase(), DefinitionMixin< ConceptDefMutable >::hasBriefDescription(), hasDetailedDescription(), Html, Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), RTF, OutputList::startParagraph(), OutputList::startTextLink(), theTranslator, TRUE, validatingParseDoc(), OutputList::writeDoc(), OutputList::writeString(), and OutputList::writeSynopsis().

Referenced by writeDocumentation().

◆ writeDeclarationLink()

void ConceptDefImpl::writeDeclarationLink ( OutputList & ol,
bool & found,
const QCString & header,
bool localNames ) const
overridevirtual

Implements ConceptDef.

Definition at line 625 of file conceptdef.cpp.

626{
627 if (isLinkable())
628 {
629 if (!found) // first concept
630 {
631 ol.startMemberHeader("concepts");
632 if (!header.isEmpty())
633 {
634 ol.parseText(header);
635 }
636 else
637 {
638 theTranslator->trConcept(true,false);
639 }
640 ol.endMemberHeader();
641 ol.startMemberList();
642 found=TRUE;
643 }
646 ol.writeString("concept ");
647 QCString cname = displayName(!localNames);
649 if (isLinkable())
650 {
653 anchor(),
654 cname
655 );
656 }
657 else
658 {
659 ol.startBold();
660 ol.docify(cname);
661 ol.endBold();
662 }
664 // add the brief description if available
665 if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
666 {
667 auto parser { createDocParser() };
668 auto ast { validatingParseDoc(
669 *parser.get(),briefFile(),briefLine(),this,nullptr,
671 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
672 if (!ast->isEmpty())
673 {
675 ol.writeDoc(ast.get(),this,nullptr);
677 }
678 }
679 ol.endMemberDeclaration(anchor(),QCString());
680 }
681}
QCString anchor() const override
bool isLinkable() const override
QCString getReference() const override
void startMemberDeclaration()
Definition outputlist.h:570
void endMemberDescription()
Definition outputlist.h:568
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
Definition outputlist.h:440
void startMemberDescription(const QCString &anchor, const QCString &inheritId=QCString(), bool typ=false)
Definition outputlist.h:566
void docify(const QCString &s)
Definition outputlist.h:438
void startMemberList()
Definition outputlist.h:482
void startBold()
Definition outputlist.h:562
void endMemberItem(OutputGenerator::MemberItemType type)
Definition outputlist.h:496
void insertMemberAlign(bool templ=FALSE)
Definition outputlist.h:518
void endBold()
Definition outputlist.h:564
void endMemberDeclaration(const QCString &anchor, const QCString &inheritId)
Definition outputlist.h:572
void endMemberHeader()
Definition outputlist.h:472
void startMemberItem(const QCString &anchor, OutputGenerator::MemberItemType type, const QCString &id=QCString())
Definition outputlist.h:494
void startMemberHeader(const QCString &anchor, int typ=2)
Definition outputlist.h:470
virtual QCString trConcept(bool first_capital, bool singular)=0
bool found
Definition util.cpp:984

References anchor(), DefinitionMixin< ConceptDefMutable >::briefDescription(), DefinitionMixin< ConceptDefMutable >::briefFile(), DefinitionMixin< ConceptDefMutable >::briefLine(), Config_getBool, createDocParser(), displayName(), OutputList::docify(), OutputList::endBold(), OutputList::endMemberDeclaration(), OutputList::endMemberDescription(), OutputList::endMemberHeader(), OutputList::endMemberItem(), FALSE, found, getOutputFileBase(), DefinitionMixin< ConceptDefMutable >::getReference(), OutputList::insertMemberAlign(), QCString::isEmpty(), isLinkable(), OutputGenerator::Normal, OutputList::parseText(), OutputList::startBold(), OutputList::startMemberDeclaration(), OutputList::startMemberDescription(), OutputList::startMemberHeader(), OutputList::startMemberItem(), OutputList::startMemberList(), theTranslator, TRUE, validatingParseDoc(), OutputList::writeDoc(), OutputList::writeObjectLink(), and OutputList::writeString().

◆ writeDefinition()

void ConceptDefImpl::writeDefinition ( OutputList & ol,
const QCString & title ) const

Definition at line 422 of file conceptdef.cpp.

423{
424 ol.startGroupHeader();
425 ol.parseText(title);
426 ol.endGroupHeader();
427
428 auto intf = Doxygen::parserManager->getCodeParser(".cpp");
429 intf->resetCodeParserState();
430 auto &codeOL = ol.codeGenerators();
431 codeOL.startCodeFragment("DoxyCode");
432 QCString scopeName;
434 TextStream conceptDef;
435 conceptDef << m_initializer;
436 intf->parseCode(codeOL,scopeName,conceptDef.str(),SrcLangExt::Cpp,Config_getBool(STRIP_CODE_COMMENTS),false,QCString(),
437 m_fileDef, -1,-1,true,nullptr,false,this);
438 codeOL.endCodeFragment("DoxyCode");
439}
QCString title() const override
Definition * getOuterScope() const override
static ParserManager * parserManager
Definition doxygen.h:131
static NamespaceDefMutable * globalScope
Definition doxygen.h:121
void startCodeFragment(const QCString &style)
Definition outputlist.h:278
const OutputCodeList & codeGenerators() const
Definition outputlist.h:357
std::unique_ptr< CodeParserInterface > getCodeParser(const QCString &extension)
Gets the interface to the parser associated with a given extension.
Definition parserintf.h:218
std::string str() const
Return the contents of the buffer as a std::string object.
Definition textstream.h:229

References OutputList::codeGenerators(), Config_getBool, Cpp, OutputList::endGroupHeader(), DefinitionMixin< ConceptDefMutable >::getOuterScope(), Doxygen::globalScope, m_fileDef, m_initializer, Definition::name(), Doxygen::parserManager, OutputList::parseText(), OutputCodeList::startCodeFragment(), OutputList::startGroupHeader(), TextStream::str(), and title().

Referenced by writeDocumentation().

◆ writeDetailedDescription()

void ConceptDefImpl::writeDetailedDescription ( OutputList & ol,
const QCString & title ) const

Definition at line 441 of file conceptdef.cpp.

442{
443 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
445 {
448 ol.writeRuler();
450
453 ol.writeAnchor(QCString(),"details");
455
456 ol.startGroupHeader();
457 ol.parseText(title);
458 ol.endGroupHeader();
459
460 ol.startTextBlock();
461 // repeat brief description
462 if (!briefDescription().isEmpty() && repeatBrief)
463 {
465 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
466 }
467 if (!briefDescription().isEmpty() && repeatBrief &&
468 !documentation().isEmpty())
469 {
472 ol.writeString("\n\n");
474 }
475
476 // write documentation
477 if (!documentation().isEmpty())
478 {
479 ol.generateDoc(docFile(),docLine(),this,nullptr,documentation(),TRUE,FALSE,
480 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
481 }
482
483 writeSourceDef(ol);
484 ol.endTextBlock();
485 }
486}
void writeSourceDef(OutputList &ol) const override
QCString briefFile() const override
void endTextBlock(bool paraBreak=FALSE)
Definition outputlist.h:671
void writeRuler()
Definition outputlist.h:522
void startTextBlock(bool dense=FALSE)
Definition outputlist.h:669
void generateDoc(const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
void writeAnchor(const QCString &fileName, const QCString &name)
Definition outputlist.h:524

References DefinitionMixin< ConceptDefMutable >::briefDescription(), DefinitionMixin< ConceptDefMutable >::briefFile(), DefinitionMixin< ConceptDefMutable >::briefLine(), Config_getBool, OutputList::disable(), OutputList::disableAllBut(), DefinitionMixin< ConceptDefMutable >::docFile(), DefinitionMixin< ConceptDefMutable >::docLine(), DefinitionMixin< ConceptDefMutable >::documentation(), OutputList::endGroupHeader(), OutputList::endTextBlock(), FALSE, OutputList::generateDoc(), hasDetailedDescription(), Html, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startGroupHeader(), OutputList::startTextBlock(), title(), TRUE, OutputList::writeAnchor(), OutputList::writeRuler(), DefinitionMixin< ConceptDefMutable >::writeSourceDef(), and OutputList::writeString().

Referenced by writeDocumentation().

◆ writeDocumentation()

void ConceptDefImpl::writeDocumentation ( OutputList & ol)
overridevirtual

Implements ConceptDefMutable.

Definition at line 513 of file conceptdef.cpp.

514{
515 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
516 QCString pageTitle = theTranslator->trConceptReference(displayName());
517 startFile(ol,getOutputFileBase(),name(),pageTitle,HighlightedItem::ConceptVisible,!generateTreeView);
518
519 // ---- navigation part
520 if (!generateTreeView)
521 {
523 {
525 }
526 ol.endQuickIndices();
527 }
528
529 // ---- title part
530 startTitle(ol,getOutputFileBase(),this);
531 ol.parseText(pageTitle);
533 addGroupListToTitle(ol,this);
535
536 // ---- contents part
537
538 ol.startContents();
539
540 //---------------------------------------- start flexible part -------------------------------
541
542 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Concept))
543 {
544 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
545 switch (lde->kind())
546 {
547 case LayoutDocEntry::BriefDesc:
549 break;
550 case LayoutDocEntry::ConceptDefinition:
551 if (ls) writeDefinition(ol,ls->title(getLanguage()));
552 break;
553 case LayoutDocEntry::DetailedDesc:
554 if (ls) writeDetailedDescription(ol,ls->title(getLanguage()));
555 break;
556 case LayoutDocEntry::AuthorSection:
558 break;
559 case LayoutDocEntry::ClassIncludes:
561 break;
562 case LayoutDocEntry::MemberDeclStart:
563 case LayoutDocEntry::NamespaceClasses:
564 case LayoutDocEntry::NamespaceInterfaces:
565 case LayoutDocEntry::NamespaceStructs:
566 case LayoutDocEntry::NamespaceExceptions:
567 case LayoutDocEntry::NamespaceConcepts:
568 case LayoutDocEntry::NamespaceNestedNamespaces:
569 case LayoutDocEntry::NamespaceNestedConstantGroups:
570 case LayoutDocEntry::MemberGroups:
571 case LayoutDocEntry::MemberDecl:
572 case LayoutDocEntry::MemberDeclEnd:
573 case LayoutDocEntry::MemberDefStart:
574 case LayoutDocEntry::NamespaceInlineClasses:
575 case LayoutDocEntry::MemberDef:
576 case LayoutDocEntry::MemberDefEnd:
577 case LayoutDocEntry::ClassInheritanceGraph:
578 case LayoutDocEntry::ClassNestedClasses:
579 case LayoutDocEntry::ClassCollaborationGraph:
580 case LayoutDocEntry::ClassAllMembersLink:
581 case LayoutDocEntry::ClassUsedFiles:
582 case LayoutDocEntry::ClassInlineClasses:
583 case LayoutDocEntry::FileClasses:
584 case LayoutDocEntry::FileConcepts:
585 case LayoutDocEntry::FileInterfaces:
586 case LayoutDocEntry::FileStructs:
587 case LayoutDocEntry::FileExceptions:
588 case LayoutDocEntry::FileNamespaces:
589 case LayoutDocEntry::FileConstantGroups:
590 case LayoutDocEntry::FileIncludes:
591 case LayoutDocEntry::FileIncludeGraph:
592 case LayoutDocEntry::FileIncludedByGraph:
593 case LayoutDocEntry::FileInlineClasses:
594 case LayoutDocEntry::FileSourceLink:
595 case LayoutDocEntry::GroupClasses:
596 case LayoutDocEntry::GroupConcepts:
597 case LayoutDocEntry::GroupModules:
598 case LayoutDocEntry::GroupInlineClasses:
599 case LayoutDocEntry::GroupNamespaces:
600 case LayoutDocEntry::GroupDirs:
601 case LayoutDocEntry::GroupNestedGroups:
602 case LayoutDocEntry::GroupFiles:
603 case LayoutDocEntry::GroupGraph:
604 case LayoutDocEntry::GroupPageDocs:
605 case LayoutDocEntry::ModuleExports:
606 case LayoutDocEntry::ModuleClasses:
607 case LayoutDocEntry::ModuleConcepts:
608 case LayoutDocEntry::ModuleUsedFiles:
609 case LayoutDocEntry::DirSubDirs:
610 case LayoutDocEntry::DirFiles:
611 case LayoutDocEntry::DirGraph:
612 err("Internal inconsistency: member '%s' should not be part of "
613 "LayoutDocManager::Concept entry list\n",qPrint(lde->entryToString()));
614 break;
615 }
616 }
617
618 //---------------------------------------- end flexible part -------------------------------
619
620 ol.endContents();
621
622 endFileWithNavPath(ol,this);
623}
void writeIncludeFiles(OutputList &ol) const
void addConceptAttributes(OutputList &ol) const
void writeBriefDescription(OutputList &) const
void writeDetailedDescription(OutputList &ol, const QCString &title) const
void writeDefinition(OutputList &ol, const QCString &title) const
void writeAuthorSection(OutputList &ol) const
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
void writeNavigationPath(OutputList &ol) const override
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition layout.cpp:1423
void endContents()
Definition outputlist.h:619
void endQuickIndices()
Definition outputlist.h:605
void startContents()
Definition outputlist.h:617
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
Definition index.cpp:386
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
Definition index.cpp:395
void startFile(OutputList &ol, const QCString &name, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel)
Definition index.cpp:402
void endFileWithNavPath(OutputList &ol, const Definition *d)
Definition index.cpp:441
#define err(fmt,...)
Definition message.h:84
const char * qPrint(const char *s)
Definition qcstring.h:672
QCString title(SrcLangExt lang) const
Definition layout.cpp:1526
void addGroupListToTitle(OutputList &ol, const Definition *d)
Definition util.cpp:5233

References addConceptAttributes(), addGroupListToTitle(), ConceptVisible, Config_getBool, displayName(), OutputList::endContents(), endFileWithNavPath(), OutputList::endQuickIndices(), endTitle(), err, DefinitionMixin< ConceptDefMutable >::getLanguage(), DefinitionMixin< ConceptDefMutable >::getOuterScope(), getOutputFileBase(), Doxygen::globalScope, LayoutDocManager::instance(), DefinitionMixin< ConceptDefMutable >::name(), OutputList::parseText(), qPrint(), OutputList::startContents(), startFile(), startTitle(), theTranslator, LayoutDocEntrySection::title(), writeAuthorSection(), writeBriefDescription(), writeDefinition(), writeDetailedDescription(), writeIncludeFiles(), and DefinitionMixin< ConceptDefMutable >::writeNavigationPath().

◆ writeIncludeFiles()

void ConceptDefImpl::writeIncludeFiles ( OutputList & ol) const

Definition at line 353 of file conceptdef.cpp.

354{
355 if (m_incInfo)
356 {
357 QCString nm=m_incInfo->includeName.isEmpty() ?
358 (m_incInfo->fileDef ?
359 m_incInfo->fileDef->docName() : QCString()
360 ) :
361 m_incInfo->includeName;
362 if (!nm.isEmpty())
363 {
364 ol.startParagraph();
365 ol.startTypewriter();
370 ol.docify(nm);
373 if (m_incInfo->fileDef)
374 {
375 ol.writeObjectLink(QCString(),m_incInfo->fileDef->includeName(),QCString(),nm);
376 }
377 else
378 {
379 ol.docify(nm);
380 }
383 ol.endTypewriter();
384 ol.endParagraph();
385 }
386 }
387}
void startTypewriter()
Definition outputlist.h:450
void endTypewriter()
Definition outputlist.h:452
QCString includeClose(SrcLangExt lang, IncludeKind kind)
Definition filedef.cpp:86
QCString includeStatement(SrcLangExt lang, IncludeKind kind)
Definition filedef.cpp:56
QCString includeOpen(SrcLangExt lang, IncludeKind kind)
Definition filedef.cpp:73

References Cpp, OutputList::disable(), OutputList::disableAllBut(), OutputList::docify(), OutputList::enable(), OutputList::endParagraph(), OutputList::endTypewriter(), Html, includeClose(), includeOpen(), includeStatement(), QCString::isEmpty(), m_incInfo, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startParagraph(), OutputList::startTypewriter(), and OutputList::writeObjectLink().

Referenced by writeDocumentation().

◆ writeTagFile()

void ConceptDefImpl::writeTagFile ( TextStream & tagFile)
overridevirtual

Implements ConceptDefMutable.

Definition at line 301 of file conceptdef.cpp.

302{
303 tagFile << " <compound kind=\"concept\">\n";
304 tagFile << " <name>" << convertToXML(name()) << "</name>\n";
305 QCString fn = getOutputFileBase();
307 tagFile << " <filename>" << convertToXML(fn) << "</filename>\n";
308 QCString idStr = id();
309 if (!idStr.isEmpty())
310 {
311 tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>\n";
312 }
314 tagFile << " </compound>\n";
315}
void writeDocAnchorsToTagFile(TextStream &fs) const override
QCString convertToXML(const QCString &s, bool keepEntities)
Definition util.cpp:4266
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5243

References addHtmlExtensionIfMissing(), convertToXML(), getOutputFileBase(), DefinitionMixin< ConceptDefMutable >::id(), QCString::isEmpty(), DefinitionMixin< ConceptDefMutable >::name(), and DefinitionMixin< ConceptDefMutable >::writeDocAnchorsToTagFile().

Member Data Documentation

◆ m_fileDef

FileDef* ConceptDefImpl::m_fileDef = nullptr
private

Definition at line 83 of file conceptdef.cpp.

Referenced by getFileDef(), setFileDef(), and writeDefinition().

◆ m_fileName

QCString ConceptDefImpl::m_fileName
private

Definition at line 80 of file conceptdef.cpp.

Referenced by getOutputFileBase().

◆ m_groupId

int ConceptDefImpl::m_groupId = -1
private

Definition at line 87 of file conceptdef.cpp.

Referenced by groupId(), and setGroupId().

◆ m_incInfo

std::unique_ptr<IncludeInfo> ConceptDefImpl::m_incInfo
private

Definition at line 81 of file conceptdef.cpp.

Referenced by includeInfo(), setIncludeFile(), and writeIncludeFiles().

◆ m_initializer

QCString ConceptDefImpl::m_initializer
private

Definition at line 86 of file conceptdef.cpp.

Referenced by initializer(), setInitializer(), and writeDefinition().

◆ m_moduleDef

ModuleDef* ConceptDefImpl::m_moduleDef = nullptr
private

Definition at line 84 of file conceptdef.cpp.

Referenced by getModuleDef(), and setModuleDef().

◆ m_nspace

NamespaceDef* ConceptDefImpl::m_nspace = nullptr
private

Definition at line 82 of file conceptdef.cpp.

Referenced by getNamespaceDef(), and setNamespace().

◆ m_tArgList

ArgumentList ConceptDefImpl::m_tArgList
private

Definition at line 85 of file conceptdef.cpp.

Referenced by getTemplateParameterList(), setInitializer(), and setTemplateArguments().


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