#include <algorithm>
#include <sstream>
#include "argsparser.h"
#include "xmipp_error.h"
Go to the source code of this file.
◆ addOcurrence()
void addOcurrence |
( |
std::map< String, int > & |
map, |
|
|
const String & |
name |
|
) |
| |
◆ reportExclusiveErrors()
void reportExclusiveErrors |
( |
std::stringstream & |
errors, |
|
|
std::vector< ParamDef *> & |
exclusive |
|
) |
| |
Definition at line 857 of file argsparser.cpp.
859 if (exclusive.empty())
862 std::vector<ParamDef*> exclusive2;
863 for (
size_t i = 0;
i < exclusive.size(); ++
i)
864 if (exclusive[
i]->counter == 1)
865 exclusive2.push_back(exclusive[
i]);
866 if (exclusive2.size() > 1)
868 errors <<
"Parameters ";
869 for (
size_t i = 0; i < exclusive.size() - 1; ++
i)
870 errors << exclusive[i]->name <<
" ";
871 errors <<
"and " << exclusive[exclusive.size()-1]->name <<
" are mutually exclusive (check alias)" << std::endl;
873 else if (exclusive2.empty() && exclusive[0]->notOptional)
875 errors <<
"You should provide parameter " << exclusive[0]->name;
876 for (
size_t i = 1; i < exclusive.size(); ++
i)
877 errors <<
" or " << exclusive[i]->name;