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


C++ TNamed::GetUniqueID方法代码示例

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


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

示例1: while

const char *Next(int &kind,int &idx,double &exe,double &heap,double &free,double &inc) {		  
  if(!inp) return 0;
  kind=0;idx=0;exe=0;heap=0;free=0,inc=0;
  TString ts;
  char *endMaker,*clear,*ctr,*doPs,*fr,*to,*and;
  while(fgets(line,500,inp)) {
    doPs = strstr(line,"doPs for");
    if (!doPs) 				continue;
    endMaker = strstr(line,"EndMaker");
    clear    = strstr(line,"Clear");
    ctr      = strstr(line,"constructor");
    kind = 0;
    if (ctr     ) kind = 1;
    if (clear   ) kind = 2;
    if (endMaker) kind = 3;
    if (!kind)				continue;
    fr = doPs+8 +strspn(doPs+8," \t");
    to = strstr(fr,":");
    ts = ""; ts.Append(fr,to-fr);
    if (!ts.Length()) 			continue;
    fr = strstr(fr,"total");  if (!fr) 	continue;
    fr = strstr(fr,"="    );  if (!fr) 	continue;
    exe = atof(fr+1);
    fr  = strstr(fr,"heap" ); if (!fr) 	continue;
    fr  = strstr(fr,"="    ); if (!fr) 	continue;
    heap = atof(fr+1);
    and  = strstr(fr,"and");
    if (and) free = atof(and+3);
    fr  = strstr(fr,"("    ); if (!fr) 	continue;
    inc = atof(fr+1);
    if (kind==1) 			continue;
    TNamed *tn = (TNamed*)hash.FindObject(ts.Data());
    if (!tn) {
      tn = new TNamed(ts.Data(),"");
      hash.Add(tn);
      fNMakers++;
      tn->SetUniqueID((UInt_t)fNMakers);
      mArray.AddAtAndExpand(tn,fNMakers);
    }
    idx = tn->GetUniqueID();
    return tn->GetName();
  }
  fclose(inp); inp = 0;
  return 0;  
}};
开发者ID:star-bnl,项目名称:star-macros,代码行数:45,代码来源:LeakFinder.C


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