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

Node representing a style change. More...

#include <src/docnode.h>

+ Inheritance diagram for DocStyleChange:
+ Collaboration diagram for DocStyleChange:

Public Types

enum  Style {
  Bold = (1<<0) , Italic = (1<<1) , Code = (1<<2) , Center = (1<<3) ,
  Small = (1<<4) , Subscript = (1<<5) , Superscript = (1<<6) , Preformatted = (1<<7) ,
  Span = (1<<8) , Div = (1<<9) , Strike = (1<<10) , Underline = (1<<11) ,
  Del = (1<<12) , Ins = (1<<13) , S = (1<<14) , Cite = (1<<15) ,
  Kbd = (1<<16)
}
 

Public Member Functions

 DocStyleChange (DocParser *parser, DocNodeVariant *parent, size_t position, Style s, const QCString &tagName, bool enable, const HtmlAttribList *attribs=nullptr)
 
 DocStyleChange (DocParser *parser, DocNodeVariant *parent, size_t position, Style s, const QCString &tagName, bool enable, const QCString &fileName, int lineNr, const HtmlAttribList *attribs=nullptr)
 
Style style () const
 
const char * styleString () const
 
bool enable () const
 
size_t position () const
 
const HtmlAttribListattribs () const
 
QCString tagName () const
 
QCString fileName () const
 
int lineNr () 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
 

Private Attributes

size_t m_position = 0
 
Style m_style = Bold
 
bool m_enable = false
 
HtmlAttribList m_attribs
 
QCString m_tagName
 
QCString m_fileName
 
int m_lineNr = -1
 

Additional Inherited Members

- Protected Types inherited from DocNode
enum  RefType { Unknown , Anchor , Section , Table }
 
- Protected Member Functions inherited from DocNode
void setInsidePreformatted (bool p)
 

Detailed Description

Node representing a style change.

Definition at line 263 of file docnode.h.

Member Enumeration Documentation

◆ Style

Enumerator
Bold 
Italic 
Code 
Center 
Small 
Subscript 
Superscript 
Preformatted 
Span 
Div 
Strike 
Underline 
Del 
Ins 
Cite 
Kbd 

Definition at line 266 of file docnode.h.

266 { Bold = (1<<0),
267 Italic = (1<<1),
268 Code = (1<<2),
269 Center = (1<<3),
270 Small = (1<<4),
271 Subscript = (1<<5),
272 Superscript = (1<<6),
273 Preformatted = (1<<7),
274 Span = (1<<8),
275 Div = (1<<9),
276 Strike = (1<<10),
277 Underline = (1<<11),
278 Del = (1<<12),
279 Ins = (1<<13),
280 S = (1<<14),
281 Cite = (1<<15),
282 Kbd = (1<<16)
283 };

Constructor & Destructor Documentation

◆ DocStyleChange() [1/2]

DocStyleChange::DocStyleChange ( DocParser * parser,
DocNodeVariant * parent,
size_t position,
Style s,
const QCString & tagName,
bool enable,
const HtmlAttribList * attribs = nullptr )
inline

Definition at line 285 of file docnode.h.

288 {
290 m_tagName = tagName.lower();
291 }
DocNode(DocParser *parser, DocNodeVariant *parent)
Definition docnode.h:84
DocParser * parser()
Definition docnode.h:97
DocNodeVariant * parent()
Definition docnode.h:89
const HtmlAttribList & attribs() const
Definition docnode.h:306
QCString tagName() const
Definition docnode.h:307
Style m_style
Definition docnode.h:313
size_t position() const
Definition docnode.h:305
HtmlAttribList m_attribs
Definition docnode.h:315
bool enable() const
Definition docnode.h:304
size_t m_position
Definition docnode.h:312
QCString m_tagName
Definition docnode.h:316

References attribs(), DocNode::DocNode(), enable(), m_attribs, m_enable, m_position, m_style, m_tagName, DocNode::parent(), DocNode::parser(), position(), and tagName().

◆ DocStyleChange() [2/2]

