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


C++ Hashtable::Delete方法代码示例

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


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

示例1: UnBind

void Texture::UnBind()
{
    if (name!=-1) {
        texHashTable.Delete (texfilename);
        GFXDeleteTexture(name);
        name = -1;
    }
    //glDeleteTextures(1, &name);
}
开发者ID:bsmr-games,项目名称:Privateer-Gemini-Gold,代码行数:9,代码来源:aux_texture.cpp

示例2: Dec

void collideTrees::Dec()
{
    refcount--;
    if (refcount == 0) {
        unitColliders.Delete( hash_key );
        for (unsigned int i = 0; i < collideTreesMaxTrees; ++i)
            if (rapidColliders[i])
                delete rapidColliders[i];
        if (colShield)
            delete colShield;
        delete this;
        return;
    }
}
开发者ID:vegastrike,项目名称:Vega-Strike-Engine-Source,代码行数:14,代码来源:collide.cpp

示例3: FileNotFound

void Texture::FileNotFound(const string &texfilename) {
    // We may need to remove from texHashTable if we found the file but it is a bad one
    texHashTable.Delete (texfilename);

    setbad( texfilename);
    name=-1;
    data = NULL;
    if( original != NULL)
    {
        original->name=-1;
        delete original;
        original=NULL;
    }
    palette=NULL;

    return;
}
开发者ID:bsmr-games,项目名称:Privateer-Gemini-Gold,代码行数:17,代码来源:aux_texture.cpp

示例4: LoadMesh

Mesh::Mesh( std::string filename, const Vector &scale, int faction, Flightgroup *fg, bool orig ) : hash_name( filename )
{
    this->convex = false;
    Mesh *cpy = LoadMesh( filename.c_str(), scale, faction, fg, vector< std::string > () );
    if (cpy->orig) {
        LoadExistant( cpy->orig );
        delete cpy;         //wasteful, but hey
        if (orig != false) {
            orig = false;
            std::vector< Mesh* > *tmp = bfxmHashTable.Get( this->orig->hash_name );
            if (tmp && tmp->size() && (*tmp)[0] == this->orig) {
                if (this->orig->refcount == 1) {
                    bfxmHashTable.Delete( this->orig->hash_name );
                    delete tmp;
                    orig = true;
                }
            }
            if (meshHashTable.Get( this->orig->hash_name ) == this->orig) {
                if (this->orig->refcount == 1) {
                    meshHashTable.Delete( this->orig->hash_name );
                    orig = true;
                }
            }
            if (orig) {
                Mesh *tmp = this->orig;
                tmp->orig  = this;
                this->orig = NULL;
                refcount   = 2;
                delete[] tmp;
            }
        }
    } else {
        delete cpy;
        fprintf( stderr, "fallback, %s unable to be loaded as bfxm\n", filename.c_str() );
    }
}
开发者ID:Ezeer,项目名称:VegaStrike_win32FR,代码行数:36,代码来源:mesh.cpp

示例5: RemoveStarsystemFromUniverse

void StarSystem::RemoveStarsystemFromUniverse()
{
    if ( star_system_table.Get( filename ) )
        star_system_table.Delete( filename );
}
开发者ID:Ezeer,项目名称:VegaStrike_win32FR,代码行数:5,代码来源:star_system_generic.cpp


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