Doxygen
conceptdef.h
浏览该文件的文档.
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2021 by Dimitri van Heesch.
4  *
5  * Permission to use, copy, modify, and distribute this software and its
6  * documentation under the terms of the GNU General Public License is hereby
7  * granted. No representations are made about the suitability of this software
8  * for any purpose. It is provided "as is" without express or implied warranty.
9  * See the GNU General Public License for more details.
10  *
11  * Documents produced by Doxygen are derivative works derived from the
12  * input used in their production; they are not affected by this license.
13  *
14  */
15 
16 #ifndef CONCEPTDEF_H
17 #define CONCEPTDEF_H
18 
19 #include "definition.h"
20 #include "filedef.h"
21 
22 class ConceptDef : public Definition
23 {
24  public:
25  virtual DefType definitionType() const = 0;
26  virtual QCString getOutputFileBase() const = 0;
27  virtual bool hasDetailedDescription() const = 0;
28  virtual QCString displayName(bool includeScope=true) const = 0;
29  virtual const IncludeInfo *includeInfo() const = 0;
30  virtual ArgumentList getTemplateParameterList() const = 0;
31  virtual QCString anchor() const = 0;
32  virtual bool isLinkableInProject() const = 0;
33  virtual bool isLinkable() const = 0;
34  virtual QCString initializer() const = 0;
35  virtual void writeDeclarationLink(OutputList &ol,bool &found,
36  const QCString &header,bool localNames) const = 0;
37  virtual const NamespaceDef *getNamespaceDef() const = 0;
38  virtual const FileDef *getFileDef() const = 0;
39  virtual QCString title() const = 0;
40 };
41 
43 {
44  public:
45  virtual void setIncludeFile(FileDef *fd,const QCString &incName,bool local,bool force) = 0;
46  virtual void setTemplateArguments(const ArgumentList &al) = 0;
47  virtual void setNamespace(NamespaceDef *nd) = 0;
48  virtual void setFileDef(FileDef *fd) = 0;
49  virtual void writeTagFile(TextStream &) = 0;
50  virtual void writeDocumentation(OutputList &ol) = 0;
51  virtual void setInitializer(const QCString &init) = 0;
52  virtual void findSectionsInDocumentation() = 0;
53 };
54 
56  const QCString &fileName,int startLine,int startColumn,const QCString &name,
57  const QCString &tagRef=QCString(),const QCString &tagFile=QCString());
58 
59 ConceptDef *createConceptDefAlias(const Definition *newScope,const ConceptDef *cd);
60 
61 // ---- Map
62 
63 class ConceptLinkedMap : public LinkedMap<ConceptDef>
64 {
65 };
66 
67 class ConceptLinkedRefMap : public LinkedRefMap<const ConceptDef>
68 {
69  public:
70  bool declVisible() const;
71  void writeDeclaration(OutputList &ol,const QCString &header,bool localNames) const;
72  void writeDocumentation(OutputList &ol,const Definition * container=0) const;
73 };
74 
75 // ---- Cast functions
76 
79 const ConceptDef *toConceptDef(const Definition *d);
82 
83 // --- Helpers
84 
85 ConceptDef *getConcept(const QCString &key);
87 {
88  return toConceptDefMutable(getConcept(key));
89 }
90 ConceptDef *getResolvedConcept(const Definition *scope,const QCString &name);
91 
92 
93 #endif
ConceptDefMutable
Definition: conceptdef.h:42
Config::init
void init()
ConceptDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
LinkedRefMap
Container class representing a vector of objects with keys.
Definition: linkedmap.h:231
toConceptDef
ConceptDef * toConceptDef(Definition *d)
Definition: conceptdef.cpp:676
ConceptDef::displayName
virtual QCString displayName(bool includeScope=true) const =0
ConceptLinkedRefMap::writeDeclaration
void writeDeclaration(OutputList &ol, const QCString &header, bool localNames) const
Definition: conceptdef.cpp:662
ConceptDef
Definition: conceptdef.h:22
getResolvedConcept
ConceptDef * getResolvedConcept(const Definition *scope, const QCString &name)
Definition: conceptdef.cpp:745
Definition
The common base class of all entity definitions found in the sources.
Definition: definition.h:76
NamespaceDef
An abstract interface of a namespace symbol.
Definition: namespacedef.h:54
ConceptLinkedRefMap::writeDocumentation
void writeDocumentation(OutputList &ol, const Definition *container=0) const
ArgumentList
This class represents an function or template argument list.
Definition: arguments.h:59
ConceptDef::isLinkableInProject
virtual bool isLinkableInProject() const =0
getConcept
ConceptDef * getConcept(const QCString &key)
Definition: conceptdef.cpp:739
createConceptDefAlias
ConceptDef * createConceptDefAlias(const Definition *newScope, const ConceptDef *cd)
Definition: conceptdef.cpp:139
ConceptDef::includeInfo
virtual const IncludeInfo * includeInfo() const =0
toConceptDefMutable
ConceptDefMutable * toConceptDefMutable(Definition *d)
Definition: conceptdef.cpp:713
ConceptDef::getNamespaceDef
virtual const NamespaceDef * getNamespaceDef() const =0
ConceptDef::anchor
virtual QCString anchor() const =0
TextStream
Text streaming class that buffers data.
Definition: textstream.h:33
ConceptDef::writeDeclarationLink
virtual void writeDeclarationLink(OutputList &ol, bool &found, const QCString &header, bool localNames) const =0
ConceptLinkedRefMap::declVisible
bool declVisible() const
Definition: conceptdef.cpp:648
ConceptDefMutable::setFileDef
virtual void setFileDef(FileDef *fd)=0
ConceptDef::hasDetailedDescription
virtual bool hasDetailedDescription() const =0
OutputList
Class representing a list of output generators that are written to in parallel.
Definition: outputlist.h:37
ConceptDefMutable::findSectionsInDocumentation
virtual void findSectionsInDocumentation()=0
ConceptDef::initializer
virtual QCString initializer() const =0
getConceptMutable
ConceptDefMutable * getConceptMutable(const QCString &key)
Definition: conceptdef.h:86
ConceptDef::getTemplateParameterList
virtual ArgumentList getTemplateParameterList() const =0
IncludeInfo
Class representing the data associated with a #include statement.
Definition: filedef.h:48
DefinitionMutable
Definition: definition.h:308
ConceptDefMutable::setInitializer
virtual void setInitializer(const QCString &init)=0
ConceptDefMutable::setNamespace
virtual void setNamespace(NamespaceDef *nd)=0
filedef.h
Definition::DefType
DefType
Definition: definition.h:85
ConceptLinkedMap
Definition: conceptdef.h:63
ConceptDef::title
virtual QCString title() const =0
createConceptDef
ConceptDefMutable * createConceptDef(const QCString &fileName, int startLine, int startColumn, const QCString &name, const QCString &tagRef=QCString(), const QCString &tagFile=QCString())
Definition: conceptdef.cpp:84
ConceptDefMutable::setIncludeFile
virtual void setIncludeFile(FileDef *fd, const QCString &incName, bool local, bool force)=0
ConceptDef::isLinkable
virtual bool isLinkable() const =0
definition.h
ConceptDefMutable::writeTagFile
virtual void writeTagFile(TextStream &)=0
ConceptLinkedRefMap
Definition: conceptdef.h:67
ConceptDef::definitionType
virtual DefType definitionType() const =0
FileDef
A model of a file symbol.
Definition: filedef.h:73
LinkedMap
Container class representing a vector of objects with keys.
Definition: linkedmap.h:35
ConceptDef::getFileDef
virtual const FileDef * getFileDef() const =0
ConceptDefMutable::writeDocumentation
virtual void writeDocumentation(OutputList &ol)=0
ConceptDefMutable::setTemplateArguments
virtual void setTemplateArguments(const ArgumentList &al)=0
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108