本文整理汇总了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;
}
示例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
}
示例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());
}
}
示例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();
}
}
}
}
示例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;
}
示例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 );
}