本文整理汇总了C++中Loader::check方法的典型用法代码示例。如果您正苦于以下问题:C++ Loader::check方法的具体用法?C++ Loader::check怎么用?C++ Loader::check使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Loader
的用法示例。
在下文中一共展示了Loader::check方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: process_lines
void process_lines(vector<string> & lines)
{
const int nlines = lines.size(); // number of lines
const int n = nlines - 1; // number of input data
if (nlines < 2) {
cout << "number of lines is wrong" << endl;
exit(EXIT_FAILURE);
}
Loader loader; // frontend
Docker docker; // backend
for (int i = 0; i < n; ++i) {
string input = lines[i + 1];
//cout << input << endl;
loader.load(input);
loader.check();
#if 1
vector<string> tokens = loader.get_tokens();
for (unsigned int i = 0; i < tokens.size() - 1; ++i)
cout << tokens[i] << ",";
cout << tokens[tokens.size() - 1];
#endif
cout << endl;
loader.build_complex(docker.complex);
docker.run();
}
}
示例2: process_lines
void process_lines(vector<string> & lines)
{
const int nlines = lines.size(); // number of lines
const int n = nlines - 1; // number of input data
if (nlines < 2) {
cout << "number of lines is wrong" << endl;
exit(EXIT_FAILURE);
}
// prints modified CSV title
vector<string> tokens;
tokens = tokenlize(lines[0]);
tokens[18] = "steps_total";
tokens[20] = "sz.n_prt";
tokens[21] = "sz.n_lig";
tokens[22] = "sz.n_tmp";
tokens[23] = "sz.n_rep";
tokens[24] = "sz.prt_npoint";
tokens[25] = "sz.lig_natom";
tokens[26] = "sz.kde_npoint";
tokens[27] = "sz.mcs_nrow";
for (unsigned int i = 0; i < tokens.size() - 1; ++i)
cout << tokens[i] << ",";
cout << tokens[tokens.size() - 1];
cout << endl;
// CSV contents
Loader loader;
for (int i = 0; i < n; ++i) {
string input = lines[i + 1];
//cout << input << endl;
loader.load(input);
loader.check();
#if 1
tokens = loader.get_tokens();
McPara mcpara = loader.get_mcpara();
ComplexSize sz = loader.get_sz();
tokens[18] = num2string(mcpara.steps_total);
tokens[20] = num2string(sz.n_prt);
tokens[21] = num2string(sz.n_lig);
tokens[22] = num2string(sz.n_tmp);
tokens[23] = num2string(sz.n_rep);
tokens[24] = num2string(sz.prt_npoint);
tokens[25] = num2string(sz.lig_natom);
tokens[26] = num2string(sz.kde_npoint);
tokens[27] = num2string(sz.mcs_nrow);
for (unsigned int i = 0; i < tokens.size() - 1; ++i)
cout << tokens[i] << ",";
cout << tokens[tokens.size() - 1];
#endif
cout << endl;
}
}