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

Get all the registered style names.

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

Definition at line 537 of file parser.cpp.

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

538 {
539  chain<string> *retval = new chain<string>;
540  string *nm = NULL;
541 
542  try {
543  for (u32 i = 0, sz = m_styles->size(); likely(i < sz); i++) {
544  nm = new string(m_styles->at(i)->name());
545  retval->add(nm);
546  nm = NULL;
547  }
548 
549  return retval;
550  }
551 
552  catch (...) {
553  delete retval;
554  delete nm;
555  throw;
556  }
557 }
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
chain< style > * m_styles
VT100 style collection.
Definition: parser.hpp:44

+ Here is the call graph for this function: