本文整理汇总了C++中GetSNm函数的典型用法代码示例。如果您正苦于以下问题:C++ GetSNm函数的具体用法?C++ GetSNm怎么用?C++ GetSNm使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetSNm函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EAssertR
void TFIn::FillBf(){
EAssertR(
(BfC==BfL)&&((BfL==-1)||(BfL==MxBfL)),
"Error reading file '"+GetSNm()+"'.");
BfL=int(fread(Bf, 1, MxBfL, FileId));
EAssertR((BfC!=0)||(BfL!=0), "Error reading file '"+GetSNm()+"'.");
BfC=0;
}
示例2: FlushBf
void TZipOut::Flush(){
FlushBf();
#ifdef GLib_WIN
EAssertR(FlushFileBuffers(ZipStdinWr)!=0, "Can not flush file '"+GetSNm()+"'.");
#else
EAssertR(fflush(ZipStdinWr)==0, "Can not flush file '"+GetSNm()+"'.");
#endif
}
示例3: EAssertR
void TZipIn::FillBf(){
EAssertR(CurFPos < FLen, "End of file "+GetSNm()+" reached.");
EAssertR((BfC==BfL)/*&&((BfL==-1)||(BfL==MxBfL))*/, "Error reading file '"+GetSNm()+"'.");
#ifdef GLib_WIN
// Read output from the child process
DWORD BytesRead;
EAssert(ReadFile(ZipStdoutRd, Bf, MxBfL, &BytesRead, NULL) != 0);
#else
size_t BytesRead = fread(Bf, 1, MxBfL, ZipStdoutRd);
EAssert(BytesRead != 0);
#endif
BfL = (int) BytesRead;
CurFPos += BytesRead;
EAssertR((BfC!=0)||(BfL!=0), "Error reading file '"+GetSNm()+"'.");
BfC = 0;
}
示例4: Load
void TSIn::Load(char*& CStr){
char Ch; Load(Ch);
int CStrLen=int(Ch);
EAssertR(CStrLen>=0, "Error reading stream '"+GetSNm()+"'.");
CStr=new char[CStrLen+1];
if (CStrLen>0){Cs+=GetBf(CStr, CStrLen);}
CStr[CStrLen]=TCh::NullCh;
}
示例5: FillBf
// reads LBfL bytes into LBf
int TFIn::GetBf(const void* LBf, const TSize& LBfL){
int LBfS=0;
if (TSize(BfC+LBfL)>TSize(BfL)){
for (TSize LBfC=0; LBfC<LBfL; LBfC++){
if (BfC==BfL){
FillBf();
// we tried to fill a buffer (that is used in the next statement).
// the available buffer BfL therefore has to be non-empty
EAssertR(BfL > 0, "Unable to fill a buffer from " + GetSNm() + "'.");
}
LBfS+=((char*)LBf)[LBfC]=Bf[BfC++];}
} else {
for (TSize LBfC=0; LBfC<LBfL; LBfC++){
LBfS+=(((char*)LBf)[LBfC]=Bf[BfC++]);}
}
return LBfS;
}
示例6: GetSNm
TStr TFInOut::GetFNm() const {
return GetSNm();
}
示例7: FlushBf
void TFOut::Flush(){
FlushBf();
EAssertR(fflush(FileId)==0, "Can not flush file '"+GetSNm()+"'.");
}
示例8: sizeof
void TSIn::LoadCs(){
TCs CurCs=Cs; TCs TestCs;
Cs+=GetBf(&TestCs, sizeof(TestCs));
EAssertR(CurCs==TestCs, "Invalid checksum reading '"+GetSNm()+"'.");
}