本文整理汇总了C++中utArray::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ utArray::clear方法的具体用法?C++ utArray::clear怎么用?C++ utArray::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utArray
的用法示例。
在下文中一共展示了utArray::clear方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: findMembers
void Type::findMembers(const MemberTypes& memberTypes,
utArray<MemberInfo *>& membersOut, bool includeBases, bool includePropertyGetterSetters)
{
if (!includeBases)
{
membersOut.clear();
}
for (size_t i = 0; i < members.size(); i++)
{
MemberInfo *m = members.at((int)i);
if (m->isConstructor() && memberTypes.constructor)
{
membersOut.push_back(m);
}
if (m->isMethod() && memberTypes.method)
{
membersOut.push_back(m);
}
if (m->isField() && memberTypes.field)
{
membersOut.push_back(m);
}
if (m->isProperty() && memberTypes.property)
{
membersOut.push_back(m);
if (includePropertyGetterSetters)
{
PropertyInfo *p = (PropertyInfo *)m;
if (p->getter && (p->getter->getDeclaringType() == p->getDeclaringType()))
{
membersOut.push_back(p->getter);
}
if (p->setter && (p->setter->getDeclaringType() == p->getDeclaringType()))
{
membersOut.push_back(p->setter);
}
}
}
}
if (baseType && includeBases)
{
baseType->findMembers(memberTypes, membersOut, true, includePropertyGetterSetters);
}
}
示例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: executeDeferredCalls
//.........这里部分代码省略.........
// Try to resolve the delegate pointer.
utArray<NativeDelegate *> *delegates = NULL;
if (sActiveNativeDelegates.find(L) != UT_NPOS)
{
delegates = *(sActiveNativeDelegates.get(L));
}
else
{
// No delegate list, can't do it.
loom_mutex_unlock(gCallNoteMutex);
return;
}
for(unsigned int i=0; i<gNDCallNoteQueue.size(); i++)
{
NativeDelegateCallNote *ndcn = gNDCallNoteQueue[i];
bool found = false;
for(unsigned int i=0; i<delegates->size(); i++)
{
// Look for our delegate.
if((*delegates)[i] != ndcn->delegate)
continue;
// If key mismatches, warn and bail.
if((*delegates)[i]->_key != ndcn->delegateKey)
{
lmLogError(gNativeDelegateGroup, "Found delegate call note with key mismatch (delegate=%x actualKey=%x expectedKey=%x), ignoring...", (*delegates)[i], (*delegates)[i]->_key, ndcn->delegateKey);
break;
}
// Match!
found = true;
break;
}
// Bail if no match.
if(!found)
continue;
// Otherwise, let's call it.
const NativeDelegate *theDelegate = ndcn->delegate;
for(;;)
{
unsigned char actionType = ndcn->readByte();
bool done = false;
char *str = NULL;
utByteArray *bytes;
switch(actionType)
{
case MSG_Nop:
lmLogError(gNativeDelegateGroup, "Got a nop in delegate data stream.");
break;
case MSG_PushString:
str = ndcn->readString();
theDelegate->pushArgument(str);
free(str);
break;
case MSG_PushByteArray:
bytes = ndcn->readByteArray();
theDelegate->pushArgument(bytes);
free(bytes);
break;
case MSG_PushDouble:
theDelegate->pushArgument(ndcn->readDouble());
break;
case MSG_PushFloat:
theDelegate->pushArgument(ndcn->readFloat());
break;
case MSG_PushInt:
theDelegate->pushArgument((int)ndcn->readInt());
break;
case MSG_PushBool:
theDelegate->pushArgument(ndcn->readBool());
break;
case MSG_Invoke:
theDelegate->invoke();
done = true;
break;
}
if(done)
break;
}
}
// Purge queue.
gNDCallNoteQueue.clear();
loom_mutex_unlock(gCallNoteMutex);
}
示例5:
~akSubMeshPair()
{
idxmap.clear();
}