本文整理汇总了C++中namepool::Ptr::displayName方法的典型用法代码示例。如果您正苦于以下问题:C++ Ptr::displayName方法的具体用法?C++ Ptr::displayName怎么用?C++ Ptr::displayName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类namepool::Ptr
的用法示例。
在下文中一共展示了Ptr::displayName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: displayName
QString FunctionSignature::displayName(const NamePool::Ptr &np) const
{
QString result;
result += np->displayName(name());
result += QLatin1Char('(');
FunctionArgument::List::const_iterator it(m_arguments.constBegin());
const FunctionArgument::List::const_iterator end(m_arguments.constEnd());
if(it != end)
{
while(true)
{
result += QLatin1Char('$');
result += np->displayName((*it)->name());
result += QLatin1String(" as ");
result += (*it)->type()->displayName(np);
++it;
if(it == end)
break;
result += QLatin1String(", ");
}
}
if(m_maxArgs == FunctionSignature::UnlimitedArity)
result += QLatin1String(", ...");
result += QLatin1String(") as ");
result += m_returnType->displayName(np);
return result;
}
示例2: printStats
void AccelTree::printStats(const NamePool::Ptr &np) const
{
Q_ASSERT(np);
#ifdef QT_NO_DEBUG
Q_UNUSED(np); /* Needed when compiling in release mode. */
#else
const int len = basicData.count();
pDebug() << "AccelTree stats for" << (m_documentURI.isEmpty() ? QString::fromLatin1("<empty URI>") : m_documentURI.toString());
pDebug() << "Maximum pre number:" << maximumPreNumber();
pDebug() << "+---------------+-------+-------+---------------+-------+--------------+-------+";
pDebug() << "| Pre number | Depth | Size | Post Number | Kind | Name | Value |";
pDebug() << "+---------------+-------+-------+---------------+-------+--------------+-------+";
for(int i = 0; i < len; ++i)
{
const BasicNodeData &v = basicData.at(i);
pDebug() << '|' << i
<< "\t\t|" << v.depth()
<< "\t|" << v.size()
<< "\t|" << postNumber(i)
<< "\t|" << v.kind()
<< "\t\t|" << (v.name().isNull() ? QString::fromLatin1("(none)") : np->displayName(v.name()))
<< "\t\t|" << ((v.kind() == QXmlNodeModelIndex::Text && isCompressed(i)) ? CompressedWhitespace::decompress(data.value(i))
: data.value(i))
<< "\t|";
/*
pDebug() << '|' << QString().arg(i, 14)
<< '|' << QString().arg(v.depth(), 6)
<< '|' << QString().arg(v.size(), 6)
<< '|' << QString().arg(postNumber(i), 14)
<< '|' << QString().arg(v.kind(), 6)
<< '|';
*/
}
pDebug() << "+---------------+-------+-------+---------------+-------+--------------+";
pDebug() << "Namespaces(" << namespaces.count() << "):";
QHashIterator<PreNumber, QVector<QXmlName> > it(namespaces);
while(it.hasNext())
{
it.next();
pDebug() << "PreNumber: " << QString::number(it.key());
for(int i = 0; i < it.value().count(); ++i)
pDebug() << "\t\t" << np->stringForPrefix(it.value().at(i).prefix()) << " = " << np->stringForNamespace(it.value().at(i).namespaceURI());
}
#endif
}
示例3: displayName
QString AnySimpleType::displayName(const NamePool::Ptr &np) const
{
return np->displayName(name(np));
}
示例4: displayName
QString NamedSchemaComponent::displayName(const NamePool::Ptr &np) const
{
return np->displayName(m_name);
}
示例5: displayName
QString QNameTest::displayName(const NamePool::Ptr &np) const
{
QString displayOther(m_primaryType->displayName(np));
return displayOther.insert(displayOther.size() - 1, np->displayName(m_qName));
}
示例6: displayName
QString XsdComplexType::displayName(const NamePool::Ptr &np) const
{
return np->displayName(name(np));
}