示例#1
0
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
}
示例#2
0
TZipOut::~TZipOut() {
  if (BfL!=0) { FlushBf(); }
  #ifdef GLib_WIN
  if (ZipStdinWr != NULL) { EAssertR(CloseHandle(ZipStdinWr), "Closing write-end of pipe failed"); }
  if (ZipStdinRd != NULL) { EAssertR(CloseHandle(ZipStdinRd), "Closing read-end of pipe failed"); }
  #else
  if (ZipStdinWr != NULL) { EAssertR(pclose(ZipStdinWr) != -1, "Closing of the process failed"); }
  #endif
  if (Bf!=NULL) { delete[] Bf; }
}
示例#3
0
文件: fl.cpp 项目: andrejmuhic/qminer
void TFOut::Flush(){
  FlushBf();
  EAssertR(fflush(FileId)==0, "Can not flush file '"+GetSNm()+"'.");
}
示例#4
0
文件: fl.cpp 项目: andrejmuhic/qminer
int TFOut::PutCh(const char& Ch){
  if (BfL==TSize(MxBfL)){FlushBf();}
  return Bf[BfL++]=Ch;
}
示例#5
0
文件: fl.cpp 项目: andrejmuhic/qminer
TFOut::~TFOut(){
  if (FileId!=NULL){FlushBf();}
  if (Bf!=NULL){delete[] Bf;}
  if (FileId!=NULL){
    EAssertR(fclose(FileId)==0, "Can not close file '"+GetSNm()+"'.");}
}
示例#6
0
int TZipOut::PutCh(const char& Ch){
  if (BfL==MxBfL) {FlushBf();}
  return Bf[BfL++]=Ch;
}