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

#include <src/doctokenizer.h>

Public Member Functions

 Token (TokenRetval tv)
 
TokenRetval value () const
 
TOKEN_SPECIFICATIONS RETVAL_SPECIFICATIONS const char * to_string () const
 
char command_to_char () const
 
template<typename... ARGS>
bool is_any_of (ARGS... args) const
 
bool is (TokenRetval rv) const
 

Static Public Member Functions

static Token char_to_command (char c)
 

Private Attributes

TokenRetval m_value
 

Friends

bool operator== (const Token &t1, const Token &t2)
 
bool operator!= (const Token &t1, const Token &t2)
 

Detailed Description

Definition at line 81 of file doctokenizer.h.

Constructor & Destructor Documentation

◆ Token()

Token::Token ( TokenRetval tv)
inlineexplicit

Definition at line 84 of file doctokenizer.h.

84: m_value(tv) {}
TokenRetval m_value

References m_value.

Referenced by char_to_command(), operator!=, and operator==.

Member Function Documentation

◆ char_to_command()

static Token Token::char_to_command ( char c)
inlinestatic

Definition at line 109 of file doctokenizer.h.

110 {
111 return c=='@' ? make_TK_COMMAND_AT() : make_TK_COMMAND_BS();
112 }

References Token().

◆ command_to_char()

char Token::command_to_char ( ) const
inline

Definition at line 104 of file doctokenizer.h.

105 {
106 return m_value==TokenRetval::TK_COMMAND_AT ? '@' : '\\';
107 }

References m_value.

Referenced by DocParser::errorHandleDefaultToken(), DocHtmlDescTitle::parse(), DocLink::parse(), DocPara::parse(), and DocSecRefList::parse().

◆ is()

bool Token::is ( TokenRetval rv) const
inline

Definition at line 120 of file doctokenizer.h.

121 {
122 return m_value==rv;
123 }

References m_value.

Referenced by DocParser::defaultHandleTitleAndSize(), DocParser::defaultHandleToken(), DocParser::handleAnchor(), DocPara::handleCite(), DocPara::handleDoxyConfig(), DocPara::handleEmoji(), DocPara::handleFile(), DocPara::handleHtmlStartTag(), DocPara::handleIFile(), DocPara::handleILine(), DocParser::handleImage(), DocPara::handleInclude(), DocPara::handleIncludeOperator(), DocParser::handleInternalRef(), DocPara::handleLink(), DocPara::handleParamSection(), DocParser::handlePrefix(), DocPara::handleRef(), DocPara::handleSection(), DocPara::handleShowDate(), DocPara::handleSimpleSection(), DocParser::handleStyleArgument(), DocPara::handleXRefItem(), DocParser::internalValidatingParseDoc(), DocAutoList::parse(), DocAutoListItem::parse(), DocHtmlBlockQuote::parse(), DocHtmlCell::parse(), DocHtmlDescData::parse(), DocHtmlDescList::parse(), DocHtmlDescTitle::parse(), DocHtmlDetails::parse(), DocHtmlList::parse(), DocHtmlListItem::parse(), DocHtmlRow::parse(), DocHtmlTable::parse(), DocIndexEntry::parse(), DocInternal::parse(), DocPara::parse(), DocParamList::parse(), DocParamSect::parse(), DocParBlock::parse(), DocRoot::parse(), DocSecRefList::parse(), DocSection::parse(), DocSimpleList::parse(), DocHtmlCell::parseXml(), DocHtmlList::parseXml(), DocHtmlListItem::parseXml(), DocHtmlRow::parseXml(), DocHtmlTable::parseXml(), DocParamList::parseXml(), and DocSimpleSect::parseXml().

◆ is_any_of()

◆ to_string()

TOKEN_SPECIFICATIONS RETVAL_SPECIFICATIONS const char * Token::to_string ( ) const
inline

Definition at line 91 of file doctokenizer.h.

92 {
93 const char *result = "ERROR";
94 switch (m_value)
95 {
96#define TKSPEC(x,y) case TokenRetval::x: result = #x; break;
99#undef TKSPEC
100 }
101 return result;
102 }
#define TOKEN_SPECIFICATIONS
#define RETVAL_SPECIFICATIONS

References m_value, RETVAL_SPECIFICATIONS, and TOKEN_SPECIFICATIONS.

Referenced by DocParser::defaultHandleToken(), DocParser::errorHandleDefaultToken(), DocParser::handleAnchor(), DocPara::handleCite(), DocPara::handleCommand(), DocPara::handleDoxyConfig(), DocPara::handleEmoji(), DocPara::handleFile(), DocPara::handleHtmlEndTag(), DocPara::handleHtmlStartTag(), DocPara::handleIFile(), DocParser::handleImage(), DocPara::handleInclude(), DocPara::handleIncludeOperator(), DocParser::handleInternalRef(), DocPara::handleLink(), DocPara::handleParamSection(), DocParser::handlePrefix(), DocPara::handleRef(), DocPara::handleSection(), DocPara::handleStartCode(), DocParser::handleStyleArgument(), DocAutoList::parse(), DocAutoListItem::parse(), DocHtmlBlockQuote::parse(), DocHtmlDescList::parse(), DocHtmlDescTitle::parse(), DocHtmlDetails::parse(), DocHtmlList::parse(), DocHtmlListItem::parse(), DocHtmlRow::parse(), DocHtmlTable::parse(), DocIndexEntry::parse(), DocInternal::parse(), DocLink::parse(), DocPara::parse(), DocParamList::parse(), DocParamSect::parse(), DocParBlock::parse(), DocSecRefList::parse(), DocSection::parse(), DocSimpleSect::parse(), DocText::parse(), DocHtmlList::parseXml(), DocHtmlListItem::parseXml(), DocHtmlRow::parseXml(), DocParamList::parseXml(), and DocSimpleSect::parseXml().

◆ value()

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( const Token & t1,
const Token & t2 )
friend

Definition at line 126 of file doctokenizer.h.

126{ return !(operator==(t1,t2)); }
friend bool operator==(const Token &t1, const Token &t2)

References operator==, and Token().

◆ operator==

bool operator== ( const Token & t1,
const Token & t2 )
friend

Definition at line 125 of file doctokenizer.h.

125{ return t1.m_value==t2.m_value; }

References m_value, and Token().

Referenced by operator!=.

Member Data Documentation

◆ m_value

TokenRetval Token::m_value
private

Definition at line 129 of file doctokenizer.h.

Referenced by command_to_char(), is(), is_any_of(), operator==, to_string(), Token(), and value().


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