|
| ManCodeGenerator (TextStream *t) |
|
void | setTextStream (TextStream *t) |
|
OutputType | type () const override |
|
std::unique_ptr< OutputCodeIntf > | clone () override |
|
void | codify (const QCString &text) override |
|
void | stripCodeComments (bool b) override |
|
void | startSpecialComment () override |
|
void | endSpecialComment () override |
|
void | setStripIndentAmount (size_t amount) override |
|
void | writeCodeLink (CodeSymbolType type, const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name, const QCString &tooltip) override |
|
void | writeTooltip (const QCString &, const DocLinkInfo &, const QCString &, const QCString &, const SourceLinkInfo &, const SourceLinkInfo &) override |
|
void | writeLineNumber (const QCString &, const QCString &, const QCString &, int l, bool) override |
|
void | startCodeLine (int) override |
|
void | endCodeLine () override |
|
void | startFontClass (const QCString &) override |
|
void | endFontClass () override |
|
void | writeCodeAnchor (const QCString &) override |
|
void | startCodeFragment (const QCString &style) override |
|
void | endCodeFragment (const QCString &) override |
|
void | startFold (int, const QCString &, const QCString &) override |
|
void | endFold () override |
|
| OutputCodeIntf ()=default |
|
Generator for Man page code fragments.
Definition at line 24 of file mangen.h.
void ManCodeGenerator::codify |
( |
const QCString & | text | ) |
|
|
overridevirtual |
Implements OutputCodeIntf.
Definition at line 162 of file mangen.cpp.
163{
166 if (!str.isEmpty())
167 {
168 char c;
169 const char *p=str.data();
171 {
173 }
174 else
175 {
176 while ((c=*p++))
177 {
178 switch(c)
179 {
180 case '-': *
m_t <<
"\\-";
break;
181 case '.': *
m_t <<
"\\&.";
break;
182 case '\t': {
183 int spacesToNextTabStop = tabSize - (
m_col%tabSize);
184 while (spacesToNextTabStop--)
185 {
186 if (
m_col>=stripAmount) *
m_t <<
" ";
188 }
189 }
190 break;
191 case ' ':
if (
m_col>=stripAmount) *
m_t <<
" ";
193 break;
194 case '\n': *
m_t <<
"\n";
m_col=0;
break;
195 case '\\': *
m_t <<
"\\\\";
m_col++;
break;
196 case '\"':
198 }
199 }
200
201 }
202 }
203}
size_t m_stripIndentAmount
#define Config_getInt(name)
const char * writeUTF8Char(TextStream &t, const char *s)
Writes the UTF8 character pointed to by s to stream t and returns a pointer to the next character.
size_t updateColumnCount(const char *s, size_t col)
References Config_getInt, QCString::data(), QCString::isEmpty(), m_col, m_hide, m_stripIndentAmount, m_t, updateColumnCount(), and writeUTF8Char().
Referenced by endCodeLine().