浏览该文件的文档.
36 className=
"anonymous:";
53 fullName = cd->
name();
63 n->
addChild(bn,prot,edgeStyle,label);
68 bn->
addChild(n,prot,edgeStyle,label);
97 n->
addChild(bn,prot,edgeStyle,label);
102 bn->
addChild(n,prot,edgeStyle,label);
116 while (!queue.empty())
122 bool truncated =
FALSE;
123 for (
const auto &dn : n->
children())
125 if (!dn->isVisible())
132 for (
const auto &dn : n->
parents())
134 if (!dn->isVisible())
146 int maxNodes,
bool includeParents)
152 childQueue.push_back(rootNode);
153 if (includeParents) parentQueue.push_back(rootNode);
156 while ((!childQueue.empty() || !parentQueue.empty()) && maxNodes>0)
158 if (!childQueue.empty())
160 DotNode *n = childQueue.front();
161 childQueue.pop_front();
167 int oldSize=(int)childTreeWidth.size();
168 if (distance>oldSize)
170 childTreeWidth.resize(std::max(childTreeWidth.size(),(
size_t)distance));
171 int i;
for (i=oldSize;i<distance;i++) childTreeWidth[i]=0;
178 for (
const auto &dn : n->
children())
180 childQueue.push_back(dn);
184 if (includeParents && !parentQueue.empty())
186 DotNode *n = parentQueue.front();
187 parentQueue.pop_front();
194 int oldSize = (int)parentTreeWidth.size();
195 if (distance>oldSize)
197 parentTreeWidth.resize(std::max(parentTreeWidth.size(),(size_t)distance));
198 int i;
for (i=oldSize;i<distance;i++) parentTreeWidth[i]=0;
205 for (
const auto &dn : n->
parents())
207 parentQueue.push_back(dn);
214 int maxHeight=(int)std::max(childTreeWidth.size(),parentTreeWidth.size());
216 for (i=0;i<childTreeWidth.size();i++)
218 if (childTreeWidth.at(i)>maxWidth) maxWidth=childTreeWidth.at(i);
220 for (i=0;i<parentTreeWidth.size();i++)
222 if (parentTreeWidth.at(i)>maxWidth) maxWidth=parentTreeWidth.at(i);
225 return maxWidth>80 && maxHeight<12;
239 label += (*it++).c_str();
240 for (; it!=e && count < maxLabels ; ++it,++count)
243 label += (*it).c_str();
245 if (count==maxLabels) label+=
"\n...";
262 addClass(bcd.classDef,n,bcd.prot,
QCString(),bcd.usedName,bcd.templSpecifiers,base,distance);
271 for (
const auto &ucd : list)
275 ucd.templSpecifiers,base,distance);
324 tmp_url+=
"#"+cd->
anchor();
420 mapName=
"inherit_map";
435 return "Collaboration graph";
438 return "Inheritance graph";
454 bool generateImageMap,
457 return DotGraph::writeGraph(out, graphFormat, textFormat, path, fileName, relPath, generateImageMap, graphId);
466 kv.second->writeXML(t,
TRUE);
474 kv.second->writeDocbook(t,
TRUE);
482 kv.second->writeDEF(t);
static void computeGraph(DotNode *root, GraphType gt, GraphOutputFormat format, const QCString &rank, bool renderParents, bool backArrows, const QCString &title, QCString &graphStr)
void addChild(DotNode *n, int edgeColor=EdgeInfo::Purple, int edgeStyle=EdgeInfo::Solid, const QCString &edgeLab=QCString(), const QCString &edgeURL=QCString(), int edgeLabCol=-1)
const DotNodeRefVector & parents() const
QCString stripScope(const QCString &name)
void setDistance(int distance)
uint length() const
Returns the length of the string, not counting the 0-terminator.
bool isEmpty() const
Returns TRUE iff the string is empty
void markAsTruncated(bool b=TRUE)
std::set< std::string > StringSet
static void deleteNodes(DotNode *node)
virtual bool isHidden() const =0
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool TBRank=TRUE, bool imageMap=TRUE, int graphId=-1)
void addParent(DotNode *n)
int getNextNodeNumber()
returns node numbers.
std::vector< int > IntVector
Text streaming class that buffers data.
void markAsVisible(bool b=TRUE)
DirIterator begin(DirIterator it) noexcept
DirIterator end(const DirIterator &) noexcept
virtual const ClassDef * templateMaster() const =0
Returns the template master of which this class is an instance.
QCString m_inheritFileName
A abstract class representing of a compound symbol.
#define Config_getInt(name)
virtual void computeTheGraph()
void buildGraph(const ClassDef *cd, DotNode *n, bool base, int distance)
virtual bool isAnonymous() const =0
virtual const TemplateInstanceList & getTemplateInstances() const =0
Returns a sorted dictionary with all template instances found for this template class.
virtual QCString getOutputFileBase() const =0
Returns the unique base name (without extension) of the class's file on disk
virtual const BaseClassList & baseClasses() const =0
Returns the list of base classes from which this class directly inherits.
virtual QCString name() const =0
static QCString joinLabels(const StringSet &ss)
virtual QCString getImgAltText() const
GraphOutputFormat m_graphFormat
QCString m_collabFileName
TruncState isTruncated() const
QCString insertTemplateSpecifierInScope(const QCString &scope, const QCString &templ)
void addClass(const ClassDef *cd, DotNode *n, int prot, const QCString &label, const QCString &usedName, const QCString &templSpec, bool base, int distance)
virtual const BaseClassList & subClasses() const =0
Returns the list of sub classes that directly derive from this class
virtual QCString getBaseName() const
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1)
void writeDEF(TextStream &t)
void writeXML(TextStream &t)
#define Config_getBool(name)
void writeDocbook(TextStream &t)
virtual QCString collaborationGraphFileName() const =0
returns the file name to use for the collaboration graph
virtual QCString getReference() const =0
If this class originated from a tagfile, this will return the tag file reference
QCString escapeCharsInString(const QCString &name, bool allowDots, bool allowUnderscore)
virtual QCString getMapLabel() const
virtual const UsesClassList & usedImplementationClasses() const =0
bool determineVisibleNodes(DotNode *rootNode, int maxNodes, bool includeParents)
virtual QCString displayName(bool includeScope=TRUE) const =0
Returns the name as it is appears in the documentation
void determineTruncatedNodes(DotNodeDeque &queue, bool includeParents)
virtual QCString briefDescriptionAsTooltip() const =0
A bunch of utility functions.
virtual bool isLinkable() const =0
return TRUE iff a link to this class is possible (either within this project, or as a cross-reference...
virtual const ConstraintClassList & templateTypeConstraints() const =0
virtual QCString inheritanceGraphFileName() const =0
returns the file name to use for the inheritance graph
const DotNodeRefVector & children() const
virtual const UsesClassList & usedByImplementationClasses() const =0
virtual QCString anchor() const =0
DotClassGraph(const ClassDef *cd, GraphType t)
This is an alternative implementation of QCString.