DocStyleChange::DocStyleChange ( DocParser * parser,
DocNodeVariant * parent,
size_t position,
Style s,
const QCString & tagName,
bool enable,
const QCString & fileName,
int lineNr,
const HtmlAttribList * attribs = nullptr )
inline

Member Function Documentation

◆ attribs()

const HtmlAttribList & DocStyleChange::attribs ( ) const
inline

Definition at line 306 of file docnode.h.

306{ return m_attribs; }

References m_attribs.

Referenced by DocStyleChange(), DocStyleChange(), DocParser::handleInitialStyleCommands(), and HtmlDocVisitor::operator()().

◆ enable()

◆ fileName()

QCString DocStyleChange::fileName ( ) const
inline

Definition at line 308 of file docnode.h.

308{ return m_fileName; }

References m_fileName.

Referenced by DocStyleChange().

◆ lineNr()

int DocStyleChange::lineNr ( ) const
inline

Definition at line 309 of file docnode.h.

309{ return m_lineNr; }

References m_lineNr.

Referenced by DocStyleChange().

◆ position()

size_t DocStyleChange::position ( ) const
inline

Definition at line 305 of file docnode.h.

305{ return m_position; }

References m_position.

Referenced by DocStyleChange(), DocStyleChange(), and DocParser::handlePendingStyleCommands().

◆ style()

◆ styleString()

const char * DocStyleChange::styleString ( ) const

Definition at line 125 of file docnode.cpp.

126{
127 switch (m_style)
128 {
129 case DocStyleChange::Bold: return "b";
130 case DocStyleChange::Italic: return "em";
131 case DocStyleChange::Code: return "code";
132 case DocStyleChange::Center: return "center";
133 case DocStyleChange::Small: return "small";
134 case DocStyleChange::Cite: return "cite";
135 case DocStyleChange::Subscript: return "subscript";
136 case DocStyleChange::Superscript: return "superscript";
137 case DocStyleChange::Preformatted: return "pre";
138 case DocStyleChange::Div: return "div";
139 case DocStyleChange::Span: return "span";
140 case DocStyleChange::Strike: return "strike";
141 case DocStyleChange::S: return "s";
142 case DocStyleChange::Del: return "del";
143 case DocStyleChange::Underline: return "u";
144 case DocStyleChange::Ins: return "ins";
145 case DocStyleChange::Kbd: return "kbd";
146 }
147 return "<invalid>";
148}

References Bold, Center, Cite, Code, Del, Div, Ins, Italic, Kbd, m_style, Preformatted, S, Small, Span, Strike, Subscript, Superscript, and Underline.

◆ tagName()

QCString DocStyleChange::tagName ( ) const
inline

Member Data Documentation

◆ m_attribs

HtmlAttribList DocStyleChange::m_attribs
private

Definition at line 315 of file docnode.h.

Referenced by attribs(), DocStyleChange(), and DocStyleChange().

◆ m_enable

bool DocStyleChange::m_enable = false
private

Definition at line 314 of file docnode.h.

Referenced by DocStyleChange(), DocStyleChange(), and enable().

◆ m_fileName

QCString DocStyleChange::m_fileName
private

Definition at line 317 of file docnode.h.

Referenced by DocStyleChange(), and fileName().

◆ m_lineNr

int DocStyleChange::m_lineNr = -1
private

Definition at line 318 of file docnode.h.

Referenced by DocStyleChange(), and lineNr().

◆ m_position

size_t DocStyleChange::m_position = 0
private

Definition at line 312 of file docnode.h.

Referenced by DocStyleChange(), DocStyleChange(), and position().

◆ m_style

Style DocStyleChange::m_style = Bold
private

Definition at line 313 of file docnode.h.

Referenced by DocStyleChange(), DocStyleChange(), style(), and styleString().

◆ m_tagName

QCString DocStyleChange::m_tagName
private

Definition at line 316 of file docnode.h.

Referenced by DocStyleChange(), DocStyleChange(), and tagName().


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