本文整理汇总了C++中TList::IsEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ TList::IsEmpty方法的具体用法?C++ TList::IsEmpty怎么用?C++ TList::IsEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TList
的用法示例。
在下文中一共展示了TList::IsEmpty方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: nextMatch
void
next(int nMatch=1)
{
char buffer[1024];
int stat=0;
int match=0;
while(match<nMatch) {
stat=chain->Make();
if( stat==2 || stat==4) break;
if( stat!=0 ) continue;
TList *matchList = ttm->GetMatchList();
if(matchList->IsEmpty()) continue;
TIter nextMatch(matchList);
match++;
StEventInfo &evinfo = muDstMk->muDst()->event()->eventInfo(); // event info
StEventSummary &evsumm = muDstMk->muDst()->event()->eventSummary();// event summary
sprintf(buffer,"Run #%d Event #%d\n",evinfo.runId(),evinfo.id());
eventInfo->Clear();
eventInfo->SetTextAlign(12);
eventInfo->AddText(buffer);
eemc->Clear();
cerr << "<Event";
cerr << "Run=\"" << evinfo.runId() << "\"\t";
cerr << "Event=\""<< evinfo.id() << "\">\n";
EEmcTTMatch *tmatch;
while ((tmatch = (EEmcTTMatch *) nextMatch())) {
TString outs;
eemc->AddMatch(*tmatch);
eemc->Out(cerr,*tmatch);
eemc->Out(outs,*tmatch);
eventInfo->AddText(outs);
}
cerr << "</Event>" << endl;
now->Set();
dateInfo->SetLabel(now->AsString());
eemc->Draw();
eventInfo->Draw();
dateInfo->Draw();
gPad->Update();
}
ttm->Summary(cerr);
}
示例2: ChatPassesFilter
bool ChatPassesFilter(ChatInfo* pchatInfo)
{
if (ChatIsNonCriticalMessage(pchatInfo))
{
return false;
}
if (m_listChannels.IsEmpty())
{
return true;
}
else
{
TList<ChatTarget>::Iterator iter(m_listChannels);
while (!iter.End())
{
if (iter.Value() == pchatInfo->GetChatTarget())
return true;
iter.Next();
}
}
return false;
}
示例3: scanDirectory
void scanDirectory(const char *dirname)
{
TDirectoryIter iter(dirname);
const char *filename = 0;
TString ent;
TString file;
TString html;
html.Form(gPreamble,dirname,dirname);
TList dirList;
TList fileList;
while( (filename=iter.Next()) )
{
if (filename[0]!='.') {
ent.Form("%s/%s", dirname, filename);
FileStat_t st;
gSystem->GetPathInfo(ent.Data(), st);
if (R_ISDIR(st.fMode)) {
//fprintf(stderr,"Seeing directory %s\n",ent.Data());
scanDirectory(ent.Data());
dirList.Add(new TObjString(filename));
} else {
size_t len = strlen(filename);
if (len > 8 && strncmp(filename,"pt_",3)==0 && strncmp(filename+len-5,".root",5)==0) {
//fprintf(stderr,"Seeing file %s\n",ent.Data());
file = filename;
file[len-5]='\0';
fileList.Add(new TObjString(file));
}
}
}
}
dirList.Sort();
fileList.Sort();
TIter next(&dirList);
TObjString *obj;
html += "<table width=\"500\">\n";
html += gLine;
html += gParentDir;
while ( (obj = (TObjString*)next()) ) {
html += TString::Format(gDirFmt,obj->GetName(),obj->GetName());
}
html += gLine;
if (!fileList.IsEmpty()) {
next = &fileList;
while ( (obj = (TObjString*)next()) ) {
html += "<tr>";
html += TString::Format(gFiles,obj->GetName(),obj->GetName(),obj->GetName(),obj->GetName());
obj = (TObjString*)next();
if (obj) {
html += TString::Format(gFiles,obj->GetName(),obj->GetName(),obj->GetName(),obj->GetName());
} else {
html += "<td></td></tr>";
break;
}
}
html += gLine;
}
html += "</table>\n";
dirList.Delete();
fileList.Delete();
html += "</body>\n";
html += "</html>\n";
ent.Form("%s/pt_index.html",dirname);
FILE *output = fopen(ent.Data(),"w");
fprintf(output,"%s",html.Data());
fclose(output);
}