Doxygen
Loading...
Searching...
No Matches
DocPlantUmlFile Class Reference

Node representing a uml file. More...

#include <src/docnode.h>

+ Inheritance diagram for DocPlantUmlFile:
+ Collaboration diagram for DocPlantUmlFile:

Public Member Functions

 DocPlantUmlFile (DocParser *parser, DocNodeVariant *parent, const QCString &name, const QCString &context, const QCString &srcFile, int srcLine)
 
bool parse ()
 
- Public Member Functions inherited from DocDiagramFileBase
 DocDiagramFileBase (DocParser *parser, DocNodeVariant *parent, const QCString &name, const QCString &context, const QCString &srcFile, int srcLine)
 
QCString name () const
 
QCString file () const
 
QCString relPath () const
 
bool hasCaption () const
 
QCString width () const
 
QCString height () const
 
QCString context () const
 
QCString srcFile () const
 
int srcLine () const
 
- Public Member Functions inherited from DocCompoundNode
 DocCompoundNode (DocParser *parser, DocNodeVariant *parent)
 
DocNodeListchildren ()
 
const DocNodeListchildren () const
 
- Public Member Functions inherited from DocNode
 DocNode (DocParser *parser, DocNodeVariant *parent)
 
 ~DocNode ()=default
 
DocNodeVariantparent ()
 
const DocNodeVariantparent () const
 
DocNodeVariantthisVariant ()
 
const DocNodeVariantthisVariant () const
 
void setThisVariant (DocNodeVariant *thisVariant)
 
DocParserparser ()
 
const DocParserparser () const
 
void setParent (DocNodeVariant *parent)
 
bool isPreformatted () const
 

Additional Inherited Members

- Protected Types inherited from DocNode
enum  RefType { Unknown , Anchor , Section , Table }
 
- Protected Member Functions inherited from DocNode
void setInsidePreformatted (bool p)
 
- Protected Attributes inherited from DocDiagramFileBase
std::unique_ptr< Privatep
 

Detailed Description

Node representing a uml file.

Definition at line 733 of file docnode.h.

Constructor & Destructor Documentation

◆ DocPlantUmlFile()

DocPlantUmlFile::DocPlantUmlFile ( DocParser * parser,
DocNodeVariant * parent,
const QCString & name,
const QCString & context,
const QCString & srcFile,
int srcLine )

Definition at line 1168 of file docnode.cpp.

1169 :
1171{
1172 p->relPath = parser->context.relPath;
1173}
QCString srcFile() const
Definition docnode.h:685
std::unique_ptr< Private > p
Definition docnode.h:702
int srcLine() const
Definition docnode.h:686
DocDiagramFileBase(DocParser *parser, DocNodeVariant *parent, const QCString &name, const QCString &context, const QCString &srcFile, int srcLine)
Definition docnode.h:675
QCString context() const
Definition docnode.h:684
QCString name() const
Definition docnode.h:678
DocParser * parser()
Definition docnode.h:97
DocNodeVariant * parent()
Definition docnode.h:89

References DocDiagramFileBase::context(), DocDiagramFileBase::DocDiagramFileBase(), DocDiagramFileBase::name(), DocDiagramFileBase::p, parent(), DocNode::parser(), DocDiagramFileBase::srcFile(), and DocDiagramFileBase::srcLine().

Member Function Documentation

◆ parse()

bool DocPlantUmlFile::parse ( )

Definition at line 1175 of file docnode.cpp.

1176{
1177 bool ok = false;
1179
1180 bool ambig = false;
1181 FileDef *fd = findFileDef(Doxygen::plantUmlFileNameLinkedMap,p->name,ambig);
1182 if (fd==nullptr && !p->name.endsWith(".puml")) // try with .puml extension as well
1183 {
1184 fd = findFileDef(Doxygen::plantUmlFileNameLinkedMap,p->name+".puml",ambig);
1185 if (fd==nullptr && !p->name.endsWith(".pu")) // try with .pu extension as well
1186 {
1187 fd = findFileDef(Doxygen::plantUmlFileNameLinkedMap,p->name+".pu",ambig);
1188 }
1189 }
1190 if (fd)
1191 {
1192 p->file = fd->absFilePath();
1193 ok = true;
1194 if (ambig)
1195 {
1196 warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"included uml file name '%s' is ambiguous.\n"
1197 "Possible candidates:\n%s",qPrint(p->name),
1199 );
1200 }
1201 }
1202 else
1203 {
1204 warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"included uml file '%s' is not found "
1205 "in any of the paths specified via PLANTUMLFILE_DIRS!",qPrint(p->name));
1206 }
1207 return ok;
1208}
DocNodeList & children()
Definition docnode.h:142
DocNodeVariant * thisVariant()
Definition docnode.h:92
void defaultHandleTitleAndSize(const CommandType cmd, DocNodeVariant *parent, DocNodeList &children, QCString &width, QCString &height)
static FileNameLinkedMap * plantUmlFileNameLinkedMap
Definition doxygen.h:110
virtual QCString absFilePath() const =0
#define warn_doc_error(file, line, fmt,...)
Definition message.h:74
const char * qPrint(const char *s)
Definition qcstring.h:672
QCString showFileDefMatches(const FileNameLinkedMap *fnMap, const QCString &n)
Definition util.cpp:3388
FileDef * findFileDef(const FileNameLinkedMap *fnMap, const QCString &n, bool &ambig)
Definition util.cpp:3262

References FileDef::absFilePath(), DocCompoundNode::children(), CMD_PLANTUMLFILE, DocDiagramFileBase::context(), DocParser::defaultHandleTitleAndSize(), findFileDef(), DocDiagramFileBase::p, DocNode::parser(), Doxygen::plantUmlFileNameLinkedMap, qPrint(), showFileDefMatches(), DocNode::thisVariant(), and warn_doc_error.


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