64 if (ext.
at(0)<
'0' || ext.
at(0)>
'9')
88 const char *p=str.
data();
94 case '-': result +=
"\\-";
break;
95 case '.': result +=
"\\&.";
break;
96 case '\\': result +=
"\\\\";
break;
97 case '\n': result +=
"\n";
break;
99 default: result += c;
break;
147 const char *p=name.
data();
153 case '-': *
m_t <<
"\\-";
break;
154 case '.': *
m_t <<
"\\&.";
break;
155 case '\\': *
m_t <<
"\\\\";
m_col++;
break;
156 case '\n': *
m_t <<
"\n";
m_col=0;
break;
172 const char *p=str.
data();
183 case '-': *
m_t <<
"\\-";
break;
184 case '.': *
m_t <<
"\\&.";
break;
186 int spacesToNextTabStop = tabSize - (
m_col%tabSize);
187 while (spacesToNextTabStop--)
189 if (
m_col>=stripAmount) *
m_t <<
" ";
194 case ' ':
if (
m_col>=stripAmount) *
m_t <<
" ";
197 case '\n': *
m_t <<
"\n";
m_col=0;
break;
198 case '\\': *
m_t <<
"\\\\";
m_col++;
break;
282 term(
"Could not create output directory {}\n",manOutput);
287 term(
"Could not create output directory {}/{}\n",manOutput,
getSubdir());
302 if (name.
empty())
return "noname";
304 const char *p=name.
data();
332 if (fileName.
right(manExtension.
length())!=manExtension)
334 fileName+=manExtension;
357 case TIMESTAMP_t::YES:
358 case TIMESTAMP_t::DATETIME:
361 case TIMESTAMP_t::DATE:
364 case TIMESTAMP_t::NO:
373 m_t <<
"\" \\\" -*- nroff -*-\n";
466 const char *p=str.
data();
472 case '-':
m_t <<
"\\-";
break;
473 case '.':
m_t <<
"\\&.";
break;
474 case '\\':
m_t <<
"\\\\";
m_col++;
break;
475 case '\n':
m_t <<
"\n";
m_col=0;
break;
492 case '\\':
m_t <<
"\\\\";
break;
494 default:
m_t << c;
break;
536 baseName=baseName.
mid(i+2);
548 if (linkStream.is_open())
579 m_t <<
".SH SYNOPSIS\n.br\n.PP\n";
618 m_t <<
"\n.ti -1c\n.RI \"";
645 m_t <<
"\n.PP\n.RI \"\\fB";
650 m_t <<
"\\fP\"\n.br\n";
687 default:
ASSERT(0);
break;
705 default:
ASSERT(0);
break;
720 {
m_t <<
"\n" <<
".PP\n";
761 std::visit(visitor,astImpl->
root);
822 m_t <<
"\n.PP\n" <<
".in -1c\n";
829 m_t <<
"\\fP\"\n" <<
".in +1c\n";
897 m_t <<
"\\fR [" << l <<
"]\\fP";
898 if (!isLast)
m_t <<
", ";
921 if (openBracket)
m_t <<
"(";
926 if (last && closeBracket)
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
size_t rfind(char c, size_t pos=npos) const
DString mid(size_t index, size_t len=npos) const
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
static constexpr size_t npos
value used to indicate 'not found' or 'to the end of the string', matching std::string::npos
char & at(size_t i)
Returns a reference to the character at index i.
DString right(size_t len) const
DString & prepend(const char *s)
void reserve(size_t size)
Reserve space for size bytes without changing the string contents.
const std::string & str() const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
size_t length() const
Returns the length of the string, not counting the 0-terminator.
The common base class of all entity definitions found in the sources.
virtual DString getDefFileExtension() const =0
Class representing a directory in the file system.
bool mkdir(const std::string &path, bool acceptsAbsPath=true) const
Class representing the abstract syntax tree of a documentation block.
Minimal replacement for QFileInfo.
opaque representation of the abstract syntax tree (AST)
Generator for Man page code fragments.
size_t m_stripIndentAmount
void stripCodeComments(bool b) override
ManCodeGenerator(TextStream *t)
void writeLineNumber(const DString &, const DString &, const DString &, int l, bool) override
void endSpecialComment() override
void startCodeFragment(const DString &style) override
void startSpecialComment() override
void writeCodeLink(CodeSymbolType type, const DString &ref, const DString &file, const DString &anchor, const DString &name, const DString &tooltip) override
void endCodeFragment(const DString &) override
void codify(const DString &text) override
void setStripIndentAmount(size_t amount) override
void setTextStream(TextStream *t)
Concrete visitor implementation for LaTeX output.
void startConstraintDocs() override
OutputType type() const override
void startAnonTypeScope(int) override
void endMemberGroupHeader(bool) override
void startBold() override
void endMemberItem(MemberItemType) override
void startEmphasis() override
void endLabels() override
void writeString(const DString &text) override
void startConstraintList(const DString &) override
void writeLabel(const DString &l, bool isLast) override
void startDescTable(const DString &title, const bool hasInits) override
ManCodeGenerator * m_codeGen
void endSection(const DString &, SectionType) override
void addCodeGen(OutputCodeList &list) override
void endAnonTypeScope(int) override
void endGroupHeader(int) override
void startIndexItem(const DString &ref, const DString &file) override
void endMemberGroup(bool) override
void endConstraintDocs() override
void startFile(const DString &name, bool isSource, const DString &manName, const DString &title, int id, int hierarchyLevel) override
std::unique_ptr< OutputCodeList > m_codeList
void endMemberList() override
void endParameterExtra(bool, bool, bool) override
void endDescTable() override
void writeStartAnnoItem(const DString &type, const DString &file, const DString &path, const DString &name) override
void startSection(const DString &, const DString &, SectionType) override
void endInlineMemberType() override
void endMemberHeader() override
void startMemberHeader(const DString &, int) override
void writeObjectLink(const DString &ref, const DString &file, const DString &anchor, const DString &name) override
void startMemberDocSimple(bool) override
void startExamples() override
void startConstraintParam() override
void endInlineMemberDoc() override
void writeInheritedSectionTitle(const DString &, const DString &, const DString &, const DString &, const DString &, const DString &) override
void endDescForItem() override
void endParagraph() override
void endConstraintList() override
void endItemListItem() override
void endPlainFile() override
void startParameterList(bool) override
void startMemberGroupHeader(const DString &, bool) override
void docify(const DString &text) override
void startMemberGroupDocs() override
void endInlineHeader() override
void startItemListItem() override
void startMemberDoc(const DString &, const DString &, const DString &, const DString &, int, int, bool) override
void endExamples() override
ManGenerator & operator=(const ManGenerator &)
void endInlineMemberName() override
void startInlineMemberType() override
void startPlainFile(const DString &name) override
void writeDoc(const IDocNodeAST *ast, const Definition *, const MemberDef *, int, int) override
void writeSynopsis() override
void endConstraintType() override
void startMemberItem(const DString &, MemberItemType, const DString &) override
void endCompoundTemplateParams() override
void endIndexItem(const DString &ref, const DString &file) override
void endMemberGroupDocs() override
void startConstraintType() override
void addLabel(const DString &, const DString &) override
void startGroupHeader(const DString &, int) override
void writeChar(char c) override
void endParameterType() override
void startDescForItem() override
void startParagraph(const DString &classDef) override
void startCompoundTemplateParams() override
void startMemberList() override
void endTitleHead(const DString &, const DString &) override
void startInlineHeader() override
void startMemberGroup() override
void startDoxyAnchor(const DString &, const DString &, const DString &, const DString &, const DString &) override
void endHeaderSection() override
void startInlineMemberDoc() override
void endConstraintParam() override
void startLabels() override
void startInlineMemberName() override
void endMemberDocSimple(bool) override
void endMemberDoc(bool) override
void endEmphasis() override
A model of a class/file/namespace member symbol.
Class representing a list of different code generators.
void add(OutputCodeIntfPtr &&p)
Abstract interface for output generators.
static constexpr int Section
static constexpr int Subsection
static constexpr int Subsubsection
constexpr int level() const
static constexpr int Page
static constexpr int Paragraph
static constexpr int Subsubparagraph
static constexpr int Subparagraph
Text streaming class that buffers data.
virtual DString trCompoundMembers()=0
virtual DString trInheritedFrom(const DString &members, const DString &what)=0
virtual DString trEnumerationValues()=0
virtual DString trExamples()=0
#define Config_getInt(name)
#define Config_getBool(name)
#define Config_getString(name)
#define Config_getEnum(name)
DString dateToString(DateTimeType includeTime)
Returns the current date, when includeTime is set also the time is provided.
Translator * theTranslator
static DString getSubdir()
static DString objectLinkToString(const DString &text)
static DString docifyToString(const DString &str)
static DString buildFileName(const DString &name)
static DString getExtension()
std::ofstream openOutputStream(const DString &name, bool append=false)
size_t updateColumnCount(const char *s, size_t col)
OutputCodeDefer< ManCodeGenerator > ManCodeGeneratorDefer
Portable versions of functions that are platform dependent.
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.
Various UTF8 related helper functions.
void clearSubDirs(const Dir &d)
void createSubDirs(const Dir &d)
A bunch of utility functions.