本文整理汇总了C++中utHashTable::insert方法的典型用法代码示例。如果您正苦于以下问题:C++ utHashTable::insert方法的具体用法?C++ utHashTable::insert怎么用?C++ utHashTable::insert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utHashTable
的用法示例。
在下文中一共展示了utHashTable::insert方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loom_asset_registerType
void loom_asset_registerType(unsigned int type, LoomAssetDeserializeCallback deserializer, LoomAssetRecognizerCallback recognizer)
{
lmAssert(gAssetDeserializerMap.find(type) == UT_NPOS, "Asset type already registered!");
gAssetDeserializerMap.insert(type, deserializer);
gRecognizerList.push_back(recognizer);
}
示例2: primeProfiler
static inline void primeProfiler()
{
const char *path = ".......";
LoomProfilerRoot **prd = dynamicProfilerRoots[path];
if (prd == NULL)
{
dynamicProfilerRoots.insert(path, new LoomProfilerRoot(strdup(path)));
prd = dynamicProfilerRoots[path];
}
gLoomProfiler->hashPush(*prd);
gLoomProfiler->hashPop(*prd);
}
示例3: lmNew
static loom_asset_t *loom_asset_getAssetByName(const char *name, int create)
{
utHashedString key = platform_normalizePath(name);
loom_asset_t **assetPtr = gAssetHash.get(key);
loom_asset_t *asset = assetPtr ? *assetPtr : NULL;
if ((asset == NULL) && create)
{
// Create one.
asset = lmNew(gAssetAllocator) loom_asset_t;
asset->name = strdup(name);
gAssetHash.insert(key, asset);
}
return asset;
}
示例4: enterMethod
void LSProfiler::enterMethod(const char *fullPath)
{
if (!isEnabled())
{
return;
}
//printf("Entering %s\n", fullPath);
LoomProfilerRoot **prd = dynamicProfilerRoots[fullPath];
if (prd == NULL)
{
dynamicProfilerRoots.insert(fullPath, new LoomProfilerRoot(strdup(fullPath)));
prd = dynamicProfilerRoots[fullPath];
}
gLoomProfiler->hashPush(*prd);
}
示例5: 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);
}
}
示例6: strncpy
static loom_asset_t *loom_asset_getAssetByName(const char *name, int create)
{
loom_mutex_lock(gAssetLock);
static char normalized[4096];
strncpy(normalized, name, sizeof(normalized));
platform_normalizePath(normalized);
utHashedString key = normalized;
loom_mutex_unlock(gAssetLock);
loom_asset_t **assetPtr = gAssetHash.get(key);
loom_asset_t *asset = assetPtr ? *assetPtr : NULL;
if ((asset == NULL) && create)
{
// Create one.
asset = lmNew(gAssetAllocator) loom_asset_t;
asset->name = name;
gAssetHash.insert(key, asset);
}
return asset;
}
示例7: setHeaderField
void setHeaderField(const char *key, const char *value)
{
header.insert(key, value);
}
示例8: loom_asset_registerType
void loom_asset_registerType(unsigned int type, LoomAssetDeserializeCallback deserializer, LoomAssetRecognizerCallback recognizer)
{
gAssetDeserializerMap.insert(type, deserializer);
gRecognizerList.push_back(recognizer);
}