Definition at line 530 of file RgbDataSrcLavc.h. References Impala::FileNameLastPathSepPos(), Impala::FileNamePath(), Impala::FileNameTail(), Impala::Util::Database::GetFilePath(), ILOG_ERROR, Impala::Util::Database::MakeDir(), and Impala::StringReplaceAll(). 00531 { 00532 String infoName = ""; 00533 if (Link::DiskImage::DiskImageUsed()) 00534 { 00535 String subPath = FileNamePath(srcName); 00536 if (subPath.substr(0, 10) == "diskimage:") 00537 { 00538 int posAfterDiskImageFileName = subPath.find("://", 10); 00539 // SK: assume disk image file name is unique, 00540 // not needing an additional (sub-)path specification 00541 const String uptoDiskImageToken = 00542 subPath.substr(0, posAfterDiskImageFileName); 00543 int diskImageFileNamePos = 00544 FileNameLastPathSepPos(uptoDiskImageToken) + 1; 00545 if (diskImageFileNamePos == String::npos) 00546 ILOG_ERROR("Disk image file was expected to be prefixed " 00547 << "with a path: " << uptoDiskImageToken); 00548 00549 String subSubPath = 00550 subPath.substr(posAfterDiskImageFileName + 1); 00551 subSubPath = StringReplaceAll(subSubPath, 00552 "0x", "0x30x", false); 00553 subSubPath = StringReplaceAll(subSubPath, 00554 "//", "/0x2F", false); 00555 subSubPath = subSubPath.substr(0, subSubPath.size() - 1); 00556 subPath = subPath.substr(diskImageFileNamePos, 00557 posAfterDiskImageFileName-diskImageFileNamePos)+subSubPath; 00558 00559 String dir = "FramePosIndex/" + subPath; 00560 00561 bool toWrite = (mode == WRITEIDX); 00562 bool silent = (mode != READIDX); 00563 00564 if (toWrite) 00565 db->MakeDir(dir); 00566 00567 String fname = FileNameTail(srcName) + ".info"; 00568 infoName = db->GetFilePath(dir, fname, toWrite, silent); 00569 } 00570 else 00571 infoName = srcName + ".info"; 00572 } 00573 return infoName; 00574 }
Here is the call graph for this function:
|