本文整理汇总了C++中Symbol::c方法的典型用法代码示例。如果您正苦于以下问题:C++ Symbol::c方法的具体用法?C++ Symbol::c怎么用?C++ Symbol::c使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symbol
的用法示例。
在下文中一共展示了Symbol::c方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TestSingO
TestSingO(Symbol ty="TestSingO")
: callCnt_(0)
, typid_(ty)
, msg_("%s::doIt() call=%d\n")
{
TRACE (test, "ctor %s", typid_.c());
}
示例2: err_pre
/** @param name to use in log and error messages
* @note does error handling, but delegates the actual
* execution to the protected (subclass) member */
ExecResult
HandlingPattern::invoke (CommandImpl& command, Symbol name) const
{
TRACE (proc_dbg, "invoking %s...", name.c());
static format err_pre ("Error state detected, %s *NOT* invoked.");
static format err_post ("Error state after %s invocation.");
static format err_fatal ("Execution of %s raised unknown error.");
try
{
Symbol errID_pre = lumiera_error();
if (errID_pre)
return ExecResult (error::Logic (str (err_pre % command), errID_pre));
// execute or undo it...
perform (command);
Symbol errID = lumiera_error();
if (errID)
return ExecResult (error::State (str (err_post % command),errID));
else
return ExecResult();
}
catch (lumiera::Error& problem)
{
Symbol errID = lumiera_error();
WARN (command, "Invocation of %s failed: %s", name.c(), problem.what());
TRACE (proc_dbg, "Error flag was: %s", errID.c());
return ExecResult (problem);
}
catch (std::exception& library_problem)
{
Symbol errID = lumiera_error();
WARN (command, "Invocation of %s failed: %s", name.c(), library_problem.what());
TRACE (proc_dbg, "Error flag was: %s", errID.c());
return ExecResult (error::External (library_problem));
}
catch (...)
{
Symbol errID = lumiera_error();
ERROR (command, "Invocation of %s failed with unknown exception; error flag is: %s", name.c(), errID.c());
throw error::Fatal (str (err_fatal % command), errID);
}
}
示例3: TRACE
virtual
~TestSingO()
{
TRACE (test, "dtor %s", typid_.c());
}