本文整理汇总了C++中common::SearchSet::addDirectory方法的典型用法代码示例。如果您正苦于以下问题:C++ SearchSet::addDirectory方法的具体用法?C++ SearchSet::addDirectory怎么用?C++ SearchSet::addDirectory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common::SearchSet
的用法示例。
在下文中一共展示了SearchSet::addDirectory方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addSysArchivesToSearchSet
void JNI::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {
JNIEnv *env = JNI::getEnv();
s.add("ASSET", _asset_archive, priority, false);
jobjectArray array =
(jobjectArray)env->CallObjectMethod(_jobj, _MID_getSysArchives);
if (env->ExceptionCheck()) {
LOGE("Error finding system archive path");
env->ExceptionDescribe();
env->ExceptionClear();
return;
}
jsize size = env->GetArrayLength(array);
for (jsize i = 0; i < size; ++i) {
jstring path_obj = (jstring)env->GetObjectArrayElement(array, i);
const char *path = env->GetStringUTFChars(path_obj, 0);
if (path != 0) {
s.addDirectory(path, path, priority);
env->ReleaseStringUTFChars(path_obj, path);
}
env->DeleteLocalRef(path_obj);
}
}
示例2: addSysArchivesToSearchSet
void TizenSystem::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {
// allow translations.dat and game .DAT files to be found
s.addDirectory(_resourcePath, _resourcePath, priority);
}
示例3: addSysArchivesToSearchSet
void BadaSystem::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {
// allow translations.dat and game .DAT files to be found
s.addDirectory(RESOURCE_PATH, RESOURCE_PATH, priority);
}