Doxygen
DocImage类 参考

Node representing an image 更多...

#include <docparser.h>

+ 类 DocImage 继承关系图:
+ DocImage 的协作图:

Public 类型

enum  Type {
  Html, Latex, Rtf, DocBook,
  Xml
}
 
- Public 类型 继承自 DocNode
enum  Kind {
  Kind_Root = 0, Kind_Word = 1, Kind_WhiteSpace = 2, Kind_Para = 3,
  Kind_AutoList = 4, Kind_AutoListItem = 5, Kind_Symbol = 6, Kind_URL = 7,
  Kind_StyleChange = 8, Kind_SimpleSect = 9, Kind_Title = 10, Kind_SimpleList = 11,
  Kind_SimpleListItem = 12, Kind_Section = 13, Kind_Verbatim = 14, Kind_XRefItem = 15,
  Kind_HtmlList = 16, Kind_HtmlListItem = 17, Kind_HtmlDescList = 18, Kind_HtmlDescData = 19,
  Kind_HtmlDescTitle = 20, Kind_HtmlTable = 21, Kind_HtmlRow = 22, Kind_HtmlCell = 23,
  Kind_HtmlCaption = 24, Kind_LineBreak = 25, Kind_HorRuler = 26, Kind_Anchor = 27,
  Kind_IndexEntry = 28, Kind_Internal = 29, Kind_HRef = 30, Kind_Include = 31,
  Kind_IncOperator = 32, Kind_HtmlHeader = 33, Kind_Image = 34, Kind_DotFile = 35,
  Kind_Link = 36, Kind_Ref = 37, Kind_Formula = 38, Kind_SecRefItem = 39,
  Kind_SecRefList = 40, Kind_SimpleSectSep = 41, Kind_LinkedWord = 42, Kind_ParamSect = 43,
  Kind_ParamList = 44, Kind_InternalRef = 45, Kind_Copy = 46, Kind_Text = 47,
  Kind_MscFile = 48, Kind_HtmlBlockQuote = 49, Kind_VhdlFlow = 50, Kind_ParBlock = 51,
  Kind_DiaFile = 52, Kind_Emoji = 53, Kind_Sep = 54
}
 

Public 成员函数

 DocImage (DocParser &parser, DocNode *parent, const HtmlAttribList &attribs, const QCString &name, Type t, const QCString &url=QCString(), bool inlineImage=TRUE)
 
Kind kind () const override
 
Type type () const
 
QCString name () const
 
bool hasCaption () const
 
QCString width () const
 
QCString height () const
 
QCString relPath () const
 
QCString url () const
 
bool isInlineImage () const
 
bool isSVG () const
 
const HtmlAttribListattribs () const
 
void parse ()
 
- Public 成员函数 继承自 CompAccept< DocImage >
 CompAccept (DocParser &parser)
 
void accept (DocVisitor *v) override
 
const DocNodeListchildren () const
 
DocNodeListchildren ()
 
- Public 成员函数 继承自 DocNode
 DocNode (DocParser &parser)
 
virtual ~DocNode ()
 
DocNodeparent () const
 
void setParent (DocNode *parent)
 
bool isPreformatted () const
 

Private 属性

HtmlAttribList m_attribs
 
QCString m_name
 
Type m_type = Html
 
QCString m_width
 
QCString m_height
 
QCString m_relPath
 
QCString m_url
 
bool m_inlineImage = false
 

额外继承的成员函数

- Protected 类型 继承自 DocNode
enum  RefType { Unknown, Anchor, Section, Table }
 
- Protected 成员函数 继承自 DocNode
void setInsidePreformatted (bool p)
 
- Protected 属性 继承自 CompAccept< DocImage >
DocNodeList m_children
 
- Protected 属性 继承自 DocNode
DocNodem_parent = 0
 
DocParserm_parser
 

详细描述

Node representing an image

在文件 docparser.h771 行定义.

成员枚举类型说明

◆ Type

枚举值
Html 
Latex 
Rtf 
DocBook 
Xml 

在文件 docparser.h774 行定义.

774 { Html, Latex, Rtf, DocBook, Xml };

构造及析构函数说明

◆ DocImage()

DocImage::DocImage ( DocParser parser,
DocNode parent,
const HtmlAttribList attribs,
const QCString name,
Type  t,
const QCString url = QCString(),
bool  inlineImage = TRUE 
)

在文件 docparser.cpp2859 行定义.

2860  :
2862  m_type(t), m_relPath(parser.context.relPath),
2863  m_url(url), m_inlineImage(inlineImage)
2864 {
2865  m_parent = parent;
2866 }

引用了 DocNode::m_parent , 以及 DocNode::parent().

成员函数说明

◆ attribs()

const HtmlAttribList& DocImage::attribs ( ) const
inline

在文件 docparser.h787 行定义.

787 { return m_attribs; }

引用了 m_attribs.

被这些函数引用 HtmlDocVisitor::visitPre() , 以及 XmlDocVisitor::visitPre().

◆ hasCaption()

◆ height()

QCString DocImage::height ( ) const
inline

在文件 docparser.h782 行定义.

782 { return m_height; }

引用了 m_height.

被这些函数引用 HtmlDocVisitor::visitPre(), DocbookDocVisitor::visitPre(), LatexDocVisitor::visitPre() , 以及 XmlDocVisitor::visitPre().

◆ isInlineImage()

◆ isSVG()

