本文整理汇总了C++中PROJECT::get_project_name方法的典型用法代码示例。如果您正苦于以下问题:C++ PROJECT::get_project_name方法的具体用法?C++ PROJECT::get_project_name怎么用?C++ PROJECT::get_project_name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PROJECT
的用法示例。
在下文中一共展示了PROJECT::get_project_name方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: show_global_prefs_source
void CLIENT_STATE::show_global_prefs_source(bool found_venue) {
PROJECT* pp = global_prefs_source_project();
if (pp) {
msg_printf(pp, MSG_INFO,
"General prefs: from %s (last modified %s)",
pp->get_project_name(), time_to_string(global_prefs.mod_time)
);
} else {
msg_printf(NULL, MSG_INFO,
"General prefs: from %s (last modified %s)",
global_prefs.source_project,
time_to_string(global_prefs.mod_time)
);
}
if (strlen(main_host_venue)) {
msg_printf(pp, MSG_INFO, "Computer location: %s", main_host_venue);
if (found_venue) {
msg_printf(NULL, MSG_INFO,
"General prefs: using separate prefs for %s", main_host_venue
);
} else {
msg_printf(pp, MSG_INFO,
"General prefs: no separate prefs for %s; using your defaults",
main_host_venue
);
}
} else {
msg_printf(pp, MSG_INFO, "Host location: none");
msg_printf(pp, MSG_INFO, "General prefs: using your defaults");
}
}
示例2: check_project_timeout
void CLIENT_STATE::check_project_timeout() {
unsigned int i;
for (i=0; i<projects.size(); i++) {
PROJECT* p = projects[i];
if (p->possibly_backed_off && now > p->min_rpc_time) {
p->possibly_backed_off = false;
char buf[256];
sprintf(buf, "Backoff ended for %s", p->get_project_name());
request_work_fetch(buf);
}
}
}
示例3: supplement
// if the given project is highest-priority among the projects
// eligible for the resource, set request fields
//
void RSC_WORK_FETCH::supplement(PROJECT* pp) {
double x = pp->sched_priority;
for (unsigned i=0; i<gstate.projects.size(); i++) {
PROJECT* p = gstate.projects[i];
if (p == pp) continue;
if (p->pwf.cant_fetch_work_reason) continue;
if (!project_state(p).may_have_work) continue;
RSC_PROJECT_WORK_FETCH& rpwf = project_state(p);
if (rpwf.anon_skip) continue;
if (p->sched_priority > x) {
if (log_flags.work_fetch_debug) {
msg_printf(pp, MSG_INFO,
"[work_fetch]: not requesting work for %s: %s has higher priority",
rsc_name(rsc_type), p->get_project_name()
);
}
return;
}
}
// didn't find a better project; ask for work
//
set_request(pp);
}
示例4: piggyback_work_request
// we're going to contact this project for reasons other than work fetch;
// decide if we should piggy-back a work fetch request.
//
void WORK_FETCH::piggyback_work_request(PROJECT* p) {
clear_request();
if (config.fetch_minimal_work && gstate.had_or_requested_work) return;
if (p->dont_request_more_work) return;
if (p->non_cpu_intensive) {
if (!has_a_job(p)) {
rsc_work_fetch[0].req_secs = 1;
}
return;
}
// if project was updated from manager and config says so,
// always fetch work if needed
//
if (p->sched_rpc_pending && config.fetch_on_update) {
set_all_requests_hyst(p, -1);
return;
}
compute_cant_fetch_work_reason();
PROJECT* bestp = choose_project(false, p);
if (p != bestp) {
if (p->pwf.cant_fetch_work_reason == 0) {
if (bestp) {
p->pwf.cant_fetch_work_reason = CANT_FETCH_WORK_NOT_HIGHEST_PRIORITY;
if (log_flags.work_fetch_debug) {
msg_printf(0, MSG_INFO,
"[work_fetch] not piggybacking work req: %s has higher priority",
bestp->get_project_name()
);
}
} else {
p->pwf.cant_fetch_work_reason = CANT_FETCH_WORK_DONT_NEED;
}
}
clear_request();
}
}