Exemplo n.º 1
0
static void setFileDefine(OovStringRef const fn, OovStringRef const srcRootDir)
    {
    OovString relFn = Project::getSrcRootDirRelativeSrcFileName(fn, srcRootDir);
    OovString fileDef = "COV_";
    fileDef += relFn;
    fileDef.replaceStrs("//", "_");
    fileDef.replaceStrs("/", "_");
    fileDef.replaceStrs(".", "_");
    fileDef.replaceStrs(":", "");
    sFileDefine = fileDef;
    }
Exemplo n.º 2
0
OovString Project::makeOutBaseFileName(OovStringRef const srcFileName,
        OovStringRef const srcRootDir, OovStringRef const outFilePath)
    {
    OovString file = getSrcRootDirRelativeSrcFileName(srcFileName, srcRootDir);
    if(file[0] == '/')
        file.erase(0, 1);
    file.replaceStrs("_", "_u");
    file.replaceStrs("/", "_s");
    file.replaceStrs(".", "_d");
    FilePath outFileName(outFilePath, FP_Dir);
    outFileName.appendFile(file);
    return outFileName;
    }
Exemplo n.º 3
0
OovString ModelStatement::makeOverloadKeyFromOperUSR(OovStringRef operStr)
    {
    OovString sym;
#define DEBUG_KEY 0
#if(DEBUG_KEY)
    sym = operStr;
    // Remove symbols that conflict with either the CompoundValue class or
    // ModelStatement name separator characters.
    sym.replaceStrs("@", "-");
    sym.replaceStrs("#", "-");
    sym.replaceStrs(":", "-");
    sym.appendInt(makeHash(operStr), 16);
#else
    sym.appendInt(makeHash(operStr), 16);
#endif
    return sym;
    }
Exemplo n.º 4
0
/// Use the filename to make an identifier.
static std::string makeOrigCovFn(OovStringRef const fn)
    {
    OovString covFn = fn;
    if(covFn.find("COV_") != std::string::npos)
        {
        covFn.erase(0, 4);
        }
    covFn.replaceStrs("_", "/");
    size_t pos = covFn.rfind('/');
    if(pos != std::string::npos)
        {
        covFn.replace(pos, 1, ".");
        }
    return covFn;
    }
Exemplo n.º 5
0
OovString FilePathGetAsWindowsPath(OovStringRef const path)
{
    OovString windowsPath = path;
    windowsPath.replaceStrs("/", "\\");
    return windowsPath;
}