本文整理汇总了C++中FILE_INFO::had_failure方法的典型用法代码示例。如果您正苦于以下问题:C++ FILE_INFO::had_failure方法的具体用法?C++ FILE_INFO::had_failure怎么用?C++ FILE_INFO::had_failure使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FILE_INFO
的用法示例。
在下文中一共展示了FILE_INFO::had_failure方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: clear_errors
void APP_VERSION::clear_errors() {
int x;
unsigned int i;
for (i=0; i<app_files.size();i++) {
FILE_INFO* fip = app_files[i].file_info;
if (fip->had_failure(x)) {
fip->reset();
}
}
}
示例2: get_file_errors
void APP_VERSION::get_file_errors(string& str) {
int errnum;
unsigned int i;
FILE_INFO* fip;
string msg;
str = "couldn't get input files:\n";
for (i=0; i<app_files.size();i++) {
fip = app_files[i].file_info;
if (fip->had_failure(errnum)) {
fip->failure_message(msg);
str = str + msg;
}
}
}
示例3: is_upload_done
// Returns true if the result's output files are all either
// successfully uploaded or have unrecoverable errors
//
bool RESULT::is_upload_done() {
unsigned int i;
FILE_INFO* fip;
int retval;
for (i=0; i<output_files.size(); i++) {
fip = output_files[i].file_info;
if (fip->uploadable()) {
if (fip->had_failure(retval)) continue;
if (!fip->uploaded) {
return false;
}
}
}
return true;
}
示例4: parse_state_file_aux
//.........这里部分代码省略.........
if (!project) {
msg_printf(NULL, MSG_INTERNAL_ERROR,
"File info outside project in state file"
);
delete fip;
continue;
}
if (retval) {
msg_printf(NULL, MSG_INTERNAL_ERROR,
"Can't handle file info in state file"
);
delete fip;
continue;
}
retval = link_file_info(project, fip);
if (project->anonymous_platform && retval == ERR_NOT_UNIQUE) {
delete fip;
continue;
}
if (retval) {
msg_printf(project, MSG_INTERNAL_ERROR,
"Can't handle file info %s in state file",
fip->name
);
delete fip;
continue;
}
file_infos.push_back(fip);
#ifndef SIM
// If the file had a failure before,
// don't start another file transfer
//
int failnum;
if (fip->had_failure(failnum)) {
if (fip->pers_file_xfer) {
delete fip->pers_file_xfer;
fip->pers_file_xfer = NULL;
}
}
if (fip->pers_file_xfer) {
retval = fip->pers_file_xfer->init(fip, fip->pers_file_xfer->is_upload);
if (retval) {
msg_printf(project, MSG_INTERNAL_ERROR,
"Can't initialize file transfer for %s",
fip->name
);
}
retval = pers_file_xfers->insert(fip->pers_file_xfer);
if (retval) {
msg_printf(project, MSG_INTERNAL_ERROR,
"Can't start persistent file transfer for %s",
fip->name
);
}
}
#endif
continue;
}
if (xp.match_tag("app_version")) {
APP_VERSION* avp = new APP_VERSION;
retval = avp->parse(xp);
if (!project) {
msg_printf(NULL, MSG_INTERNAL_ERROR,
"Application version outside project in state file"
);
delete avp;