PhoenixInkscape  2.0.0
Generate multiple png files with svg inkscape files
value_completion.cpp
Go to the documentation of this file.
1 /***************************************
2  Auteur : Pierre Aubert
3  Mail : pierre.aubert@lapp.in2p3.fr
4  Licence : CeCILL-C
5 ****************************************/
6 
7 #include "value_completion.h"
8 
10 
14 PString value_completion(const PString & baseValue, const PVecString & vecPossibleValue){
15  PString strBashCompletion(""), separator("");
16  if(baseValue == ""){
17  for(PVecString::const_iterator it(vecPossibleValue.begin()); it != vecPossibleValue.end(); ++it){
18  strBashCompletion += separator + *it;
19  separator = " ";
20  }
21  }else{
22  for(PVecString::const_iterator it(vecPossibleValue.begin()); it != vecPossibleValue.end(); ++it){
23  if(it->isSameBegining(baseValue)){
24  strBashCompletion += separator + *it;
25  separator = " ";
26  }
27  }
28  }
29  return strBashCompletion;
30 }
31 
32 
std::vector< PString > PVecString
Definition: PString.h:96
Extends the std::string.
Definition: PString.h:16
PString value_completion(const PString &baseValue, const PVecString &vecPossibleValue)
Complete the given value.