本文整理汇总了C++中NamespaceDef::qualifiedName方法的典型用法代码示例。如果您正苦于以下问题:C++ NamespaceDef::qualifiedName方法的具体用法?C++ NamespaceDef::qualifiedName怎么用?C++ NamespaceDef::qualifiedName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NamespaceDef
的用法示例。
在下文中一共展示了NamespaceDef::qualifiedName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addIncludedUsingDirectives
void FileDef::addIncludedUsingDirectives()
{
if (visited) return;
visited=TRUE;
//printf("( FileDef::addIncludedUsingDirectives for file %s\n",name().data());
NamespaceList nl;
if (includeList) // file contains #includes
{
{
QListIterator<IncludeInfo> iii(*includeList);
IncludeInfo *ii;
for (iii.toFirst();(ii=iii.current());++iii) // foreach #include...
{
if (ii->fileDef && !ii->fileDef->visited) // ...that is a known file
{
// recurse into this file
ii->fileDef->addIncludedUsingDirectives();
}
}
}
{
QListIterator<IncludeInfo> iii(*includeList);
IncludeInfo *ii;
// iterate through list from last to first
for (iii.toLast();(ii=iii.current());--iii)
{
if (ii->fileDef && ii->fileDef!=this)
{
// add using directives
NamespaceSDict *unl = ii->fileDef->usingDirList;
if (unl)
{
NamespaceSDict::Iterator nli(*unl);
NamespaceDef *nd;
for (nli.toLast();(nd=nli.current());--nli)
{
// append each using directive found in a #include file
if (usingDirList==0) usingDirList = new NamespaceSDict;
//printf("Prepending used namespace %s to the list of file %s\n",
// nd->name().data(),name().data());
if (usingDirList->find(nd->qualifiedName())==0) // not yet added
{
usingDirList->prepend(nd->qualifiedName(),nd);
}
}
}
// add using declarations
SDict<Definition> *udl = ii->fileDef->usingDeclList;
if (udl)
{
SDict<Definition>::Iterator udi(*udl);
Definition *d;
for (udi.toLast();(d=udi.current());--udi)
{
//printf("Adding using declaration %s\n",d->name().data());
if (usingDeclList==0)
{
usingDeclList = new SDict<Definition>(17);
}
if (usingDeclList->find(d->qualifiedName())==0)
{
usingDeclList->prepend(d->qualifiedName(),d);
}
}
}
}
}
}
}
//printf(") end FileDef::addIncludedUsingDirectives for file %s\n",name().data());
}