本文整理汇总了C++中utHashTable::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ utHashTable::clear方法的具体用法?C++ utHashTable::clear怎么用?C++ utHashTable::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utHashTable
的用法示例。
在下文中一共展示了utHashTable::clear方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loom_asset_initialize
void loom_asset_initialize(const char *rootUri)
{
// Set up the lock for the mutex.
lmAssert(gAssetLock == NULL, "Double initialization!");
gAssetLock = loom_mutex_create();
// Note the CWD.
char tmpBuff[1024];
platform_getCurrentWorkingDir(tmpBuff, 1024);
lmLog(gAssetLogGroup, "Current working directory ='%s'", tmpBuff);
// And the allocator.
//gAssetAllocator = loom_allocator_initializeTrackerProxyAllocator(loom_allocator_getGlobalHeap());
gAssetAllocator = (loom_allocator_getGlobalHeap());
// Clear, it might have been filled up before (for unit tests)
gAssetLoadQueue.clear();
gAssetHash.clear();
// Asset server connection state.
gAssetServerSocketLock = loom_mutex_create();
// And set up some default asset types.
loom_asset_registerType(LATText, loom_asset_textDeserializer, loom_asset_textRecognizer);
loom_asset_registerType(LATBinary, loom_asset_binaryDeserializer, loom_asset_binaryRecognizer);
loom_asset_registerImageAsset();
loom_asset_registerSoundAsset();
loom_asset_registerScriptAsset();
// Listen to log and send it if we have a connection.
loom_log_addListener(loom_asset_logListener, NULL);
}
示例2: loom_asset_clear
// Clears the asset name cache that is built up
// through loom_asset_lock and others
static void loom_asset_clear()
{
utHashTableIterator<utHashTable<utHashedString, loom_asset_t *> > assetIterator(gAssetHash);
while (assetIterator.hasMoreElements())
{
utHashedString key = assetIterator.peekNextKey();
lmDelete(NULL, assetIterator.peekNextValue());
assetIterator.next();
}
gAssetHash.clear();
}
示例3: loom_asset_shutdown
void loom_asset_shutdown()
{
loom_asset_flushAll();
// Clear out our queues and maps.
gAssetDeserializerMap.clear();
gRecognizerList.clear();
lmAssert(gAssetLock != NULL, "Shutdown without being initialized!");
loom_mutex_destroy(gAssetLock);
gAssetLock = NULL;
}
示例4: regenerateSourceBreakpoints
static void regenerateSourceBreakpoints()
{
sourceBreakpoints.clear();
for (UTsize i = 0; i < breakpoints.size(); i++)
{
Breakpoint *bp = breakpoints.at(i);
utFastStringHash fhash(bp->source);
if (sourceBreakpoints.find(fhash) == UT_NPOS)
{
utArray<Breakpoint *> bps;
sourceBreakpoints.insert(fhash, bps);
}
sourceBreakpoints.get(fhash)->push_back(bp);
}
}