当前位置: 首页>>代码示例>>C++>>正文


C++ SymTab::erase方法代码示例

本文整理汇总了C++中SymTab::erase方法的典型用法代码示例。如果您正苦于以下问题:C++ SymTab::erase方法的具体用法?C++ SymTab::erase怎么用?C++ SymTab::erase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SymTab的用法示例。


在下文中一共展示了SymTab::erase方法的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
//.........这里部分代码省略.........
开发者ID:rose-compiler,项目名称:rose-edg3,代码行数:101,代码来源:sageDoxygen.C


注:本文中的SymTab::erase方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。