bool DocImage::isSVG ( ) const

在文件 docparser.cpp2868 行定义.

2869 {
2870  QCString locName = m_url.isEmpty() ? m_name : m_url;
2871  int len = (int)locName.length();
2872  int fnd = locName.find('?'); // ignore part from ? until end
2873  if (fnd==-1) fnd=len;
2874  return fnd>=4 && locName.mid(fnd-4,4)==".svg";
2875 }

引用了 QCString::find(), QCString::isEmpty(), QCString::length(), m_name, m_url , 以及 QCString::mid().

被这些函数引用 HtmlDocVisitor::visitPre().

◆ kind()

Kind DocImage::kind ( ) const
inlineoverridevirtual

Returns the kind of node. Provides runtime type information

实现了 DocNode.

在文件 docparser.h777 行定义.

777 { return Kind_Image; }

引用了 DocNode::Kind_Image.

◆ name()

◆ parse()

◆ relPath()

QCString DocImage::relPath ( ) const
inline

在文件 docparser.h783 行定义.

783 { return m_relPath; }

引用了 m_relPath.

被这些函数引用 HtmlDocVisitor::visitPre(), DocbookDocVisitor::visitPre() , 以及 XmlDocVisitor::visitPre().

◆ type()

◆ url()

QCString DocImage::url ( ) const
inline

在文件 docparser.h784 行定义.

784 { return m_url; }

引用了 m_url.

被这些函数引用 HtmlDocVisitor::visitPre() , 以及 XmlDocVisitor::visitPre().

◆ width()

QCString DocImage::width ( ) const
inline

在文件 docparser.h781 行定义.

781 { return m_width; }

引用了 m_width.

被这些函数引用 HtmlDocVisitor::visitPre(), DocbookDocVisitor::visitPre(), LatexDocVisitor::visitPre() , 以及 XmlDocVisitor::visitPre().

类成员变量说明

◆ m_attribs

HtmlAttribList DocImage::m_attribs
private

在文件 docparser.h791 行定义.

被这些函数引用 attribs().

◆ m_height

QCString DocImage::m_height
private

在文件 docparser.h795 行定义.

被这些函数引用 height() , 以及 parse().

◆ m_inlineImage

bool DocImage::m_inlineImage = false
private

在文件 docparser.h798 行定义.

被这些函数引用 isInlineImage().

◆ m_name

QCString DocImage::m_name
private

在文件 docparser.h792 行定义.

被这些函数引用 isSVG() , 以及 name().

◆ m_relPath

QCString DocImage::m_relPath
private

在文件 docparser.h796 行定义.

被这些函数引用 relPath().

◆ m_type

Type DocImage::m_type = Html
private

在文件 docparser.h793 行定义.

被这些函数引用 type().

◆ m_url

QCString DocImage::m_url
private

在文件 docparser.h797 行定义.

被这些函数引用 isSVG() , 以及 url().

◆ m_width

QCString DocImage::m_width
private

在文件 docparser.h794 行定义.

被这些函数引用 parse() , 以及 width().


该类的文档由以下文件生成:
DocImage::m_name
QCString m_name
Definition: docparser.h:792
DocParser::context
DocParserContext context
Definition: docparser.cpp:175
DocParserContext::relPath
QCString relPath
Definition: docparser.cpp:111
CompAccept< DocImage >
DocImage::Xml
@ Xml
Definition: docparser.h:774
QCString::length
uint length() const
Returns the length of the string, not counting the 0-terminator.
Definition: qcstring.h:147
QCString::isEmpty
bool isEmpty() const
Returns TRUE iff the string is empty
Definition: qcstring.h:144
DocImage::DocBook
@ DocBook
Definition: docparser.h:774
QCString::find
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:38
DocParser::defaultHandleTitleAndSize
void defaultHandleTitleAndSize(const int cmd, DocNode *parent, DocNodeList &children, QCString &width, QCString &height)
Definition: docparser.cpp:1209
DocImage::name
QCString name() const
Definition: docparser.h:779
DocImage::Html
@ Html
Definition: docparser.h:774
DocImage::Latex
@ Latex
Definition: docparser.h:774
DocImage::m_width
QCString m_width
Definition: docparser.h:794
CMD_IMAGE
@ CMD_IMAGE
Definition: cmdmapper.h:59
DocNode::m_parser
DocParser & m_parser
Definition: docparser.h:184
DocImage::Rtf
@ Rtf
Definition: docparser.h:774
DocImage::m_type
Type m_type
Definition: docparser.h:793
QCString::mid
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition: qcstring.h:224
DocImage::m_height
QCString m_height
Definition: docparser.h:795
DocImage::m_relPath
QCString m_relPath
Definition: docparser.h:796
DocImage::m_inlineImage
bool m_inlineImage
Definition: docparser.h:798
DocImage::m_attribs
HtmlAttribList m_attribs
Definition: docparser.h:791
DocImage::m_url
QCString m_url
Definition: docparser.h:797
DocNode::parent
DocNode * parent() const
Definition: docparser.h:166
DocImage::url
QCString url() const
Definition: docparser.h:784
DocImage::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:787
CompAccept< DocImage >::m_children
DocNodeList m_children
Definition: docparser.h:211
DocNode::Kind_Image
@ Kind_Image
Definition: docparser.h:134
DocNode::m_parent
DocNode * m_parent
Definition: docparser.h:182
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108