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


C++ SymbolSet::NextElement方法代码示例

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


在下文中一共展示了SymbolSet::NextElement方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: PartialOrder

void TypeCycleChecker::PartialOrder(SymbolSet& types)
{
    //
    // assert that the "index" of all types that should be checked is initially
    // set to OMEGA
    //
    for (TypeSymbol* type = (TypeSymbol*) types.FirstElement();
         type; type = (TypeSymbol*) types.NextElement())
    {
        if (type -> index == OMEGA)
            ProcessSubtypes(type);
    }

    ReverseTypeList();
}
开发者ID:daveshields,项目名称:jikes,代码行数:15,代码来源:depend.cpp

示例2: FindMoreRecentInputFiles

//
// For each file whose associated source (".java") has changed, add it to the
// list to be recompiled...
//
void Control::FindMoreRecentInputFiles(SymbolSet& file_candidates)
{
    FileSymbol* file_symbol;
    for (file_symbol = (FileSymbol*) file_candidates.FirstElement();
         file_symbol;
         file_symbol = (FileSymbol*) file_candidates.NextElement())
    {
        //
        // If the type is not zipped and it is not already contained in the
        // recompilation set, then check it...
        //
        if ((! file_symbol -> IsZip()) &&
            (! recompilation_file_set.IsElement(file_symbol)) &&
            (! expired_file_set.IsElement(file_symbol)))
        {
            //
            // If there is no java source file or its time stamp is not newer
            // than file_symbol then reset file_symbol to NULL. Otherwise,
            // reset file symbol to the newer file.
            //
            DirectoryEntry* java_entry = FindInputFile(file_symbol);
            if (! java_entry)
            {
                // A source file that was compiled in the previous pass no
                // longer exists.
                if (file_symbol -> IsJava())
                    expired_file_set.AddElement(file_symbol);
            }
            else if (java_entry -> Mtime() > file_symbol -> mtime)
            {
                // A newer file was found.
                file_symbol -> mtime = java_entry -> Mtime();
                recompilation_file_set.AddElement(file_symbol);
            }
        }
    }
}
开发者ID:prog012,项目名称:jikes,代码行数:41,代码来源:incrmnt.cpp

示例3: RemoveTrashedTypes

void Control::RemoveTrashedTypes(SymbolSet& type_trash_set)
{
    TypeSymbol* type;

    //
    // For each type T that is going to be trashed, and for each parent P of T
    // that is not itself being trashed, remove T from the set of dependents of
    // P. If T is a subtype of P it is also removed from the subtypes set.
    //
    for (type = (TypeSymbol*) type_trash_set.FirstElement();
         type; type = (TypeSymbol*) type_trash_set.NextElement())
    {
        TypeSymbol* parent;
        for (parent = (TypeSymbol*) type -> static_parents -> FirstElement();
             parent;
             parent = (TypeSymbol*) type -> static_parents -> NextElement())
        {
            if (! type_trash_set.IsElement(parent))
            {
                parent -> dependents -> RemoveElement(type);
                parent -> subtypes -> RemoveElement(type);
            }
        }

        for (parent = (TypeSymbol*) type -> parents -> FirstElement();
             parent;
             parent = (TypeSymbol*) type -> parents -> NextElement())
        {
            if (! type_trash_set.IsElement(parent))
            {
                parent -> dependents -> RemoveElement(type);
                parent -> subtypes -> RemoveElement(type);
            }
        }
    }

    //
    // We can now safely delete the type.
    //
    for (type = (TypeSymbol*) type_trash_set.FirstElement();
         type; type = (TypeSymbol*) type_trash_set.NextElement())
    {
        PackageSymbol* package = type -> ContainingPackage();

        //
        // If a type that is about to be trashed was read in via a class file,
        // remove the class file. Note that invoking RemoveElement for a file
        // that it does not contain has no ill effect.
        //
        FileSymbol* file_symbol = type -> file_symbol;
        if (file_symbol && type -> Identity() == file_symbol -> Identity())
            input_class_file_set.RemoveElement(file_symbol);

        //
        // If a type that is about to be trashed was contained in the
        // unnamed_package, remove it from the set "unnamed_package_types"
        //
        if (package == unnamed_package)
            unnamed_package_types.RemoveElement(type);

        //
        // Remove the type from its containing package.
        //
        package -> DeleteTypeSymbol(type);
    }
}
开发者ID:prog012,项目名称:jikes,代码行数:66,代码来源:incrmnt.cpp


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