本文整理汇总了C++中SymTab::equal_range方法的典型用法代码示例。如果您正苦于以下问题:C++ SymTab::equal_range方法的具体用法?C++ SymTab::equal_range怎么用?C++ SymTab::equal_range使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SymTab
的用法示例。
在下文中一共展示了SymTab::equal_range方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
virtual void
visit(SgNode *n)
{
SgVariableDeclaration *vd = isSgVariableDeclaration(n);
if (!vd)
{
return;
}
if (isRecognizedDeclaration(vd))
{
return;
}
AttachedPreprocessingInfoType *info = vd->getAttachedPreprocessingInfo();
if (info)
{
DoxygenFile *f = new DoxygenFile(vd);
DoxygenGroup *currentGroup = 0;
DoxygenComment *groupComment = 0;
(*docsList)[vd->get_file_info()->get_filenameString()] = f;
for (AttachedPreprocessingInfoType::iterator i = info->begin(); i != info->end(); ++i)
{
PreprocessingInfo *pi = *i;
//printf("pass %d: processing comment %s\n", inexact ? 3 : 2, pi->getString().c_str());
//printf("processing comment %s\n", pi->getString().c_str());
if (DoxygenComment::isDoxygenComment(pi))
{
DoxygenComment *comm = new DoxygenComment(vd, pi);
comm->originalFile = f;
if (comm->entry.type() == DoxygenEntry::None)
{
if (comm->entry.hasName())
{
// this is a group
//printf("name = '%s'\n", comm->entry.name().c_str());
if (currentGroup)
{
currentGroup->comment = comm;
}
else
{
groupComment = comm;
}
}
else
{
delete comm;
continue;
}
}
commentList->push_back(comm);
#if 0
pair<SymTab::iterator, SymTab::iterator> bounds = symTab->equal_range(DoxygenClass::getProtoName(comm->entry.prototype));
for (SymTab::iterator i = bounds.first; i != bounds.second; )
{
if (inexact || comm->entry.prototype == getQualifiedPrototype((*i).second))
{
DoxygenCommentListAttribute *attr = dynamic_cast<DoxygenCommentListAttribute *>((*i).second->attribute()["DoxygenCommentList"]);
ROSE_ASSERT(attr);
printf("attaching to node %s\n", (*i).second->unparseToString().c_str());
attr->commentList.push_back(comm);
SymTab::iterator ii = i;
++i;
symTab->erase(ii);
}
else
{
++i;
}
}
#endif
}
else if (isGroupStart(pi))
{
if (currentGroup)
{
puts("Group already open!");
}
//puts("opening group");
currentGroup = new DoxygenGroup();
currentGroup->groupStart = *i;
currentGroup->comment = groupComment;
groupComment = 0;
}
else if (isGroupEnd(pi))
{
//puts("closing group");
if (!currentGroup)
{
puts("Group-end encountered without group begin!");
}
else
{
currentGroup->groupEnd = *i;
if (currentGroup->comment)
{
f->groups[currentGroup->comment->entry.name()] = currentGroup;
}
else
//.........这里部分代码省略.........