Doxygen
FilterStripPath类 参考

The implementation of the "default" filter 更多...

静态 Public 成员函数

static TemplateVariant apply (const TemplateVariant &v, const TemplateVariant &)
 

详细描述

The implementation of the "default" filter

在文件 template.cpp1383 行定义.

成员函数说明

◆ apply()

static TemplateVariant FilterStripPath::apply ( const TemplateVariant v,
const TemplateVariant  
)
inlinestatic

在文件 template.cpp1386 行定义.

1387  {
1388  if (!v.isValid() || !v.isString())
1389  {
1390  return v;
1391  }
1392  QCString result = v.toString();
1393  int i=result.findRev('/');
1394  if (i!=-1)
1395  {
1396  result=result.mid(i+1);
1397  }
1398  i=result.findRev('\\');
1399  if (i!=-1)
1400  {
1401  result=result.mid(i+1);
1402  }
1403  return result;
1404  }

引用了 QCString::findRev(), TemplateVariant::isString(), TemplateVariant::isValid(), QCString::mid() , 以及 TemplateVariant::toString().


该类的文档由以下文件生成:
QCString::findRev
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:86
QCString::mid
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition: qcstring.h:224
TemplateVariant::toString
QCString toString() const
Returns the variant as a string.
Definition: template.cpp:399
TemplateVariant::isValid
constexpr bool isValid() const
Returns TRUE if the variant holds a valid value, or FALSE otherwise
Definition: template.h:203
TemplateVariant::isString
constexpr bool isString() const
Returns TRUE if the variant holds a string value
Definition: template.h:209
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108