Skip to main content

The TextGeneratorOLImpl Class Reference

Implements TextGeneratorIntf for an OutputDocInterface stream. More...

Declaration

class TextGeneratorOLImpl { ... }

Included Headers

#include <src/util.h>

Base class

classTextGeneratorIntf

Abstract interface for a hyperlinked text fragment. More...

Public Constructors Index

TextGeneratorOLImpl (OutputList &ol)

Public Member Functions Index

voidwriteString (std::string_view s, bool keepSpaces) const override
voidwriteBreak (int indent) const override
voidwriteLink (const QCString &extRef, const QCString &file, const QCString &anchor, std::string_view text) const override

Private Member Attributes Index

OutputList &m_ol

Description

Implements TextGeneratorIntf for an OutputDocInterface stream.

Definition at line 76 of file util.h.

Public Constructors

TextGeneratorOLImpl()

TextGeneratorOLImpl::TextGeneratorOLImpl (OutputList & ol)

Declaration at line 79 of file util.h, definition at line 104 of file util.cpp.

Reference m_ol.

Public Member Functions

writeBreak()

void TextGeneratorOLImpl::writeBreak (int indent)
virtual

Declaration at line 81 of file util.h, definition at line 136 of file util.cpp.

136void TextGeneratorOLImpl::writeBreak(int indent) const
137{
138 m_ol.lineBreak("typebreak");
139 for (int i=0;i<indent;i++)
140 {
141 m_ol.writeNonBreakableSpace(3);
142 }
143}

Reference m_ol.

writeLink()

void TextGeneratorOLImpl::writeLink (const QCString & extRef, const QCString & file, const QCString & anchor, std::string_view text)
virtual

Declaration at line 82 of file util.h, definition at line 145 of file util.cpp.

145void TextGeneratorOLImpl::writeLink(const QCString &extRef,const QCString &file,
146 const QCString &anchor,std::string_view text
147 ) const
148{
149 //printf("TextGeneratorOlImpl::writeLink('%s')\n",text);
150 m_ol.writeObjectLink(extRef,file,anchor,QCString(text));
151}

Reference m_ol.

writeString()

void TextGeneratorOLImpl::writeString (std::string_view s, bool keepSpaces)
virtual

Declaration at line 80 of file util.h, definition at line 108 of file util.cpp.

108void TextGeneratorOLImpl::writeString(std::string_view s,bool keepSpaces) const
109{
110 if (s.empty()) return;
111 //printf("TextGeneratorOlImpl::writeString('%s',%d)\n",s,keepSpaces);
112 if (keepSpaces)
113 {
114 char cs[2];
115 cs[1]='\0';
116 for (size_t i=0;i<s.length();i++)
117 {
118 char c = s[i];
119 if (c==' ')
120 {
121 m_ol.writeNonBreakableSpace(1);
122 }
123 else
124 {
125 cs[0]=c;
126 m_ol.docify(cs);
127 }
128 }
129 }
130 else
131 {
132 m_ol.docify(QCString(s));
133 }
134}

Reference m_ol.

Private Member Attributes

m_ol

OutputList& TextGeneratorOLImpl::m_ol

Definition at line 86 of file util.h.

Referenced by TextGeneratorOLImpl, writeBreak, writeLink and writeString.


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


Generated via doxygen2docusaurus by Doxygen 1.14.0.