本文整理汇总了C++中Statistic::GetName方法的典型用法代码示例。如果您正苦于以下问题:C++ Statistic::GetName方法的具体用法?C++ Statistic::GetName怎么用?C++ Statistic::GetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Statistic
的用法示例。
在下文中一共展示了Statistic::GetName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DBIO_LoadStatistic
static long DBIO_LoadStatistic( VDinfoP VDptr, Statistic *stat, gzFile fh, long useOtherNames, char *id )
{
long dataread = 0;
if ( !fh ) return 0;
// read one statistic
if ( stat ) {
dataread += gzread( fh, stat ,sizeof(Statistic) );
if ( useOtherNames == NAMEIS_NORMAL || useOtherNames == NAMEIS_IP ) {
if ( stat->GetName() && stat->length>0 ){
char *name;
name = stat->AllocateName( stat->length );
dataread += ReadString( fh, name, stat->length );
}
} else
if ( (long)stat->GetName() == NAMEIS_STATIC )
{
if( !mystrcmpi( "hour", id ) ) RestoreHourNames( stat );
else if( !mystrcmpi( "wkday", id ) ) RestoreWeekdaysNames( stat );
else if( !mystrcmpi( "wdays", id ) ) RestoreHourNames( stat );
else if( !mystrcmpi( "oper", id ) ) RestoreOpersysNames( stat );
else if( !mystrcmpi( "errs", id ) ) RestoreErrorsNames( stat );
else if( !mystrcmpi( s_errorsWithTopReferralsTag, id ) ) RestoreErrorsNames( stat );
else if( !mystrcmpi( "pages", id ) ) RestoreStatisticName( stat, VDptr->byFile );
else if( !mystrcmpi( "down", id ) ) RestoreStatisticName( stat, VDptr->byFile );
else if( !mystrcmpi( "audio", id ) ) RestoreStatisticName( stat, VDptr->byFile );
else if( !mystrcmpi( "video", id ) ) RestoreStatisticName( stat, VDptr->byFile );
else if( !mystrcmpi( s_brokenLinkReferalsTag, id ) ) RestoreStatisticName( stat, VDptr->byRefer );
else if( !mystrcmpi( s_intBrokenLinkReferalsTag, id ) ) RestoreStatisticName( stat, VDptr->byRefer );
else stat->name = NULL;
}
} else {
// read to where? empty area just incase
Statistic Lstat;
dataread += gzread( fh, &Lstat ,sizeof(Statistic) );
if ( Lstat.GetName() && !useOtherNames ) {
char tmp[1024];
dataread += gzread( fh, tmp , stat->length );
}
if ( (long)stat->GetName() == NAMEIS_STATIC )
stat->name = NULL;
}
return dataread;
}