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


C++ plString::IsNull方法代码示例

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


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

示例1: StupidSearch

plKey plKeyFinder::StupidSearch(const plString & age, const plString & rm,
                                 uint16_t classType, const plString &obName, bool subString)
{
    if (obName.IsNull())
        return nil;

    plUoid newOid;

    fLastError = kOk;

    uint16_t maxClasses = plFactory::GetNumClasses();

    uint16_t ty = classType;
    if (ty == maxClasses)   // error
    {   fLastError = kInvalidClass;
        return nil;
    }

    if (!age.IsNull() && !rm.IsNull())
    {
        const plLocation &loc = IGetResMgr()->FindLocation( age, rm );
        if( !loc.IsValid() )
        {
            fLastError = kPageNotFound;
            return nil;
        }

        plKeyFinderIter keyFinder( classType, obName, subString );

        if( !IGetResMgr()->IterateKeys( &keyFinder, loc ) )
            // Return value of false means it stopped somewhere, i.e. found something
            return keyFinder.GetFoundKey();
    }
    else if (!age.IsNull())
    {
        plKeyFinderIter keyFinder(classType, obName, subString, age);

        if( !IGetResMgr()->IterateAllPages( &keyFinder ) )
            return keyFinder.GetFoundKey();
    }
    else
    {
        plKeyFinderIter keyFinder( classType, obName, subString );

        if( !IGetResMgr()->IterateKeys( &keyFinder ) )
            // Return value of false means it stopped somewhere, i.e. found something
            return keyFinder.GetFoundKey();
    }

    fLastError = kObjectNotFound;
    return nil;
}
开发者ID:Asteral,项目名称:Plasma,代码行数:52,代码来源:plKeyFinder.cpp

示例2: EatPage

        virtual bool  EatPage( plRegistryPageNode *node )
        {
            const plPageInfo    &info = node->GetPageInfo();

            // Are we searching by age/page?
            if (!fAgeString.IsNull())
            {
                if (info.GetAge().CompareI(fAgeString) == 0 && info.GetPage().CompareI(fFindString) == 0)
                {
                    *fPagePtr = node;
                    return false;
                }
                return true;
            }

            // Try for page only
            if (info.GetPage().CompareI(fFindString) == 0)
            {
                *fPagePtr = node;
                return false;
            }

            // Try for full location
            if (plString::Format("%s_%s", info.GetAge().c_str(), info.GetPage().c_str()).CompareI(fFindString) == 0)
            {
                *fPagePtr = node;
                return false;
            }

            return true;    // Keep searching
        }
开发者ID:Asteral,项目名称:Plasma,代码行数:31,代码来源:plKeyFinder.cpp

示例3: AddNameToCursor

void plMouseDevice::AddNameToCursor(const plString& name)
{
    if (fInstance && !name.IsNull())
    {
        plDebugText     &txt = plDebugText::Instance();
        txt.DrawString(fInstance->fWXPos + 12 ,fInstance->fWYPos - 7,name.c_str());
    }
}
开发者ID:Asteral,项目名称:Plasma,代码行数:8,代码来源:plInputDevice.cpp

示例4: INextProfile

void plAutoProfileImp::INextProfile()
{
    // Haven't linked to our first age yet, do that before we start profiling
    if (fNextAge == 0)
    {
        if (!INextAge())
            IShutdown();
    }
    else
    {
        // Log the stats for this spawn point
        if (!fLastSpawnPointName.IsNull())
        {
            plString ageName = NetCommGetAge()->ageDatasetName;
            plProfileManagerFull::Instance().LogStats(ageName, fLastSpawnPointName);

            plMipmap mipmap;
            if (plClient::GetInstance()->GetPipeline()->CaptureScreen(&mipmap))
            {
                plString fileName = plFormat("{}\\{}_{}.jpg",
                    plProfileManagerFull::Instance().GetProfilePath(),
                    ageName, fLastSpawnPointName);

                plJPEG::Instance().SetWriteQuality(100);
                plJPEG::Instance().WriteToFile(fileName.c_str(), &mipmap);
            }

            fLastSpawnPointName = plString::Null;
        }

        // Try to go to the next spawn point
        if (!INextSpawnPoint())
        {
            // Link to the next age
            if (!INextAge())
            {
                // We've done all the ages, shut down
                IShutdown();
            }
        }
    }
}
开发者ID:Drakesinger,项目名称:Plasma,代码行数:42,代码来源:plAutoProfile.cpp

示例5: Log

//
// override for plLoggable
//
bool plNetClientMgr::Log(const plString& str) const
{
    if (str.IsNull() || str.IsEmpty()) {
        return true;
    }

    // prepend raw time
    plString buf2 = plFormat("{.2f} {}", hsTimer::GetSeconds(), ProcessTab(str.c_str()));

    if ( GetConsoleOutput() )
        hsStatusMessage(buf2.c_str());

    GetLog();

    plNetObjectDebugger::GetInstance()->LogMsgIfMatch(buf2.c_str());

    if (fStatusLog) {
        return fStatusLog->AddLine(buf2);
    }

    return true;
}
开发者ID:MareinK,项目名称:Plasma,代码行数:25,代码来源:plNetClientMgr.cpp

示例6: ReallyStupidSubstringSearch

void plKeyFinder::ReallyStupidSubstringSearch(const plString &name, uint16_t objType, std::vector<plKey>& foundKeys, const plLocation &hintLocation )
{
    if (name.IsNull())
        return;

    plKeyFinderIterator collector( objType, name, foundKeys );
    if( hintLocation.IsValid() )
    {
        plRegistryPageNode *hintPage = IGetResMgr()->FindPage( hintLocation );
        if( hintPage != nil )
        {
            // Try all pages in the same age as that page
            IGetResMgr()->IteratePages( &collector, hintPage->GetPageInfo().GetAge() );
        }

        if (foundKeys.size() > 0)
        {
            return;
        }
    }

    //fpReg->IterateKeys( &collector );
    IGetResMgr()->IterateAllPages( &collector );
}
开发者ID:Asteral,项目名称:Plasma,代码行数:24,代码来源:plKeyFinder.cpp


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