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

Implements TextGeneratorIntf for an OutputDocInterface stream. More...

#include <src/util.h>

+ Inheritance diagram for TextGeneratorOLImpl:
+ Collaboration diagram for TextGeneratorOLImpl:

Public Member Functions

 TextGeneratorOLImpl (OutputList &ol)
 
void writeString (std::string_view s, bool keepSpaces) const override
 
void writeBreak (int indent) const override
 
void writeLink (const QCString &extRef, const QCString &file, const QCString &anchor, std::string_view text) const override
 
- Public Member Functions inherited from TextGeneratorIntf

Private Attributes

OutputListm_ol
 

Detailed Description

Implements TextGeneratorIntf for an OutputDocInterface stream.

Definition at line 76 of file util.h.

Constructor & Destructor Documentation

◆ TextGeneratorOLImpl()

TextGeneratorOLImpl::TextGeneratorOLImpl ( OutputList & ol)

Definition at line 103 of file util.cpp.

103 : m_ol(ol)
104{
105}
OutputList & m_ol
Definition util.h:86

References m_ol.

Member Function Documentation

◆ writeBreak()

void TextGeneratorOLImpl::writeBreak ( int indent) const
overridevirtual

Implements TextGeneratorIntf.

Definition at line 135 of file util.cpp.

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

References m_ol.

◆ writeLink()

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

Implements TextGeneratorIntf.

Definition at line 144 of file util.cpp.

147{
148 //printf("TextGeneratorOlImpl::writeLink('%s')\n",text);
149 m_ol.writeObjectLink(extRef,file,anchor,QCString(text));
150}

References m_ol.

◆ writeString()

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

Implements TextGeneratorIntf.

Definition at line 107 of file util.cpp.

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

References m_ol.

Member Data Documentation

◆ m_ol

OutputList& TextGeneratorOLImpl::m_ol
private

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: