libcsdbg  1.28
C++ exception (and generic) stack trace debug library
chain< string > * csdbg::parser::get_dictionary_names ( ) const
virtual

Get all the registered dictionary names.

Returns
a list of names (heap allocated)
Exceptions
std::bad_alloc

Definition at line 398 of file parser.cpp.

References csdbg::chain< T >::add(), likely, m_dictionaries, and csdbg::string::string().

399 {
400  chain<string> *retval = new chain<string>;
401  string *nm = NULL;
402 
403  try {
404  for (u32 i = 0, sz = m_dictionaries->size(); likely(i < sz); i++) {
405  nm = new string(m_dictionaries->at(i)->name());
406  retval->add(nm);
407  nm = NULL;
408  }
409 
410  return retval;
411  }
412 
413  catch (...) {
414  delete retval;
415  delete nm;
416  throw;
417  }
418 }
chain< dictionary > * m_dictionaries
Dictionary collection.
Definition: parser.hpp:42
string(u32=0)
Object constructor.
Definition: string.cpp:127
#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

+ Here is the call graph for this function: