Commit dde3f0a2 authored by Pierre Aubert's avatar Pierre Aubert
Browse files

Print remaning offset when there are not to many

parent 4ae6873f
Pipeline #131970 passed with stages
in 1 minute and 44 seconds
......@@ -57,6 +57,21 @@ size_t getNbPossibleOffset(const PVecPossibleOffset & vecOffset){
return nbOffset;
}
///Print the remaning offset
/** @param vecOffset : vector of available offset
* @param indentation : indentation to be used
*/
void printRemaningOffset(const PVecPossibleOffset & vecOffset, const std::string & indentation){
size_t offset(0lu), i(0lu);
for(PVecPossibleOffset::const_iterator it(vecOffset.begin()); it != vecOffset.end(); ++it){
if(*it){ //If this is a potential offset
std::cout << indentation << i << " : " << offset << std::endl;
++i;
}
++offset;
}
}
///Default constructor of POffsetFinder
POffsetFinder::POffsetFinder(){
initialisationPOffsetFinder();
......@@ -128,6 +143,10 @@ void POffsetFinder::print() const{
if(it->getVecOffset().size() != 0lu){
size_t nbPossibleOffset(getNbPossibleOffset(it->getVecOffset()));
std::cout << "Not enough data to conclude (potential conflict with other searched Attributes) => " << nbPossibleOffset << " possibilities";
if(nbPossibleOffset <= 10lu){
std::cout << "\tcandidates are :" << std::endl;
printRemaningOffset(it->getVecOffset(), "\t\t");
}
}else{
std::cout << "not found";
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment