当前位置: 首页>>代码示例>>C++>>正文


C++ OovStringRef::getStr方法代码示例

本文整理汇总了C++中OovStringRef::getStr方法的典型用法代码示例。如果您正苦于以下问题:C++ OovStringRef::getStr方法的具体用法?C++ OovStringRef::getStr怎么用?C++ OovStringRef::getStr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OovStringRef的用法示例。


在下文中一共展示了OovStringRef::getStr方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: checkAttrUsed

bool ModelStatements::checkAttrUsed(ModelClassifier const *cls,
        OovStringRef attrName) const
    {
    bool used = false;
    for(auto const &stmt : *this)
        {
        ModelType const *modelType = stmt.getClassDecl().getDeclType();
        ModelClassifier const *classifier = ModelType::getClass(modelType);
        if(cls == classifier)
            {
            eModelStatementTypes stateType = stmt.getStatementType();
            if(stateType == ST_VarRef)
                {
                if(stmt.getAttrName() == attrName.getStr())
                    {
                    used = true;
                    break;
                    }
                }
            else if(stateType == ST_Call)
                {
                if(stmt.getAttrName() == attrName.getStr())
                    {
                    used = true;
                    break;
                    }
                }
            }
        }
    return used;
    }
开发者ID:animatedb,项目名称:oovaide,代码行数:31,代码来源:ModelObjects.cpp

示例2: FileMakeSubDir

OovStatusReturn FileMakeSubDir(OovStringRef partPath)
    {
#ifdef __linux__
    bool success = (mkdir(partPath.getStr(), 0x1FF) == 0);       // 0777
#else
    bool success = (_mkdir(partPath.getStr()) == 0);
#endif
    return(OovStatus(success, SC_File));
    }
开发者ID:Purplenigma,项目名称:oovaide,代码行数:9,代码来源:FilePath.cpp

示例3: FileGetFileTime

OovStatusReturn FileGetFileTime(OovStringRef const path, time_t &time)
    {
    struct OovStat32 srcFileStat;
    OovStatus status(OovStat32(path.getStr(), &srcFileStat) == 0, SC_File);
    if(status.ok())
        time = srcFileStat.st_mtime;
    return status;
    }
开发者ID:Purplenigma,项目名称:oovaide,代码行数:8,代码来源:FilePath.cpp

示例4: FileGetFileTime

bool FileGetFileTime(OovStringRef const path, time_t &time)
{
    struct OovStat32 srcFileStat;
    bool success = (OovStat32(path.getStr(), &srcFileStat) == 0);
    if(success)
        time = srcFileStat.st_mtime;
    return success;
}
开发者ID:8l,项目名称:oovcde,代码行数:8,代码来源:FilePath.cpp

示例5: switch

Visibility::Visibility(OovStringRef const umlStr)
    {
    switch(umlStr.getStr()[0])
        {
        default:        // fall through
        case '+':       vis = Visibility::Public;       break;
        case '#':       vis = Visibility::Protected;    break;
        case '-':       vis = Visibility::Private;      break;
        }
    }
开发者ID:animatedb,项目名称:oovaide,代码行数:10,代码来源:ModelObjects.cpp

示例6: addPackageDefines

void CMaker::addPackageDefines(OovStringRef const pkgName, std::string &str)
    {
    OovString pkgDefName;
    makeDefineName(pkgName, pkgDefName);
    str += std::string("# ") + pkgDefName + "\n";
    str += std::string("pkg_check_modules(") + pkgDefName + " REQUIRED " +
            pkgName.getStr() + ")\n";
    str += std::string("include_directories(${") + pkgDefName + "_INCLUDE_DIRS})\n";
    str += std::string("link_directories(${") + pkgDefName + "_LIBRARY_DIRS})\n";
    str += std::string("add_definitions(${") + pkgDefName + "_CFLAGS_OTHER})\n";
    }
开发者ID:8l,项目名称:oovcde,代码行数:11,代码来源:oovCMaker.cpp

示例7: getSrcRootDirRelativeSrcFileName

OovString Project::getSrcRootDirRelativeSrcFileName(OovStringRef const srcFileName,
        OovStringRef const srcRootDir)
    {
    OovString relSrcFileName = srcFileName;
    size_t pos = relSrcFileName.find(srcRootDir.getStr());
    if(pos != std::string::npos)
        {
        relSrcFileName.erase(pos, srcRootDir.numBytes());
        FilePathRemovePathSep(relSrcFileName, 0);
        }
    return relSrcFileName;
    }
开发者ID:animatedb,项目名称:oovaide,代码行数:12,代码来源:Project.cpp

示例8: FilePathGetPosStartDir

size_t FilePathGetPosStartDir(OovStringRef const path)
{
    size_t pos = std::string(path.getStr()).rfind(':');
    if(pos == std::string::npos)
    {
        pos = 0;
    }
    else
    {
        pos++;
    }
    return pos;
}
开发者ID:8l,项目名称:oovcde,代码行数:13,代码来源:FilePath.cpp

示例9: replaceStrs

bool OovString::replaceStrs(OovStringRef const srchStr, OovStringRef const repStr)
    {
    size_t starti = 0;
    bool didReplace = false;
    do
        {
        starti = find(srchStr, starti);
        if(starti != OovString::npos)
            {
            didReplace = true;
            std::string::replace(starti, strlen(srchStr), repStr);
            starti+=strlen(repStr.getStr());
            }
        } while(starti != OovString::npos);
    return didReplace;
    }
开发者ID:sguzwf,项目名称:oovaide,代码行数:16,代码来源:OovString.cpp

示例10: processFile

// Return true while success.
bool FindFiles::processFile(OovStringRef const filePath)
    {
    bool success = true;
    FilePath ext(filePath, FP_File);

    bool isSource = (isCppHeader(ext) || isCppSource(ext) || isJavaSource(ext));
    if(mSourceFilesOnly ? isSource : true)
        {
        FILE *fp = fopen(filePath.getStr(), "r");
        if(fp)
            {
            char buf[1000];
            int lineNum = 0;
            while(fgets(buf, sizeof(buf), fp))
                {
                lineNum++;
                char const *match=NULL;
                if(mCaseSensitive)
                    {
                    match = strstr(buf, mSrchStr.c_str());
                    }
                else
                    {
                    match = strcasestr(buf, mSrchStr.c_str());
                    }
                if(match)
                    {
                    mNumMatches++;
                    OovString matchStr = filePath;
                    matchStr += ':';
                    matchStr.appendInt(lineNum);
                    matchStr += "   ";
                    matchStr += buf;
//                  matchStr += '\n';
                    Gui::appendText(mView, matchStr);
                    }
                }
            fclose(fp);
            }
        }
    return success;
    }
开发者ID:animatedb,项目名称:oovaide,代码行数:43,代码来源:oovEdit.cpp

示例11: sendMessage

void OovIpc::sendMessage(OovStringRef msg)
    {
    printf("%s", msg.getStr());
    fflush(stdout);
    }
开发者ID:8l,项目名称:oovcde,代码行数:5,代码来源:OovIpc.cpp

示例12: FileRename

OovStatusReturn FileRename(OovStringRef const  oldPath, OovStringRef const  newPath)
    {
    return OovStatus(rename(oldPath.getStr(), newPath.getStr()) == 0, SC_File);
    }
开发者ID:Purplenigma,项目名称:oovaide,代码行数:4,代码来源:FilePath.cpp

示例13: FileDelete

OovStatusReturn FileDelete(OovStringRef const path)
    {
    return OovStatus(unlink(path.getStr()) == 0 || errno == ENOENT, SC_File);
    }
开发者ID:Purplenigma,项目名称:oovaide,代码行数:4,代码来源:FilePath.cpp

示例14: FileRename

void FileRename(OovStringRef const  oldPath, OovStringRef const  newPath)
{
    rename(oldPath.getStr(), newPath.getStr());
}
开发者ID:8l,项目名称:oovcde,代码行数:4,代码来源:FilePath.cpp

示例15: FileDelete

void FileDelete(OovStringRef const path)
{
    unlink(path.getStr());
}
开发者ID:8l,项目名称:oovcde,代码行数:4,代码来源:FilePath.cpp


注:本文中的OovStringRef::getStr方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。