Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ippPatternChecker.h

Go to the documentation of this file.
00001 #pragma once
00002 
00003 
00004 //=============================================================================
00005 template<typename token_type>
00006 bool match(
00007  const std::vector<token_type>& vector,
00008  const char* pattern,
00009  int startindex =0
00010 )
00011 // ----------------------------------------------------------------------------
00012 {
00013   int n= vector.size();
00014   const char* p =pattern;
00015   int i=startindex;
00016   while(*p) { 
00017     if (i>=n) {
00018       return false;
00019     }
00020     token_type t = (token_type)(*p++);
00021     if (vector[i++]!=t) { 
00022       return false;
00023     }
00024   }
00025   return true;
00026 }

Generated on Wed Nov 8 00:20:05 2006 for IPPDME by  doxygen 1.4.1