libcsdbg  1.28
C++ exception (and generic) stack trace debug library
style * csdbg::parser::add_style ( const i8 nm,
color_t  fg,
color_t  bg,
attrset_t  set 
)
virtual

Add a style to the parser/highlighter.

Parameters
[in]nmthe style name
[in]fgthe foreground color
[in]bgthe background color
[in]setthe text formatting attributes
Returns
the new style (heap allocated)
Exceptions
std::bad_alloc
csdbg::exception

Definition at line 437 of file parser.cpp.

References m_styles.

Referenced by on_lib_load().

438 {
439  style *retval = NULL;
440  try {
441  retval = new style(nm, fg, bg, set);
442  m_styles->add(retval);
443  return retval;
444  }
445 
446  catch (...) {
447  delete retval;
448  throw;
449  }
450 }
virtual string & set(const i8 *,...)
Fill with a printf-style format C-string expanded with the values of a variable argument list...
Definition: string.cpp:271
chain< style > * m_styles
VT100 style collection.
Definition: parser.hpp:44

+ Here is the caller graph for this function: