PhoenixPresentation  2.0.0
Set of cmake function to automate presentation generation
PFileParser_impl.h
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 #ifndef __PFILE_PARSER_IMPL_H__
8 #define __PFILE_PARSER_IMPL_H__
9 
10 #include "PFileParser.h"
11 
13 
18 template<typename T>
19 bool PFileParser::isMatchToken(PString & matchKey, T & matchValue, const std::map<PString, T> & patern){
20  if(patern.size() == 0lu) return false;
21  typename std::map<PString, T>::const_iterator it(patern.begin());
22  while(it != patern.end()){
23  if(isMatchToken(it->first)){
24  matchKey = it->first;
25  matchValue = it->second;
26  return true;
27  }
28  ++it;
29  }
30  return false;
31 }
32 
33 
34 #endif
bool isMatchToken(const PString &patern)
Says if the patern match with the current caracters of the PFileParser but treats the string as a tok...
Extends the std::string.
Definition: PString.h:16