Esempio n. 1
0
Result qr_search(char *str, AppData appData)
{
	int wcount, dcout, max_dcout = 0;
	char **list = strsplit(str, wcount);
	PDoc *dlist = new PDoc[wcount];
	int *dclist = new int[wcount];

	clock_t begin = clock();

	// Load cac document lien quan
	for (int i = 0; list[i] != NULL; i++)
	{
		dlist[i] = loadMeta(list[i], dcout);
		dclist[i] = dcout;
		if (dcout > max_dcout) max_dcout = dcout;
	}

	PDocMix docMix = new DocMix[wcount*max_dcout];
	int ipos = 0;
	
	// Tim phan giao + xep hang
	for (int i = 0; i < wcount; i++)
		qr_mix(docMix, ipos, dlist[i], dclist[i]);

	// Sap xep ket qua
	qr_sort_result(docMix, ipos);
	clock_t end = clock();

	Result ret = {ipos, docMix, double(end - begin) / CLOCKS_PER_SEC, wcount};
	return ret;
}
Esempio n. 2
0
bool AudioGroupDataCollection::_attemptLoad() {
  if (m_metaData && m_loadedData && m_loadedGroup)
    return true;
  if (!loadProj())
    return false;
  if (!loadPool())
    return false;
  if (!loadSdir())
    return false;
  if (!loadSamp())
    return false;
  if (!loadMeta())
    return false;

  return _indexData();
}
Esempio n. 3
0
int
GPD_PrimMetaSQuad::loadPrivate(istream &is, int binary)
{
    if (binary)
    {
	if (!UTread(is, &xyExp)) 	return -1;
	if (!UTread(is, &zExp))		return -1;
    }
    else
    {
	is >> xyExp >> zExp;
	if (!is) return -1;
    }
    if (loadMeta(is, binary) < 0) return -1;

    return GPD_PrimSphere::loadPrivate(is, binary);
}
Esempio n. 4
0
///=============================================================================
bool recursiveMetaLoader(sm2obj::entityInfoStruct* Output, const std::string& BlueprintFolder, const std::string& BlueprintName, const std::string& SubFolder){
    std::string path = BlueprintFolder + SubFolder + "\\meta.smbpm";

	if(!loadMeta(Output, path, BlueprintName)){
		ffw::logError() << "Failed to open meta file from: " << path;
		return false;
    } else {
		ffw::logSuccess() << "Meta file loaded from: " << path;
	}

    for(auto& item : Output->attachments){
        if(!recursiveMetaLoader(&item, BlueprintFolder, BlueprintName, item.path)){
            return false;
        }
    }

    return true;
}
Esempio n. 5
0
OpticPackMeta OpticPack::meta() const {
    return loadMeta(handle);
}
Esempio n. 6
0
OpticPackMeta OpticPack::meta(const std::string& file) {
    HZIP handle = open(file);
    return loadMeta(handle);
}
Esempio n. 7
0
OpticPack::OpticPack(const std::string& fileName) {
    handle = open(fileName);
    metadata = loadMeta(handle);
    loadAssets();
}
Esempio n. 8
0
G12Buffer* PPMLoader::load(string name)
{
    return loadMeta(name, nullptr);
}