libcsdbg  1.28
C++ exception (and generic) stack trace debug library
const i8 * csdbg::parser::lookup ( const string exp,
bool  icase = false 
) const
virtual

Lookup an expression in all registered dictionaries.

Parameters
[in]expthe expression
[in]icasetrue to ignore case in lookups
Returns
the name of the first dictionary that found a match, NULL otherwise
Exceptions
csdbg::exception

Definition at line 694 of file parser.cpp.

References likely, csdbg::dictionary::lookup(), m_dictionaries, csdbg::dictionary::name(), and unlikely.

695 {
696  for (u32 i = 0, sz = m_dictionaries->size(); likely(i < sz); i++) {
697  dictionary *dict = m_dictionaries->at(i);
698  if ( unlikely(dict->lookup(exp, icase) != NULL) )
699  return dict->name();
700  }
701 
702  return NULL;
703 }
chain< dictionary > * m_dictionaries
Dictionary collection.
Definition: parser.hpp:42
#define likely(expr)
Offer a hint (positive) to the pipeline branch predictor.
Definition: config.hpp:344
unsigned int u32
32-bit unsigned integer
Definition: config.hpp:102
#define unlikely(expr)
Offer a hint (negative) to the pipeline branch predictor.
Definition: config.hpp:349

+ Here is the call graph for this function: