2008-08-06 18:36:30 +00:00
|
|
|
// This file is part of BOINC.
|
2005-01-20 23:22:22 +00:00
|
|
|
// http://boinc.berkeley.edu
|
2008-08-06 18:36:30 +00:00
|
|
|
// Copyright (C) 2008 University of California
|
2003-08-14 00:02:15 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
2003-08-14 00:02:15 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
2005-01-20 23:22:22 +00:00
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
2003-08-14 00:02:15 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2003-08-14 00:02:15 +00:00
|
|
|
|
|
|
|
#ifndef H_VALIDATE_UTIL
|
|
|
|
#define H_VALIDATE_UTIL
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
2006-06-10 21:29:51 +00:00
|
|
|
#include "boinc_db.h"
|
2008-05-29 20:11:43 +00:00
|
|
|
#include "parse.h"
|
2006-06-10 21:29:51 +00:00
|
|
|
|
2008-06-30 16:46:05 +00:00
|
|
|
// bit of a misnomer - this actually taken from the <file_ref> elements
|
|
|
|
// of result.xml_doc_in
|
|
|
|
//
|
2008-05-29 20:11:43 +00:00
|
|
|
struct FILE_INFO {
|
|
|
|
std::string name;
|
|
|
|
std::string path;
|
|
|
|
bool optional;
|
2008-06-30 16:46:05 +00:00
|
|
|
bool no_validate;
|
2008-05-29 20:11:43 +00:00
|
|
|
|
|
|
|
int parse(XML_PARSER&);
|
|
|
|
};
|
|
|
|
|
2008-05-29 21:54:18 +00:00
|
|
|
extern int get_output_file_info(RESULT& result, FILE_INFO&);
|
|
|
|
extern int get_output_file_infos(RESULT& result, std::vector<FILE_INFO>&);
|
|
|
|
extern int get_output_file_path(RESULT& result, std::string&);
|
|
|
|
extern int get_output_file_paths(RESULT& result, std::vector<std::string>&);
|
|
|
|
extern int get_logical_name(
|
|
|
|
RESULT& result, std::string& path, std::string& name
|
|
|
|
);
|
|
|
|
|
2007-01-30 18:19:30 +00:00
|
|
|
extern double median_mean_credit(WORKUNIT&, std::vector<RESULT>& results);
|
2008-08-07 22:50:05 +00:00
|
|
|
extern int get_credit_from_wu(WORKUNIT&, std::vector<RESULT>& results, double&);
|
2008-03-07 21:13:01 +00:00
|
|
|
extern double stddev_credit(WORKUNIT&, std::vector<RESULT>& results);
|
|
|
|
extern double two_credit(WORKUNIT&, std::vector<RESULT>& results);
|
2003-08-14 00:02:15 +00:00
|
|
|
#endif
|