本文整理汇总了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);
}
示例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;
}
}
示例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;
}
示例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() );
}
}
示例5: RemoveStarsystemFromUniverse
void StarSystem::RemoveStarsystemFromUniverse()
{
if ( star_system_table.Get( filename ) )
star_system_table.Delete( filename );
}