本文整理汇总了C++中KVNameValueList::IsValue方法的典型用法代码示例。如果您正苦于以下问题:C++ KVNameValueList::IsValue方法的具体用法?C++ KVNameValueList::IsValue怎么用?C++ KVNameValueList::IsValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KVNameValueList
的用法示例。
在下文中一共展示了KVNameValueList::IsValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RunHasFileWithDateAndName
KVNameValueList* KVAvailableRunsFile::RunHasFileWithDateAndName(Int_t run, const Char_t* filename, TDatime modtime, Int_t& OccNum)
{
// look in previously read infos (see ReadFile) to see if, for a given run, there is a file with the
// given name and modification date/time
// if so, returns the address of the KVNameValueList for the run & sets OccNum to the index number of
// the corresponding entry (in case of several files for the run)
// if not, returns NULL
if(!fAvailableRuns) return NULL;
// is run already in list ?
KVNameValueList* NVL = (KVNameValueList*)fAvailableRuns->FindObject(Form("%d",run));
if(!NVL) return NULL;
Int_t Occurs = NVL->GetIntValue("Occurs");
for(OccNum=0; OccNum<Occurs; OccNum++){
if( NVL->IsValue( Form("Filename[%d]",OccNum) , filename ) && NVL->IsValue( Form("Date[%d]",OccNum) , modtime.AsSQLString() ) ) return NVL;
}
return NULL;
}
示例2: InfosNeedUpdate
Bool_t KVAvailableRunsFile::InfosNeedUpdate(Int_t run, const Char_t * filename)
{
// return kTRUE if the given file for this run is lacking some information
// e.g. the KV version and username
// N.B.: if no file is known for this run, we return kFALSE
ReadFile();
// is run already in list ?
KVNameValueList* NVL = (KVNameValueList*)fAvailableRuns->FindObject(Form("%d",run));
if(!NVL) return kFALSE;
Int_t Occurs = NVL->GetIntValue("Occurs");
for(Int_t OccNum=0; OccNum<Occurs; OccNum++){
if( NVL->IsValue( Form("Filename[%d]",OccNum) , filename ) ){
// infos need update if no KV version has been set
return ( !NVL->HasParameter(Form("KVVersion[%d]",OccNum)) );
}
}
return kFALSE;
}