Doxygen
mangen.cpp 文件参考
#include <stdlib.h>
#include "message.h"
#include "mangen.h"
#include "config.h"
#include "util.h"
#include "doxygen.h"
#include <string.h>
#include "docparser.h"
#include "mandocvisitor.h"
#include "language.h"
#include "dir.h"
#include "utf8.h"
+ mangen.cpp 的引用(Include)关系图:

浏览源代码.

函数

static QCString getExtension ()
 
static QCString getSubdir ()
 
static QCString buildFileName (const QCString &name)
 

函数说明

◆ buildFileName()

static QCString buildFileName ( const QCString name)
static

在文件 mangen.cpp125 行定义.

126 {
127  QCString fileName;
128  if (name.isEmpty()) return "noname";
129 
130  const char *p=name.data();
131  char c;
132  while ((c=*p++))
133  {
134  switch (c)
135  {
136  case ':':
137  fileName+="_";
138  if (*p==':') p++;
139  break;
140  case '<':
141  case '>':
142  case '&':
143  case '*':
144  case '!':
145  case '^':
146  case '~':
147  case '%':
148  case '+':
149  case '/':
150  fileName+="_";
151  break;
152  default:
153  fileName+=c;
154  }
155  }
156 
157  QCString manExtension = "." + getExtension();
158  if (fileName.right(manExtension.length())!=manExtension)
159  {
160  fileName+=manExtension;
161  }
162 
163  return fileName;
164 }

引用了 QCString::data(), getExtension(), QCString::isEmpty(), QCString::length() , 以及 QCString::right().

被这些函数引用 ManGenerator::startDoxyAnchor() , 以及 ManGenerator::startFile().

◆ getExtension()

static QCString getExtension ( )
static

在文件 mangen.cpp35 行定义.

36 {
37  /*
38  * [.][number][rest]
39  * in case of . missing, just ignore it
40  * in case number missing, just place a 3 in front of it
41  */
42  QCString ext = Config_getString(MAN_EXTENSION);
43  if (ext.isEmpty())
44  {
45  ext = "3";
46  }
47  else
48  {
49  if (ext.at(0)=='.')
50  {
51  if (ext.length()==1)
52  {
53  ext = "3";
54  }
55  else // strip .
56  {
57  ext = ext.mid(1);
58  }
59  }
60  if (ext.at(0)<'0' || ext.at(0)>'9')
61  {
62  ext.prepend("3");
63  }
64  }
65  return ext;
66 }

引用了 QCString::at(), Config_getString, QCString::isEmpty(), QCString::length(), QCString::mid() , 以及 QCString::prepend().

被这些函数引用 buildFileName(), ManGenerator::endTitleHead() , 以及 getSubdir().

◆ getSubdir()

static QCString getSubdir ( )
static

在文件 mangen.cpp68 行定义.

69 {
70  QCString dir = Config_getString(MAN_SUBDIR);
71  if (dir.isEmpty())
72  {
73  dir = "man" + getExtension();
74  }
75  return dir;
76 }

引用了 Config_getString, getExtension() , 以及 QCString::isEmpty().

被这些函数引用 ManGenerator::init() , 以及 ManGenerator::startDoxyAnchor().

getExtension
static QCString getExtension()
Definition: mangen.cpp:35
QCString::length
uint length() const
Returns the length of the string, not counting the 0-terminator.
Definition: qcstring.h:147
QCString::isEmpty
bool isEmpty() const
Returns TRUE iff the string is empty
Definition: qcstring.h:144
QCString::at
char & at(size_t i)
Returns a reference to the character at index i.
Definition: qcstring.h:477
QCString::mid
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition: qcstring.h:224
Config_getString
#define Config_getString(name)
Definition: config.h:32
QCString::data
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string
Definition: qcstring.h:153
QCString::right
QCString right(size_t len) const
Definition: qcstring.h:217
QCString::prepend
QCString & prepend(const char *s)
Definition: qcstring.h:339
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108